summaryrefslogtreecommitdiffstats
path: root/include/linux/if_pppox.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-10 15:56:08 -0300
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-25 22:24:43 -0700
commit797659fb4a4a511649cd71028141c32ad1698a12 (patch)
tree370361e706de99e3c176b343e9f2db5a1a9df2a3 /include/linux/if_pppox.h
parent37e6636669b0b996681586facee8034f7f674f6a (diff)
downloadop-kernel-dev-797659fb4a4a511649cd71028141c32ad1698a12.zip
op-kernel-dev-797659fb4a4a511649cd71028141c32ad1698a12.tar.gz
[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 <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/if_pppox.h')
-rw-r--r--include/linux/if_pppox.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h
index e33ee76..7044f8a 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 <linux/skbuff.h>
+
+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 */
OpenPOWER on IntegriCloud