diff options
author | stig <stig@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-10-18 17:46:00 +0000 |
---|---|---|
committer | stig <stig@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-10-18 17:46:00 +0000 |
commit | dab1721c24711ca80c9fb8c725a7ab75d03edd6d (patch) | |
tree | 1e4c56840b5168eaee0ac033059ea671f00f79a4 /epan/packet_info.h | |
parent | f8e92c2ede1e95ac0cb2765a4b4b90cd8bd55ae1 (diff) |
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.<key>, 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.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39461 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/packet_info.h')
-rw-r--r-- | epan/packet_info.h | 1 |
1 files changed, 1 insertions, 0 deletions
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; |