aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2010-10-26 12:43:40 +0000
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2010-10-26 12:43:40 +0000
commit0c8ee5a89918204235efa32598b202fdc60cf3b0 (patch)
tree8f8e3fb94f8f960fbad2724340ecd5c31310e4b6
parent89a034ea998047d462a433fd0275e5026ac15a00 (diff)
Follow up on:
You may not use g_int64_hash() or g_int64_equal(), as they are not present in the minimum version of GLib that we support. Create a ieee802154_long_addr structure for long addresses, create hash routines for those addresses, and use them. Export and use those routines. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34653 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r--epan/dissectors/packet-ieee802154.h2
-rw-r--r--epan/dissectors/packet-zbee-nwk.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-ieee802154.h b/epan/dissectors/packet-ieee802154.h
index 25c7d4275a..c8a9ada6c6 100644
--- a/epan/dissectors/packet-ieee802154.h
+++ b/epan/dissectors/packet-ieee802154.h
@@ -246,7 +246,9 @@ extern proto_item *proto_tree_add_eui64(proto_tree *, int, tvbuff_t *, gint, gi
/* Short to Extended Address Prototypes */
extern ieee802154_map_rec *ieee802154_addr_update(ieee802154_addr_t *, guint16, guint16, guint64, int, guint);
extern guint ieee802154_short_addr_hash(gconstpointer);
+extern guint ieee802154_long_addr_hash(gconstpointer key);
extern gboolean ieee802154_short_addr_equal(gconstpointer, gconstpointer);
+extern gboolean ieee802154_long_addr_equal(gconstpointer a, gconstpointer b);
extern gboolean ieee802154_short_addr_invalidate(guint16, guint16, guint);
extern gboolean ieee802154_long_addr_invalidate(guint64, guint);
diff --git a/epan/dissectors/packet-zbee-nwk.c b/epan/dissectors/packet-zbee-nwk.c
index 4ce8b60c45..1b64099e04 100644
--- a/epan/dissectors/packet-zbee-nwk.c
+++ b/epan/dissectors/packet-zbee-nwk.c
@@ -1904,8 +1904,6 @@ proto_init_zbee_nwk(void)
/* (Re)create the hash tables. */
zbee_nwk_addr.short_table = g_hash_table_new(ieee802154_short_addr_hash, ieee802154_short_addr_equal);
-#if GLIB_CHECK_VERSION(2,22,0)
- zbee_nwk_addr.long_table = g_hash_table_new(g_int64_hash, g_int64_equal);
-#endif
+ zbee_nwk_addr.long_table = g_hash_table_new(ieee802154_long_addr_hash, ieee802154_long_addr_equal);
zbee_table_nwk_keyring = g_hash_table_new_full(g_int_hash, g_int_equal, NULL, free_keyring_val);
} /* proto_init_zbee_nwk */