aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-iax2.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2007-04-26 00:51:33 +0000
committerGuy Harris <guy@alum.mit.edu>2007-04-26 00:51:33 +0000
commit1ed26d317caa512ae730a84e0b41bb35f7b10216 (patch)
tree1420e4c5a71174ced5607e725f5620ae3fe1f8a7 /epan/dissectors/packet-iax2.c
parent41cafa2212976006aee5e58efecd9b6d0a028335 (diff)
Add a macro for hashing the bytes of an address into a hash value.
Use it in the IAX2 dissector and in the conversation code. svn path=/trunk/; revision=21577
Diffstat (limited to 'epan/dissectors/packet-iax2.c')
-rw-r--r--epan/dissectors/packet-iax2.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/epan/dissectors/packet-iax2.c b/epan/dissectors/packet-iax2.c
index c249aa466a..ae020de79e 100644
--- a/epan/dissectors/packet-iax2.c
+++ b/epan/dissectors/packet-iax2.c
@@ -477,10 +477,7 @@ static guint iax_circuit_hash (gconstpointer v)
int i;
hash_val = 0;
- addrdata = key->addr.data;
- for (i = 0; i < key->addr.len; i++)
- hash_val += (guint)(addrdata[i]);
-
+ HASH_ADDRESS(hash_val, key->addr);
hash_val += (guint)(key->ptype);
hash_val += (guint)(key->port);
hash_val += (guint)(key->callno);