More fixes for uint8_t being shorter than u_int8_t.

Fix a typo while we're at it.
This commit is contained in:
Guy Harris 2014-04-23 11:53:22 -07:00
parent 30f0d2314d
commit a2633f2f21
17 changed files with 216 additions and 216 deletions

8
ah.h
View File

@ -38,16 +38,16 @@
#define _NETINET6_AH_H_
struct ah {
uint8_t ah_nxt; /* Next Header */
uint8_t ah_len; /* Length of data, in 32bit */
uint8_t ah_nxt; /* Next Header */
uint8_t ah_len; /* Length of data, in 32bit */
uint16_t ah_reserve; /* Reserved for future use */
uint32_t ah_spi; /* Security parameter index */
/* variable size, 32bit bound*/ /* Authentication data */
};
struct newah {
uint8_t ah_nxt; /* Next Header */
uint8_t ah_len; /* Length of data + 1, in 32bit */
uint8_t ah_nxt; /* Next Header */
uint8_t ah_len; /* Length of data + 1, in 32bit */
uint16_t ah_reserve; /* Reserved for future use */
uint32_t ah_spi; /* Security parameter index */
uint32_t ah_seq; /* Sequence number field */

View File

@ -22,9 +22,9 @@
*/
struct LAP {
uint8_t dst;
uint8_t src;
uint8_t type;
uint8_t dst;
uint8_t src;
uint8_t type;
};
#define lapShortDDP 1 /* short DDP type */
#define lapDDP 2 /* DDP type */
@ -37,18 +37,18 @@ struct atDDP {
uint16_t checksum;
uint16_t dstNet;
uint16_t srcNet;
uint8_t dstNode;
uint8_t srcNode;
uint8_t dstSkt;
uint8_t srcSkt;
uint8_t type;
uint8_t dstNode;
uint8_t srcNode;
uint8_t dstSkt;
uint8_t srcSkt;
uint8_t type;
};
struct atShortDDP {
uint16_t length;
uint8_t dstSkt;
uint8_t srcSkt;
uint8_t type;
uint8_t dstSkt;
uint8_t srcSkt;
uint8_t type;
};
#define ddpMaxWKS 0x7F
@ -72,10 +72,10 @@ struct atShortDDP {
/* AppleTalk Transaction Protocol */
struct atATP {
uint8_t control;
uint8_t bitmap;
uint8_t control;
uint8_t bitmap;
uint16_t transID;
int32_t userData;
int32_t userData;
};
#define atpReqCode 0x40
@ -93,8 +93,8 @@ struct atATP {
/* AppleTalk Echo Protocol */
struct atEcho {
uint8_t echoFunction;
uint8_t *echoData;
uint8_t echoFunction;
uint8_t *echoData;
};
#define echoSkt 4 /* the echoer socket */
@ -106,15 +106,15 @@ struct atEcho {
/* Name Binding Protocol */
struct atNBP {
uint8_t control;
uint8_t id;
uint8_t control;
uint8_t id;
};
struct atNBPtuple {
uint16_t net;
uint8_t node;
uint8_t skt;
uint8_t enumerator;
uint8_t node;
uint8_t skt;
uint8_t enumerator;
};
#define nbpBrRq 0x10
@ -140,8 +140,8 @@ struct atNBPtuple {
/* Zone Information Protocol */
struct zipHeader {
uint8_t command;
uint8_t netcount;
uint8_t command;
uint8_t netcount;
};
#define zipHeaderSize 2

View File

@ -53,7 +53,7 @@ typedef union etheraddress etheraddr; /* Ethernet address */
#define DN_MAXADDL 20 /* max size of DECnet address */
struct dn_naddr {
uint16_t a_len; /* length of address */
uint8_t a_addr[DN_MAXADDL]; /* address as bytes */
uint8_t a_addr[DN_MAXADDL]; /* address as bytes */
};
/*

View File

@ -44,8 +44,8 @@
* Structure of a DEC/Intel/Xerox or 802.3 Ethernet header.
*/
struct ether_header {
uint8_t ether_dhost[ETHER_ADDR_LEN];
uint8_t ether_shost[ETHER_ADDR_LEN];
uint8_t ether_dhost[ETHER_ADDR_LEN];
uint8_t ether_shost[ETHER_ADDR_LEN];
uint16_t ether_type;
};

View File

@ -63,7 +63,7 @@ in_cksum(const struct cksum_vec *vec, int veclen)
int byte_swapped = 0;
union {
uint8_t c[2];
uint8_t c[2];
uint16_t s;
} s_util;
union {

16
ip.h
View File

@ -50,18 +50,18 @@
* against negative integers quite easily, and fail in subtle ways.
*/
struct ip {
uint8_t ip_vhl; /* header length, version */
uint8_t ip_vhl; /* header length, version */
#define IP_V(ip) (((ip)->ip_vhl & 0xf0) >> 4)
#define IP_HL(ip) ((ip)->ip_vhl & 0x0f)
uint8_t ip_tos; /* type of service */
uint8_t ip_tos; /* type of service */
uint16_t ip_len; /* total length */
uint16_t ip_id; /* identification */
uint16_t ip_off; /* fragment offset field */
#define IP_DF 0x4000 /* dont fragment flag */
#define IP_MF 0x2000 /* more fragments flag */
#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
uint8_t ip_ttl; /* time to live */
uint8_t ip_p; /* protocol */
uint8_t ip_ttl; /* time to live */
uint8_t ip_p; /* protocol */
uint16_t ip_sum; /* checksum */
struct in_addr ip_src,ip_dst; /* source and dest address */
} UNALIGNED;
@ -123,10 +123,10 @@ struct ip {
* Time stamp option structure.
*/
struct ip_timestamp {
uint8_t ipt_code; /* IPOPT_TS */
uint8_t ipt_len; /* size of structure (variable) */
uint8_t ipt_ptr; /* index of current entry */
uint8_t ipt_oflwflg; /* flags, overflow counter */
uint8_t ipt_code; /* IPOPT_TS */
uint8_t ipt_len; /* size of structure (variable) */
uint8_t ipt_ptr; /* index of current entry */
uint8_t ipt_oflwflg; /* flags, overflow counter */
#define IPTS_OFLW(ip) (((ipt)->ipt_oflwflg & 0xf0) >> 4)
#define IPTS_FLG(ip) ((ipt)->ipt_oflwflg & 0x0f)
union ipt_timestamp {

View File

@ -172,9 +172,9 @@ static const struct tok ctrl_str[] = {
struct mgmt_header_t {
uint16_t fc;
uint16_t duration;
uint8_t da[6];
uint8_t sa[6];
uint8_t bssid[6];
uint8_t da[6];
uint8_t sa[6];
uint8_t bssid[6];
uint16_t seq_ctrl;
};
@ -189,54 +189,54 @@ struct mgmt_header_t {
#define CAPABILITY_PRIVACY(cap) ((cap) & 0x0010)
struct ssid_t {
uint8_t element_id;
uint8_t length;
uint8_t element_id;
uint8_t length;
u_char ssid[33]; /* 32 + 1 for null */
};
struct rates_t {
uint8_t element_id;
uint8_t length;
uint8_t rate[16];
uint8_t element_id;
uint8_t length;
uint8_t rate[16];
};
struct challenge_t {
uint8_t element_id;
uint8_t length;
uint8_t text[254]; /* 1-253 + 1 for null */
uint8_t element_id;
uint8_t length;
uint8_t text[254]; /* 1-253 + 1 for null */
};
struct fh_t {
uint8_t element_id;
uint8_t length;
uint8_t element_id;
uint8_t length;
uint16_t dwell_time;
uint8_t hop_set;
uint8_t hop_set;
uint8_t hop_pattern;
uint8_t hop_index;
uint8_t hop_index;
};
struct ds_t {
uint8_t element_id;
uint8_t length;
uint8_t channel;
uint8_t element_id;
uint8_t length;
uint8_t channel;
};
struct cf_t {
uint8_t element_id;
uint8_t length;
uint8_t count;
uint8_t period;
uint8_t element_id;
uint8_t length;
uint8_t count;
uint8_t period;
uint16_t max_duration;
uint16_t dur_remaing;
};
struct tim_t {
uint8_t element_id;
uint8_t length;
uint8_t count;
uint8_t period;
uint8_t bitmap_control;
uint8_t bitmap[251];
uint8_t element_id;
uint8_t length;
uint8_t count;
uint8_t period;
uint8_t bitmap_control;
uint8_t bitmap[251];
};
#define E_SSID 0
@ -295,9 +295,9 @@ struct mgmt_body_t {
struct ctrl_rts_t {
uint16_t fc;
uint16_t duration;
uint8_t ra[6];
uint8_t ta[6];
uint8_t fcs[4];
uint8_t ra[6];
uint8_t ta[6];
uint8_t fcs[4];
};
#define CTRL_RTS_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\
@ -306,8 +306,8 @@ struct ctrl_rts_t {
struct ctrl_cts_t {
uint16_t fc;
uint16_t duration;
uint8_t ra[6];
uint8_t fcs[4];
uint8_t ra[6];
uint8_t fcs[4];
};
#define CTRL_CTS_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+IEEE802_11_RA_LEN)
@ -315,8 +315,8 @@ struct ctrl_cts_t {
struct ctrl_ack_t {
uint16_t fc;
uint16_t duration;
uint8_t ra[6];
uint8_t fcs[4];
uint8_t ra[6];
uint8_t fcs[4];
};
#define CTRL_ACK_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+IEEE802_11_RA_LEN)
@ -324,9 +324,9 @@ struct ctrl_ack_t {
struct ctrl_ps_poll_t {
uint16_t fc;
uint16_t aid;
uint8_t bssid[6];
uint8_t ta[6];
uint8_t fcs[4];
uint8_t bssid[6];
uint8_t ta[6];
uint8_t fcs[4];
};
#define CTRL_PS_POLL_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_AID_LEN+\
@ -335,9 +335,9 @@ struct ctrl_ps_poll_t {
struct ctrl_end_t {
uint16_t fc;
uint16_t duration;
uint8_t ra[6];
uint8_t bssid[6];
uint8_t fcs[4];
uint8_t ra[6];
uint8_t bssid[6];
uint8_t fcs[4];
};
#define CTRL_END_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\
@ -346,9 +346,9 @@ struct ctrl_end_t {
struct ctrl_end_ack_t {
uint16_t fc;
uint16_t duration;
uint8_t ra[6];
uint8_t bssid[6];
uint8_t fcs[4];
uint8_t ra[6];
uint8_t bssid[6];
uint8_t fcs[4];
};
#define CTRL_END_ACK_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\
@ -357,8 +357,8 @@ struct ctrl_end_ack_t {
struct ctrl_ba_t {
uint16_t fc;
uint16_t duration;
uint8_t ra[6];
uint8_t fcs[4];
uint8_t ra[6];
uint8_t fcs[4];
};
#define CTRL_BA_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+IEEE802_11_RA_LEN)
@ -366,11 +366,11 @@ struct ctrl_ba_t {
struct ctrl_bar_t {
uint16_t fc;
uint16_t dur;
uint8_t ra[6];
uint8_t ta[6];
uint8_t ra[6];
uint8_t ta[6];
uint16_t ctl;
uint16_t seq;
uint8_t fcs[4];
uint8_t fcs[4];
};
#define CTRL_BAR_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\
@ -378,12 +378,12 @@ struct ctrl_bar_t {
IEEE802_11_CTL_LEN+IEEE802_11_SEQ_LEN)
struct meshcntl_t {
uint8_t flags;
uint8_t ttl;
uint8_t seq[4];
uint8_t addr4[6];
uint8_t addr5[6];
uint8_t addr6[6];
uint8_t flags;
uint8_t ttl;
uint8_t seq[4];
uint8_t addr4[6];
uint8_t addr5[6];
uint8_t addr6[6];
};
#define IV_IV(iv) ((iv) & 0xFFFFFF)
@ -443,12 +443,12 @@ struct meshcntl_t {
* Note well: all radiotap fields are little-endian.
*/
struct ieee80211_radiotap_header {
uint8_t it_version; /* Version 0. Only increases
uint8_t it_version; /* Version 0. Only increases
* for drastic changes,
* introduction of compatible
* new fields does not count.
*/
uint8_t it_pad;
uint8_t it_pad;
uint16_t it_len; /* length of the whole
* header in bytes, including
* it_version, it_pad,
@ -553,8 +553,8 @@ struct ieee80211_radiotap_header {
*
* IEEE80211_RADIOTAP_XCHANNEL uint32_t bitmap
* uint16_t MHz
* uint8_t channel number
* uint8_t .5 dBm
* uint8_t channel number
* uint8_t .5 dBm
*
* Extended channel specification: flags (see below) followed by
* frequency in MHz, the corresponding IEEE channel number, and
@ -562,9 +562,9 @@ struct ieee80211_radiotap_header {
* units. This property supersedes IEEE80211_RADIOTAP_CHANNEL
* and only one of the two should be present.
*
* IEEE80211_RADIOTAP_MCS uint8_t known
* uint8_t flags
* uint8_t mcs
* IEEE80211_RADIOTAP_MCS uint8_t known
* uint8_t flags
* uint8_t mcs
*
* Bitset indicating which fields have known values, followed
* by bitset of flag values, followed by the MCS rate index as
@ -691,7 +691,7 @@ struct radiotap_state
{
uint32_t present;
uint8_t rate;
uint8_t rate;
};
#define PRINT_SSID(p) \
@ -2506,7 +2506,7 @@ print_radiotap_field(netdissect_options *ndo,
{
union {
int8_t i8;
uint8_t u8;
uint8_t u8;
int16_t i16;
uint16_t u16;
uint32_t u32;

View File

@ -46,10 +46,10 @@
struct aodv_rreq {
uint8_t rreq_type; /* AODV message type (1) */
uint8_t rreq_flags; /* various flags */
uint8_t rreq_zero0; /* reserved, set to zero */
uint8_t rreq_hops; /* number of hops from originator */
uint8_t rreq_type; /* AODV message type (1) */
uint8_t rreq_flags; /* various flags */
uint8_t rreq_zero0; /* reserved, set to zero */
uint8_t rreq_hops; /* number of hops from originator */
uint32_t rreq_id; /* request ID */
uint32_t rreq_da; /* destination IPv4 address */
uint32_t rreq_ds; /* destination sequence number */
@ -58,10 +58,10 @@ struct aodv_rreq {
};
#ifdef INET6
struct aodv_rreq6 {
uint8_t rreq_type; /* AODV message type (1) */
uint8_t rreq_flags; /* various flags */
uint8_t rreq_zero0; /* reserved, set to zero */
uint8_t rreq_hops; /* number of hops from originator */
uint8_t rreq_type; /* AODV message type (1) */
uint8_t rreq_flags; /* various flags */
uint8_t rreq_zero0; /* reserved, set to zero */
uint8_t rreq_hops; /* number of hops from originator */
uint32_t rreq_id; /* request ID */
struct in6_addr rreq_da; /* destination IPv6 address */
uint32_t rreq_ds; /* destination sequence number */
@ -69,10 +69,10 @@ struct aodv_rreq6 {
uint32_t rreq_os; /* originator sequence number */
};
struct aodv_rreq6_draft_01 {
uint8_t rreq_type; /* AODV message type (16) */
uint8_t rreq_flags; /* various flags */
uint8_t rreq_zero0; /* reserved, set to zero */
uint8_t rreq_hops; /* number of hops from originator */
uint8_t rreq_type; /* AODV message type (16) */
uint8_t rreq_flags; /* various flags */
uint8_t rreq_zero0; /* reserved, set to zero */
uint8_t rreq_hops; /* number of hops from originator */
uint32_t rreq_id; /* request ID */
uint32_t rreq_ds; /* destination sequence number */
uint32_t rreq_os; /* originator sequence number */
@ -89,10 +89,10 @@ struct aodv_rreq6_draft_01 {
#define RREQ_FLAGS_MASK 0xF8 /* mask for rreq_flags */
struct aodv_rrep {
uint8_t rrep_type; /* AODV message type (2) */
uint8_t rrep_flags; /* various flags */
uint8_t rrep_ps; /* prefix size */
uint8_t rrep_hops; /* number of hops from o to d */
uint8_t rrep_type; /* AODV message type (2) */
uint8_t rrep_flags; /* various flags */
uint8_t rrep_ps; /* prefix size */
uint8_t rrep_hops; /* number of hops from o to d */
uint32_t rrep_da; /* destination IPv4 address */
uint32_t rrep_ds; /* destination sequence number */
uint32_t rrep_oa; /* originator IPv4 address */
@ -100,20 +100,20 @@ struct aodv_rrep {
};
#ifdef INET6
struct aodv_rrep6 {
uint8_t rrep_type; /* AODV message type (2) */
uint8_t rrep_flags; /* various flags */
uint8_t rrep_ps; /* prefix size */
uint8_t rrep_hops; /* number of hops from o to d */
uint8_t rrep_type; /* AODV message type (2) */
uint8_t rrep_flags; /* various flags */
uint8_t rrep_ps; /* prefix size */
uint8_t rrep_hops; /* number of hops from o to d */
struct in6_addr rrep_da; /* destination IPv6 address */
uint32_t rrep_ds; /* destination sequence number */
struct in6_addr rrep_oa; /* originator IPv6 address */
uint32_t rrep_life; /* lifetime of this route */
};
struct aodv_rrep6_draft_01 {
uint8_t rrep_type; /* AODV message type (17) */
uint8_t rrep_flags; /* various flags */
uint8_t rrep_ps; /* prefix size */
uint8_t rrep_hops; /* number of hops from o to d */
uint8_t rrep_type; /* AODV message type (17) */
uint8_t rrep_flags; /* various flags */
uint8_t rrep_ps; /* prefix size */
uint8_t rrep_hops; /* number of hops from o to d */
uint32_t rrep_ds; /* destination sequence number */
struct in6_addr rrep_da; /* destination IPv6 address */
struct in6_addr rrep_oa; /* originator IPv6 address */
@ -142,10 +142,10 @@ struct rerr_unreach6_draft_01 {
#endif
struct aodv_rerr {
uint8_t rerr_type; /* AODV message type (3 or 18) */
uint8_t rerr_flags; /* various flags */
uint8_t rerr_zero0; /* reserved, set to zero */
uint8_t rerr_dc; /* destination count */
uint8_t rerr_type; /* AODV message type (3 or 18) */
uint8_t rerr_flags; /* various flags */
uint8_t rerr_zero0; /* reserved, set to zero */
uint8_t rerr_dc; /* destination count */
union {
struct rerr_unreach dest[1];
#ifdef INET6
@ -159,8 +159,8 @@ struct aodv_rerr {
#define RERR_FLAGS_MASK 0x80 /* mask for rerr_flags */
struct aodv_rrep_ack {
uint8_t ra_type;
uint8_t ra_zero0;
uint8_t ra_type;
uint8_t ra_zero0;
};
union aodv {
@ -187,13 +187,13 @@ union aodv {
#define AODV_V6_DRAFT_01_RREP_ACK 19 /* IPV6 route response acknowledgment */
struct aodv_ext {
uint8_t type; /* extension type */
uint8_t length; /* extension length */
uint8_t type; /* extension type */
uint8_t length; /* extension length */
};
struct aodv_hello {
struct aodv_ext eh; /* extension header */
uint8_t interval[4]; /* expect my next hello in
uint8_t interval[4]; /* expect my next hello in
* (n) ms
* NOTE: this is not aligned */
};

View File

@ -51,12 +51,12 @@ static const struct tok type2str[] = {
struct aarp {
uint16_t htype, ptype;
uint8_t halen, palen;
uint8_t halen, palen;
uint16_t op;
uint8_t hsaddr[6];
uint8_t psaddr[4];
uint8_t hdaddr[6];
uint8_t pdaddr[4];
uint8_t hsaddr[6];
uint8_t psaddr[4];
uint8_t hdaddr[6];
uint8_t pdaddr[4];
};
static void atp_print(netdissect_options *, const struct atATP *, u_int);

View File

@ -43,11 +43,11 @@
struct dccp_hdr {
uint16_t dccph_sport,
dccph_dport;
uint8_t dccph_doff;
uint8_t dccph_ccval_cscov;
uint8_t dccph_doff;
uint8_t dccph_ccval_cscov;
uint16_t dccph_checksum;
uint8_t dccph_xtr;
uint8_t dccph_seq[3];
uint8_t dccph_xtr;
uint8_t dccph_seq[3];
} UNALIGNED;
/**
@ -67,12 +67,12 @@ struct dccp_hdr {
struct dccp_hdr_ext {
uint16_t dccph_sport,
dccph_dport;
uint8_t dccph_doff;
uint8_t dccph_ccval_cscov;
uint8_t dccph_doff;
uint8_t dccph_ccval_cscov;
uint16_t dccph_checksum;
uint8_t dccph_xtr;
uint8_t reserved;
uint8_t dccph_seq[6];
uint8_t dccph_xtr;
uint8_t reserved;
uint8_t dccph_seq[6];
} UNALIGNED;
#define DCCPH_CCVAL(dh) (((dh)->dccph_ccval_cscov >> 4) & 0xF)
@ -97,7 +97,7 @@ struct dccp_hdr_request {
* @dccph_resp_service - Echoes the Service Code on a received DCCP-Request
*/
struct dccp_hdr_response {
uint8_t dccph_resp_ack[8]; /* always 8 bytes */
uint8_t dccph_resp_ack[8]; /* always 8 bytes */
uint32_t dccph_resp_service;
} UNALIGNED;
@ -108,8 +108,8 @@ struct dccp_hdr_response {
* @dccph_reset_service - Echoes the Service Code on a received DCCP-Request
*/
struct dccp_hdr_reset {
uint8_t dccph_reset_ack[8]; /* always 8 bytes */
uint8_t dccph_reset_code,
uint8_t dccph_reset_ack[8]; /* always 8 bytes */
uint8_t dccph_reset_code,
dccph_reset_data[3];
} UNALIGNED;

View File

@ -79,15 +79,15 @@ static const struct tok states[] = {
/* HSRP protocol header. */
struct hsrp {
uint8_t hsrp_version;
uint8_t hsrp_op_code;
uint8_t hsrp_state;
uint8_t hsrp_hellotime;
uint8_t hsrp_holdtime;
uint8_t hsrp_priority;
uint8_t hsrp_group;
uint8_t hsrp_reserved;
uint8_t hsrp_authdata[HSRP_AUTH_SIZE];
uint8_t hsrp_version;
uint8_t hsrp_op_code;
uint8_t hsrp_state;
uint8_t hsrp_hellotime;
uint8_t hsrp_holdtime;
uint8_t hsrp_priority;
uint8_t hsrp_group;
uint8_t hsrp_reserved;
uint8_t hsrp_authdata[HSRP_AUTH_SIZE];
struct in_addr hsrp_virtaddr;
};

View File

@ -74,13 +74,13 @@
*/
struct icmp6_hdr {
uint8_t icmp6_type; /* type field */
uint8_t icmp6_code; /* code field */
uint8_t icmp6_type; /* type field */
uint8_t icmp6_code; /* code field */
uint16_t icmp6_cksum; /* checksum field */
union {
uint32_t icmp6_un_data32[1]; /* type-specific field */
uint16_t icmp6_un_data16[2]; /* type-specific field */
uint8_t icmp6_un_data8[4]; /* type-specific field */
uint8_t icmp6_un_data8[4]; /* type-specific field */
} icmp6_dataun;
};
@ -267,8 +267,8 @@ struct nd_redirect { /* redirect */
#define nd_rd_reserved nd_rd_hdr.icmp6_data32[0]
struct nd_opt_hdr { /* Neighbor discovery option header */
uint8_t nd_opt_type;
uint8_t nd_opt_len;
uint8_t nd_opt_type;
uint8_t nd_opt_len;
/* followed by option specific data*/
};
@ -284,13 +284,13 @@ struct nd_opt_hdr { /* Neighbor discovery option header */
#define ND_OPT_DNSSL 31
struct nd_opt_prefix_info { /* prefix information */
uint8_t nd_opt_pi_type;
uint8_t nd_opt_pi_len;
uint8_t nd_opt_pi_prefix_len;
uint8_t nd_opt_pi_flags_reserved;
uint8_t nd_opt_pi_valid_time[4];
uint8_t nd_opt_pi_preferred_time[4];
uint8_t nd_opt_pi_reserved2[4];
uint8_t nd_opt_pi_type;
uint8_t nd_opt_pi_len;
uint8_t nd_opt_pi_prefix_len;
uint8_t nd_opt_pi_flags_reserved;
uint8_t nd_opt_pi_valid_time[4];
uint8_t nd_opt_pi_preferred_time[4];
uint8_t nd_opt_pi_reserved2[4];
struct in6_addr nd_opt_pi_prefix;
};
@ -299,23 +299,23 @@ struct nd_opt_prefix_info { /* prefix information */
#define ND_OPT_PI_FLAG_ROUTER 0x20 /*2292bis*/
struct nd_opt_rd_hdr { /* redirected header */
uint8_t nd_opt_rh_type;
uint8_t nd_opt_rh_len;
uint8_t nd_opt_rh_type;
uint8_t nd_opt_rh_len;
uint16_t nd_opt_rh_reserved1;
uint32_t nd_opt_rh_reserved2;
/* followed by IP header and data */
};
struct nd_opt_mtu { /* MTU option */
uint8_t nd_opt_mtu_type;
uint8_t nd_opt_mtu_len;
uint8_t nd_opt_mtu_type;
uint8_t nd_opt_mtu_len;
uint16_t nd_opt_mtu_reserved;
uint32_t nd_opt_mtu_mtu;
};
struct nd_opt_rdnss { /* RDNSS RFC 6106 5.1 */
uint8_t nd_opt_rdnss_type;
uint8_t nd_opt_rdnss_len;
uint8_t nd_opt_rdnss_type;
uint8_t nd_opt_rdnss_len;
uint16_t nd_opt_rdnss_reserved;
uint32_t nd_opt_rdnss_lifetime;
struct in6_addr nd_opt_rdnss_addr[1]; /* variable-length */
@ -330,25 +330,25 @@ struct nd_opt_dnssl { /* DNSSL RFC 6106 5.2 */
};
struct nd_opt_advinterval { /* Advertisement interval option */
uint8_t nd_opt_adv_type;
uint8_t nd_opt_adv_len;
uint8_t nd_opt_adv_type;
uint8_t nd_opt_adv_len;
uint16_t nd_opt_adv_reserved;
uint32_t nd_opt_adv_interval;
};
struct nd_opt_homeagent_info { /* Home Agent info */
uint8_t nd_opt_hai_type;
uint8_t nd_opt_hai_len;
uint8_t nd_opt_hai_type;
uint8_t nd_opt_hai_len;
uint16_t nd_opt_hai_reserved;
int16_t nd_opt_hai_preference;
uint16_t nd_opt_hai_lifetime;
};
struct nd_opt_route_info { /* route info */
uint8_t nd_opt_rti_type;
uint8_t nd_opt_rti_len;
uint8_t nd_opt_rti_prefixlen;
uint8_t nd_opt_rti_flags;
uint8_t nd_opt_rti_type;
uint8_t nd_opt_rti_len;
uint8_t nd_opt_rti_prefixlen;
uint8_t nd_opt_rti_flags;
uint32_t nd_opt_rti_lifetime;
/* prefix follows */
};
@ -359,11 +359,11 @@ struct nd_opt_route_info { /* route info */
struct icmp6_namelookup {
struct icmp6_hdr icmp6_nl_hdr;
uint8_t icmp6_nl_nonce[8];
uint8_t icmp6_nl_nonce[8];
int32_t icmp6_nl_ttl;
#if 0
uint8_t icmp6_nl_len;
uint8_t icmp6_nl_name[3];
uint8_t icmp6_nl_len;
uint8_t icmp6_nl_name[3];
#endif
/* could be followed by options */
};
@ -414,8 +414,8 @@ struct ni_reply_fqdn {
*/
struct icmp6_router_renum { /* router renumbering header */
struct icmp6_hdr rr_hdr;
uint8_t rr_segnum;
uint8_t rr_flags;
uint8_t rr_segnum;
uint8_t rr_flags;
uint16_t rr_maxdelay;
uint32_t rr_reserved;
};
@ -431,12 +431,12 @@ struct icmp6_router_renum { /* router renumbering header */
#define rr_seqnum rr_hdr.icmp6_data32[0]
struct rr_pco_match { /* match prefix part */
uint8_t rpm_code;
uint8_t rpm_len;
uint8_t rpm_ordinal;
uint8_t rpm_matchlen;
uint8_t rpm_minlen;
uint8_t rpm_maxlen;
uint8_t rpm_code;
uint8_t rpm_len;
uint8_t rpm_ordinal;
uint8_t rpm_matchlen;
uint8_t rpm_minlen;
uint8_t rpm_maxlen;
uint16_t rpm_reserved;
struct in6_addr rpm_prefix;
};
@ -447,10 +447,10 @@ struct rr_pco_match { /* match prefix part */
#define RPM_PCO_MAX 4
struct rr_pco_use { /* use prefix part */
uint8_t rpu_uselen;
uint8_t rpu_keeplen;
uint8_t rpu_ramask;
uint8_t rpu_raflags;
uint8_t rpu_uselen;
uint8_t rpu_keeplen;
uint8_t rpu_ramask;
uint8_t rpu_raflags;
uint32_t rpu_vltime;
uint32_t rpu_pltime;
uint32_t rpu_flags;
@ -465,8 +465,8 @@ struct rr_pco_use { /* use prefix part */
struct rr_result { /* router renumbering result message */
uint16_t rrr_flags;
uint8_t rrr_ordinal;
uint8_t rrr_matchedlen;
uint8_t rrr_ordinal;
uint8_t rrr_matchedlen;
uint32_t rrr_ifid;
struct in6_addr rrr_prefix;
};

View File

@ -49,7 +49,7 @@ struct ip6_mobility {
uint16_t ip6m_cksum; /* sum of IPv6 pseudo-header and MH */
union {
uint16_t ip6m_un_data16[1]; /* type-specific field */
uint8_t ip6m_un_data8[2]; /* type-specific fiedl */
uint8_t ip6m_un_data8[2]; /* type-specific field */
} ip6m_dataun;
};

View File

@ -68,14 +68,14 @@
struct netinfo6 {
struct in6_addr rip6_dest;
uint16_t rip6_tag;
uint8_t rip6_plen;
uint8_t rip6_metric;
uint8_t rip6_plen;
uint8_t rip6_metric;
};
struct rip6 {
uint8_t rip6_cmd;
uint8_t rip6_vers;
uint8_t rip6_res1[2];
uint8_t rip6_cmd;
uint8_t rip6_vers;
uint8_t rip6_res1[2];
union {
struct netinfo6 ru6_nets[1];
char ru6_tracefile[1];

View File

@ -81,7 +81,7 @@ struct sll_header {
uint16_t sll_pkttype; /* packet type */
uint16_t sll_hatype; /* link-layer address type */
uint16_t sll_halen; /* link-layer address length */
uint8_t sll_addr[SLL_ADDRLEN]; /* link-layer address */
uint8_t sll_addr[SLL_ADDRLEN]; /* link-layer address */
uint16_t sll_protocol; /* protocol */
};

View File

@ -39,8 +39,8 @@ struct tsp_timeval {
};
struct tsp {
uint8_t tsp_type;
uint8_t tsp_vers;
uint8_t tsp_type;
uint8_t tsp_vers;
uint16_t tsp_seq;
union {
struct tsp_timeval tspu_time;

4
tcp.h
View File

@ -43,8 +43,8 @@ struct tcphdr {
uint16_t th_dport; /* destination port */
tcp_seq th_seq; /* sequence number */
tcp_seq th_ack; /* acknowledgement number */
uint8_t th_offx2; /* data offset, rsvd */
uint8_t th_flags;
uint8_t th_offx2; /* data offset, rsvd */
uint8_t th_flags;
uint16_t th_win; /* window */
uint16_t th_sum; /* checksum */
uint16_t th_urp; /* urgent pointer */