aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2007-11-09 06:01:18 +0000
committerAnders Broman <anders.broman@ericsson.com>2007-11-09 06:01:18 +0000
commit622603589393ddd44656437f2e323c7fecf1c362 (patch)
tree874c9902e9d5e87aeda6b3c11e76dd35b41312f0 /plugins
parent29cf34d1c2fa3d56559fd08cfa4bc5616f9cbf14 (diff)
downloadwireshark-622603589393ddd44656437f2e323c7fecf1c362.tar.gz
wireshark-622603589393ddd44656437f2e323c7fecf1c362.tar.bz2
wireshark-622603589393ddd44656437f2e323c7fecf1c362.zip
Apply yet another set of the optimization patches:
When offset parameter is 0 replace tvb_bytes_exist() with the faster tvb_length(). On the other hand if (tvb_bytes_exist(tvb, 0, 20) is more readable than if (tvb_length(tvb) >= 20 so only do it in heuristic function svn path=/trunk/; revision=23412
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ciscosm/packet-sm.c38
1 files changed, 29 insertions, 9 deletions
diff --git a/plugins/ciscosm/packet-sm.c b/plugins/ciscosm/packet-sm.c
index 1081da89c2..dfd2280472 100644
--- a/plugins/ciscosm/packet-sm.c
+++ b/plugins/ciscosm/packet-sm.c
@@ -122,6 +122,8 @@ static int hf_sm_channel = -1;
static int hf_sm_bearer = -1;
static int hf_sm_len = -1;
static int hf_sm_ip_addr = -1;
+static int hf_sm_context = -1;
+static int hf_sm_eisup_msg_id = -1;
static int hf_sm_tag = -1;
/* Initialize the subtree pointers */
@@ -166,7 +168,12 @@ dissect_sm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset = offset + 2;
switch(protocol){
case SM_PROTOCOL_X101:
- /* XXX Reveres enginered so this may not be correct!!! */
+ /* XXX Reveres enginered so this may not be correct!!!
+ * EISUP - used between Cisco HSI and Cisco PGW devices,
+ * uses RUDP with default port number 8003.
+ * Protocol stack is RUDP->Cisco SM->SDP.
+ * This implementation is PROPRIETARY
+ */
proto_tree_add_item(sm_tree, hf_sm_len, tvb, offset, 2, FALSE);
length = tvb_get_ntohs(tvb,offset);
offset = offset + 2;
@@ -174,10 +181,12 @@ dissect_sm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* The next stuff seems to be IP addr */
proto_tree_add_item(sm_tree, hf_sm_ip_addr, tvb, offset, 4, FALSE);
offset = offset + 4;
- proto_tree_add_item(sm_tree, hf_sm_tag, tvb, offset, 2, FALSE);
- offset = offset +2;
- proto_tree_add_text(sm_tree, tvb, offset,3,"[unknown]");
- offset = offset + 3;
+ /* This part looks to be the same per session */
+ proto_tree_add_item(sm_tree, hf_sm_context, tvb, offset, 4, FALSE);
+ offset = offset +4;
+ /* Some sort of message type? */
+ proto_tree_add_item(sm_tree, hf_sm_eisup_msg_id, tvb, offset, 1, FALSE);
+ offset = offset + 1;
/* XXX Problem are tags 1 or two bytes???*/
proto_tree_add_item(sm_tree, hf_sm_tag, tvb, offset, 2, FALSE);
@@ -203,10 +212,11 @@ dissect_sm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* The next stuff seems to be IP addr */
proto_tree_add_item(sm_tree, hf_sm_ip_addr, tvb, offset, 4, FALSE);
offset = offset + 4;
- proto_tree_add_item(sm_tree, hf_sm_tag, tvb, offset, 2, FALSE);
- offset = offset +2;
- proto_tree_add_text(sm_tree, tvb, offset,3,"[unknown]");
- offset = offset + 3;
+ proto_tree_add_item(sm_tree, hf_sm_context, tvb, offset, 4, FALSE);
+ offset = offset +4;
+ /* Some sort of message type? */
+ proto_tree_add_item(sm_tree, hf_sm_eisup_msg_id, tvb, offset, 1, FALSE);
+ offset = offset + 1;
/* XXX Problem are tags 1 or two bytes???*/
proto_tree_add_item(sm_tree, hf_sm_tag, tvb, offset, 2, FALSE);
@@ -298,6 +308,16 @@ proto_register_sm(void)
FT_IPv4,BASE_NONE, NULL, 0x0,
"IPv4 address", HFILL }
},
+ { &hf_sm_context,
+ { "Context","sm.context",
+ FT_UINT32, BASE_DEC, NULL, 0x0,
+ "Context(guesswork!)", HFILL }
+ },
+ { &hf_sm_eisup_msg_id,
+ { "Message id","sm.eisup_message_id",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ "Message id(guesswork!)", HFILL }
+ },
{ &hf_sm_tag,
{ "Tag","sm.tag",
FT_UINT16, BASE_DEC, NULL, 0x0,