summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2014-08-07 09:14:25 +0200
committerTobias Klauser <tklauser@distanz.ch>2014-08-07 09:14:25 +0200
commita539a4d7a02c41a59a5490ebeba461a68f0a2a87 (patch)
tree5cb99db32f9fb0015f2fe367653b9205dd66ad76
parent815dcd255ea9da8b23e8e7c839545d5d41eee336 (diff)
dissectors: Use __packed macro instead of open-coding it
Consistently vse the __packed macro defined in built_in.h instead of __attribute__((packed)) in all dissectors (and the entire code base for that matter). Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r--proto_igmp.c10
-rw-r--r--proto_vlan.c2
2 files changed, 6 insertions, 6 deletions
diff --git a/proto_igmp.c b/proto_igmp.c
index 0ef38f9..0e1cfb7 100644
--- a/proto_igmp.c
+++ b/proto_igmp.c
@@ -54,7 +54,7 @@ struct igmp_v1_msg {
uint8_t unused; /* always zero */
uint16_t checksum;
uint32_t group_address;
-} __attribute__((packed));
+} __packed;
/* igmp_v1_msg.version__type (!) */
/* IGMP_V1_MEMBERSHIP_QUERY 0x11 */
@@ -66,7 +66,7 @@ struct igmp_v2_msg {
uint8_t max_resp_time;
uint16_t checksum;
uint32_t group_address;
-} __attribute__((packed));
+} __packed;
/* igmp_v2_msg.type */
/* IGMP_V2_MEMBERSHIP_QUERY 0x11 */
@@ -91,7 +91,7 @@ struct igmp_v3_group_record {
uint32_t multicast_address;
uint32_t source_addresses[0];
/* auxiliary data (IGMPv3 does not define any) */
-} __attribute__((packed));
+} __packed;
/* igmp_v3_group_record.record_type */
#define IGMP_V3_MODE_IS_INCLUDE 1
@@ -108,7 +108,7 @@ struct igmp_v3_membership_report {
uint16_t reserved2;
uint16_t number_of_group_records;
struct igmp_v3_group_record group_records[0];
-} __attribute__((packed));
+} __packed;
struct igmp_v3_membership_query {
uint8_t type;
@@ -129,7 +129,7 @@ struct igmp_v3_membership_query {
uint8_t qqic;
uint16_t number_of_sources;
uint32_t source_addresses[0];
-} __attribute__((packed));
+} __packed;
#define IGMP_MEMBERSHIP_QUERY 0x11 /* v1/v2/v3 */
#define IGMP_V3_MEMBERSHIP_REPORT 0x22
diff --git a/proto_vlan.c b/proto_vlan.c
index f9b2cf2..9ba66a9 100644
--- a/proto_vlan.c
+++ b/proto_vlan.c
@@ -16,7 +16,7 @@
struct vlanhdr {
uint16_t h_vlan_TCI;
uint16_t h_vlan_encapsulated_proto;
-} __attribute__((packed));
+} __packed;
static void vlan(struct pkt_buff *pkt)
{