15 |
struct ip |
struct ip |
16 |
{ |
{ |
17 |
#if defined(NO_CHAR_BITFIELDS) |
#if defined(NO_CHAR_BITFIELDS) |
18 |
u_char ip_hl_v; // bug in GCC for mips means the bitfield stuff will sometimes break - so we use a char for both and get round it with macro's instead... |
u_char ip_hl_v; /* bug in GCC for mips means the bitfield stuff will sometimes break - so we use a char for both and get round it with macro's instead... */ |
19 |
#else |
#else |
20 |
#if BYTE_ORDER == LITTLE_ENDIAN |
#if BYTE_ORDER == LITTLE_ENDIAN |
21 |
u_char ip_hl:4, /* header length */ |
unsigned ip_hl:4, /* header length */ |
22 |
ip_v:4; /* version */ |
ip_v:4; /* version */ |
23 |
#elif BYTE_ORDER == BIG_ENDIAN |
#elif BYTE_ORDER == BIG_ENDIAN |
24 |
u_char ip_v:4, /* version */ |
unsigned ip_v:4, /* version */ |
25 |
ip_hl:4; /* header length */ |
ip_hl:4; /* header length */ |
26 |
#else |
#else |
27 |
COMPLAIN - NO BYTE ORDER SELECTED! |
COMPLAIN - NO BYTE ORDER SELECTED! |
58 |
u_char th_x2_off; |
u_char th_x2_off; |
59 |
#else |
#else |
60 |
#if BYTE_ORDER == LITTLE_ENDIAN |
#if BYTE_ORDER == LITTLE_ENDIAN |
61 |
u_char th_x2:4, /* (unused) */ |
unsigned th_x2:4, /* (unused) */ |
62 |
th_off:4; /* data offset */ |
th_off:4; /* data offset */ |
63 |
#endif |
#endif |
64 |
#if BYTE_ORDER == BIG_ENDIAN |
#if BYTE_ORDER == BIG_ENDIAN |
65 |
u_char th_off:4, /* data offset */ |
unsigned th_off:4, /* data offset */ |
66 |
th_x2:4; /* (unused) */ |
th_x2:4; /* (unused) */ |
67 |
#endif |
#endif |
68 |
#endif |
#endif |