53 |
|
* TCP header. |
54 |
|
* Per RFC 793, September, 1981. |
55 |
|
*/ |
56 |
+ |
#ifdef PRAGMA_PACK_SUPPORTED |
57 |
+ |
#pragma pack(1) |
58 |
+ |
#endif |
59 |
+ |
|
60 |
|
struct tcphdr { |
61 |
|
u_int16_t th_sport; /* source port */ |
62 |
|
u_int16_t th_dport; /* destination port */ |
63 |
|
tcp_seq th_seq; /* sequence number */ |
64 |
|
tcp_seq th_ack; /* acknowledgement number */ |
65 |
|
#ifdef WORDS_BIGENDIAN |
66 |
< |
u_int th_off:4, /* data offset */ |
66 |
> |
u_char th_off:4, /* data offset */ |
67 |
|
th_x2:4; /* (unused) */ |
68 |
|
#else |
69 |
< |
u_int th_x2:4, /* (unused) */ |
69 |
> |
u_char th_x2:4, /* (unused) */ |
70 |
|
th_off:4; /* data offset */ |
71 |
|
#endif |
72 |
|
u_int8_t th_flags; |
79 |
|
u_int16_t th_win; /* window */ |
80 |
|
u_int16_t th_sum; /* checksum */ |
81 |
|
u_int16_t th_urp; /* urgent pointer */ |
82 |
< |
}; |
82 |
> |
} PACKED__; |
83 |
> |
|
84 |
> |
#ifdef PRAGMA_PACK_SUPPORTED |
85 |
> |
#pragma pack(0) |
86 |
> |
#endif |
87 |
|
|
88 |
|
#include "tcp_var.h" |
89 |
|
|