diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:33 +0000 |
commit | 9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9 (patch) | |
tree | 2784370cda9bbf2da9114d70f05399c0b229d28c /epan/dissectors/packet-ieee8021ah.c | |
parent | Adding debian version 4.2.6-1. (diff) | |
download | wireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.tar.xz wireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.zip |
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-ieee8021ah.c')
-rw-r--r-- | epan/dissectors/packet-ieee8021ah.c | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/epan/dissectors/packet-ieee8021ah.c b/epan/dissectors/packet-ieee8021ah.c index cc127990..43877241 100644 --- a/epan/dissectors/packet-ieee8021ah.c +++ b/epan/dissectors/packet-ieee8021ah.c @@ -38,32 +38,32 @@ static void dissect_ieee8021ah_common(tvbuff_t *tvb, packet_info *pinfo, /* ethertype for 802.1ah tag - encapsulating an Ethernet packet */ static unsigned int ieee8021ah_ethertype = ETHERTYPE_IEEE_802_1AH; -static int proto_ieee8021ah = -1; -static int proto_ieee8021ad = -1; +static int proto_ieee8021ah; +static int proto_ieee8021ad; /* dot1ad B-tag fields */ -static int hf_ieee8021ad_priority = -1; -static int hf_ieee8021ad_cfi = -1; -static int hf_ieee8021ad_id = -1; -static int hf_ieee8021ad_svid = -1; -static int hf_ieee8021ad_cvid = -1; +static int hf_ieee8021ad_priority; +static int hf_ieee8021ad_cfi; +static int hf_ieee8021ad_id; +static int hf_ieee8021ad_svid; +static int hf_ieee8021ad_cvid; /* dot1ah C-tag fields */ -static int hf_ieee8021ah_priority = -1; -static int hf_ieee8021ah_drop = -1; /* drop eligibility */ -static int hf_ieee8021ah_nca = -1; /* no customer addresses (c_daddr & c_saddr are 0) */ -static int hf_ieee8021ah_res1 = -1; /* 2 bits reserved; ignored on receive */ -static int hf_ieee8021ah_res2 = -1; /* 2 bits reserved; delete frame if non-zero */ -static int hf_ieee8021ah_isid = -1; /* I-SID */ -static int hf_ieee8021ah_c_daddr = -1; /* encapsulated customer dest addr */ -static int hf_ieee8021ah_c_saddr = -1; /* encapsulated customer src addr */ - -static int hf_ieee8021ah_etype = -1; -/* static int hf_ieee8021ah_len = -1; */ -static int hf_ieee8021ah_trailer = -1; - -static gint ett_ieee8021ah = -1; -static gint ett_ieee8021ad = -1; +static int hf_ieee8021ah_priority; +static int hf_ieee8021ah_drop; /* drop eligibility */ +static int hf_ieee8021ah_nca; /* no customer addresses (c_daddr & c_saddr are 0) */ +static int hf_ieee8021ah_res1; /* 2 bits reserved; ignored on receive */ +static int hf_ieee8021ah_res2; /* 2 bits reserved; delete frame if non-zero */ +static int hf_ieee8021ah_isid; /* I-SID */ +static int hf_ieee8021ah_c_daddr; /* encapsulated customer dest addr */ +static int hf_ieee8021ah_c_saddr; /* encapsulated customer src addr */ + +static int hf_ieee8021ah_etype; +/* static int hf_ieee8021ah_len; */ +static int hf_ieee8021ah_trailer; + +static int ett_ieee8021ah; +static int ett_ieee8021ad; #define IEEE8021AD_LEN 4 #define IEEE8021AH_LEN 18 @@ -72,13 +72,13 @@ static gint ett_ieee8021ad = -1; /* FUNCTIONS ************************************************************/ -static gboolean -capture_ieee8021ah(const guchar *pd, int offset, int len, capture_packet_info_t *cpinfo, const union wtap_pseudo_header *pseudo_header _U_) +static bool +capture_ieee8021ah(const unsigned char *pd, int offset, int len, capture_packet_info_t *cpinfo, const union wtap_pseudo_header *pseudo_header _U_) { - guint16 encap_proto; + uint16_t encap_proto; if (!BYTES_ARE_IN_FRAME(offset, len, IEEE8021AH_LEN + 1)) - return FALSE; + return false; encap_proto = pntoh16( &pd[offset + IEEE8021AH_LEN - 2] ); if (encap_proto <= IEEE_802_3_MAX_LEN) { @@ -101,8 +101,8 @@ int dissect_ieee8021ad(tvbuff_t *tvb, packet_info *pinfo, { proto_tree *ptree = NULL; proto_tree *tagtree = NULL; - guint32 tci, ctci; - guint16 encap_proto; + uint32_t tci, ctci; + uint16_t encap_proto; int proto_tree_index; ethertype_data_t ethertype_data; @@ -221,8 +221,8 @@ int dissect_ieee8021ad(tvbuff_t *tvb, packet_info *pinfo, static void dissect_ieee8021ah_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree *parent, int tree_index) { - guint32 tci; - guint16 encap_proto; + uint32_t tci; + uint16_t encap_proto; proto_tree *ptree; ethertype_data_t ethertype_data; @@ -296,7 +296,7 @@ int dissect_ieee8021ah(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_item *pi; - guint32 tci; + uint32_t tci; int proto_tree_index; proto_tree *ieee8021ah_tree; @@ -386,7 +386,7 @@ proto_register_ieee8021ah(void) 0, 0x0FFF, "C-Vlan ID", HFILL }}, }; - static gint *ett[] = { + static int *ett[] = { &ett_ieee8021ah, &ett_ieee8021ad }; @@ -423,7 +423,7 @@ proto_register_ieee8021ah(void) void proto_reg_handoff_ieee8021ah(void) { - static gboolean prefs_initialized = FALSE; + static bool prefs_initialized = false; static unsigned int old_ieee8021ah_ethertype; static capture_dissector_handle_t ieee8021ah_cap_handle; @@ -438,7 +438,7 @@ proto_reg_handoff_ieee8021ah(void) ipx_cap_handle = find_capture_dissector("ipx"); llc_cap_handle = find_capture_dissector("llc"); - prefs_initialized = TRUE; + prefs_initialized = true; } else { dissector_delete_uint("ethertype", old_ieee8021ah_ethertype, ieee8021ah_handle); |