Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc10502d authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

net: use __packed annotation



cleanup patch.

Use new __packed annotation in net/ and include/
(except netfilter)

Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ba2d3587
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -119,7 +119,7 @@ struct ethhdr {
	unsigned char	h_dest[ETH_ALEN];	/* destination eth addr	*/
	unsigned char	h_source[ETH_ALEN];	/* source ether addr	*/
	__be16		h_proto;		/* packet type ID field	*/
} __attribute__((packed));
} __packed;

#ifdef __KERNEL__
#include <linux/skbuff.h>
+4 −4
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ struct fddi_8022_1_hdr {
	__u8	dsap;					/* destination service access point */
	__u8	ssap;					/* source service access point */
	__u8	ctrl;					/* control byte #1 */
} __attribute__ ((packed));
} __packed;

/* Define 802.2 Type 2 header */
struct fddi_8022_2_hdr {
@@ -75,7 +75,7 @@ struct fddi_8022_2_hdr {
	__u8	ssap;					/* source service access point */
	__u8	ctrl_1;					/* control byte #1 */
	__u8	ctrl_2;					/* control byte #2 */
} __attribute__ ((packed));
} __packed;

/* Define 802.2 SNAP header */
#define FDDI_K_OUI_LEN	3
@@ -85,7 +85,7 @@ struct fddi_snap_hdr {
	__u8	ctrl;					/* always 0x03 */
	__u8	oui[FDDI_K_OUI_LEN];	/* organizational universal id */
	__be16	ethertype;				/* packet type ID field */
} __attribute__ ((packed));
} __packed;

/* Define FDDI LLC frame header */
struct fddihdr {
@@ -98,7 +98,7 @@ struct fddihdr {
		struct fddi_8022_2_hdr		llc_8022_2;
		struct fddi_snap_hdr		llc_snap;
		} hdr;
} __attribute__ ((packed));
} __packed;

#ifdef __KERNEL__
#include <linux/netdevice.h>
+1 −1
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ struct frhdr
   __be16 PID;

#define IP_NLPID pad 
} __attribute__((packed));
} __packed;

/* see RFC 1490 for the definition of the following */
#define FRAD_I_UI		0x03
+4 −4
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ struct hippi_fp_hdr {
	__be32		fixed;
#endif
	__be32		d2_size;
} __attribute__ ((packed));
} __packed;

struct hippi_le_hdr {
#if defined (__BIG_ENDIAN_BITFIELD)
@@ -129,7 +129,7 @@ struct hippi_le_hdr {
	__u8		daddr[HIPPI_ALEN];
	__u16		locally_administered;
	__u8		saddr[HIPPI_ALEN];
} __attribute__ ((packed));
} __packed;

#define HIPPI_OUI_LEN	3
/*
@@ -142,12 +142,12 @@ struct hippi_snap_hdr {
	__u8	ctrl;			/* always 0x03 */
	__u8	oui[HIPPI_OUI_LEN];	/* organizational universal id (zero)*/
	__be16	ethertype;		/* packet type ID field */
} __attribute__ ((packed));
} __packed;

struct hippi_hdr {
	struct hippi_fp_hdr	fp;
	struct hippi_le_hdr	le;
	struct hippi_snap_hdr	snap;
} __attribute__ ((packed));
} __packed;

#endif	/* _LINUX_IF_HIPPI_H */
+4 −4
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ struct sockaddr_pppox {
       union{ 
               struct pppoe_addr       pppoe; 
       }sa_addr; 
}__attribute__ ((packed)); 
} __packed;

/* The use of the above union isn't viable because the size of this
 * struct must stay fixed over time -- applications use sizeof(struct
@@ -70,7 +70,7 @@ struct sockaddr_pppol2tp {
	sa_family_t     sa_family;      /* address family, AF_PPPOX */
	unsigned int    sa_protocol;    /* protocol identifier */
	struct pppol2tp_addr pppol2tp;
}__attribute__ ((packed));
} __packed;

/* The L2TPv3 protocol changes tunnel and session ids from 16 to 32
 * bits. So we need a different sockaddr structure.
@@ -79,7 +79,7 @@ struct sockaddr_pppol2tpv3 {
	sa_family_t     sa_family;      /* address family, AF_PPPOX */
	unsigned int    sa_protocol;    /* protocol identifier */
	struct pppol2tpv3_addr pppol2tp;
} __attribute__ ((packed));
} __packed;

/*********************************************************************
 *
@@ -129,7 +129,7 @@ struct pppoe_hdr {
	__be16 sid;
	__be16 length;
	struct pppoe_tag tag[0];
} __attribute__ ((packed));
} __packed;

/* Length of entire PPPoE + PPP header */
#define PPPOE_SES_HLEN	8
Loading