From 82e0b650388aa4f89c4fc371eab057b278b59f92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Bj=C3=B8rlykke?= Date: Tue, 18 Oct 2011 17:46:00 +0000 Subject: Added a private hash table to transport string values between dissectors. This works between C and Lua. In C the pinfo.private_table pointer must be initialized using g_hash_table_new (g_str_hash, g_str_equal); In Lua the values are available using pinfo.private., and the table is created automatically on first usage. It's possible to use this datatypes: nil, boolean, number and string, but every value is converted to string so numbers must be converted using tonumber() on usage. Boolean is either nil or an empty string. svn path=/trunk/; revision=39461 --- epan/packet_info.h | 1 + 1 file changed, 1 insertion(+) (limited to 'epan/packet_info.h') diff --git a/epan/packet_info.h b/epan/packet_info.h index 646a24a7be..94ee3c1b42 100644 --- a/epan/packet_info.h +++ b/epan/packet_info.h @@ -175,6 +175,7 @@ typedef struct _packet_info { * in the SCTP packet */ void *private_data; /* pointer to data passed from one dissector to another */ + GHashTable *private_table; /* a hash table passed from one dissector to another */ /* TODO: Use emem_strbuf_t instead */ GString *layer_names; /* layers of each protocol */ guint16 link_number; -- cgit v1.2.3