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

Commit 740c15d0 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller
Browse files

[VLAN]: Clean up vlan_hdr/vlan_ethhdr structs



Fix 3 space indentation and some overly long lines by moving the
comments to a kdoc structure description.

Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 476bcea6
Loading
Loading
Loading
Loading
+23 −10
Original line number Original line Diff line number Diff line
@@ -34,12 +34,30 @@ struct hlist_node;
#define VLAN_ETH_DATA_LEN	1500	/* Max. octets in payload	 */
#define VLAN_ETH_DATA_LEN	1500	/* Max. octets in payload	 */
#define VLAN_ETH_FRAME_LEN	1518	/* Max. octets in frame sans FCS */
#define VLAN_ETH_FRAME_LEN	1518	/* Max. octets in frame sans FCS */


/*
 * 	struct vlan_hdr - vlan header
 * 	@h_vlan_TCI: priority and VLAN ID
 *	@h_vlan_encapsulated_proto: packet type ID or len
 */
struct vlan_hdr {
	__be16	h_vlan_TCI;
	__be16	h_vlan_encapsulated_proto;
};

/**
 *	struct vlan_ethhdr - vlan ethernet header (ethhdr + vlan_hdr)
 *	@h_dest: destination ethernet address
 *	@h_source: source ethernet address
 *	@h_vlan_proto: ethernet protocol (always 0x8100)
 *	@h_vlan_TCI: priority and VLAN ID
 *	@h_vlan_encapsulated_proto: packet type ID or len
 */
struct vlan_ethhdr {
struct vlan_ethhdr {
   unsigned char	h_dest[ETH_ALEN];	   /* destination eth addr	*/
	unsigned char	h_dest[ETH_ALEN];
   unsigned char	h_source[ETH_ALEN];	   /* source ether addr	*/
	unsigned char	h_source[ETH_ALEN];
   __be16               h_vlan_proto;              /* Should always be 0x8100 */
	__be16		h_vlan_proto;
   __be16               h_vlan_TCI;                /* Encapsulates priority and VLAN ID */
	__be16		h_vlan_TCI;
   __be16		h_vlan_encapsulated_proto; /* packet type ID field (or len) */
	__be16		h_vlan_encapsulated_proto;
};
};


#include <linux/skbuff.h>
#include <linux/skbuff.h>
@@ -49,11 +67,6 @@ static inline struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb)
	return (struct vlan_ethhdr *)skb_mac_header(skb);
	return (struct vlan_ethhdr *)skb_mac_header(skb);
}
}


struct vlan_hdr {
   __be16               h_vlan_TCI;                /* Encapsulates priority and VLAN ID */
   __be16               h_vlan_encapsulated_proto; /* packet type ID field (or len) */
};

#define VLAN_VID_MASK	0xfff
#define VLAN_VID_MASK	0xfff


/* found in socket.c */
/* found in socket.c */