~ubuntu-branches/ubuntu/feisty/basilisk2/feisty

« back to all changes in this revision

Viewing changes to src/slirp/tcp.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2006-06-01 01:11:16 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060601011116-xjhegbgyfsxag5fl
Tags: 0.9.20060529-1
* New upstream CVS snapshot.
* Update local cdbs snippet copyright-check.mk:
  + Broaden scan to also look for "(c)" by default.
  + Make egrep options configurable.
  + Ignore auto-tools files.
* Bump up standards-version to 3.7.2 (no changes needed).
* Let dh_strip do the stripping (not the make install target).

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
 * TCP header.
54
54
 * Per RFC 793, September, 1981.
55
55
 */
 
56
#ifdef PRAGMA_PACK_SUPPORTED
 
57
#pragma pack(1)
 
58
#endif
 
59
 
56
60
struct tcphdr {
57
61
        u_int16_t       th_sport;               /* source port */
58
62
        u_int16_t       th_dport;               /* destination port */
59
63
        tcp_seq th_seq;                 /* sequence number */
60
64
        tcp_seq th_ack;                 /* acknowledgement number */
61
65
#ifdef WORDS_BIGENDIAN
62
 
        u_int   th_off:4,               /* data offset */
 
66
        u_char  th_off:4,               /* data offset */
63
67
                th_x2:4;                /* (unused) */
64
68
#else
65
 
        u_int   th_x2:4,                /* (unused) */
 
69
        u_char  th_x2:4,                /* (unused) */
66
70
                th_off:4;               /* data offset */
67
71
#endif
68
72
        u_int8_t        th_flags;
75
79
        u_int16_t       th_win;                 /* window */
76
80
        u_int16_t       th_sum;                 /* checksum */
77
81
        u_int16_t       th_urp;                 /* urgent pointer */
78
 
};
 
82
} PACKED__;
 
83
 
 
84
#ifdef PRAGMA_PACK_SUPPORTED
 
85
#pragma pack(0)
 
86
#endif
79
87
 
80
88
#include "tcp_var.h"
81
89
 
100
108
 * With an IP MSS of 576, this is 536,
101
109
 * but 512 is probably more convenient.
102
110
 * This should be defined as MIN(512, IP_MSS - sizeof (struct tcpiphdr)).
 
111
 *
 
112
 * We make this 1460 because we only care about Ethernet in the qemu context.
103
113
 */
104
 
#define TCP_MSS 512
 
114
#define TCP_MSS 1460
105
115
 
106
116
#define TCP_MAXWIN      65535   /* largest value for (unscaled) window */
107
117