Revision 1484,
987 bytes
checked in by eichin, 36 years ago
(diff) |
Initial revision
|
Line | |
---|
1 | /* This file is part of the Project Athena Global Message System. |
---|
2 | * Created by: Mark W. Eichin <eichin@athena.mit.edu> |
---|
3 | * $Source: /afs/dev.mit.edu/source/repository/athena/bin/gms/gethost_errors.c,v $ |
---|
4 | * $Author: eichin $ |
---|
5 | * |
---|
6 | * Copyright (c) 1988 by the Massachusetts Institute of Technology. |
---|
7 | * For copying and distribution information, see the file |
---|
8 | * "mit-copyright.h". |
---|
9 | */ |
---|
10 | #include <mit-copyright.h> |
---|
11 | #ifndef lint |
---|
12 | static char rcsid_gethost_errors_c[] = "$Header: /afs/dev.mit.edu/source/repository/athena/bin/gms/gethost_errors.c,v 1.1 1988-09-26 15:37:33 eichin Exp $"; |
---|
13 | #endif lint |
---|
14 | |
---|
15 | #include "gethost_err.h" |
---|
16 | #include <netdb.h> |
---|
17 | |
---|
18 | typedef int Code_t; |
---|
19 | |
---|
20 | Code_t gethost_error() |
---|
21 | { |
---|
22 | init_ghs_err_tbl(); |
---|
23 | |
---|
24 | switch(h_errno) { |
---|
25 | case HOST_NOT_FOUND: |
---|
26 | return(GETHOST_HOST_NOT_FOUND); |
---|
27 | case TRY_AGAIN: |
---|
28 | return(GETHOST_TRY_AGAIN); |
---|
29 | case NO_RECOVERY: |
---|
30 | return(GETHOST_NO_RECOVERY); |
---|
31 | case NO_ADDRESS: |
---|
32 | return(GETHOST_NO_ADDRESS); |
---|
33 | default: |
---|
34 | return(GETHOST_INVALID); |
---|
35 | } |
---|
36 | } |
---|
37 | |
---|
Note: See
TracBrowser
for help on using the repository browser.