summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2013-04-25 15:21:48 +0000
committerPascal Quantin <pascal.quantin@gmail.com>2013-04-25 15:21:48 +0000
commitb3da159427a51f7c61c06734a455930aa94eb73b (patch)
treec965d850ddf21c8249aada1c41acb6a3d95e70d5 /epan
parentdf0bbb4ffcaf77f996ef06149b3adb99c65ccbb4 (diff)
downloadwireshark-b3da159427a51f7c61c06734a455930aa94eb73b.tar.gz
Enhance dissection of feedback
svn path=/trunk/; revision=49032
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-rohc.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/epan/dissectors/packet-rohc.c b/epan/dissectors/packet-rohc.c
index 70e14a3b21..4b66701e9d 100644
--- a/epan/dissectors/packet-rohc.c
+++ b/epan/dissectors/packet-rohc.c
@@ -72,6 +72,7 @@ static int hf_rohc_opt_type = -1;
static int hf_rohc_opt_len = -1;
static int hf_rohc_crc = -1;
static int hf_rohc_opt_sn = -1;
+static int hf_rohc_ext_sn = -1;
static int hf_rohc_opt_clock = -1;
static int hf_rohc_opt_jitter = -1;
static int hf_rohc_opt_loss = -1;
@@ -837,7 +838,7 @@ dissect_rohc_feedback_data(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
guint8 opt, opt_len, oct;
rohc_cid_context_t *rohc_cid_context = NULL;
gint key = cid;
-
+ guint32 sn;
if (!pinfo->fd->flags.visited){
rohc_cid_context = (rohc_cid_context_t*)g_hash_table_lookup(rohc_cid_hash, GUINT_TO_POINTER(key));
@@ -917,6 +918,7 @@ dissect_rohc_feedback_data(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
rohc_cid_context->mode = (enum rohc_mode)((tvb_get_guint8(tvb,offset) & 0x30)>>4);
proto_tree_add_item(rohc_feedback_tree, hf_rohc_acktype, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(rohc_feedback_tree, hf_rohc_mode, tvb, offset, 1, ENC_BIG_ENDIAN);
+ sn = tvb_get_ntohs(tvb, offset) & 0x0fff;
proto_tree_add_item(rohc_feedback_tree, hf_rohc_sn, tvb, offset, 2, ENC_BIG_ENDIAN);
offset+=2;
feedback_data_len-=2;
@@ -947,8 +949,9 @@ dissect_rohc_feedback_data(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
case 4:
/* SN */
proto_tree_add_item(rohc_feedback_tree, hf_rohc_opt_sn, tvb, offset, 1, ENC_BIG_ENDIAN);
- oct = tvb_get_guint8(tvb, offset);
- col_append_fstr(pinfo->cinfo, COL_INFO, "SN=%u ", oct);
+ sn = (sn << 8) | tvb_get_guint8(tvb, offset);
+ ti = proto_tree_add_uint(rohc_feedback_tree, hf_rohc_ext_sn, tvb, 0, 0, sn);
+ PROTO_ITEM_SET_GENERATED(ti);
break;
case 5:
/* Clock */
@@ -986,6 +989,7 @@ dissect_rohc_feedback_data(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo,
offset = offset + opt_len;
}
+ col_append_fstr(pinfo->cinfo, COL_INFO, " (sn=%u)", sn);
break;
default:
ti = proto_tree_add_text(tree, tvb, offset, feedback_data_len, "profile-specific information[Not dissected yet]");
@@ -2433,7 +2437,7 @@ proto_register_rohc(void)
}
},
{ &hf_rohc_sn,
- { "SN","rohc.sn",
+ { "SN LSB","rohc.sn",
FT_UINT16, BASE_HEX_DEC, NULL, 0x0fff,
NULL , HFILL
}
@@ -2445,7 +2449,7 @@ proto_register_rohc(void)
}
},
{ &hf_rohc_fb1_sn,
- { "SN","rohc.fb1_sn",
+ { "SN LSB","rohc.sn",
FT_UINT8, BASE_HEX_DEC, NULL, 0x0,
NULL , HFILL
}
@@ -2469,11 +2473,17 @@ proto_register_rohc(void)
}
},
{ &hf_rohc_opt_sn,
- { "SN","rohc.opt.sn",
+ { "SN additional bits","rohc.opt.sn_add_bits",
FT_UINT8, BASE_HEX_DEC, NULL, 0x0,
"Feedback Option SN", HFILL
}
},
+ { &hf_rohc_ext_sn,
+ { "SN LSB","rohc.sn",
+ FT_UINT24, BASE_HEX_DEC, NULL, 0x0,
+ NULL, HFILL
+ }
+ },
{ &hf_rohc_opt_clock,
{ "Clock", "rohc.opt.clock",
FT_UINT8, BASE_DEC, NULL, 0x0,