diff options
author | Jeremy Sowden <jeremy@azazel.net> | 2021-11-30 10:56:00 +0000 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2022-01-03 18:59:51 +0100 |
commit | c033faff44a991db726e1dae95441a75ea44084e (patch) | |
tree | c69c21751992e1a84e16a3a0a71b121cd18b8f63 /output/ipfix | |
parent | a5d2789474494fae044a48fbffe84601f3f40374 (diff) |
output: IPFIX: remove compiler attribute macros
The ipfix.h header includes three macros which expand to compiler attributes.
Presumably, at some point the definitions were one branch of an if-else
preprocessor conditional where the definitions in the other branch expanded to
nothing. This is no longer the case. Only one of the macros (`__packed`) is
used and the raw attribute is used elsewhere in the code-base. Remove the
macros.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'output/ipfix')
-rw-r--r-- | output/ipfix/ipfix.c | 2 | ||||
-rw-r--r-- | output/ipfix/ipfix.h | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/output/ipfix/ipfix.c b/output/ipfix/ipfix.c index b2719fd..e0b3440 100644 --- a/output/ipfix/ipfix.c +++ b/output/ipfix/ipfix.c @@ -8,8 +8,6 @@ /* These forward declarations are needed since ulogd.h doesn't like to be the first */ #include <ulogd/linuxlist.h> -#define __packed __attribute__((packed)) - #include "ipfix.h" #include <ulogd/ulogd.h> diff --git a/output/ipfix/ipfix.h b/output/ipfix/ipfix.h index 93945fb..b0f3ae6 100644 --- a/output/ipfix/ipfix.h +++ b/output/ipfix/ipfix.h @@ -19,7 +19,7 @@ struct ipfix_hdr { uint32_t seqno; uint32_t oid; /* Observation Domain ID */ uint8_t data[]; -} __packed; +} __attribute__((packed)); #define IPFIX_HDRLEN sizeof(struct ipfix_hdr) @@ -32,7 +32,7 @@ struct ipfix_templ_hdr { uint16_t tid; uint16_t cnt; uint8_t data[]; -} __packed; +} __attribute__((packed)); #define IPFIX_TEMPL_HDRLEN(nfields) sizeof(struct ipfix_templ_hdr) + (sizeof(uint16_t) * 2 * nfields) @@ -42,7 +42,7 @@ struct ipfix_set_hdr { uint16_t id; uint16_t len; uint8_t data[]; -} __packed; +} __attribute__((packed)); #define IPFIX_SET_HDRLEN sizeof(struct ipfix_set_hdr) @@ -67,7 +67,7 @@ struct vy_ipfix_data { uint16_t dport; uint8_t l4_proto; uint32_t aid; /* Application ID */ -} __packed; +} __attribute__((packed)); #define VY_IPFIX_SID 256 |