aboutsummaryrefslogtreecommitdiffstats
path: root/epan/address_types.h
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-06-21 22:23:05 -0400
committerAnders Broman <a.broman58@gmail.com>2016-06-22 07:47:39 +0000
commit0bf1cb2342e5becdda56be41f0347068549a77fe (patch)
tree80a39ed33612f3907a6813f683d83204d1d3bf49 /epan/address_types.h
parentc664f72f36ed1ac4e50c020cd3afb1ccf55094c8 (diff)
Add address_to_bytes API.
This will copy an address's "byte format" into a buffer. The original intended design is for export_pdu functionality, which tries to do this "manually" for many address types (and creates undesired dependencies) The default functionality if a "byte format function" isn't provided (currently the case for all address types) is a memcpy of the address data. Providing "address to byte" functions to aid export PDU functionality will be provided later. Change-Id: I3703f9e617a8cef09165ad53a0f98c6372676b9b Reviewed-on: https://code.wireshark.org/review/16070 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/address_types.h')
-rw-r--r--epan/address_types.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/address_types.h b/epan/address_types.h
index 2fdb7f8f53..c9a00ea2d6 100644
--- a/epan/address_types.h
+++ b/epan/address_types.h
@@ -31,6 +31,7 @@ extern "C" {
typedef int (*AddrValueToString)(const address* addr, gchar *buf, int buf_len);
typedef int (*AddrValueToStringLen)(const address* addr);
+typedef guint (*AddrValueToByte)(const address* addr, guint8 *buf, guint buf_len);
typedef int (*AddrFixedLen)(void);
typedef const char* (*AddrColFilterString)(const address* addr, gboolean src);
typedef int (*AddrNameResolutionLen)(void);
@@ -41,7 +42,7 @@ typedef struct _address_type_t address_type_t;
WS_DLL_PUBLIC 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, AddrFixedLen fixed_len_func,
+ AddrValueToByte to_bytes_func, AddrColFilterString col_filter_str_func, AddrFixedLen fixed_len_func,
AddrNameResolutionToString name_res_str_func, AddrNameResolutionLen name_res_len_func);
WS_DLL_PUBLIC int address_type_get_by_name(const char* name);