aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/address.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/epan/address.h b/epan/address.h
index 0f202a3008..3a0074a043 100644
--- a/epan/address.h
+++ b/epan/address.h
@@ -26,6 +26,8 @@
#ifndef __ADDRESS_H__
#define __ADDRESS_H__
+#include "emem.h"
+
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
@@ -111,6 +113,15 @@ typedef struct _address {
(to)->data = COPY_ADDRESS_data; \
}
+#define SE_COPY_ADDRESS(to, from) { \
+ guint8 *SE_COPY_ADDRESS_data; \
+ (to)->type = (from)->type; \
+ (to)->len = (from)->len; \
+ SE_COPY_ADDRESS_data = se_alloc((from)->len); \
+ memcpy(SE_COPY_ADDRESS_data, (from)->data, (from)->len); \
+ (to)->data = SE_COPY_ADDRESS_data; \
+ }
+
/* Types of port numbers Wireshark knows about. */
typedef enum {
PT_NONE, /* no port number */