diff options
author | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-08-15 06:38:10 +0000 |
---|---|---|
committer | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-08-15 06:38:10 +0000 |
commit | 7d442624064b470be60a976c9d9ae06069458aac (patch) | |
tree | a46ff02b744f06032eaef2a29c3777ff4d894226 /epan/packet.h | |
parent | 3beae5944f126dbaa9a08a9e31cb07b68eac5296 (diff) |
This patch introduces packet_add_new_data_source() which effectively deprecates add_new_data_source(). This is based on the following observation:
1) The tvb + name (aka. data_source) is only used when the protocol tree is visible
The current implementation of add_new_data_source() doesn't take this into account and simply allocates a data_source regardless. This is what packet_add_new_data_source() tries to rectify.
A couple of dissectors have already been switched over to the new packet_add_new_data_source(). Many are still missing. Help appreciated!
svn path=/trunk/; revision=29427
Diffstat (limited to 'epan/packet.h')
-rw-r--r-- | epan/packet.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/epan/packet.h b/epan/packet.h index 5725b58dd5..50b8f7965f 100644 --- a/epan/packet.h +++ b/epan/packet.h @@ -377,11 +377,22 @@ extern void final_registration_all_protocols(void); /* + * DEPRECATED: Use packet_add_new_data_source() instead. + */ +extern void +add_new_data_source(packet_info *pinfo, tvbuff_t *tvb, const char *name); + +/* * Add a new data source to the list of data sources for a frame, given * the tvbuff for the data source and its name. + * + * @param tree The protocol tree. + * @param pinfo Packet Info. + * @param tvb The buffer to store. + * @param name The name of the data source */ -extern void add_new_data_source(packet_info *pinfo, tvbuff_t *tvb, - const char *name); +extern void +packet_add_new_data_source(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, const char *name); /* * Return the data source name. |