Changeset 64c67f6 in rtems
- Timestamp:
- May 12, 2005, 6:20:10 AM (15 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, master
- Children:
- 3eb8b6e8
- Parents:
- e714a91
- Location:
- cpukit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/ChangeLog
re714a91 r64c67f6 1 1 2005-05-12 Ralf Corsepius <ralf.corsepius@rtems.org> 2 2 3 * libnetworking/netinet/tcp.h: Partial update from FreeBSD. 4 Remove BYTE_PACK. 3 5 * libnetworking/netinet/ip_var.h: Partial update from FreeBSD. 4 6 Remove some useless BYTE_PACKs. -
cpukit/libnetworking/netinet/tcp.h
re714a91 r64c67f6 11 11 * notice, this list of conditions and the following disclaimer in the 12 12 * documentation and/or other materials provided with the distribution. 13 * 3. All advertising materials mentioning features or use of this software14 * must display the following acknowledgement:15 * This product includes software developed by the University of16 * California, Berkeley and its contributors.17 13 * 4. Neither the name of the University nor the names of its contributors 18 14 * may be used to endorse or promote products derived from this software … … 32 28 * 33 29 * @(#)tcp.h 8.1 (Berkeley) 6/10/93 30 * $FreeBSD: src/sys/netinet/tcp.h,v 1.30 2005/01/07 01:45:45 imp Exp $ 31 */ 32 33 /* 34 34 * $Id$ 35 35 */ … … 38 38 #define _NETINET_TCP_H_ 39 39 40 #ifndef BYTE_PACK 41 #define BYTE_PACK __attribute__((packed)) 42 #endif 40 #include <sys/cdefs.h> 43 41 44 typedef u_long tcp_seq; 42 #if __BSD_VISIBLE 43 44 typedef u_int32_t tcp_seq; 45 46 #define tcp6_seq tcp_seq /* for KAME src sync over BSD*'s */ 47 #define tcp6hdr tcphdr /* for KAME src sync over BSD*'s */ 48 45 49 typedef u_long tcp_cc; /* connection count per rfc1644 */ 46 50 … … 50 54 */ 51 55 struct tcphdr { 52 u_short th_sport BYTE_PACK;/* source port */53 u_short th_dport BYTE_PACK;/* destination port */54 tcp_seq th_seq BYTE_PACK;/* sequence number */55 tcp_seq th_ack BYTE_PACK;/* acknowledgement number */56 u_short th_sport; /* source port */ 57 u_short th_dport; /* destination port */ 58 tcp_seq th_seq; /* sequence number */ 59 tcp_seq th_ack; /* acknowledgement number */ 56 60 #if BYTE_ORDER == LITTLE_ENDIAN 57 u_ charth_x2:4, /* (unused) */61 u_int th_x2:4, /* (unused) */ 58 62 th_off:4; /* data offset */ 59 63 #endif 60 64 #if BYTE_ORDER == BIG_ENDIAN 61 u_ charth_off:4, /* data offset */65 u_int th_off:4, /* data offset */ 62 66 th_x2:4; /* (unused) */ 63 67 #endif … … 69 73 #define TH_ACK 0x10 70 74 #define TH_URG 0x20 71 #define TH_FLAGS (TH_FIN|TH_SYN|TH_RST|TH_ACK|TH_URG) 75 #define TH_ECE 0x40 76 #define TH_CWR 0x80 77 #define TH_FLAGS (TH_FIN|TH_SYN|TH_RST|TH_ACK|TH_URG|TH_ECE|TH_CWR) 72 78 73 u_short th_win BYTE_PACK;/* window */74 u_short th_sum BYTE_PACK;/* checksum */75 u_short th_urp BYTE_PACK;/* urgent pointer */79 u_short th_win; /* window */ 80 u_short th_sum; /* checksum */ 81 u_short th_urp; /* urgent pointer */ 76 82 }; 77 83 … … 101 107 /* 102 108 * Default maximum segment size for TCP. 103 * With an IP M SSof 576, this is 536,109 * With an IP MTU of 576, this is 536, 104 110 * but 512 is probably more convenient. 105 111 * This should be defined as MIN(512, IP_MSS - sizeof (struct tcpiphdr)). … … 115 121 #define TCP_MAXOLEN (TCP_MAXHLEN - sizeof(struct tcphdr)) 116 122 /* max space left for options */ 123 #endif /* __BSD_VISIBLE */ 117 124 118 125 /* … … 120 127 */ 121 128 #define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */ 129 #if __BSD_VISIBLE 122 130 #define TCP_MAXSEG 0x02 /* set maximum segment size */ 123 131 #define TCP_NOPUSH 0x04 /* don't push last block of write */ 124 132 #define TCP_NOOPT 0x08 /* don't use TCP options */ 133 #define TCP_MD5SIG 0x10 /* use MD5 digests (RFC2385) */ 134 #define TCP_INFO 0x20 /* retrieve tcp_info structure */ 135 #endif 125 136 126 #endif 137 #endif /* !_NETINET_TCP_H_ */
Note: See TracChangeset
for help on using the changeset viewer.