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-chdlc.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-chdlc.c')
-rw-r--r-- | epan/dissectors/packet-chdlc.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/epan/dissectors/packet-chdlc.c b/epan/dissectors/packet-chdlc.c index 41c78707..eb979b69 100644 --- a/epan/dissectors/packet-chdlc.c +++ b/epan/dissectors/packet-chdlc.c @@ -36,24 +36,24 @@ void proto_reg_handoff_chdlc(void); void proto_register_slarp(void); void proto_reg_handoff_slarp(void); -static int proto_chdlc = -1; -static int hf_chdlc_addr = -1; -static int hf_chdlc_control = -1; -static int hf_chdlc_proto = -1; -static int hf_chdlc_clns_padding = -1; +static int proto_chdlc; +static int hf_chdlc_addr; +static int hf_chdlc_control; +static int hf_chdlc_proto; +static int hf_chdlc_clns_padding; -static gint ett_chdlc = -1; +static int ett_chdlc; -static int proto_slarp = -1; -static int hf_slarp_ptype = -1; -static int hf_slarp_address = -1; -static int hf_slarp_netmask = -1; -static int hf_slarp_mysequence = -1; -static int hf_slarp_yoursequence = -1; -static int hf_slarp_reliability = -1; +static int proto_slarp; +static int hf_slarp_ptype; +static int hf_slarp_address; +static int hf_slarp_netmask; +static int hf_slarp_mysequence; +static int hf_slarp_yoursequence; +static int hf_slarp_reliability; -static expert_field ei_slarp_reliability = EI_INIT; -static gint ett_slarp = -1; +static expert_field ei_slarp_reliability; +static int ett_slarp; /* * Protocol types for the Cisco HDLC format. @@ -103,21 +103,21 @@ const value_string chdlc_vals[] = { {0, NULL} }; -static gboolean -capture_chdlc( const guchar *pd, int offset, int len, capture_packet_info_t *cpinfo, const union wtap_pseudo_header *pseudo_header) { +static bool +capture_chdlc( const unsigned char *pd, int offset, int len, capture_packet_info_t *cpinfo, const union wtap_pseudo_header *pseudo_header) { if (!BYTES_ARE_IN_FRAME(offset, len, 4)) - return FALSE; + return false; switch (pntoh16(&pd[offset + 2])) { case ETHERTYPE_IP: return call_capture_dissector(ip_cap_handle, pd, offset + 4, len, cpinfo, pseudo_header); } - return FALSE; + return false; } void -chdlctype(dissector_handle_t sub_dissector, guint16 chdlc_type, +chdlctype(dissector_handle_t sub_dissector, uint16_t chdlc_type, tvbuff_t *tvb, int offset_after_chdlctype, packet_info *pinfo, proto_tree *tree, proto_tree *fh_tree, int chdlctype_id) @@ -128,7 +128,7 @@ chdlctype(dissector_handle_t sub_dissector, guint16 chdlc_type, proto_tree_add_uint(fh_tree, chdlctype_id, tvb, offset_after_chdlctype - 2, 2, chdlc_type); - padbyte = tvb_get_guint8(tvb, offset_after_chdlctype); + padbyte = tvb_get_uint8(tvb, offset_after_chdlctype); if (chdlc_type == CHDLCTYPE_OSI && !( padbyte == NLPID_ISO8473_CLNP || /* older Juniper SW does not send a padbyte */ padbyte == NLPID_ISO9542_ESIS || @@ -149,14 +149,14 @@ chdlctype(dissector_handle_t sub_dissector, guint16 chdlc_type, } } -static gint chdlc_fcs_decode = 0; /* 0 = No FCS, 1 = 16 bit FCS, 2 = 32 bit FCS */ +static int chdlc_fcs_decode; /* 0 = No FCS, 1 = 16 bit FCS, 2 = 32 bit FCS */ static int dissect_chdlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_item *ti; proto_tree *fh_tree = NULL; - guint16 proto; + uint16_t proto; dissector_handle_t sub_dissector; col_set_str(pinfo->cinfo, COL_PROTOCOL, "CHDLC"); @@ -215,7 +215,7 @@ proto_register_chdlc(void) NULL, 0x0, NULL, HFILL }}, }; - static gint *ett[] = { + static int *ett[] = { &ett_chdlc, }; @@ -281,10 +281,10 @@ dissect_slarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U { proto_item *ti; proto_tree *slarp_tree; - guint32 code; - guint32 addr; - guint32 mysequence; - guint32 yoursequence; + uint32_t code; + uint32_t addr; + uint32_t mysequence; + uint32_t yoursequence; proto_item* reliability_item; col_set_str(pinfo->cinfo, COL_PROTOCOL, "SLARP"); @@ -367,7 +367,7 @@ proto_register_slarp(void) { "Reliability", "slarp.reliability", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }}, }; - static gint *ett[] = { + static int *ett[] = { &ett_slarp, }; |