From 797659fb4a4a511649cd71028141c32ad1698a12 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Sat, 10 Mar 2007 15:56:08 -0300 Subject: [PPPOE]: Introduce pppoe_hdr() For consistency with all the other skb->nh.raw accessors. Also do some really obvious simplifications in pppoe_recvmsg, well the kfree_skb one is not so obvious, but free() and kfree() have the same behaviour (hint :-) ). Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller --- include/linux/if_pppox.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/linux/if_pppox.h') diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h index e33ee763c052..7044f8ab30a0 100644 --- a/include/linux/if_pppox.h +++ b/include/linux/if_pppox.h @@ -112,6 +112,13 @@ struct pppoe_hdr { } __attribute__ ((packed)); #ifdef __KERNEL__ +#include + +static inline struct pppoe_hdr *pppoe_hdr(const struct sk_buff *skb) +{ + return (struct pppoe_hdr *)skb->nh.raw; +} + struct pppoe_opt { struct net_device *dev; /* device associated with socket*/ int ifindex; /* ifindex of device associated with socket */ -- cgit v1.2.3-59-g8ed1b