Changeset 183 for trunk/src/emx/include/netinet
- Timestamp:
- May 19, 2003, 4:41:00 AM (22 years ago)
- Location:
- trunk/src/emx/include/netinet
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/include/netinet/icmp_var.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r182 r183 1 /* 1 /* Modified for gcc/os2 by bird 2003 2 * 2 3 * Copyright (c) 1982, 1986, 1993 3 4 * The Regents of the University of California. All rights reserved. … … 49 50 */ 50 51 struct icmpstat { 52 #if 0 /* OS2 is slightly different */ 51 53 /* statistics related to icmp packets generated */ 52 54 u_long icps_error; /* # of calls to icmp_error */ … … 61 63 u_long icps_reflect; /* number of responses */ 62 64 u_long icps_inhist[ICMP_MAXTYPE + 1]; 65 #else /* OS2: short not longs */ 66 u_short icps_error; /* # of calls to icmp_error */ 67 u_short icps_oldshort; /* no error 'cuz old ip too short */ 68 u_short icps_oldicmp; /* no error 'cuz old was icmp */ 69 u_short icps_outhist[ICMP_MAXTYPE + 1]; 70 /* statistics related to input messages processed */ 71 u_short icps_badcode; /* icmp_code out of range */ 72 u_short icps_tooshort; /* packet < ICMP_MINLEN */ 73 u_short icps_checksum; /* bad checksum */ 74 u_short icps_badlen; /* calculated bound mismatch */ 75 u_short icps_reflect; /* number of responses */ 76 u_short icps_inhist[ICMP_MAXTYPE + 1]; 77 #endif 63 78 #if 0 /* not on OS/2 */ 64 79 u_long icps_bmcastecho; /* b/mcast echo requests dropped */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/netinet/if_ether.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r182 r183 1 1 /* Modified for emx by hv 1994,1996 2 * Modified for gcc by bird 2003 2 3 * 3 4 * Copyright (c) 1982, 1986 Regents of the University of California. … … 39 40 #define _NETINET_IF_ETHER_H_ 40 41 41 /* 42 * Ethernet address - 6 octets 43 * this is only used by the ethers(3) functions. 44 */ 45 struct ether_addr { 46 u_char ether_addr_octet[6]; 47 }; 42 #ifdef TCPV40HDRS 48 43 49 44 /* … … 57 52 58 53 #define ETHERTYPE_PUP 0x0200 /* PUP protocol */ 59 /* the IBM header corrects the following to 0x608 for OS/2 but I believe 60 * this is just a dirty hack 61 */ 54 #define ETHERTYPE_IP 0x0800 /* IP protocol */ 55 #ifdef OS2 /* hv thinks this is just a dirty hack, but we must include it. */ 56 #define ETHERTYPE_ARP 0x0608 /* address resolution protocol */ 57 #else 62 58 #define ETHERTYPE_ARP 0x0806 /* address resolution protocol */ 63 #define ETHERTYPE_IP 0x0800 /* IP protocol */ 64 #define ETHERTYPE_REVARP 0x8035 /* reverse addr resolution protocol */ 59 #endif 65 60 66 61 /* … … 79 74 * 80 75 * See RFC 826 for protocol description. Structure below is adapted 81 * to resolving internet addresses. Field names used correspond to 76 * to resolving internet addresses. Field names used correspond to 82 77 * RFC 826. 83 78 */ … … 113 108 * Internet to ethernet address resolution table. 114 109 */ 115 #ifdef TCPIPV4116 110 #pragma pack(1) 117 #else118 #pragma pack(4)119 #endif120 111 struct arptab { 121 112 struct in_addr at_iaddr; /* internet address */ … … 127 118 u_short at_rcf; /* token ring routing control field */ 128 119 u_short at_rseg[8]; /* token ring routing segments */ 120 #ifdef OS2 129 121 u_long at_millisec; /* TOD millsecons of last update */ 130 #ifdef TCPIPV4131 122 short at_interface; /* interface index */ 132 #else133 int at_interface; /* interface index */134 123 #endif 135 124 }; 136 125 #pragma pack() 137 126 127 128 #else /*TCPV40HDRS*/ 129 130 131 #pragma pack(1) 132 struct sockaddr_inarp { 133 u_char sin_len; 134 u_char sin_family; 135 u_short sin_port; 136 struct in_addr sin_addr; 137 struct in_addr sin_srcaddr; 138 u_short sin_tos; 139 u_short sin_other; 140 #define SIN_PROXY 1 141 }; 142 struct oarptab { 143 struct in_addr at_iaddr; /* internet address */ 144 u_char at_enaddr[6]; /* ethernet address */ 145 u_char at_timer; /* minutes since last reference */ 146 u_char at_flags; /* flags */ 147 void * at_hold; 148 u_short at_rcf; /* token ring routing control field */ 149 u_short at_rseg[8]; /* token ring routing segments */ 150 u_long at_millisec; /* TOD milliseconds of last update */ 151 u_short at_interface; /* interface index */ 152 }; 153 #pragma pack() 154 155 /* 156 * IP and ethernet specific routing flags 157 */ 158 #define RTF_USETRAILERS RTF_PROTO1 /* use trailers */ 159 #define RTF_ANNOUNCE RTF_PROTO2 /* announce new arp entry */ 160 161 162 #endif /*TCPV40HDRS (else) */ 163 138 164 #endif /* !_NETINET_IF_ETHER_H_ */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/netinet/igmp.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r182 r183 1 1 /* Modified for emx by hv 1996 2 * Modified for gcc/os2 by bird 2003 2 3 * 3 4 * Copyright (c) 1988 Stephen Deering. … … 47 48 * IGMP packet format. 48 49 */ 50 #ifndef TCPV40HDRS 51 #pragma pack(1) 52 #endif 49 53 struct igmp { 50 54 u_char igmp_type; /* version & type of IGMP message */ … … 53 57 struct in_addr igmp_group; /* group address being reported */ 54 58 }; /* (zero for queries) */ 59 #ifndef TCPV40HDRS 60 #pragma pack() 61 #endif 55 62 56 63 #define IGMP_MINLEN 8 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/netinet/igmp_var.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r182 r183 1 /* 1 /* Modified for gcc/os2 by bird 2003 2 * 2 3 * Copyright (c) 1988 Stephen Deering. 3 4 * Copyright (c) 1992, 1993 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/netinet/in.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r182 r183 1 1 /* Modified for emx by hv and em 1994,1996 2 * Modified for gcc/os2 by bird 2003 2 3 * 3 4 * Copyright (c) 1982, 1986, 1990 Regents of the University of California. … … 66 67 #define IPPROTO_UDP 17 /* user datagram protocol */ 67 68 #define IPPROTO_IDP 22 /* xns idp */ 69 #ifndef TCPV40HDRS 68 70 #define IPPROTO_TP 29 /* tp-4 w/ class negotiation */ 69 71 #define IPPROTO_EON 80 /* ISO cnlp */ 72 #define IPPROTO_ENCAP 98 /* encapsulation header */ 73 #endif 70 74 71 75 #define IPPROTO_RAW 255 /* raw IP packet */ … … 80 84 * for servers, not necessarily privileged. 81 85 */ 86 #ifdef TCPV40HDRS 82 87 #define IPPORT_RESERVED 1024 83 88 #define IPPORT_USERRESERVED 5000 89 #else 90 /* Changing the ephemeral port #s as per Internet Assigned Numbers Authority's 91 * update as found in JUL '97. [Ref: http://www.isi.edu/div7/iana/descript/html] */ 92 #define IPPORT_RESERVED 49152 /* Old 1024. Changed as per IANA draft */ 93 #define IPPORT_USERRESERVED 65535 /* Old 5000. Changed as per IANA draft */ 94 #endif 95 96 #ifdef TCPV40HDRS 97 /* 98 * Link numbers 99 */ 100 #define IMPLINK_IP 155 101 #define IMPLINK_LOWEXPER 156 102 #define IMPLINK_HIGHEXPER 158 103 #endif 84 104 85 105 /* … … 113 133 114 134 #define IN_CLASSD(i) (((long)(i) & 0xf0000000) == 0xe0000000) 135 #ifdef TCPV40HDRS 136 #define IN_CLASSD_NET 0xffffffff 137 #define IN_CLASSD_HOST 0 138 #else 115 139 #define IN_CLASSD_NET 0xf0000000 /* These ones aren't really */ 140 #define IN_CLASSD_HOST 0x0fffffff /* routing needn't know. */ 141 #endif 116 142 #define IN_CLASSD_NSHIFT 28 /* net and host fields, but */ 117 #define IN_CLASSD_HOST 0x0fffffff /* routing needn't know. */118 143 #define IN_MULTICAST(i) IN_CLASSD(i) 119 144 145 #ifdef TCPV40HDRS 120 146 #define IN_EXPERIMENTAL(i) (((long)(i) & 0xe0000000) == 0xe0000000) 147 #else 148 #define IN_EXPERIMENTAL(i) (((long)(i) & 0xf0000000) == 0xe0000000) 149 #endif 121 150 #define IN_BADCLASS(i) (((long)(i) & 0xf0000000) == 0xf0000000) 122 151 123 152 #define INADDR_ANY (u_long)0x00000000 153 #ifndef TCPV40HDRS 124 154 #define INADDR_LOOPBACK (u_long)0x7f000001 155 #endif 125 156 #define INADDR_BROADCAST (u_long)0xffffffff /* must be masked */ 126 #ifndef KERNEL127 #define INADDR_NONE 0xffffffff /* -1 return */128 #endif129 157 130 158 #define INADDR_UNSPEC_GROUP (u_long)0xe0000000 /* 224.0.0.0 */ … … 132 160 #define INADDR_MAX_LOCAL_GROUP (u_long)0xe00000ff /* 224.0.0.255 */ 133 161 162 #ifndef KERNEL 163 #define INADDR_NONE 0xffffffff /* -1 return */ 164 #endif 165 134 166 #define IN_LOOPBACKNET 127 /* official! */ 135 167 136 /* 137 * Define a macro to stuff the loopback address into an Internet address 138 */ 139 #define IN_SET_LOOPBACK_ADDR(a) { \ 140 (a)->sin_addr.s_addr = htonl(INADDR_LOOPBACK); \ 141 (a)->sin_family = AF_INET; } 168 142 169 /* 143 170 * Socket address, internet style. 4.3BSD 144 171 */ 172 #ifdef TCPV40HDRS 145 173 struct sockaddr_in { 146 174 short sin_family; … … 149 177 char sin_zero[8]; 150 178 }; 179 #else 180 #pragma pack(1) 181 struct sockaddr_in { 182 u_char sin_len; 183 u_char sin_family; 184 u_short sin_port; 185 struct in_addr sin_addr; 186 char sin_zero[8]; 187 }; 188 #pragma pack() 189 #endif 151 190 152 191 /* … … 157 196 * (this gets put into the header proper). 158 197 */ 198 #ifndef TCPV40HDRS 199 #pragma pack(1) 200 #endif 159 201 struct ip_opts { 160 202 struct in_addr ip_dst; /* first hop, 0 w/o src rt */ 161 203 char ip_opts[40]; /* actually variable in size */ 162 204 }; 205 #ifndef TCPV40HDRS 206 #pragma pack() 207 #endif 163 208 164 209 /* … … 167 212 */ 168 213 #define IP_OPTIONS 1 /* buf/ip_opts; set/get IP options */ 169 170 214 #define IP_MULTICAST_IF 2 /* u_char; set/get IP mcast i/f */ 171 215 #define IP_MULTICAST_TTL 3 /* u_char; set/get IP mcast ttl */ … … 173 217 #define IP_ADD_MEMBERSHIP 5 /* ip_mreq; add IP group membership */ 174 218 #define IP_DROP_MEMBERSHIP 6 /* ip_mreq; drop IP group membership */ 175 176 #ifndef __EMX__ /* not supported so far */ 177 #define IP_HDRINCL 2 /* int; header is included with data */ 178 #define IP_TOS 3 /* int; IP type of service and preced */ 179 #define IP_TTL 4 /* int; IP time to live */ 180 #define IP_RECVOPTS 5 /* bool; receive all IP opts w/dgram */ 181 #define IP_RECVRETOPTS 6 /* bool; receive IP opts for response */ 182 #define IP_RECVDSTADDR 7 /* bool; receive IP dst addr w/dgram */ 183 #define IP_RETOPTS 8 /* ip_opts; set/get IP options */ 184 #endif 185 219 #ifndef TCPV40HDRS 220 #define IP_HDRINCL 7 /* int; header is included with data */ 221 #define IP_TOS 8 /* int; IP type of service and preced. */ 222 #define IP_TTL 9 /* int; IP time to live */ 223 #define IP_RECVOPTS 10 /* bool; receive all IP opts w/dgram */ 224 #define IP_RECVRETOPTS 11 /* bool; receive IP opts for response */ 225 #define IP_RECVDSTADDR 12 /* bool; receive IP dst addr w/dgram */ 226 #define IP_RETOPTS 13 /* ip_opts; set/get IP options */ 227 #define IP_RECVTRRI 14 /* bool; receive token ring routing inf */ 228 #endif 229 230 /* 231 * Defaults and limits for options 232 */ 186 233 #define IP_DEFAULT_MULTICAST_TTL 1 /* normally limit m'casts to 1 hop */ 187 234 #define IP_DEFAULT_MULTICAST_LOOP 1 /* normally hear sends if a member */ 188 235 #define IP_MAX_MEMBERSHIPS 20 /* per socket; must fit in one mbuf */ 236 #ifndef TCPV40HDRS 237 #define MAX_IN_MULTI 16*IP_MAX_MEMBERSHIPS /* 320 max per os2 */ 238 extern u_short CntInMulti; 239 #endif 189 240 190 241 /* 191 242 * Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. 192 243 */ 244 #ifndef TCPV40HDRS 245 #pragma pack(1) 246 #endif 193 247 struct ip_mreq { 194 248 struct in_addr imr_multiaddr; /* IP multicast address of group */ 195 249 struct in_addr imr_interface; /* local IP address of interface */ 196 250 }; 197 198 /* prototypes for functions in inet(3) */ 199 extern u_long inet_addr(__const__ char*); 200 extern struct in_addr inet_makeaddr(u_long, u_long); 201 extern u_long inet_network(__const__ char*); 202 extern char *inet_ntoa(struct in_addr); 203 extern u_long inet_netof(struct in_addr); 204 extern u_long inet_lnaof(struct in_addr); 251 #ifndef TCPV40HDRS 252 #pragma pack() 253 #endif 254 255 #ifdef TCPV40HDRS 256 /* for functions */ 257 #include <arpa/inet.h> 258 259 #else 260 261 /* 262 * Definitions for inet sysctl operations. 263 * 264 * Third level is protocol number. 265 * Fourth level is desired variable within that protocol. 266 */ 267 #define IPPROTO_MAXID (IPPROTO_IDP + 1) /* don't list to IPPROTO_MAX */ 268 269 #define CTL_IPPROTO_NAMES { \ 270 { "ip", CTLTYPE_NODE }, \ 271 { "icmp", CTLTYPE_NODE }, \ 272 { "igmp", CTLTYPE_NODE }, \ 273 { "ggp", CTLTYPE_NODE }, \ 274 { 0, 0 }, \ 275 { 0, 0 }, \ 276 { "tcp", CTLTYPE_NODE }, \ 277 { 0, 0 }, \ 278 { "egp", CTLTYPE_NODE }, \ 279 { 0, 0 }, \ 280 { 0, 0 }, \ 281 { 0, 0 }, \ 282 { "pup", CTLTYPE_NODE }, \ 283 { 0, 0 }, \ 284 { 0, 0 }, \ 285 { 0, 0 }, \ 286 { 0, 0 }, \ 287 { "udp", CTLTYPE_NODE }, \ 288 { 0, 0 }, \ 289 { 0, 0 }, \ 290 { 0, 0 }, \ 291 { 0, 0 }, \ 292 { "idp", CTLTYPE_NODE }, \ 293 } 294 #endif /*TCPV40HDRS (else) */ 205 295 206 296 #if defined (__cplusplus) -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/netinet/ip.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r182 r183 1 1 /* Modified for emx by hv 1994,1996 2 * Modified for gcc/os2 by bird 2003 2 3 * 3 4 * Copyright (c) 1982, 1986 Regents of the University of California. … … 39 40 #define _NETINET_IP_H_ 40 41 41 #ifdef __EMX__42 42 #include <machine/endian.h> 43 #endif /* __EMX__ */44 43 45 44 /* … … 56 55 * against negative integers quite easily, and fail in subtle ways. 57 56 */ 57 #pragma pack(1) 58 58 struct ip { 59 59 #if BYTE_ORDER == LITTLE_ENDIAN … … 71 71 #define IP_DF 0x4000 /* dont fragment flag */ 72 72 #define IP_MF 0x2000 /* more fragments flag */ 73 #ifndef TCPV40HDRS 74 #define IP_OFFMASK 0x1fff /* mask for fragmenting bits */ 75 #endif 73 76 u_char ip_ttl; /* time to live */ 74 77 u_char ip_p; /* protocol */ … … 76 79 struct in_addr ip_src,ip_dst; /* source and dest address */ 77 80 }; 78 81 #pragma pack() 82 83 #ifdef TCPV40HDRS 79 84 #define IP_MAXPACKET 32767 /* OS2 maximum packet size */ 85 #else 86 #define IP_MAXPACKET 65535 /* maximum packet size */ 87 #endif 80 88 81 89 /* … … 96 104 #define IPTOS_PREC_IMMEDIATE 0x40 97 105 #define IPTOS_PREC_PRIORITY 0x20 106 #ifdef TCPV40HDRS 98 107 #define IPTOS_PREC_ROUTINE 0x10 108 #else 109 #define IPTOS_PREC_ROUTINE 0x00 110 #endif 99 111 100 112 /* 101 113 * Definitions for options. 102 114 */ 115 #ifndef TCPV40HDRS 116 #define IPOPT_COPY 0x80 117 #endif 103 118 #define IPOPT_COPIED(o) ((o)&0x80) 104 119 #define IPOPT_CLASS(o) ((o)&0x60) … … 119 134 #define IPOPT_SATID 136 /* satnet id */ 120 135 #define IPOPT_SSRR 137 /* strict source route */ 136 #ifndef TCPV40HDRS 137 #define IPOPT_RALERT 148 /* router alert */ 138 #endif 121 139 122 140 /* … … 131 149 * Time stamp option structure. 132 150 */ 151 #pragma pack(1) 133 152 struct ip_timestamp { 134 153 u_char ipt_code; /* IPOPT_TS */ … … 151 170 } ipt_timestamp; 152 171 }; 172 #pragma pack() 153 173 154 174 /* flag bits for ipt_flg */ 155 175 #define IPOPT_TS_TSONLY 0 /* timestamps only */ 156 176 #define IPOPT_TS_TSANDADDR 1 /* timestamps and addresses */ 177 #ifdef TCPV40HDRS 178 #define IPOPT_TS_PRESPEC 2 /* specified modules only */ 179 #else 157 180 #define IPOPT_TS_PRESPEC 3 /* specified modules only */ 181 #endif 182 158 183 159 184 /* bits for security (not byte swapped) */ … … 170 195 */ 171 196 #define MAXTTL 255 /* maximum time to live (seconds) */ 197 /* This is being defined as TCP_TTL, UDP_TTL etc in tcp_time.h 198 #define IPDEFTTL 64 199 */ 172 200 #define IPFRAGTTL 60 /* time to live for frags, slowhz */ 173 201 #define IPTTLDEC 1 /* subtracted when forwarding */ … … 175 203 #define IP_MSS 576 /* default maximum segment size */ 176 204 177 /* hv: this is a new data structure in TCPIPV4; consult IBM's doc for 178 * details (provided they tell anything about it at all) 179 */ 180 #ifdef TCPIPV4 205 #ifdef TCPV40HDRS 181 206 struct ipstat { 182 207 long ips_total; … … 204 229 long ips_ipInUnknownProtos; 205 230 }; 206 #endif 231 #endif /* TCPV40HDRS */ 232 207 233 208 234 #endif /* !_NETINET_IP_H_ */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/netinet/ip_icmp.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r182 r183 1 1 /* Modified for emx by hv 1994 2 * Modified for gcc/os2 by bird 2003 2 3 * 3 4 * Copyright (c) 1982, 1986 Regents of the University of California. … … 47 48 * Structure of an icmp header. 48 49 */ 50 #pragma pack(1) 49 51 struct icmp { 50 52 u_char icmp_type; /* type of message, see below */ … … 59 61 } ih_idseq; 60 62 int ih_void; 63 #ifndef TCPV40HDRS 64 65 /* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */ 66 struct ih_pmtu { 67 n_short ipm_void; 68 n_short ipm_nextmtu; 69 } ih_pmtu; 70 #endif 61 71 } icmp_hun; 62 72 #define icmp_pptr icmp_hun.ih_pptr … … 65 75 #define icmp_seq icmp_hun.ih_idseq.icd_seq 66 76 #define icmp_void icmp_hun.ih_void 77 #ifndef TCPV40HDRS 78 #define icmp_pmvoid icmp_hun.ih_pmtu.ipm_void 79 #define icmp_nextmtu icmp_hun.ih_pmtu.ipm_nextmtu 80 #endif 67 81 union { 68 82 struct id_ts { … … 85 99 #define icmp_data icmp_dun.id_data 86 100 }; 101 #pragma pack() 87 102 88 103 /* … … 112 127 #define ICMP_UNREACH_NEEDFRAG 4 /* IP_DF caused drop */ 113 128 #define ICMP_UNREACH_SRCFAIL 5 /* src route failed */ 129 #ifndef TCPV40HDRS 130 #define ICMP_UNREACH_NET_UNKNOWN 6 /* unknown net */ 131 #define ICMP_UNREACH_HOST_UNKNOWN 7 /* unknown host */ 132 #define ICMP_UNREACH_ISOLATED 8 /* src host isolated */ 133 #define ICMP_UNREACH_NET_PROHIB 9 /* prohibited access */ 134 #define ICMP_UNREACH_HOST_PROHIB 10 /* ditto */ 135 #define ICMP_UNREACH_TOSNET 11 /* bad tos for net */ 136 #define ICMP_UNREACH_TOSHOST 12 /* bad tos for host */ 137 #endif 114 138 #define ICMP_SOURCEQUENCH 4 /* packet lost, slow down */ 115 139 #define ICMP_REDIRECT 5 /* shorter route, codes: */ … … 119 143 #define ICMP_REDIRECT_TOSHOST 3 /* for tos and host */ 120 144 #define ICMP_ECHO 8 /* echo service */ 145 #ifndef TCPV40HDRS 146 #define ICMP_ROUTERADVERT 9 /* router advertisement */ 147 #define ICMP_ROUTERSOLICIT 10 /* router solicitation */ 148 #endif 121 149 #define ICMP_TIMXCEED 11 /* time exceeded, code: */ 122 150 #define ICMP_TIMXCEED_INTRANS 0 /* ttl==0 in transit */ 123 151 #define ICMP_TIMXCEED_REASS 1 /* ttl==0 in reass */ 124 152 #define ICMP_PARAMPROB 12 /* ip header bad */ 153 #ifndef TCPV40HDRS 154 #define ICMP_PARAMPROB_OPTABSENT 1 /* req. opt. absent */ 155 #endif 125 156 #define ICMP_TSTAMP 13 /* timestamp request */ 126 157 #define ICMP_TSTAMPREPLY 14 /* timestamp reply */ … … 132 163 #define ICMP_MAXTYPE 18 133 164 165 #ifdef TCPV40HDRS 134 166 #define ICMP_INFOTYPE(type) \ 135 167 ((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \ … … 137 169 (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \ 138 170 (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY) 139 140 /* hv: this is a new TCPIPV4 data structure. Consult IBM's doc on that. */ 141 #ifdef TCPIPV4 171 #else 172 #define ICMP_INFOTYPE(type) \ 173 ((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \ 174 (type) == ICMP_ROUTERADVERT || (type) == ICMP_ROUTERSOLICIT || \ 175 (type) == ICMP_TSTAMP || (type) == ICMP_TSTAMPREPLY || \ 176 (type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \ 177 (type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY) 178 #endif 179 180 #ifdef TCPV40HDRS 181 #pragma pack(1) 142 182 struct icmpstat { 183 /* statistics related to icmp packets generated */ 143 184 short icps_error; 144 185 short icps_oldshort; 145 186 short icps_oldicmp; 146 187 short icps_outhist[ICMP_MAXTYPE + 1]; 188 /* statistics related to input messages processed */ 147 189 short icps_badcode; 148 190 short icps_tooshort; … … 177 219 u_long icps_OutAddrMaskReps; 178 220 }; 221 #pragma pack() 179 222 #endif 180 223 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/netinet/ip_mroute.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r182 r183 59 59 * Multicast Routing set/getsockopt commands. 60 60 */ 61 #if 1 /* not on OS/2 - but let's include it anyway. */ 61 62 #define MRT_INIT 100 /* initialize forwarder */ 62 63 #define MRT_DONE 101 /* shut down forwarder */ 63 64 #define MRT_ADD_VIF 102 /* create virtual interface */ 64 65 #define MRT_DEL_VIF 103 /* delete virtual interface */ 65 #if 0 /* different on OS/2 */66 66 #define MRT_ADD_MFC 104 /* insert forwarding cache entry */ 67 67 #define MRT_DEL_MFC 105 /* delete forwarding cache entry */ 68 68 #define MRT_VERSION 106 /* get kernel version number */ 69 69 #define MRT_ASSERT 107 /* enable PIM assert processing */ 70 #if 0 70 71 #define GET_TIME(t) microtime(&t) 71 #else /* OS2: */ 72 #endif 73 #endif 74 75 76 #if 1 /* OS2 only? It's aliases of the above defs it seems... */ 77 /* 78 * DVMRP-specific setsockopt commands. 79 */ 80 #define DVMRP_INIT 100 81 #define DVMRP_DONE 101 82 #define DVMRP_ADD_VIF 102 83 #define DVMRP_DEL_VIF 103 72 84 #define DVMRP_ADD_LGRP 104 73 85 #define DVMRP_DEL_LGRP 105 … … 105 117 u_char vifc_flags; /* VIFF_ flags defined below */ 106 118 u_char vifc_threshold; /* min ttl required to forward on vif */ 119 #if 0 /* not on OS/2 */ 107 120 u_int vifc_rate_limit; /* max rate */ 121 #endif 108 122 struct in_addr vifc_lcl_addr; /* local interface address */ 109 123 struct in_addr vifc_rmt_addr; /* remote address (tunnels only) */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/netinet/ip_var.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r182 r183 90 90 #pragma pack() 91 91 92 #if 0 /* different/not on OS/2 */ 92 93 93 /* 94 94 * Structure stored in mbuf in inpcb.ip_options … … 97 97 * is in m_len. 98 98 */ 99 #define MAX_IPOPTLEN 40 100 #if 0 /* different/not on OS/2 */ 99 101 struct ipoption { 100 102 struct in_addr ipopt_dst; /* first-hop dst if source routed */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/netinet/tcp.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r182 r183 1 1 /* Modified for emx by hv 1996 2 * Modified for gcc/os2 by bird 2003 2 3 * 3 4 * Copyright (c) 1982, 1986 Regents of the University of California. … … 46 47 * Per RFC 793, September, 1981. 47 48 */ 49 #pragma pack(1) 48 50 struct tcphdr { 49 51 u_short th_sport; /* source port */ … … 51 53 tcp_seq th_seq; /* sequence number */ 52 54 tcp_seq th_ack; /* acknowledgement number */ 55 #ifdef TCPV40HDRS 56 #if BYTE_ORDER == LITTLE_ENDIAN 57 u_int th_x2:4, /* (unused) */ 58 th_off:4, /* data offset */ 59 th_flags:8, 60 th_win:16; 61 #endif 62 #if BYTE_ORDER == BIG_ENDIAN 63 u_int th_win:16, 64 th_flags:8, 65 th_off:4, /* data offset */ 66 th_x2:4; /* (unused) */ 67 #endif 68 #define TH_FIN 0x01 69 #define TH_SYN 0x02 70 #define TH_RST 0x04 71 #define TH_PUSH 0x08 72 #define TH_ACK 0x10 73 #define TH_URG 0x20 74 #else 53 75 #if BYTE_ORDER == LITTLE_ENDIAN 54 76 u_char th_x2:4, /* (unused) */ … … 67 89 #define TH_URG 0x20 68 90 u_short th_win; /* window */ 91 #endif 69 92 u_short th_sum; /* checksum */ 70 93 u_short th_urp; /* urgent pointer */ 71 94 }; 95 #pragma pack() 72 96 73 97 #define TCPOPT_EOL 0 74 98 #define TCPOPT_NOP 1 75 99 #define TCPOPT_MAXSEG 2 100 #ifndef TCPV40HDRS 101 #define TCPOLEN_MAXSEG 4 102 #define TCPOPT_WINDOW 3 103 #define TCPOLEN_WINDOW 3 104 #define TCPOPT_SACK_PERMITTED 4 /* Experimental */ 105 #define TCPOLEN_SACK_PERMITTED 2 106 #define TCPOPT_SACK 5 /* Experimental */ 107 #define TCPOPT_TIMESTAMP 8 108 #define TCPOLEN_TIMESTAMP 10 109 #define TCPOLEN_TSTAMP_APPA (TCPOLEN_TIMESTAMP+2) /* appendix A */ 110 111 #define TCPOPT_CC 11 /* CC options: RFC-1644 */ 112 #define TCPOPT_CCNEW 12 113 #define TCPOPT_CCECHO 13 114 #define TCPOLEN_CC 6 115 #define TCPOLEN_CC_APPA (TCPOLEN_CC+2) 116 #define TCPOPT_CC_HDR(ccopt) \ 117 (TCPOPT_NOP<<24|TCPOPT_NOP<<16|(ccopt)<<8|TCPOLEN_CC) 118 #define TTCP_CLIENT_SND_WND 4096 /* dflt send window of ttcp client */ 119 #define TCPOPT_TSTAMP_HDR \ 120 (TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP) 121 #endif /*!TCPV40HDRS*/ 76 122 77 123 /* … … 81 127 * This should be defined as MIN(512, IP_MSS - sizeof (struct tcpiphdr)). 82 128 */ 129 #ifdef TCPV40HDRS 130 #ifdef lint 131 #define TCP_MSS 536 132 #else 133 #ifndef IP_MSS 134 #define IP_MSS 576 135 #endif 136 #define TCP_MSS MIN(512, IP_MSS - 40) 137 #endif 138 #else /* TCPV40HDRS*/ 83 139 #define TCP_MSS 512 140 #endif 84 141 85 142 #define TCP_MAXWIN 65535 /* largest value for window */ 143 144 #ifndef TCPV40HDRS 145 #define TCP_MAX_WINSHIFT 14 /* maximum window shift */ 146 #endif 86 147 87 148 /* … … 90 151 #define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */ 91 152 #define TCP_MAXSEG 0x02 /* set maximum segment size */ 153 #ifndef TCPV40HDRS 154 #define TCP_MSL 0x03 /* MSL HACK */ 155 #define TCP_TIMESTMP 0x04 /* RFC 1323 (RTTM TimeStamp) */ 156 #define TCP_WINSCALE 0x05 /* RFC 1323 (Window Scale) */ 157 #define TCP_CC 0x06 /* RFC 1644 (Connection Count) */ 158 #ifdef VEGAS 159 #define TCP_TAHOE 3 160 #define TCP_RENO 4 161 #define TCP_VEGAS 5 162 #define TCP_VEGAS_SPIKE_ON 6 163 #define TCP_VEGAS_EXP_INC_OFF 7 164 #define TCP_VEGAS_CONG_DETECT_OFF 8 165 #define TCP_VEGAS_24 9 166 #define TCP_VEGAS_CONG_DETECT_PRED_ON 10 167 #endif 168 #endif /*!TCPV40HDS*/ 92 169 93 /* hv: this is a new data structure in TCPIPV4. */ 94 #ifdef TCPIPV4 170 #ifdef TCPV40HDRS 95 171 #include <netinet/tcp_var.h> 96 172 #endif -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/netinet/tcp_var.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r182 r183 1 1 /* Modified for emx by hv 1996 2 * 2 * 3 3 * Copyright (c) 1982, 1986 Regents of the University of California. 4 4 * All rights reserved. … … 44 44 * but that's inconvenient at the moment. 45 45 */ 46 #ifdef TCPIPCV447 46 struct tcpstat { 48 47 u_long tcps_connattempt; /* connections initiated */ … … 72 71 u_long tcps_sndwinup; /* window update-only packets sent */ 73 72 u_long tcps_sndctrl; /* control (SYN|FIN|RST) packets sent */ 73 u_long tcps_sndrst; /* RST packets sent, MIB II ... */ 74 74 75 75 u_long tcps_rcvtotal; /* total packets received */ … … 94 94 u_long tcps_rcvackbyte; /* bytes acked by rcvd acks */ 95 95 u_long tcps_rcvwinupd; /* rcvd window update packets */ 96 #ifndef TCPV40HDRS 97 u_long tcps_pawsdrop; /* segments dropped due to PAWS */ 98 u_long tcps_predack; /* times hdr predict ok for acks */ 99 u_long tcps_preddat; /* times hdr predict ok for data pkts*/ 100 u_long tcps_pcbcachemiss; 101 u_long tcps_persistdrop; /* timeout in persist state */ 102 u_long tcps_badsyn; /* bogus SYN, e.g. premature ACK */ 103 104 /* the fillowing 7 are for mtudisco and ttcp */ 105 106 u_long tcps_mturesent; /* resends due to MTU discovery */ 107 u_long tcps_cachedrtt; /* times cached RTT in route updated */ 108 u_long tcps_cachedrttvar; /* times cached rttvar updated */ 109 u_long tcps_cachedssthresh; /* times cached ssthresh updated */ 110 u_long tcps_usedrtt; /* times RTT initialized from route */ 111 u_long tcps_usedrttvar; /* times RTTVAR initialized from rt */ 112 u_long tcps_usedssthresh; /* times ssthresh initialized from rt*/ 113 #endif 96 114 }; 97 #endif 115 116 #ifndef TCPV40HDRS 117 /* 118 * Names for TCP sysctl objects 119 */ 120 #define TCPCTL_MSSDFLT 1 /* MSS default */ 121 #define TCPCTL_STATS 2 /* statistics (read-only) */ 122 #define TCPCTL_RTTDFLT 3 /* default RTT estimate */ 123 #define TCPCTL_MSL 4 /* No Of Keepalive probes */ 124 #define TCPCTL_INETCFG 6 /* Generic TCP Inetcfg switching */ 125 #define TCPCTL_LINGERTIME 7 /* Linger On close timer */ 126 #define TCPCTL_KEEPCNT 8 /* No Of Keepalive probes */ 127 #define TCPCTL_TCPSWIN 9 /* TCP Send Window Size */ 128 #define TCPCTL_TCPRWIN 10 /* TCP Recieve Window Size */ 129 #define TCPCTL_TTL 11 /* TTL for TCP packets */ 130 #define TCPCTL_MTU 12 /* Path MTU Discovery ON/OFF flg */ 131 #define TCPCTL_WINSCALE 13 /* Winow Scale (Fat Pipe) ON/OFF flg */ 132 #define TCPCTL_TIMESTMP 14 /* TCP TimeStamp ON/OFF flg */ 133 #define TCPCTL_CC 15 /* Cc, CCnew & Echo ON/OFF flg */ 134 #define TCPCTL_REALSLOW 16 /* Real Slow Timer for Time Wait Q */ 135 #define TCPCTL_REUSETW 17 /* Reuse TW inetcfg */ 136 #define TCPCTL_SYNCOOKIE 18 /* Syncookie inetcfg */ 137 #define TCPCTL_PERFHTTP 19 /* Fast Path HTTP */ 138 139 140 /*Inetcfg ioctl constants */ 141 #define ICFG_SETKEEPALIVE 20 /* sysctl code:Set the KeepAlive timer */ 142 #define ICFG_GETKEEPALIVE 21 /* sysctl code:Get the KeepAlive timer defaults */ 143 144 #define TCPCTL_NAMES { \ 145 { 0, 0 }, \ 146 { "mssdflt", CTLTYPE_INT }, \ 147 { "stats", CTLTYPE_STRUCT }, \ 148 { "rttdflt", CTLTYPE_INT }, \ 149 { "inetcfg", CTLTYPE_INETCFG },\ 150 } 151 #endif /* !TCPV40HDRS */ 98 152 99 153 #endif /* !_NETINET_TCP_VAR_H_ */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/netinet/udp.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r182 r183 1 1 /* Modified for emx by hv 1996 2 * Modified for gcc/os2 by bird 2003 2 3 * 3 4 * Copyright (c) 1982, 1986 Regents of the University of California. … … 39 40 #define _NETINET_UDP_H_ 40 41 42 #ifdef TCPV40HDRS 43 #include <netinet/udp_var.h> 44 #else 41 45 /* 42 46 * Udp protocol header. 43 47 * Per RFC 768, September, 1981. 44 48 */ 49 #pragma pack(1) 45 50 struct udphdr { 46 51 u_short uh_sport; /* source port */ … … 49 54 u_short uh_sum; /* udp checksum */ 50 55 }; 51 52 /* hv: this is a new structure of TCPIPV4. Consult IBM's docs on that */ 53 #ifdef TCPIPV4 54 #include <netinet/udp_var.h> 55 struct udpstat { 56 u_long udps_hdrops; 57 u_long udps_badsum; 58 u_long udps_badlen; 59 u_long udps_udpInDatagrams; 60 u_long udps_udpNoPorts; 61 u_long udps_udpOutDatagrams; 62 }; 56 #pragma pack() 63 57 #endif 64 58 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/netinet/udp_var.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r182 r183 1 1 /* Modified for emx by hv 1996 2 * 2 * Modified for gcc/os2 by bird 2003 3 * 3 4 * Copyright (c) 1982, 1986, 1989 Regents of the University of California. 4 5 * All rights reserved. … … 39 40 #define _NETINET_UDP_VAR_H_ 40 41 41 #ifdef TCPIPV4 42 struct udpstat { 43 /* input statistics: */ 44 #ifndef __EMX__ 45 u_long udps_ipackets; /* total input packets */ 46 #endif 47 u_long udps_hdrops; /* packet shorter than header */ 48 u_long udps_badsum; /* checksum error */ 49 u_long udps_badlen; /* data length larger than packet */ 50 #ifndef __EMX__ 51 u_long udps_noport; /* no socket on port */ 52 u_long udps_noportbcast; /* of above, arrived as broadcast */ 53 u_long udps_fullsock; /* not delivered, input socket full */ 54 u_long udpps_pcbcachemiss; /* input packets missing pcb cache */ 55 /* output statistics: */ 56 u_long udps_opackets; /* total output packets */ 57 #else /* __EMX__ */ 42 #ifdef TCPV40HDRS 43 struct udpstat { 44 u_long udps_hdrops; 45 u_long udps_badsum; 46 u_long udps_badlen; 58 47 u_long udps_udpInDatagrams; 59 48 u_long udps_udpNoPorts; 60 49 u_long udps_udpOutDatagrams; 61 #endif /* __EMX__ */62 50 }; 63 #endif /* TCPIPV4 */64 51 65 #define UDP_TTL 30 /* default time to live for UDP packets */ 52 #else 53 54 /* 55 * UDP kernel structures and variables. 56 */ 57 #pragma pack(1) 58 struct udpiphdr { 59 struct ipovly ui_i; /* overlaid ip structure */ 60 struct udphdr ui_u; /* udp header */ 61 }; 62 #pragma pack() 63 #define ui_next ui_i.ih_next 64 #define ui_prev ui_i.ih_prev 65 #define ui_x1 ui_i.ih_x1 66 #define ui_pr ui_i.ih_pr 67 #define ui_len ui_i.ih_len 68 #define ui_src ui_i.ih_src 69 #define ui_dst ui_i.ih_dst 70 #define ui_sport ui_u.uh_sport 71 #define ui_dport ui_u.uh_dport 72 #define ui_ulen ui_u.uh_ulen 73 #define ui_sum ui_u.uh_sum 74 75 struct udpstat { 76 /* input statistics: */ 77 u_long udps_ipackets; /* total input packets */ 78 u_long udps_hdrops; /* packet shorter than header */ 79 u_long udps_badsum; /* checksum error */ 80 u_long udps_badlen; /* data length larger than packet */ 81 u_long udps_noport; /* no socket on port */ 82 u_long udps_noportbcast; /* of above, arrived as broadcast */ 83 u_long udps_fullsock; /* not delivered, input socket full */ 84 u_long udpps_pcbcachemiss; /* input packets missing pcb cache */ 85 /* output statistics: */ 86 u_long udps_opackets; /* total output packets */ 87 }; 88 89 /* 90 * Names for UDP sysctl objects 91 */ 92 #define UDPCTL_CHECKSUM 1 /* checksum UDP packets */ 93 #define UDPCTL_STATS 2 /* statistics (read-only) */ 94 #define UDPCTL_INETCFG 31 /* sysctl code-Generic UDP Inetcfg switching */ 95 #define UDPCTL_TTL 32 /* sysctl code-TTL for UDP packets */ 96 #define UDPCTL_UDPSWIN 33 /* sysctl code-UDP really MAX datagram Size */ 97 #define UDPCTL_UDPRWIN 34 /* sysctl code-UDP recieve window size */ 98 99 #define UDPCTL_NAMES { \ 100 { 0, 0 }, \ 101 { "stats", CTLTYPE_STRUCT }, \ 102 { "inetcfg",CTLTYPE_INETCFG},\ 103 } 104 105 #endif /* TCPV40HDRS */ 66 106 67 107 #endif /* !_NETINET_UDP_VAR_H_ */ -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.