From 34124c857ec50d428bf6c14fc4f24add735c5441 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 15 Jun 2015 14:10:12 -0700 Subject: [PATCH] Define XXX_phdr structures in the order in which they appear in the union. Change-Id: Ia1fe1758998237a344889bdf8215ecfba7b871ee Reviewed-on: https://code.wireshark.org/review/8942 Reviewed-by: Guy Harris --- wiretap/wtap.h | 69 +++++++++++++++++++++++++------------------------- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/wiretap/wtap.h b/wiretap/wtap.h index 264c6b8d53..740b31aab3 100644 --- a/wiretap/wtap.h +++ b/wiretap/wtap.h @@ -390,28 +390,6 @@ extern "C" { */ -struct nstr_phdr { - gint64 rec_offset; - gint32 rec_len; - guint8 nicno_offset; - guint8 nicno_len; - guint8 dir_offset; - guint8 dir_len; - guint8 eth_offset; - guint8 pcb_offset; - guint8 l_pcb_offset; - guint8 rec_type; - guint8 vlantag_offset; - guint8 coreid_offset; - guint8 srcnodeid_offset; - guint8 destnodeid_offset; - guint8 clflags_offset; - guint8 src_vmname_len_offset; - guint8 dst_vmname_len_offset; - guint8 ns_activity_offset; - guint8 data_offset; -}; - /* Packet "pseudo-header" information for Ethernet capture files. */ struct eth_phdr { gint fcs_len; /* Number of bytes of FCS - -1 means "unknown" */ @@ -524,12 +502,6 @@ struct atm_phdr { guint32 aal5t_chksum; /* checksum for AAL5 packet */ }; -/* Packet "pseudo-header" for Nokia output */ -struct nokia_phdr { - struct eth_phdr eth; - guint8 stuff[4]; /* mysterious stuff */ -}; - /* Packet "pseudo-header" for the output from "wandsession", "wannext", "wandisplay", and similar commands on Lucent/Ascend access equipment. */ @@ -779,12 +751,6 @@ struct erf_mc_phdr { } subhdr; }; -#define LLCP_PHDR_FLAG_SENT 0 -struct llcp_phdr { - guint8 adapter; - guint8 flags; -}; - #define SITA_FRAME_DIR_TXED (0x00) /* values of sita_phdr.flags */ #define SITA_FRAME_DIR_RXED (0x01) #define SITA_FRAME_DIR (0x01) /* mask */ @@ -899,6 +865,41 @@ struct gsm_um_phdr { #define GSM_UM_CHANNEL_AGCH 7 #define GSM_UM_CHANNEL_PCH 8 +/* Pseudo-header for nstrace packets */ +struct nstr_phdr { + gint64 rec_offset; + gint32 rec_len; + guint8 nicno_offset; + guint8 nicno_len; + guint8 dir_offset; + guint8 dir_len; + guint8 eth_offset; + guint8 pcb_offset; + guint8 l_pcb_offset; + guint8 rec_type; + guint8 vlantag_offset; + guint8 coreid_offset; + guint8 srcnodeid_offset; + guint8 destnodeid_offset; + guint8 clflags_offset; + guint8 src_vmname_len_offset; + guint8 dst_vmname_len_offset; + guint8 ns_activity_offset; + guint8 data_offset; +}; + +/* Packet "pseudo-header" for Nokia output */ +struct nokia_phdr { + struct eth_phdr eth; + guint8 stuff[4]; /* mysterious stuff */ +}; + +#define LLCP_PHDR_FLAG_SENT 0 +struct llcp_phdr { + guint8 adapter; + guint8 flags; +}; + /* pseudo header for WTAP_ENCAP_LOGCAT */ struct logcat_phdr { gint version;