aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2007-01-15 14:01:04 +0000
committerAnders Broman <anders.broman@ericsson.com>2007-01-15 14:01:04 +0000
commit165354a3f54064094746e171b9e6269fa50c4ade (patch)
tree3f552e648212982ff91988acf7f66b4e68a3d826 /asn1
parentde009c280a6eef701f1cb83a943f48d483bced50 (diff)
Handle the case where the same TransactionID is used for two different
destinations. svn path=/trunk/; revision=20440
Diffstat (limited to 'asn1')
-rw-r--r--asn1/ansi_map/ansi_map.cnf21
-rw-r--r--asn1/ansi_map/packet-ansi_map-template.c21
2 files changed, 38 insertions, 4 deletions
diff --git a/asn1/ansi_map/ansi_map.cnf b/asn1/ansi_map/ansi_map.cnf
index f06a5fc6dc..08d978e48c 100644
--- a/asn1/ansi_map/ansi_map.cnf
+++ b/asn1/ansi_map/ansi_map.cnf
@@ -30,22 +30,39 @@ OriginationRequestRes
}
/* No Data */
if(tvb_length_remaining(tvb, offset)<=0){
- update_saved_invokedata(pinfo);
+ update_saved_invokedata(pinfo, tree, tvb);
return offset;
}
offset = dissect_invokeData(pinfo, tree, tvb, offset);
- update_saved_invokedata(pinfo);
+ update_saved_invokedata(pinfo, tree, tvb);
#.FN_BODY ReturnParameters
struct amsi_map_invokedata_t *ansi_map_saved_invokedata;
struct tcap_private_t *p_private_tcap;
proto_item *item;
+ address* src = &(pinfo->src);
+ address* dst = &(pinfo->dst);
+ guint8 *src_str;
+ guint8 *dst_str;
+ char *buf;
+
+ buf=ep_alloc(1024);
+ src_str = address_to_str(src);
+ dst_str = address_to_str(dst);
/* Data from the TCAP dissector */
if (pinfo->private_data != NULL){
p_private_tcap=pinfo->private_data;
+ /* The hash string needs to contain src and dest to distiguish differnt flows */
+ src_str = address_to_str(src);
+ dst_str = address_to_str(dst);
+ buf = p_private_tcap->TransactionID_str;
+ /* Reverse order to invoke */
+ strcat(buf,dst_str);
+ strcat(buf,src_str);
+ strcat(buf,"\0");
ansi_map_saved_invokedata = g_hash_table_lookup(TransactionId_table, p_private_tcap->TransactionID_str);
if(ansi_map_saved_invokedata){
OperationCode = ansi_map_saved_invokedata->opcode;
diff --git a/asn1/ansi_map/packet-ansi_map-template.c b/asn1/ansi_map/packet-ansi_map-template.c
index f19751efe7..3b08ecff61 100644
--- a/asn1/ansi_map/packet-ansi_map-template.c
+++ b/asn1/ansi_map/packet-ansi_map-template.c
@@ -404,9 +404,20 @@ ansi_map_init_protocol(void)
/* Store Invoke information needed for the corresponding reply */
static void
-update_saved_invokedata(packet_info *pinfo){
+update_saved_invokedata(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb){
struct amsi_map_invokedata_t *ansi_map_saved_invokedata;
struct tcap_private_t *p_private_tcap;
+ guint32 framenum = (guint32)pinfo->fd->num;
+ address* src = &(pinfo->src);
+ address* dst = &(pinfo->dst);
+ guint8 *src_str;
+ guint8 *dst_str;
+ char *buf;
+
+ buf=ep_alloc(1024);
+
+ src_str = address_to_str(src);
+ dst_str = address_to_str(dst);
/* Data from the TCAP dissector */
if (pinfo->private_data != NULL){
@@ -416,9 +427,15 @@ update_saved_invokedata(packet_info *pinfo){
ansi_map_saved_invokedata->ServiceIndicator = ServiceIndicator;
if ((!pinfo->fd->flags.visited)&&(p_private_tcap->TransactionID_str)){
/* Only do this once XXX I hope its the right thing to do */
+ buf = p_private_tcap->TransactionID_str;
+ /* The hash string needs to contain src and dest to distiguish differnt flows */
+ strcat(buf,src_str);
+ strcat(buf,dst_str);
+ strcat(buf,"\0");
g_hash_table_insert(TransactionId_table,
- g_strdup(p_private_tcap->TransactionID_str),
+ g_strdup(buf),
ansi_map_saved_invokedata);
+ proto_tree_add_text(tree, tvb, 0, 1, "HAsh string %s",buf);
}
}