diff options
author | Luis Ontanon <luis.ontanon@gmail.com> | 2005-06-06 18:52:54 +0000 |
---|---|---|
committer | Luis Ontanon <luis.ontanon@gmail.com> | 2005-06-06 18:52:54 +0000 |
commit | 1415bb4d54eb173639e8b5fc677d565357245c7c (patch) | |
tree | 7919ab057e546e927f6da191bb58e644068e96ea /epan/dissectors/packet-sscop.c | |
parent | acdc3d771a57c03ac57c971e9539ffd7b911f653 (diff) |
- add an hf entry I forgot
- get the STAT/USTAT PDU list straight
svn path=/trunk/; revision=14568
Diffstat (limited to 'epan/dissectors/packet-sscop.c')
-rw-r--r-- | epan/dissectors/packet-sscop.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/epan/dissectors/packet-sscop.c b/epan/dissectors/packet-sscop.c index 66391ef444..255ae21fc8 100644 --- a/epan/dissectors/packet-sscop.c +++ b/epan/dissectors/packet-sscop.c @@ -166,11 +166,13 @@ static const value_string sscop_type_vals[] = { #define SSCOP_SS_N_MR (reported_length - 8) /* lower 3 bytes thereof */ #define SSCOP_SS_N_R (reported_length - 4) /* lower 3 bytes thereof */ -extern void dissect_stat_list(proto_tree *tree, tvbuff_t *tvb) { - gint n = (tvb_reported_length(tvb)-3)/4 ; - proto_item* pi = proto_tree_add_text(tree,tvb,0,n*4,"SD List"); - gint i; +extern void dissect_stat_list(proto_tree *tree, tvbuff_t *tvb,guint h) { + gint n,i; + proto_item* pi; + + n = (tvb_reported_length(tvb))/4 - h ; + pi = proto_tree_add_text(tree,tvb,0,n*4,"SD List"); tree = proto_item_add_subtree(pi,ett_stat); for (i = 0; i < n; i++) { @@ -279,13 +281,13 @@ dissect_sscop_and_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, d proto_tree_add_item(sscop_tree, hf_sscop_ps, tvb, SSCOP_N_PS + 1, 3,FALSE); proto_tree_add_item(sscop_tree, hf_sscop_mr, tvb, SSCOP_N_MR + 1, 3, FALSE); proto_tree_add_item(sscop_tree, hf_sscop_r, tvb, SSCOP_SS_N_R + 1, 3,FALSE); - dissect_stat_list(sscop_tree,tvb); + dissect_stat_list(sscop_tree,tvb,3); break; case SSCOP_USTAT: proto_tree_add_item(sscop_tree, hf_sscop_mr, tvb, SSCOP_N_MR + 1, 3, FALSE); proto_tree_add_item(sscop_tree, hf_sscop_r, tvb, SSCOP_SS_N_R + 1, 3,FALSE); - dissect_stat_list(sscop_tree,tvb); + dissect_stat_list(sscop_tree,tvb,2); break; } } @@ -397,6 +399,7 @@ proto_register_sscop(void) { &hf_sscop_mr, { "N(MR)", "sscop.mr", FT_UINT24, BASE_DEC, NULL, 0x0, "", HFILL }}, { &hf_sscop_s, { "N(S)", "sscop.s", FT_UINT24, BASE_DEC, NULL, 0x0, "", HFILL }}, { &hf_sscop_ps, { "N(PS)", "sscop.ps", FT_UINT24, BASE_DEC, NULL, 0x0, "", HFILL }}, + { &hf_sscop_r, { "N(R)", "sscop.r", FT_UINT24, BASE_DEC, NULL, 0x0, "", HFILL }}, { &hf_sscop_stat_s, { "N(S)", "sscop.stat.s", FT_UINT24, BASE_DEC, NULL, 0x0,"", HFILL }} }; |