aboutsummaryrefslogtreecommitdiffstats
path: root/epan/address_types.h
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-02-08 20:36:03 -0500
committerMichael Mann <mmann78@netscape.net>2015-02-09 03:49:13 +0000
commit8ff944d4ab892521c6a32fe40f6a410640a34d34 (patch)
treecb9bb5956a1073babc778b2f75fd2d83a52608e3 /epan/address_types.h
parent2875cd382fdc0efd5d949f674a0328ecf918b7e9 (diff)
Add fixed length function for address types.
This allows for even more cleanup with respect to how address types are handled, including removing address_to_str.c. Most of the functionality was folded into address_types.c, but the remainder was just dispersed because it didn't make sense to keep the file. Change-Id: Id4e9391f0c3c26eff8c27b362e4f7a1970d718b4 Reviewed-on: https://code.wireshark.org/review/7038 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/address_types.h')
-rw-r--r--epan/address_types.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/epan/address_types.h b/epan/address_types.h
index ae699c86eb..e2cbe05ab1 100644
--- a/epan/address_types.h
+++ b/epan/address_types.h
@@ -1,4 +1,5 @@
/* address_types.h
+ * Definitions for address types
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
@@ -30,6 +31,7 @@ extern "C" {
typedef gboolean (*AddrValueToString)(const address* addr, gchar *buf, int buf_len);
typedef int (*AddrValueToStringLen)(const address* addr);
+typedef int (*AddrFixedLen)(void);
typedef const char* (*AddrColFilterString)(const address* addr, gboolean src);
struct _address_type_t;
@@ -37,23 +39,23 @@ typedef struct _address_type_t address_type_t;
int address_type_dissector_register(const char* name, const char* pretty_name,
AddrValueToString to_str_func, AddrValueToStringLen str_len_func,
- AddrColFilterString col_filter_str_func);
+ AddrColFilterString col_filter_str_func, AddrFixedLen fixed_len_func);
void address_types_initialize(void);
/* Address type functions used by multiple (dissector) address types */
gboolean none_addr_to_str(const address* addr, gchar *buf, int buf_len);
int none_addr_str_len(const address* addr);
+int none_addr_len(void);
gboolean ether_to_str(const address* addr, gchar *buf, int buf_len);
int ether_str_len(const address* addr);
+int ether_len(void);
/* XXX - Temporary? Here at least until all of the address type handling is finalized
* Otherwise should be folded into address_types.c or just be handled with function pointers
*/
-int address_type_get_length(const address* addr);
-void address_type_to_string(const address* addr, gchar *buf, int buf_len);
const char* address_type_column_filter_string(const address* addr, gboolean src);