forked from osmocom/wireshark
new SE_COPY_ADDRESS macro
svn path=/trunk/; revision=21364
This commit is contained in:
parent
d72a70d653
commit
36fe262fa8
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue