Revision 2163,
1006 bytes
checked in by probe, 35 years ago
(diff) |
*** empty log message ***
|
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: probe $ |
---|
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.2 1989-10-20 10:22:36 probe Exp $"; |
---|
13 | #endif lint |
---|
14 | |
---|
15 | #include "gethost_err.h" |
---|
16 | #include <netdb.h> |
---|
17 | |
---|
18 | extern int h_errno; |
---|
19 | |
---|
20 | typedef int Code_t; |
---|
21 | |
---|
22 | Code_t gethost_error() |
---|
23 | { |
---|
24 | init_ghs_err_tbl(); |
---|
25 | |
---|
26 | switch(h_errno) { |
---|
27 | case HOST_NOT_FOUND: |
---|
28 | return(GETHOST_HOST_NOT_FOUND); |
---|
29 | case TRY_AGAIN: |
---|
30 | return(GETHOST_TRY_AGAIN); |
---|
31 | case NO_RECOVERY: |
---|
32 | return(GETHOST_NO_RECOVERY); |
---|
33 | case NO_ADDRESS: |
---|
34 | return(GETHOST_NO_ADDRESS); |
---|
35 | default: |
---|
36 | return(GETHOST_INVALID); |
---|
37 | } |
---|
38 | } |
---|
39 | |
---|
Note: See
TracBrowser
for help on using the repository browser.