diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:26 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:26 +0000 |
commit | c4e8a3222648fcf22ca207f1815ebbf7cd144eeb (patch) | |
tree | 93d5c6aa93d9987680dd1adad5685e2ad698f223 /epan/dissectors/packet-sdlc.c | |
parent | Adding upstream version 4.2.6. (diff) | |
download | wireshark-c4e8a3222648fcf22ca207f1815ebbf7cd144eeb.tar.xz wireshark-c4e8a3222648fcf22ca207f1815ebbf7cd144eeb.zip |
Adding upstream version 4.4.0.upstream/4.4.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-sdlc.c')
-rw-r--r-- | epan/dissectors/packet-sdlc.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/epan/dissectors/packet-sdlc.c b/epan/dissectors/packet-sdlc.c index 78a571a6..4decbd76 100644 --- a/epan/dissectors/packet-sdlc.c +++ b/epan/dissectors/packet-sdlc.c @@ -29,21 +29,21 @@ void proto_reg_handoff_sdlc(void); static dissector_handle_t sdlc_handle; -static int proto_sdlc = -1; -static int hf_sdlc_address = -1; -static int hf_sdlc_control = -1; -static int hf_sdlc_n_r = -1; -static int hf_sdlc_n_s = -1; -static int hf_sdlc_p = -1; -static int hf_sdlc_f = -1; -static int hf_sdlc_s_ftype = -1; -static int hf_sdlc_u_modifier_cmd = -1; -static int hf_sdlc_u_modifier_resp = -1; -static int hf_sdlc_ftype_i = -1; -static int hf_sdlc_ftype_s_u = -1; - -static gint ett_sdlc = -1; -static gint ett_sdlc_control = -1; +static int proto_sdlc; +static int hf_sdlc_address; +static int hf_sdlc_control; +static int hf_sdlc_n_r; +static int hf_sdlc_n_s; +static int hf_sdlc_p; +static int hf_sdlc_f; +static int hf_sdlc_s_ftype; +static int hf_sdlc_u_modifier_cmd; +static int hf_sdlc_u_modifier_resp; +static int hf_sdlc_ftype_i; +static int hf_sdlc_ftype_s_u; + +static int ett_sdlc; +static int ett_sdlc_control; static dissector_handle_t sna_handle; @@ -64,16 +64,16 @@ dissect_sdlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ { proto_tree *sdlc_tree; proto_item *sdlc_ti; - guint8 addr; - guint16 control; + uint8_t addr; + uint16_t control; int sdlc_header_len; - gboolean is_response; + bool is_response; tvbuff_t *next_tvb; col_set_str(pinfo->cinfo, COL_PROTOCOL, "SDLC"); col_clear(pinfo->cinfo, COL_INFO); - addr = tvb_get_guint8(tvb, 0); + addr = tvb_get_uint8(tvb, 0); sdlc_header_len = 1; /* address */ /* @@ -82,13 +82,13 @@ dissect_sdlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ * direction? */ if (pinfo->p2p_dir == P2P_DIR_SENT) { - is_response = FALSE; + is_response = false; col_set_str(pinfo->cinfo, COL_RES_DL_DST, "DCE"); col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "DTE"); } else { /* XXX - what if the direction is unknown? */ - is_response = TRUE; + is_response = true; col_set_str(pinfo->cinfo, COL_RES_DL_DST, "DTE"); col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "DCE"); } @@ -108,8 +108,8 @@ dissect_sdlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ */ control = dissect_xdlc_control(tvb, 1, pinfo, sdlc_tree, hf_sdlc_control, ett_sdlc_control, &sdlc_cf_items, NULL, NULL, NULL, - is_response, FALSE, FALSE); - sdlc_header_len += XDLC_CONTROL_LEN(control, FALSE); + is_response, false, false); + sdlc_header_len += XDLC_CONTROL_LEN(control, false); proto_item_set_len(sdlc_ti, sdlc_header_len); @@ -133,7 +133,7 @@ proto_register_sdlc(void) static hf_register_info hf[] = { { &hf_sdlc_address, { "Address Field", "sdlc.address", FT_UINT8, BASE_HEX, - NULL, 0x0, "Address", HFILL }}, + NULL, 0x0, NULL, HFILL }}, { &hf_sdlc_control, { "Control Field", "sdlc.control", FT_UINT16, BASE_HEX, @@ -175,7 +175,7 @@ proto_register_sdlc(void) { "Frame type", "sdlc.control.ftype", FT_UINT8, BASE_HEX, VALS(ftype_vals), XDLC_S_U_MASK, NULL, HFILL }}, }; - static gint *ett[] = { + static int *ett[] = { &ett_sdlc, &ett_sdlc_control, }; |