aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gprs-llc.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2008-03-04 21:05:21 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2008-03-04 21:05:21 +0000
commitbb323055b299c96b060f4d09ed4f6793a6f957f5 (patch)
treeb3280da4bedd09f3a32e75f7252628d3f4ca8caa /epan/dissectors/packet-gprs-llc.c
parent2da196a98bbcf5b2797b1ab2d4944575fb162821 (diff)
match_strval() may return NULL so don't blindly pass its return value into col_add_*() or proto_add_*(); use val_to_str() (returning "Unknown (%d)" if no match is found) instead.
svn path=/trunk/; revision=24557
Diffstat (limited to 'epan/dissectors/packet-gprs-llc.c')
-rw-r--r--epan/dissectors/packet-gprs-llc.c324
1 files changed, 163 insertions, 161 deletions
diff --git a/epan/dissectors/packet-gprs-llc.c b/epan/dissectors/packet-gprs-llc.c
index cf35ffca69..c8d6357704 100644
--- a/epan/dissectors/packet-gprs-llc.c
+++ b/epan/dissectors/packet-gprs-llc.c
@@ -7,17 +7,17 @@
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -180,7 +180,7 @@ static const true_false_string pd_bit = {
};
static const true_false_string e_bit = {
" encrypted frame",
- " non encrypted frame"
+ " non encrypted frame"
};
static const true_false_string pm_bit = {
"FCS covers the frame header and information fields",
@@ -257,37 +257,37 @@ static const value_string cr_formats_ipluss[] = {
/* CRC24 table - FCS */
guint32 tbl_crc24[256] = {
- 0x00000000, 0x00d6a776, 0x00f64557, 0x0020e221, 0x00b78115, 0x00612663, 0x0041c442, 0x00976334,
- 0x00340991, 0x00e2aee7, 0x00c24cc6, 0x0014ebb0, 0x00838884, 0x00552ff2, 0x0075cdd3, 0x00a36aa5,
- 0x00681322, 0x00beb454, 0x009e5675, 0x0048f103, 0x00df9237, 0x00093541, 0x0029d760, 0x00ff7016,
- 0x005c1ab3, 0x008abdc5, 0x00aa5fe4, 0x007cf892, 0x00eb9ba6, 0x003d3cd0, 0x001ddef1, 0x00cb7987,
- 0x00d02644, 0x00068132, 0x00266313, 0x00f0c465, 0x0067a751, 0x00b10027, 0x0091e206, 0x00474570,
- 0x00e42fd5, 0x003288a3, 0x00126a82, 0x00c4cdf4, 0x0053aec0, 0x008509b6, 0x00a5eb97, 0x00734ce1,
- 0x00b83566, 0x006e9210, 0x004e7031, 0x0098d747, 0x000fb473, 0x00d91305, 0x00f9f124, 0x002f5652,
- 0x008c3cf7, 0x005a9b81, 0x007a79a0, 0x00acded6, 0x003bbde2, 0x00ed1a94, 0x00cdf8b5, 0x001b5fc3,
- 0x00fb4733, 0x002de045, 0x000d0264, 0x00dba512, 0x004cc626, 0x009a6150, 0x00ba8371, 0x006c2407,
- 0x00cf4ea2, 0x0019e9d4, 0x00390bf5, 0x00efac83, 0x0078cfb7, 0x00ae68c1, 0x008e8ae0, 0x00582d96,
- 0x00935411, 0x0045f367, 0x00651146, 0x00b3b630, 0x0024d504, 0x00f27272, 0x00d29053, 0x00043725,
- 0x00a75d80, 0x0071faf6, 0x005118d7, 0x0087bfa1, 0x0010dc95, 0x00c67be3, 0x00e699c2, 0x00303eb4,
- 0x002b6177, 0x00fdc601, 0x00dd2420, 0x000b8356, 0x009ce062, 0x004a4714, 0x006aa535, 0x00bc0243,
- 0x001f68e6, 0x00c9cf90, 0x00e92db1, 0x003f8ac7, 0x00a8e9f3, 0x007e4e85, 0x005eaca4, 0x00880bd2,
- 0x00437255, 0x0095d523, 0x00b53702, 0x00639074, 0x00f4f340, 0x00225436, 0x0002b617, 0x00d41161,
- 0x00777bc4, 0x00a1dcb2, 0x00813e93, 0x005799e5, 0x00c0fad1, 0x00165da7, 0x0036bf86, 0x00e018f0,
- 0x00ad85dd, 0x007b22ab, 0x005bc08a, 0x008d67fc, 0x001a04c8, 0x00cca3be, 0x00ec419f, 0x003ae6e9,
- 0x00998c4c, 0x004f2b3a, 0x006fc91b, 0x00b96e6d, 0x002e0d59, 0x00f8aa2f, 0x00d8480e, 0x000eef78,
- 0x00c596ff, 0x00133189, 0x0033d3a8, 0x00e574de, 0x007217ea, 0x00a4b09c, 0x008452bd, 0x0052f5cb,
- 0x00f19f6e, 0x00273818, 0x0007da39, 0x00d17d4f, 0x00461e7b, 0x0090b90d, 0x00b05b2c, 0x0066fc5a,
- 0x007da399, 0x00ab04ef, 0x008be6ce, 0x005d41b8, 0x00ca228c, 0x001c85fa, 0x003c67db, 0x00eac0ad,
- 0x0049aa08, 0x009f0d7e, 0x00bfef5f, 0x00694829, 0x00fe2b1d, 0x00288c6b, 0x00086e4a, 0x00dec93c,
- 0x0015b0bb, 0x00c317cd, 0x00e3f5ec, 0x0035529a, 0x00a231ae, 0x007496d8, 0x005474f9, 0x0082d38f,
- 0x0021b92a, 0x00f71e5c, 0x00d7fc7d, 0x00015b0b, 0x0096383f, 0x00409f49, 0x00607d68, 0x00b6da1e,
- 0x0056c2ee, 0x00806598, 0x00a087b9, 0x007620cf, 0x00e143fb, 0x0037e48d, 0x001706ac, 0x00c1a1da,
- 0x0062cb7f, 0x00b46c09, 0x00948e28, 0x0042295e, 0x00d54a6a, 0x0003ed1c, 0x00230f3d, 0x00f5a84b,
- 0x003ed1cc, 0x00e876ba, 0x00c8949b, 0x001e33ed, 0x008950d9, 0x005ff7af, 0x007f158e, 0x00a9b2f8,
- 0x000ad85d, 0x00dc7f2b, 0x00fc9d0a, 0x002a3a7c, 0x00bd5948, 0x006bfe3e, 0x004b1c1f, 0x009dbb69,
- 0x0086e4aa, 0x005043dc, 0x0070a1fd, 0x00a6068b, 0x003165bf, 0x00e7c2c9, 0x00c720e8, 0x0011879e,
- 0x00b2ed3b, 0x00644a4d, 0x0044a86c, 0x00920f1a, 0x00056c2e, 0x00d3cb58, 0x00f32979, 0x00258e0f,
- 0x00eef788, 0x003850fe, 0x0018b2df, 0x00ce15a9, 0x0059769d, 0x008fd1eb, 0x00af33ca, 0x007994bc,
+ 0x00000000, 0x00d6a776, 0x00f64557, 0x0020e221, 0x00b78115, 0x00612663, 0x0041c442, 0x00976334,
+ 0x00340991, 0x00e2aee7, 0x00c24cc6, 0x0014ebb0, 0x00838884, 0x00552ff2, 0x0075cdd3, 0x00a36aa5,
+ 0x00681322, 0x00beb454, 0x009e5675, 0x0048f103, 0x00df9237, 0x00093541, 0x0029d760, 0x00ff7016,
+ 0x005c1ab3, 0x008abdc5, 0x00aa5fe4, 0x007cf892, 0x00eb9ba6, 0x003d3cd0, 0x001ddef1, 0x00cb7987,
+ 0x00d02644, 0x00068132, 0x00266313, 0x00f0c465, 0x0067a751, 0x00b10027, 0x0091e206, 0x00474570,
+ 0x00e42fd5, 0x003288a3, 0x00126a82, 0x00c4cdf4, 0x0053aec0, 0x008509b6, 0x00a5eb97, 0x00734ce1,
+ 0x00b83566, 0x006e9210, 0x004e7031, 0x0098d747, 0x000fb473, 0x00d91305, 0x00f9f124, 0x002f5652,
+ 0x008c3cf7, 0x005a9b81, 0x007a79a0, 0x00acded6, 0x003bbde2, 0x00ed1a94, 0x00cdf8b5, 0x001b5fc3,
+ 0x00fb4733, 0x002de045, 0x000d0264, 0x00dba512, 0x004cc626, 0x009a6150, 0x00ba8371, 0x006c2407,
+ 0x00cf4ea2, 0x0019e9d4, 0x00390bf5, 0x00efac83, 0x0078cfb7, 0x00ae68c1, 0x008e8ae0, 0x00582d96,
+ 0x00935411, 0x0045f367, 0x00651146, 0x00b3b630, 0x0024d504, 0x00f27272, 0x00d29053, 0x00043725,
+ 0x00a75d80, 0x0071faf6, 0x005118d7, 0x0087bfa1, 0x0010dc95, 0x00c67be3, 0x00e699c2, 0x00303eb4,
+ 0x002b6177, 0x00fdc601, 0x00dd2420, 0x000b8356, 0x009ce062, 0x004a4714, 0x006aa535, 0x00bc0243,
+ 0x001f68e6, 0x00c9cf90, 0x00e92db1, 0x003f8ac7, 0x00a8e9f3, 0x007e4e85, 0x005eaca4, 0x00880bd2,
+ 0x00437255, 0x0095d523, 0x00b53702, 0x00639074, 0x00f4f340, 0x00225436, 0x0002b617, 0x00d41161,
+ 0x00777bc4, 0x00a1dcb2, 0x00813e93, 0x005799e5, 0x00c0fad1, 0x00165da7, 0x0036bf86, 0x00e018f0,
+ 0x00ad85dd, 0x007b22ab, 0x005bc08a, 0x008d67fc, 0x001a04c8, 0x00cca3be, 0x00ec419f, 0x003ae6e9,
+ 0x00998c4c, 0x004f2b3a, 0x006fc91b, 0x00b96e6d, 0x002e0d59, 0x00f8aa2f, 0x00d8480e, 0x000eef78,
+ 0x00c596ff, 0x00133189, 0x0033d3a8, 0x00e574de, 0x007217ea, 0x00a4b09c, 0x008452bd, 0x0052f5cb,
+ 0x00f19f6e, 0x00273818, 0x0007da39, 0x00d17d4f, 0x00461e7b, 0x0090b90d, 0x00b05b2c, 0x0066fc5a,
+ 0x007da399, 0x00ab04ef, 0x008be6ce, 0x005d41b8, 0x00ca228c, 0x001c85fa, 0x003c67db, 0x00eac0ad,
+ 0x0049aa08, 0x009f0d7e, 0x00bfef5f, 0x00694829, 0x00fe2b1d, 0x00288c6b, 0x00086e4a, 0x00dec93c,
+ 0x0015b0bb, 0x00c317cd, 0x00e3f5ec, 0x0035529a, 0x00a231ae, 0x007496d8, 0x005474f9, 0x0082d38f,
+ 0x0021b92a, 0x00f71e5c, 0x00d7fc7d, 0x00015b0b, 0x0096383f, 0x00409f49, 0x00607d68, 0x00b6da1e,
+ 0x0056c2ee, 0x00806598, 0x00a087b9, 0x007620cf, 0x00e143fb, 0x0037e48d, 0x001706ac, 0x00c1a1da,
+ 0x0062cb7f, 0x00b46c09, 0x00948e28, 0x0042295e, 0x00d54a6a, 0x0003ed1c, 0x00230f3d, 0x00f5a84b,
+ 0x003ed1cc, 0x00e876ba, 0x00c8949b, 0x001e33ed, 0x008950d9, 0x005ff7af, 0x007f158e, 0x00a9b2f8,
+ 0x000ad85d, 0x00dc7f2b, 0x00fc9d0a, 0x002a3a7c, 0x00bd5948, 0x006bfe3e, 0x004b1c1f, 0x009dbb69,
+ 0x0086e4aa, 0x005043dc, 0x0070a1fd, 0x00a6068b, 0x003165bf, 0x00e7c2c9, 0x00c720e8, 0x0011879e,
+ 0x00b2ed3b, 0x00644a4d, 0x0044a86c, 0x00920f1a, 0x00056c2e, 0x00d3cb58, 0x00f32979, 0x00258e0f,
+ 0x00eef788, 0x003850fe, 0x0018b2df, 0x00ce15a9, 0x0059769d, 0x008fd1eb, 0x00af33ca, 0x007994bc,
0x00dafe19, 0x000c596f, 0x002cbb4e, 0x00fa1c38, 0x006d7f0c, 0x00bbd87a, 0x009b3a5b, 0x004d9d2d
};
@@ -332,15 +332,15 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *uinfo_tree = NULL;
/* END MLT CHANGES */
- if (check_col(pinfo->cinfo, COL_PROTOCOL))
+ if (check_col(pinfo->cinfo, COL_PROTOCOL))
{
col_set_str(pinfo->cinfo, COL_PROTOCOL, "GPRS-LLC");
}
-
+
addr_fld = tvb_get_guint8(tvb,offset);
offset++;
-
- if (addr_fld > 128 )
+
+ if (addr_fld > 128 )
{
if (check_col(pinfo->cinfo,COL_INFO))
{
@@ -348,15 +348,15 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
return;
}
-
+
sapi = addr_fld & 0xF;
-
- if (check_col(pinfo->cinfo, COL_INFO))
+
+ if (check_col(pinfo->cinfo, COL_INFO))
{
- col_add_fstr(pinfo->cinfo, COL_INFO, "SAPI: %s", match_strval(sapi,sapi_abrv));
+ col_add_fstr(pinfo->cinfo, COL_INFO, "SAPI: %s", val_to_str(sapi,sapi_abrv, "Unknown (%d)"));
}
-
-
+
+
length = tvb_reported_length(tvb);
if (tvb_length(tvb) >= length && length >= 3)
{
@@ -380,7 +380,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
fcs_status = FCS_NOT_VALID;
}
- }
+ }
else
{
/* We don't have enough data to compute the FCS. */
@@ -391,14 +391,16 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
fcs_calc = 0;
crc_start = 0;
}
-
+
/* In the interest of speed, if "tree" is NULL, don't do any work not
necessary to generate protocol tree items. */
-
- if (tree)
+
+ if (tree)
{
- ti = proto_tree_add_protocol_format(tree, proto_llcgprs, tvb, 0, -1,"MS-SGSN LLC (Mobile Station - Serving GPRS Support Node Logical Link Control) SAPI: %s", match_strval(sapi,sapi_t));
+ ti = proto_tree_add_protocol_format(tree, proto_llcgprs, tvb, 0, -1,
+ "MS-SGSN LLC (Mobile Station - Serving GPRS Support Node Logical Link Control) SAPI: %s",
+ val_to_str(sapi,sapi_t, "Unknown (%d)"));
llcgprs_tree = proto_item_add_subtree(ti, ett_llcgprs);
@@ -406,7 +408,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
switch (fcs_status) {
case FCS_VALID:
- proto_tree_add_text (llcgprs_tree, tvb, crc_start, 3,
+ proto_tree_add_text (llcgprs_tree, tvb, crc_start, 3,
"FCS: 0x%06x (correct)", fcs_calc&0xffffff);
break;
@@ -420,25 +422,25 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
addres_field_item = proto_tree_add_uint_format(llcgprs_tree,hf_llcgprs_sapi,
- tvb, 0,1, sapi, "Address field SAPI: %s", match_strval(sapi,sapi_abrv));
+ tvb, 0,1, sapi, "Address field SAPI: %s", val_to_str(sapi,sapi_abrv, "Unknown (%d)"));
ad_f_tree = proto_item_add_subtree(addres_field_item, ett_llcgprs_adf);
proto_tree_add_boolean(ad_f_tree, hf_llcgprs_pd, tvb, 0, 1, addr_fld );
proto_tree_add_boolean(ad_f_tree, hf_llcgprs_cr, tvb, 0, 1, addr_fld );
proto_tree_add_uint(ad_f_tree, hf_llcgprs_sapib, tvb, 0, 1, addr_fld );
- }
+ }
+
-
ctrl_fld_fb = tvb_get_guint8(tvb,offset);
if (ctrl_fld_fb < 0xC0)
{
frame_format = (ctrl_fld_fb < 0x80)? I_FORMAT : S_FORMAT;
}
- else
+ else
{
frame_format = (ctrl_fld_fb < 0xe0 )? UI_FORMAT : U_FORMAT;
- }
+ }
switch (frame_format)
{
@@ -461,7 +463,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (check_col(pinfo->cinfo, COL_INFO))
{
- col_append_str(pinfo->cinfo, COL_INFO, match_strval(epm, cr_formats_ipluss));
+ col_append_str(pinfo->cinfo, COL_INFO, val_to_str(epm, cr_formats_ipluss, "Unknown (%d)"));
col_append_fstr(pinfo->cinfo, COL_INFO, ", N(S) = %u", ns);
col_append_fstr(pinfo->cinfo, COL_INFO, ", N(R) = %u", nr);
}
@@ -470,9 +472,9 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint32 tmp;
- ctrl_field_item = proto_tree_add_text(llcgprs_tree, tvb, (offset-3),
- 3,"Information format: %s: N(S) = %u, N(R) = %u",
- match_strval(epm, cr_formats_ipluss), ns, nr);
+ ctrl_field_item = proto_tree_add_text(llcgprs_tree, tvb, (offset-3),
+ 3,"Information format: %s: N(S) = %u, N(R) = %u",
+ val_to_str(epm, cr_formats_ipluss, "Unknown (%d)"), ns, nr);
ctrl_f_tree = proto_item_add_subtree(ctrl_field_item, ett_llcgprs_sframe);
/* retrieve the second octet */
@@ -488,7 +490,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_isack_nr, tvb, offset-3, 3, tmp);
proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_isack_sfb, tvb, offset-3, 3, ctrl_fld_ui_s);
}
-
+
/* check to see if epm is SACK - meaning this is an ISACK frame */
if (epm == 0x03)
{
@@ -515,7 +517,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 r_byte = 0;
guint16 location = offset;
- ctrl_field_item = proto_tree_add_text(llcgprs_tree, tvb, (offset-1),
+ ctrl_field_item = proto_tree_add_text(llcgprs_tree, tvb, (offset-1),
(k+1), "SACK FRAME: k = %u", k);
ctrl_f_tree = proto_item_add_subtree(ctrl_field_item, ett_llcgprs_sframe);
@@ -534,10 +536,10 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* step past the R Bitmap */
offset += k;
}
-
+
if ((sapi == SAPI_TOM2) || (sapi == SAPI_TOM8))
{
- /* if SAPI is TOM do other parsing */
+ /* if SAPI is TOM do other parsing */
if (tree)
{
guint8 tom_byte = 0;
@@ -549,9 +551,9 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
remaining_length = (tom_byte >> 4) & 0x0F;
tom_pd = tom_byte & 0x0F;
- ctrl_field_item = proto_tree_add_text(llcgprs_tree, tvb, offset,
- (crc_start-offset), "TOM Envelope - Protocol: %s",
- match_strval(tom_pd, tompd_formats));
+ ctrl_field_item = proto_tree_add_text(llcgprs_tree, tvb, offset,
+ (crc_start-offset), "TOM Envelope - Protocol: %s",
+ val_to_str(tom_pd, tompd_formats, "Unknown (%d)"));
ctrl_f_tree = proto_item_add_subtree(ctrl_field_item, ett_llcgprs_sframe);
@@ -569,7 +571,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
tom_byte = tvb_get_guint8(tvb, offset);
- proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_tom_header, tvb,
+ proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_tom_header, tvb,
offset, 1, tom_byte);
/* step to the next byte */
@@ -583,7 +585,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
tom_byte = tvb_get_guint8(tvb, offset);
- proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_tom_data, tvb,
+ proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_tom_data, tvb,
offset, 1, tom_byte);
/* step to the next byte */
@@ -603,7 +605,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
}
/* END MLT CHANGES */
-
+
break;
case S_FORMAT:
case UI_FORMAT:
@@ -618,29 +620,29 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (check_col(pinfo->cinfo, COL_INFO))
{
col_append_str(pinfo->cinfo, COL_INFO, ", S, ");
- col_append_str(pinfo->cinfo, COL_INFO, match_strval(epm,cr_formats_ipluss));
+ col_append_str(pinfo->cinfo, COL_INFO, val_to_str(epm,cr_formats_ipluss, "Unknown (%d)"));
col_append_fstr(pinfo->cinfo, COL_INFO, ", N(R) = %u", nu);
}
-
+
if (tree)
{
ctrl_field_item = proto_tree_add_text(llcgprs_tree, tvb, offset-2, 2,
"Supervisory format: %s: N(R) = %u",
- match_strval(epm,cr_formats_ipluss), nu);
+ val_to_str(epm,cr_formats_ipluss, "Unknown (%d)"), nu);
ctrl_f_tree = proto_item_add_subtree(ctrl_field_item, ett_llcgprs_sframe);
proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_S_fmt, tvb, offset-2,
2, ctrl_fld_ui_s);
- proto_tree_add_boolean(ctrl_f_tree, hf_llcgprs_As, tvb, offset-2,
+ proto_tree_add_boolean(ctrl_f_tree, hf_llcgprs_As, tvb, offset-2,
2, ctrl_fld_ui_s);
/* MLT CHANGES - added spare bits */
- proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_sspare, tvb, offset-2,
+ proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_sspare, tvb, offset-2,
2, ctrl_fld_ui_s);
/* END MLT CHANGES */
- proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_NR, tvb, offset-2,
+ proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_NR, tvb, offset-2,
2, ctrl_fld_ui_s);
- proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_sjsd, tvb, offset-2,
+ proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_sjsd, tvb, offset-2,
2, ctrl_fld_ui_s);
}
@@ -657,16 +659,16 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 r_byte = 0;
guint16 location = offset;
- ctrl_field_item = proto_tree_add_text(llcgprs_tree, tvb, offset,
+ ctrl_field_item = proto_tree_add_text(llcgprs_tree, tvb, offset,
sack_length, "SACK FRAME: length = %u", sack_length);
-
+
/* display the R Bitmap */
for (loop_count = 0; loop_count < sack_length; loop_count++)
{
r_byte = tvb_get_guint8(tvb, location);
- proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_rbyte, tvb,
+ proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_rbyte, tvb,
location, 1, r_byte);
-
+
location++;
}
@@ -690,9 +692,9 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
remaining_length = (tom_byte >> 4) & 0x0F;
tom_pd = tom_byte & 0x0F;
- ctrl_field_item = proto_tree_add_text(llcgprs_tree, tvb, offset,
- (crc_start-offset), "TOM Envelope - Protocol: %s",
- match_strval(tom_pd, tompd_formats));
+ ctrl_field_item = proto_tree_add_text(llcgprs_tree, tvb, offset,
+ (crc_start-offset), "TOM Envelope - Protocol: %s",
+ val_to_str(tom_pd, tompd_formats, "Unknown (%d)"));
ctrl_f_tree = proto_item_add_subtree(ctrl_field_item, ett_llcgprs_sframe);
@@ -710,7 +712,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
tom_byte = tvb_get_guint8(tvb, offset);
- proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_tom_header, tvb,
+ proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_tom_header, tvb,
offset, 1, tom_byte);
/* step to the next byte */
@@ -725,7 +727,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
tom_byte = tvb_get_guint8(tvb, offset);
- proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_tom_data, tvb,
+ proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_tom_data, tvb,
offset, 1, tom_byte);
/* step to the next byte */
@@ -748,24 +750,24 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
else
{
/*UI format*/
- if (check_col(pinfo->cinfo, COL_INFO))
+ if (check_col(pinfo->cinfo, COL_INFO))
{
col_append_str(pinfo->cinfo, COL_INFO, ", UI, ");
- col_append_str(pinfo->cinfo, COL_INFO, match_strval(epm, pme ));
+ col_append_str(pinfo->cinfo, COL_INFO, val_to_str(epm, pme, "Unknown (%d)"));
col_append_fstr(pinfo->cinfo,COL_INFO, ", N(U) = %u", nu);
}
-
+
if (tree)
- {
- ctrl_field_item = proto_tree_add_text(llcgprs_tree, tvb, offset-2,
+ {
+ ctrl_field_item = proto_tree_add_text(llcgprs_tree, tvb, offset-2,
2, "Unnumbered Information format - UI, N(U) = %u", nu);
ctrl_f_tree = proto_item_add_subtree(ctrl_field_item, ett_llcgprs_ctrlf);
- proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_U_fmt, tvb, offset-2,
+ proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_U_fmt, tvb, offset-2,
2, ctrl_fld_ui_s);
proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_sp_bits, tvb, offset-2,
2, ctrl_fld_ui_s);
- proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_NU, tvb, offset-2, 2,
+ proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_NU, tvb, offset-2, 2,
ctrl_fld_ui_s);
proto_tree_add_boolean(ctrl_f_tree, hf_llcgprs_E_bit, tvb, offset-2,
2, ctrl_fld_ui_s);
@@ -781,7 +783,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Either we're ignoring the cipher bit
* (because the bit is set but the
* data is unciphered), and the data has
- * a valid FCS, or the cipher
+ * a valid FCS, or the cipher
* bit isn't set (indicating that the
* data is unciphered). Try dissecting
* it with a subdissector. */
@@ -800,9 +802,9 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
remaining_length = (tom_byte >> 4) & 0x0F;
tom_pd = tom_byte & 0x0F;
- ctrl_field_item = proto_tree_add_text(llcgprs_tree, tvb, offset,
- (crc_start-offset), "TOM Envelope - Protocol: %s",
- match_strval(tom_pd, tompd_formats));
+ ctrl_field_item = proto_tree_add_text(llcgprs_tree, tvb, offset,
+ (crc_start-offset), "TOM Envelope - Protocol: %s",
+ val_to_str(tom_pd, tompd_formats, "Unknown (%d)"));
ctrl_f_tree = proto_item_add_subtree(ctrl_field_item, ett_llcgprs_sframe);
@@ -820,7 +822,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
tom_byte = tvb_get_guint8(tvb, offset);
- proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_tom_header, tvb,
+ proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_tom_header, tvb,
offset, 1, tom_byte);
/* step to the next byte */
@@ -835,7 +837,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
tom_byte = tvb_get_guint8(tvb, offset);
- proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_tom_data, tvb,
+ proto_tree_add_uint(ctrl_f_tree, hf_llcgprs_tom_data, tvb,
offset, 1, tom_byte);
/* step to the next byte */
@@ -867,16 +869,16 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tmp = 0;
tmp = ctrl_fld_fb & 0xf;
- if (check_col(pinfo->cinfo, COL_INFO))
+ if (check_col(pinfo->cinfo, COL_INFO))
{
col_append_str(pinfo->cinfo, COL_INFO, ", U, ");
- col_append_str(pinfo->cinfo, COL_INFO,
+ col_append_str(pinfo->cinfo, COL_INFO,
val_to_str(tmp, cr_formats_unnumb,"Unknown/invalid code:%X"));
}
if(tree){
ui_ti = proto_tree_add_text(llcgprs_tree, tvb, (offset-1), (crc_start-1),
- "Unnumbered frame: %s",
+ "Unnumbered frame: %s",
val_to_str(tmp,cr_formats_unnumb, "Unknown/invalid code:%X"));
ui_tree = proto_item_add_subtree(ui_ti, ett_ui);
@@ -899,7 +901,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* These frames SHOULD NOT have an info field */
if (tree)
{
- ui_ti = proto_tree_add_text(llcgprs_tree, tvb, offset, (crc_start-2),
+ ui_ti = proto_tree_add_text(llcgprs_tree, tvb, offset, (crc_start-2),
"No Information Field");
ui_tree = proto_item_add_subtree(ui_ti, ett_ui);
}
@@ -918,7 +920,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 ending = 0;
int loop_counter = 0;
- ui_ti = proto_tree_add_text(llcgprs_tree, tvb, offset, (crc_start-2),
+ ui_ti = proto_tree_add_text(llcgprs_tree, tvb, offset, (crc_start-2),
"Information Field: Length = %u", info_len);
ui_tree = proto_item_add_subtree(ui_ti, ett_ui);
@@ -926,8 +928,8 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
/* parse the XID parameters */
byte1 = tvb_get_guint8(tvb, location);
-
- if (byte1 & 0x80)
+
+ if (byte1 & 0x80)
{
guint8 xid_param_len_high = 0;
guint8 xid_param_len_low = 0;
@@ -958,23 +960,23 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tmp = byte1 & 0x7C;
tmp = tmp >> 2;
- uinfo_field = proto_tree_add_text(ui_tree, tvb, location,
- (ending - 1), "XID Parameter Type: %s",
+ uinfo_field = proto_tree_add_text(ui_tree, tvb, location,
+ (ending - 1), "XID Parameter Type: %s",
val_to_str(tmp, xid_param_type_str,"Reserved Type:%X"));
uinfo_tree = proto_item_add_subtree(uinfo_field, ett_ui);
- proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_xl, tvb,
+ proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_xl, tvb,
location, 1, byte1);
- proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_type, tvb,
+ proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_type, tvb,
location, 1, byte1);
- proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_len1, tvb,
+ proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_len1, tvb,
location, 1, byte1);
if (byte1 & 0x80) {
/* length continued into byte 2 */
- proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_len2, tvb,
+ proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_len2, tvb,
location, 1, byte2);
- proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_spare, tvb,
+ proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_spare, tvb,
location, 1, byte2);
/* be sure to account for the second byte of length */
@@ -986,7 +988,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
/* grab the information in the XID param */
byte2 = tvb_get_guint8(tvb, location);
- proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_byte, tvb,
+ proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_byte, tvb,
location, 1, byte2);
location++;
@@ -995,7 +997,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
else
{
- ui_ti = proto_tree_add_text(llcgprs_tree, tvb, offset, (crc_start-2),
+ ui_ti = proto_tree_add_text(llcgprs_tree, tvb, offset, (crc_start-2),
"No Information Field");
ui_tree = proto_item_add_subtree(ui_ti, ett_ui);
}
@@ -1014,7 +1016,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 ending = 0;
int loop_counter = 0;
- ui_ti = proto_tree_add_text(llcgprs_tree, tvb, offset, (crc_start-2),
+ ui_ti = proto_tree_add_text(llcgprs_tree, tvb, offset, (crc_start-2),
"Information Field: Length = %u", info_len);
ui_tree = proto_item_add_subtree(ui_ti, ett_ui);
@@ -1022,8 +1024,8 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
/* parse the XID parameters */
byte1 = tvb_get_guint8(tvb, location);
-
- if (byte1 & 0x80)
+
+ if (byte1 & 0x80)
{
guint8 xid_param_len_high = 0;
guint8 xid_param_len_low = 0;
@@ -1063,28 +1065,28 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
value <<= 8;
value |= (unsigned long)tvb_get_guint8(tvb, location+i );
}
- uinfo_field = proto_tree_add_text(ui_tree, tvb, location, (ending - 1),
- "XID Parameter Type: %s - Value: %lu",
+ uinfo_field = proto_tree_add_text(ui_tree, tvb, location, (ending - 1),
+ "XID Parameter Type: %s - Value: %lu",
val_to_str(tmp, xid_param_type_str,"Reserved Type:%X"),value);
}
else
- uinfo_field = proto_tree_add_text(ui_tree, tvb, location, (ending - 1),
- "XID Parameter Type: %s",
+ uinfo_field = proto_tree_add_text(ui_tree, tvb, location, (ending - 1),
+ "XID Parameter Type: %s",
val_to_str(tmp, xid_param_type_str,"Reserved Type:%X"));
uinfo_tree = proto_item_add_subtree(uinfo_field, ett_ui);
- proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_xl, tvb, location,
+ proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_xl, tvb, location,
1, byte1);
- proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_type, tvb, location,
+ proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_type, tvb, location,
1, byte1);
- proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_len1, tvb, location,
+ proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_len1, tvb, location,
1, byte1);
if (byte1 & 0x80) {
/* length continued into byte 2 */
- proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_len2, tvb, location,
+ proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_len2, tvb, location,
1, byte2);
- proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_spare, tvb, location,
+ proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_spare, tvb, location,
1, byte2);
/* be sure to account for the second byte of length */
@@ -1096,7 +1098,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
/* grab the information in the XID param */
byte2 = tvb_get_guint8(tvb, location);
- proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_byte, tvb, location,
+ proto_tree_add_uint(uinfo_tree, hf_llcgprs_xid_byte, tvb, location,
1, byte2);
location++;
@@ -1113,11 +1115,11 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int loop_counter = 0;
int location = 0;
- ui_ti = proto_tree_add_text(llcgprs_tree, tvb, offset, (crc_start-2),
+ ui_ti = proto_tree_add_text(llcgprs_tree, tvb, offset, (crc_start-2),
"Information Field: Length = %u", info_len);
ui_tree = proto_item_add_subtree(ui_ti, ett_ui);
- uinfo_field = proto_tree_add_text(ui_tree, tvb, offset, 6,
+ uinfo_field = proto_tree_add_text(ui_tree, tvb, offset, 6,
"Rejected Frame Control Field");
uinfo_tree = proto_item_add_subtree(uinfo_field, ett_ui);
@@ -1126,32 +1128,32 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
/* display the rejected frame control field */
cf_byte = tvb_get_ntohs(tvb, location);
- proto_tree_add_uint(uinfo_tree, hf_llcgprs_frmr_cf, tvb, location,
+ proto_tree_add_uint(uinfo_tree, hf_llcgprs_frmr_cf, tvb, location,
2, cf_byte);
location += 2;
}
- uinfo_field = proto_tree_add_text(ui_tree, tvb, location, 4,
+ uinfo_field = proto_tree_add_text(ui_tree, tvb, location, 4,
"Information Field Data");
uinfo_tree = proto_item_add_subtree(uinfo_field, ett_ui);
fld_vars = tvb_get_ntohl(tvb, location);
- proto_tree_add_uint(uinfo_tree, hf_llcgprs_frmr_spare, tvb, location,
+ proto_tree_add_uint(uinfo_tree, hf_llcgprs_frmr_spare, tvb, location,
4, fld_vars);
- proto_tree_add_uint(uinfo_tree, hf_llcgprs_frmr_vs, tvb, location,
+ proto_tree_add_uint(uinfo_tree, hf_llcgprs_frmr_vs, tvb, location,
2, fld_vars);
- proto_tree_add_uint(uinfo_tree, hf_llcgprs_frmr_vr, tvb, (location + 1),
+ proto_tree_add_uint(uinfo_tree, hf_llcgprs_frmr_vr, tvb, (location + 1),
2, fld_vars);
- proto_tree_add_uint(uinfo_tree, hf_llcgprs_frmr_cr, tvb, (location + 2),
+ proto_tree_add_uint(uinfo_tree, hf_llcgprs_frmr_cr, tvb, (location + 2),
1, fld_vars);
- proto_tree_add_uint(uinfo_tree, hf_llcgprs_frmr_w4, tvb, (location + 3),
+ proto_tree_add_uint(uinfo_tree, hf_llcgprs_frmr_w4, tvb, (location + 3),
1, fld_vars);
- proto_tree_add_uint(uinfo_tree, hf_llcgprs_frmr_w3, tvb, (location + 3),
+ proto_tree_add_uint(uinfo_tree, hf_llcgprs_frmr_w3, tvb, (location + 3),
1, fld_vars);
- proto_tree_add_uint(uinfo_tree, hf_llcgprs_frmr_w2, tvb, (location + 3),
+ proto_tree_add_uint(uinfo_tree, hf_llcgprs_frmr_w2, tvb, (location + 3),
1, fld_vars);
- proto_tree_add_uint(uinfo_tree, hf_llcgprs_frmr_w1, tvb, (location + 3),
+ proto_tree_add_uint(uinfo_tree, hf_llcgprs_frmr_w1, tvb, (location + 3),
1, fld_vars);
}
break;
@@ -1160,7 +1162,7 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
/* END MLT CHANGES */
break;
- }
+ }
}
@@ -1170,19 +1172,19 @@ dissect_llcgprs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
void
proto_register_llcgprs(void)
-{
+{
/* Setup list of header fields See Section 1.6.1 for details*/
static hf_register_info hf[] = {
{ &hf_llcgprs_sapi,
{ "SAPI", "llcgprs.sapi", FT_UINT8, BASE_DEC, VALS(sapi_abrv), 0x0,"Service Access Point Identifier", HFILL }},
- { &hf_llcgprs_pd,
+ { &hf_llcgprs_pd,
{ "Protocol Discriminator_bit", "llcgprs.pd", FT_BOOLEAN,8, TFS(&pd_bit), 0x80, " Protocol Discriminator bit (should be 0)", HFILL }},
{&hf_llcgprs_sjsd,
{ "Supervisory function bits","llcgprs.s1s2", FT_UINT16, BASE_HEX, VALS(cr_formats_ipluss),0x3, "Supervisory functions bits",HFILL }},
- { &hf_llcgprs_cr,
+ { &hf_llcgprs_cr,
{ "Command/Response bit", "llcgprs.cr", FT_BOOLEAN, 8, TFS(&cr_bit), 0x40, " Command/Response bit", HFILL}},
{ &hf_llcgprs_sapib,
- { "SAPI", "llcgprs.sapib", FT_UINT8, BASE_DEC , VALS(sapi_t), 0xf, "Service Access Point Identifier ",HFILL }},
+ { "SAPI", "llcgprs.sapib", FT_UINT8, BASE_DEC , VALS(sapi_t), 0xf, "Service Access Point Identifier ",HFILL }},
{ &hf_llcgprs_U_fmt,
{ "UI format", "llcgprs.ui", FT_UINT16, BASE_HEX, NULL, UI_MASK_FMT, "UI frame format",HFILL}},
{ &hf_llcgprs_Un,
@@ -1200,7 +1202,7 @@ proto_register_llcgprs(void)
{ &hf_llcgprs_PF,
{ "P/F bit", "llcgprs.pf", FT_BOOLEAN, 8, NULL, 0x10,"Poll /Finall bit", HFILL}},
{ &hf_llcgprs_ucom,
- { "Command/Response","llcgprs.ucom", FT_UINT8, BASE_HEX, VALS(cr_formats_unnumb),0xf,"Commands and Responses",HFILL }},
+ { "Command/Response","llcgprs.ucom", FT_UINT8, BASE_HEX, VALS(cr_formats_unnumb),0xf,"Commands and Responses",HFILL }},
{ &hf_llcgprs_NR,
{ "Receive sequence number", "llcgprs.nr",FT_UINT16, BASE_DEC, NULL, UI_MASK_NU,"Receive sequence number N(R)",HFILL }},
{&hf_llcgprs_S_fmt,
@@ -1241,43 +1243,43 @@ proto_register_llcgprs(void)
{ "Parameter Byte","llcgprs.xidbyte", FT_UINT8, BASE_HEX, NULL, 0xFF, "Data", HFILL}},
/* FRMR Parsing Information */
{&hf_llcgprs_frmr_cf,
- { "Control Field Octet","llcgprs.frmrrfcf", FT_UINT16, BASE_DEC, NULL,
+ { "Control Field Octet","llcgprs.frmrrfcf", FT_UINT16, BASE_DEC, NULL,
0xFFFF, "Rejected Frame CF", HFILL}},
{&hf_llcgprs_frmr_spare,
- { "X","llcgprs.frmrspare", FT_UINT32, BASE_HEX, NULL, 0xF00400F0,
+ { "X","llcgprs.frmrspare", FT_UINT32, BASE_HEX, NULL, 0xF00400F0,
"Filler", HFILL}},
{&hf_llcgprs_frmr_vs,
- { "V(S)","llcgprs.frmrvs", FT_UINT32, BASE_DEC, NULL, 0x0FF80000,
+ { "V(S)","llcgprs.frmrvs", FT_UINT32, BASE_DEC, NULL, 0x0FF80000,
"Current send state variable", HFILL}},
{&hf_llcgprs_frmr_vr,
- { "V(R)","llcgprs.frmrvr", FT_UINT32, BASE_DEC, NULL, 0x0003FE00,
+ { "V(R)","llcgprs.frmrvr", FT_UINT32, BASE_DEC, NULL, 0x0003FE00,
"Current receive state variable", HFILL}},
{&hf_llcgprs_frmr_cr,
- { "C/R","llcgprs.frmrcr", FT_UINT32, BASE_DEC, NULL, 0x00000100,
+ { "C/R","llcgprs.frmrcr", FT_UINT32, BASE_DEC, NULL, 0x00000100,
"Rejected command response", HFILL}},
{&hf_llcgprs_frmr_w4,
- { "W4","llcgprs.frmrw4", FT_UINT32, BASE_DEC, NULL, 0x00000008,
+ { "W4","llcgprs.frmrw4", FT_UINT32, BASE_DEC, NULL, 0x00000008,
"LLE was in ABM when rejecting", HFILL}},
{&hf_llcgprs_frmr_w3,
- { "W3","llcgprs.frmrw3", FT_UINT32, BASE_DEC, NULL, 0x00000004,
+ { "W3","llcgprs.frmrw3", FT_UINT32, BASE_DEC, NULL, 0x00000004,
"Undefined control field", HFILL}},
{&hf_llcgprs_frmr_w2,
- { "W2","llcgprs.frmrw2", FT_UINT32, BASE_DEC, NULL, 0x00000002,
+ { "W2","llcgprs.frmrw2", FT_UINT32, BASE_DEC, NULL, 0x00000002,
"Info exceeded N201", HFILL}},
{&hf_llcgprs_frmr_w1,
- { "W1","llcgprs.frmrw1", FT_UINT32, BASE_DEC, NULL, 0x00000001,
+ { "W1","llcgprs.frmrw1", FT_UINT32, BASE_DEC, NULL, 0x00000001,
"Invalid - info not permitted", HFILL}},
{&hf_llcgprs_tom_rl,
{ "Remaining Length of TOM Protocol Header","llcgprs.romrl", FT_UINT8,
BASE_DEC, NULL, 0xF0, "RL", HFILL}},
{&hf_llcgprs_tom_pd,
- { "TOM Protocol Discriminator","llcgprs.tompd", FT_UINT8, BASE_HEX,
+ { "TOM Protocol Discriminator","llcgprs.tompd", FT_UINT8, BASE_HEX,
NULL, 0x0F, "TPD", HFILL}},
{&hf_llcgprs_tom_header,
- { "TOM Header Byte","llcgprs.tomhead", FT_UINT8, BASE_HEX, NULL, 0xFF,
+ { "TOM Header Byte","llcgprs.tomhead", FT_UINT8, BASE_HEX, NULL, 0xFF,
"thb", HFILL}},
{&hf_llcgprs_tom_data,
- { "TOM Message Capsule Byte","llcgprs.tomdata", FT_UINT8, BASE_HEX, NULL,
+ { "TOM Message Capsule Byte","llcgprs.tomdata", FT_UINT8, BASE_HEX, NULL,
0xFF, "tdb", HFILL}},
/* END MLT CHANGES */
};
@@ -1292,7 +1294,7 @@ proto_register_llcgprs(void)
};
module_t *llcgprs_module;
-
+
/* Register the protocol name and description */
proto_llcgprs = proto_register_protocol("Logical Link Control GPRS",
"GPRS-LLC", "llcgprs");
@@ -1301,10 +1303,10 @@ proto_register_llcgprs(void)
proto_register_field_array(proto_llcgprs, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_dissector("llcgprs", dissect_llcgprs, proto_llcgprs);
-
+
llcgprs_module = prefs_register_protocol ( proto_llcgprs, NULL );
prefs_register_bool_preference ( llcgprs_module, "autodetect_cipher_bit",
- "Autodetect cipher bit",
+ "Autodetect cipher bit",
"Whether to autodetect the cipher bit (because it might be set on unciphered data)",
&ignore_cipher_bit );
}