Changeset 183 for trunk/src/emx/include/netdb.h
- Timestamp:
- May 19, 2003, 4:41:00 AM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/include/netdb.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r182 r183 1 1 /*- Modified for emx by hv and em 1994-1997 2 *- Modified for gcc by bird 2003 2 3 * 3 4 * Copyright (c) 1980, 1983, 1988 Regents of the University of California. … … 33 34 * 34 35 * from: @(#)netdb.h 5.15 (Berkeley) 4/3/91 35 * netdb.h,v 1. 1 2003/04/16 15:53:07bird Exp36 * netdb.h,v 1.2 2003/05/19 02:41:00 bird Exp 36 37 */ 37 38 38 39 #ifndef _NETDB_H_ 39 40 #define _NETDB_H_ 41 #ifdef TCPV40HDRS 42 #define __NETDB_32H 43 #endif 40 44 41 45 #if defined (__cplusplus) 42 46 extern "C" { 43 47 #endif 48 49 /* toolkit compatibility - start */ 50 #include <sys/param.h> 51 #include <sys/cdefs.h> 52 /* toolkit compatibility - end */ 44 53 45 54 #ifndef _EMX_TCPIP … … 54 63 #endif 55 64 56 extern int h_errno; 57 58 #define _PATH_HEQUIV "/tcpip/etc/hosts.equiv" 59 #define _PATH_HOSTS "/tcpip/etc/hosts" 60 #define _PATH_NETWORKS "/tcpip/etc/networks" 61 #define _PATH_PROTOCOLS "/tcpip/etc/protocols" 62 #define _PATH_SERVICES "/tcpip/etc/services" 65 66 #define _PATH_HEQUIV "/mptn/etc/hosts.equiv" 67 #define _PATH_HOSTS "/mptn/etc/hosts" 68 #define _PATH_NETWORKS "/mptn/etc/networks" 69 #define _PATH_PROTOCOLS "/mptn/etc/protocols" 70 #define _PATH_SERVICES "/mptn/etc/services" 71 72 #ifdef TCPV40HDRS 73 #define h_errno (tcp_h_errno()) /* __MT__ safe */ 74 #else 75 #define h_errno (*tcp_h_errno1()) /* __MT__ safe */ 76 #endif 63 77 64 78 /* … … 104 118 * (left in extern int h_errno). 105 119 */ 106 #if 0 107 #define h_errno (tcp_h_errno()) /* thread safe */ 120 #ifndef TCPV40HDRS 121 #define NETDB_INTERNAL -1 /* see errno */ 122 #define NETDB_SUCCESS 0 /* no problem */ 108 123 #endif 109 124 #define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */ … … 113 128 #define NO_ADDRESS NO_DATA /* no address, look for MX record */ 114 129 115 int gethostname (char *, int); 116 void endhostent (void); 117 void endnetent (void); 118 void endprotoent (void); 119 void endservent (void); 120 struct hostent *gethostbyaddr (__const__ char *, int, int); 121 struct hostent *gethostbyname (__const__ char *); 122 struct hostent *gethostent (void); 123 struct netent *getnetbyaddr (u_long, int); 124 struct netent *getnetbyname (__const__ char *); 125 struct netent *getnetent (void); 126 struct protoent *getprotobyname (__const__ char *); 127 struct protoent *getprotobynumber (int); 128 struct protoent *getprotoent (void); 129 struct servent *getservbyname (__const__ char *, __const__ char *); 130 struct servent *getservbyport (int, __const__ char *); 131 struct servent *getservent (void); 132 void herror (__const__ char *); 133 void sethostent (int); 134 void setnetent (int); 135 void setprotoent (int); 136 void setservent (int); 137 138 #ifdef NETDB_IBM_ADDENDUM 130 131 #ifdef TCPV40HDRS 132 #include <stdio.h> 133 #include <string.h> 134 #include <netinet\in.h> 139 135 140 136 /* IBM addendum structures and functions */ … … 144 140 #define _MAXLINELEN 1024 145 141 146 /* this is the internally used data structure to which pointers of 142 /* this is the internally used data structure to which pointers of 147 143 * struct hostent ponit to, after gethostbyname_r/gethostbyaddr_r were 148 144 * called. ATTENTION EMX: The component _opaque_ is a pointer to a data … … 159 155 int stayopen; /* AIX addon */ 160 156 u_long host_addresses[_MAXADDRS]; /* Actual Addresses. */ 161 }; 157 }; 162 158 163 159 struct servent_data { … … 167 163 int _serv_stayopen; 168 164 }; 169 170 int gethostbyname_r(char*, struct hostent*, struct hostent_data*); 171 int gethostbyaddr_r(char*, int, int, struct hostent*, struct hostent_data*); 172 int getservbyname_r(char*, char*, struct servent*, struct servent_data*); 173 struct hostent *_gethtbyname(char*); 174 struct hostent *_gethtbyaddr(char*, int, int); 175 int tcp_h_errno(void); /* thread safe h_errno */ 176 177 #endif /* NETDB_IBM_ADDENDUM */ 165 #endif 166 167 168 /* BSD */ 169 int _System gethostname( char *, int ); 170 struct hostent * _System gethostbyname( __const__ char * ); 171 struct hostent * _System gethostbyaddr( __const__ char *, int, int ); 172 struct netent * _System getnetbyname( __const__ char * ); 173 struct netent * _System getnetbyaddr( unsigned long, int ); 174 struct servent * _System getservbyname( __const__ char *, char * ); 175 struct servent * _System getservbyport( int, __const__ char * ); 176 struct servent * _System getservent( void ); 177 struct protoent * _System getprotobyname( __const__ char * ); 178 struct protoent * _System getprotobynumber( int ); 179 void _System sethostent( int ); 180 struct hostent * _System gethostent( void ); 181 void _System endhostent(void); 182 void _System setnetent( int ); 183 struct netent * _System getnetent( void ); 184 void _System endnetent(void); 185 void _System setprotoent( int ); 186 struct protoent * _System getprotoent( void ); 187 void _System endprotoent(void); 188 void _System setservent( int ); 189 struct servent * _System getservent( void ); 190 void _System endservent(void); 191 #ifndef TCPV40HDRS 192 struct hostent * _System gethostbyname2( __const__ char *, int ); 193 #endif 194 195 196 /* OS2 Additions */ 197 #ifdef TCPV40HDRS 198 int _System tcp_h_errno(void); 199 struct hostent * _System Rgethostbyname(char *); /* Socks additions */ 200 #else 201 const char * _System hstrerror(int); 202 /* void _System sethostfile(const char *); */ 203 int * _System tcp_h_errno1(void); 204 #endif 205 206 /* EMX/BSD additions. */ 207 void herror (__const__ char *); 208 209 /* EMX/BSD stuff which isn't implemeneted */ 210 #ifndef TCPV40HDRS 211 struct hostent_data; 212 struct servent_data; 213 #endif 214 int gethostbyname_r(char*, struct hostent*, struct hostent_data*); 215 int gethostbyaddr_r(char*, int, int, struct hostent*, struct hostent_data*); 216 int getservbyname_r(char*, char*, struct servent*, struct servent_data*); 217 struct hostent * _gethtbyname(char*); 218 struct hostent * _gethtbyaddr(char*, int, int); 219 178 220 179 221 #ifdef __RSXNT__ … … 187 229 188 230 #endif /* !_NETDB_H_ */ 231 -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.