X-Git-Url: http://git.samba.org/?a=blobdiff_plain;f=xdlc.c;h=982820165aa9865bdac7a6af5d4015fd987956a2;hb=292e38e2c61edcd14bfa30ca3c72bacda1bcbe32;hp=1bbd6d5fa4394f413f402f93258ca2ae686f968b;hpb=162800efb308901e0c302517be01226130e39b19;p=metze%2Fwireshark%2Fwip.git diff --git a/xdlc.c b/xdlc.c index 1bbd6d5fa4..982820165a 100644 --- a/xdlc.c +++ b/xdlc.c @@ -2,7 +2,7 @@ * Routines for use by various SDLC-derived protocols, such as HDLC * and its derivatives LAPB, IEEE 802.2 LLC, etc.. * - * $Id: xdlc.c,v 1.13 2000/03/14 06:03:26 guy Exp $ + * $Id: xdlc.c,v 1.14 2000/05/11 08:16:00 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -249,45 +249,45 @@ dissect_xdlc_control(const u_char *pd, int offset, frame_data *fd, col_add_str(fd, COL_INFO, info); if (xdlc_tree) { if (is_extended) { - tc = proto_tree_add_uint_format(xdlc_tree, hf_xdlc_control, + tc = proto_tree_add_uint_format(xdlc_tree, hf_xdlc_control, NullTVB, offset, 2, control, "Control field: %s (0x%04X)", info, control); control_tree = proto_item_add_subtree(tc, ett_xdlc_control); - proto_tree_add_text(control_tree, offset, 2, + proto_tree_add_text(control_tree, NullTVB, offset, 2, decode_numeric_bitfield(control, XDLC_N_R_EXT_MASK, 2*8, "N(R) = %u")); if (control & XDLC_P_F_EXT) { - proto_tree_add_text(control_tree, offset, 2, + proto_tree_add_text(control_tree, NullTVB, offset, 2, decode_boolean_bitfield(control, XDLC_P_F_EXT, 2*8, (is_response ? "Final" : "Poll"), NULL)); } - proto_tree_add_text(control_tree, offset, 2, + proto_tree_add_text(control_tree, NullTVB, offset, 2, decode_enumerated_bitfield(control, XDLC_S_FTYPE_MASK, 2*8, stype_vals, "Supervisory frame - %s")); /* This will always say it's a supervisory frame */ - proto_tree_add_text(control_tree, offset, 2, + proto_tree_add_text(control_tree, NullTVB, offset, 2, decode_boolean_bitfield(control, 0x03, 2*8, "Supervisory frame", NULL)); } else { - tc = proto_tree_add_uint_format(xdlc_tree, hf_xdlc_control, + tc = proto_tree_add_uint_format(xdlc_tree, hf_xdlc_control, NullTVB, offset, 1, control, "Control field: %s (0x%02X)", info, control); control_tree = proto_item_add_subtree(tc, ett_xdlc_control); - proto_tree_add_text(control_tree, offset, 1, + proto_tree_add_text(control_tree, NullTVB, offset, 1, decode_numeric_bitfield(control, XDLC_N_R_MASK, 1*8, "N(R) = %u")); if (control & XDLC_P_F) { - proto_tree_add_text(control_tree, offset, 1, + proto_tree_add_text(control_tree, NullTVB, offset, 1, decode_boolean_bitfield(control, XDLC_P_F, 1*8, (is_response ? "Final" : "Poll"), NULL)); } - proto_tree_add_text(control_tree, offset, 1, + proto_tree_add_text(control_tree, NullTVB, offset, 1, decode_enumerated_bitfield(control, XDLC_S_FTYPE_MASK, 1*8, stype_vals, "%s")); /* This will always say it's a supervisory frame */ - proto_tree_add_text(control_tree, offset, 1, + proto_tree_add_text(control_tree, NullTVB, offset, 1, decode_boolean_bitfield(control, 0x03, 1*8, "Supervisory frame", NULL)); } @@ -323,22 +323,22 @@ dissect_xdlc_control(const u_char *pd, int offset, frame_data *fd, if (check_col(fd, COL_INFO)) col_add_str(fd, COL_INFO, info); if (xdlc_tree) { - tc = proto_tree_add_uint_format(xdlc_tree, hf_xdlc_control, + tc = proto_tree_add_uint_format(xdlc_tree, hf_xdlc_control, NullTVB, offset, 1, control, "Control field: %s (0x%02X)", info, control); control_tree = proto_item_add_subtree(tc, ett_xdlc_control); if (control & XDLC_P_F) { - proto_tree_add_text(control_tree, offset, 2, + proto_tree_add_text(control_tree, NullTVB, offset, 2, decode_boolean_bitfield(control, XDLC_P_F, 1*8, (is_response ? "Final" : "Poll"), NULL)); } - proto_tree_add_text(control_tree, offset, 1, + proto_tree_add_text(control_tree, NullTVB, offset, 1, decode_enumerated_bitfield(control, XDLC_U_MODIFIER_MASK, 1*8, (is_response ? modifier_vals_resp : modifier_vals_cmd), "%s")); /* This will always say it's an unnumbered frame */ - proto_tree_add_text(control_tree, offset, 1, + proto_tree_add_text(control_tree, NullTVB, offset, 1, decode_boolean_bitfield(control, 0x03, 1*8, "Unnumbered frame", NULL)); } @@ -366,7 +366,7 @@ dissect_xdlc_control(const u_char *pd, int offset, frame_data *fd, if (check_col(fd, COL_INFO)) col_add_str(fd, COL_INFO, info); if (xdlc_tree) { - tc = proto_tree_add_uint_format(xdlc_tree, hf_xdlc_control, + tc = proto_tree_add_uint_format(xdlc_tree, hf_xdlc_control, NullTVB, offset, (is_extended) ? 2 : 1, control, (is_extended) ? "Control field: %s (0x%04X)" @@ -374,35 +374,35 @@ dissect_xdlc_control(const u_char *pd, int offset, frame_data *fd, info, control); control_tree = proto_item_add_subtree(tc, ett_xdlc_control); if (is_extended) { - proto_tree_add_text(control_tree, offset, 2, + proto_tree_add_text(control_tree, NullTVB, offset, 2, decode_numeric_bitfield(control, XDLC_N_R_EXT_MASK, 2*8, "N(R) = %u")); - proto_tree_add_text(control_tree, offset, 2, + proto_tree_add_text(control_tree, NullTVB, offset, 2, decode_numeric_bitfield(control, XDLC_N_S_EXT_MASK, 2*8, "N(S) = %u")); if (control & XDLC_P_F_EXT) { - proto_tree_add_text(control_tree, offset, 2, + proto_tree_add_text(control_tree, NullTVB, offset, 2, decode_boolean_bitfield(control, XDLC_P_F_EXT, 2*8, "Poll", NULL)); } /* This will always say it's an information frame */ - proto_tree_add_text(control_tree, offset, 2, + proto_tree_add_text(control_tree, NullTVB, offset, 2, decode_boolean_bitfield(control, 0x01, 2*8, NULL, "Information frame")); } else { - proto_tree_add_text(control_tree, offset, 1, + proto_tree_add_text(control_tree, NullTVB, offset, 1, decode_numeric_bitfield(control, XDLC_N_R_MASK, 1*8, "N(R) = %u")); - proto_tree_add_text(control_tree, offset, 1, + proto_tree_add_text(control_tree, NullTVB, offset, 1, decode_numeric_bitfield(control, XDLC_N_S_MASK, 1*8, "N(S) = %u")); if (control & XDLC_P_F) { - proto_tree_add_text(control_tree, offset, 1, + proto_tree_add_text(control_tree, NullTVB, offset, 1, decode_boolean_bitfield(control, XDLC_P_F, 1*8, "Poll", NULL)); } /* This will always say it's an information frame */ - proto_tree_add_text(control_tree, offset, 1, + proto_tree_add_text(control_tree, NullTVB, offset, 1, decode_boolean_bitfield(control, 0x01, 1*8, NULL, "Information frame")); }