00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef INADDR_ANY
00012 #define INADDR_ANY ((unsigned long) 0)
00013 #endif
00014
00015
00016 #ifndef HOSTENT_DEFINED
00017 #define HOSTENT_DEFINED
00018 struct hostent
00019 {
00020 char *h_name;
00021 char **h_aliases;
00022 int h_addrtype;
00023 int h_length;
00024 char **h_addr_list;
00025 #ifndef h_addr
00026 #define h_addr h_addr_list[0]
00027 #endif
00028 };
00029 #endif
00030
00031
00032
00033
00034 #ifndef IN_ADDR_DEFINED
00035 #define IN_ADDR_DEFINED
00036 struct in_addr
00037 {
00038 union
00039 {
00040 struct
00041 {
00042 unsigned char s_b1, s_b2, s_b3, s_b4;
00043 }
00044 S_un_b;
00045 struct
00046 {
00047 unsigned short s_w1, s_w2;
00048 }
00049 S_un_w;
00050 unsigned long S_addr;
00051 }
00052 S_un;
00053 #define s_addr S_un.S_addr
00054 #define s_host S_un.S_un_b.s_b2
00055 #define s_net S_un.S_un_b.s_b1
00056 #define s_imp S_un.S_un_w.s_w2
00057 #define s_impno S_un.S_un_b.s_b4
00058 #define s_lh S_un.S_un_b.s_b3
00059 };
00060 #endif
00061
00062
00063
00064
00065
00066 #ifndef SOCKADDR_DEFINED
00067 #define SOCKADDR_DEFINED
00068 struct sockaddr
00069 {
00070 unsigned short sa_family;
00071 char sa_data[14];
00072 };
00073 #endif
00074
00075
00076
00077
00078
00079 #ifndef SOCKADDR_IN_DEFINED
00080 #define SOCKADDR_IN_DEFINED
00081 struct sockaddr_in
00082 {
00083 short sin_family;
00084 unsigned short sin_port;
00085 struct in_addr sin_addr;
00086 char sin_zero[8];
00087 };
00088 #endif
00089
00090
00091
00092
00093 #ifndef TIMEVAL_DEFINED
00094 #define TIMEVAL_DEFINED
00095 struct timeval
00096 {
00097 long tv_sec;
00098 long tv_usec;
00099 };
00100 #endif
00101
00102 #ifndef IOVEC_DEFINED
00103 #define IOVEC_DEFINED
00104 struct iovec
00105 {
00106 char RCS_FAR *iov_base;
00107 int iov_len;
00108 };
00109 typedef struct iovec iovec_t;
00110 #endif
00111
00112 #ifndef MSGHDR_DEFINED
00113 #define MSGHDR_DEFINED
00114
00115
00116
00117 struct msghdr
00118 {
00119 char RCS_FAR *msg_name;
00120 int msg_namelen;
00121 struct iovec RCS_FAR *msg_iov;
00122 int msg_iovlen;
00123 char RCS_FAR *msg_accrights;
00124 int msg_accrightslen;
00125 };
00126 #endif
00127
00128 #ifdef _WINDOWS
00129
00130
00131 #ifndef HINSTANCE_ERROR
00132 #define HINSTANCE_ERROR (32)
00133 #endif