diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2011-08-06 14:23:29 +0200 |
---|---|---|
committer | Jan Kiszka <jan.kiszka@siemens.com> | 2011-08-14 23:34:44 -0700 |
commit | e16060a2f5dcd1dc7c2a1b9c9a09a534850256b1 (patch) | |
tree | be560f5415ccb60d5b9db5adafd63d4ddb16de68 /ip.h | |
parent | 14bf0c9f507611699d94c0e94ba7c4ecd834590b (diff) | |
download | slirp-e16060a2f5dcd1dc7c2a1b9c9a09a534850256b1.zip slirp-e16060a2f5dcd1dc7c2a1b9c9a09a534850256b1.tar.gz slirp-e16060a2f5dcd1dc7c2a1b9c9a09a534850256b1.tar.bz2 |
slirp: Fix bit field types in IP header structs
-mms-bitfields prevents that the bitfields in current IP header structs
are packed into a single byte as it is required. Fix this by using
uint8_t as backing type.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Diffstat (limited to 'ip.h')
-rw-r--r-- | ip.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -74,10 +74,10 @@ typedef uint32_t n_long; /* long as received from the net */ */ struct ip { #ifdef HOST_WORDS_BIGENDIAN - u_int ip_v : 4, /* version */ + uint8_t ip_v : 4, /* version */ ip_hl : 4; /* header length */ #else - u_int ip_hl : 4, /* header length */ + uint8_t ip_hl : 4, /* header length */ ip_v : 4; /* version */ #endif uint8_t ip_tos; /* type of service */ @@ -140,10 +140,10 @@ struct ip_timestamp { uint8_t ipt_len; /* size of structure (variable) */ uint8_t ipt_ptr; /* index of current entry */ #ifdef HOST_WORDS_BIGENDIAN - u_int ipt_oflw : 4, /* overflow counter */ + uint8_t ipt_oflw : 4, /* overflow counter */ ipt_flg : 4; /* flags, see below */ #else - u_int ipt_flg : 4, /* flags, see below */ + uint8_t ipt_flg : 4, /* flags, see below */ ipt_oflw : 4; /* overflow counter */ #endif union ipt_timestamp { |