Changeset 74c402a2 in rtems
- Timestamp:
- 07/17/02 17:08:48 (22 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 4f0b287
- Parents:
- 2b947a4
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/libnetworking/ChangeLog
r2b947a4 r74c402a2 1 2002-07-17 Jay Monkman <jtm@smoothsmoothie.com> 2 3 * netinet/in.h, netinet/ip.h, netinet/ip_var.h, netinet/tcp.h: 4 Modified to added packed attribute.o 1 5 2002-07-05 Ralf Corsepius <corsepiu@faw.uni-ulm.de> 2 6 -
c/src/exec/libnetworking/netinet/in.h
r2b947a4 r74c402a2 205 205 */ 206 206 #define IPPORT_RESERVEDSTART 600 207 207 #define BYTE_PACK __attribute__((packed)) 208 208 /* 209 209 * Internet address (a structure for historical reasons) 210 210 */ 211 211 struct in_addr { 212 u_long s_addr ;212 u_long s_addr BYTE_PACK; 213 213 }; 214 214 -
c/src/exec/libnetworking/netinet/ip.h
r2b947a4 r74c402a2 65 65 #endif /* not _IP_VHL */ 66 66 u_char ip_tos; /* type of service */ 67 u_short ip_len ;/* total length */68 u_short ip_id ;/* identification */69 u_short ip_off ;/* fragment offset field */67 u_short ip_len BYTE_PACK; /* total length */ 68 u_short ip_id BYTE_PACK; /* identification */ 69 u_short ip_off BYTE_PACK; /* fragment offset field */ 70 70 #define IP_RF 0x8000 /* reserved fragment flag */ 71 71 #define IP_DF 0x4000 /* dont fragment flag */ … … 74 74 u_char ip_ttl; /* time to live */ 75 75 u_char ip_p; /* protocol */ 76 u_short ip_sum; /* checksum */ 77 struct in_addr ip_src,ip_dst; /* source and dest address */ 76 u_short ip_sum BYTE_PACK; /* checksum */ 77 struct in_addr ip_src BYTE_PACK; /* source address */ 78 struct in_addr ip_dst BYTE_PACK; /* dest address */ 78 79 }; 79 80 -
c/src/exec/libnetworking/netinet/ip_var.h
r2b947a4 r74c402a2 42 42 */ 43 43 struct ipovly { 44 caddr_t ih_next, ih_prev; /* for protocol sequence q's */ 44 caddr_t ih_next BYTE_PACK; 45 caddr_t ih_prev BYTE_PACK; /* for protocol sequence q's */ 45 46 u_char ih_x1; /* (unused) */ 46 47 u_char ih_pr; /* protocol */ 47 u_short ih_len ;/* protocol length */48 u_short ih_len BYTE_PACK; /* protocol length */ 48 49 struct in_addr ih_src; /* source internet address */ 49 50 struct in_addr ih_dst; /* destination internet address */ … … 60 61 u_char ipq_ttl; /* time for reass q to live */ 61 62 u_char ipq_p; /* protocol of this fragment */ 62 u_short ipq_id ;/* sequence id for reassembly */63 u_short ipq_id BYTE_PACK; /* sequence id for reassembly */ 63 64 struct ipasfrag *ipq_next,*ipq_prev; 64 65 /* to ip headers of fragments */ 65 66 struct in_addr ipq_src,ipq_dst; 66 67 #ifdef IPDIVERT 67 u_short ipq_divert ;/* divert protocol port */68 u_short ipq_divert BYTE_PACK; /* divert protocol port */ 68 69 #endif 69 70 }; … … 86 87 * to avoid destroying tos; 87 88 * copied from (ip_off&IP_MF) */ 88 u_short ip_len ;89 u_short ip_id ;90 u_short ip_off ;89 u_short ip_len BYTE_PACK; 90 u_short ip_id BYTE_PACK; 91 u_short ip_off BYTE_PACK; 91 92 u_char ip_ttl; 92 93 u_char ip_p; 93 u_short ip_sum ;94 u_short ip_sum BYTE_PACK; 94 95 struct ipasfrag *ipf_next; /* next fragment */ 95 96 struct ipasfrag *ipf_prev; /* previous fragment */ -
c/src/exec/libnetworking/netinet/tcp.h
r2b947a4 r74c402a2 46 46 */ 47 47 struct tcphdr { 48 u_short th_sport ;/* source port */49 u_short th_dport ;/* destination port */50 tcp_seq th_seq ;/* sequence number */51 tcp_seq th_ack ;/* acknowledgement number */48 u_short th_sport BYTE_PACK; /* source port */ 49 u_short th_dport BYTE_PACK; /* destination port */ 50 tcp_seq th_seq BYTE_PACK; /* sequence number */ 51 tcp_seq th_ack BYTE_PACK; /* acknowledgement number */ 52 52 #if BYTE_ORDER == LITTLE_ENDIAN 53 53 u_char th_x2:4, /* (unused) */ … … 67 67 #define TH_FLAGS (TH_FIN|TH_SYN|TH_RST|TH_ACK|TH_URG) 68 68 69 u_short th_win ;/* window */70 u_short th_sum ;/* checksum */71 u_short th_urp ;/* urgent pointer */69 u_short th_win BYTE_PACK; /* window */ 70 u_short th_sum BYTE_PACK; /* checksum */ 71 u_short th_urp BYTE_PACK; /* urgent pointer */ 72 72 }; 73 73 -
cpukit/libnetworking/ChangeLog
r2b947a4 r74c402a2 1 2002-07-17 Jay Monkman <jtm@smoothsmoothie.com> 2 3 * netinet/in.h, netinet/ip.h, netinet/ip_var.h, netinet/tcp.h: 4 Modified to added packed attribute.o 1 5 2002-07-05 Ralf Corsepius <corsepiu@faw.uni-ulm.de> 2 6 -
cpukit/libnetworking/netinet/in.h
r2b947a4 r74c402a2 205 205 */ 206 206 #define IPPORT_RESERVEDSTART 600 207 207 #define BYTE_PACK __attribute__((packed)) 208 208 /* 209 209 * Internet address (a structure for historical reasons) 210 210 */ 211 211 struct in_addr { 212 u_long s_addr ;212 u_long s_addr BYTE_PACK; 213 213 }; 214 214 -
cpukit/libnetworking/netinet/ip.h
r2b947a4 r74c402a2 65 65 #endif /* not _IP_VHL */ 66 66 u_char ip_tos; /* type of service */ 67 u_short ip_len ;/* total length */68 u_short ip_id ;/* identification */69 u_short ip_off ;/* fragment offset field */67 u_short ip_len BYTE_PACK; /* total length */ 68 u_short ip_id BYTE_PACK; /* identification */ 69 u_short ip_off BYTE_PACK; /* fragment offset field */ 70 70 #define IP_RF 0x8000 /* reserved fragment flag */ 71 71 #define IP_DF 0x4000 /* dont fragment flag */ … … 74 74 u_char ip_ttl; /* time to live */ 75 75 u_char ip_p; /* protocol */ 76 u_short ip_sum; /* checksum */ 77 struct in_addr ip_src,ip_dst; /* source and dest address */ 76 u_short ip_sum BYTE_PACK; /* checksum */ 77 struct in_addr ip_src BYTE_PACK; /* source address */ 78 struct in_addr ip_dst BYTE_PACK; /* dest address */ 78 79 }; 79 80 -
cpukit/libnetworking/netinet/ip_var.h
r2b947a4 r74c402a2 42 42 */ 43 43 struct ipovly { 44 caddr_t ih_next, ih_prev; /* for protocol sequence q's */ 44 caddr_t ih_next BYTE_PACK; 45 caddr_t ih_prev BYTE_PACK; /* for protocol sequence q's */ 45 46 u_char ih_x1; /* (unused) */ 46 47 u_char ih_pr; /* protocol */ 47 u_short ih_len ;/* protocol length */48 u_short ih_len BYTE_PACK; /* protocol length */ 48 49 struct in_addr ih_src; /* source internet address */ 49 50 struct in_addr ih_dst; /* destination internet address */ … … 60 61 u_char ipq_ttl; /* time for reass q to live */ 61 62 u_char ipq_p; /* protocol of this fragment */ 62 u_short ipq_id ;/* sequence id for reassembly */63 u_short ipq_id BYTE_PACK; /* sequence id for reassembly */ 63 64 struct ipasfrag *ipq_next,*ipq_prev; 64 65 /* to ip headers of fragments */ 65 66 struct in_addr ipq_src,ipq_dst; 66 67 #ifdef IPDIVERT 67 u_short ipq_divert ;/* divert protocol port */68 u_short ipq_divert BYTE_PACK; /* divert protocol port */ 68 69 #endif 69 70 }; … … 86 87 * to avoid destroying tos; 87 88 * copied from (ip_off&IP_MF) */ 88 u_short ip_len ;89 u_short ip_id ;90 u_short ip_off ;89 u_short ip_len BYTE_PACK; 90 u_short ip_id BYTE_PACK; 91 u_short ip_off BYTE_PACK; 91 92 u_char ip_ttl; 92 93 u_char ip_p; 93 u_short ip_sum ;94 u_short ip_sum BYTE_PACK; 94 95 struct ipasfrag *ipf_next; /* next fragment */ 95 96 struct ipasfrag *ipf_prev; /* previous fragment */ -
cpukit/libnetworking/netinet/tcp.h
r2b947a4 r74c402a2 46 46 */ 47 47 struct tcphdr { 48 u_short th_sport ;/* source port */49 u_short th_dport ;/* destination port */50 tcp_seq th_seq ;/* sequence number */51 tcp_seq th_ack ;/* acknowledgement number */48 u_short th_sport BYTE_PACK; /* source port */ 49 u_short th_dport BYTE_PACK; /* destination port */ 50 tcp_seq th_seq BYTE_PACK; /* sequence number */ 51 tcp_seq th_ack BYTE_PACK; /* acknowledgement number */ 52 52 #if BYTE_ORDER == LITTLE_ENDIAN 53 53 u_char th_x2:4, /* (unused) */ … … 67 67 #define TH_FLAGS (TH_FIN|TH_SYN|TH_RST|TH_ACK|TH_URG) 68 68 69 u_short th_win ;/* window */70 u_short th_sum ;/* checksum */71 u_short th_urp ;/* urgent pointer */69 u_short th_win BYTE_PACK; /* window */ 70 u_short th_sum BYTE_PACK; /* checksum */ 71 u_short th_urp BYTE_PACK; /* urgent pointer */ 72 72 }; 73 73
Note: See TracChangeset
for help on using the changeset viewer.