14 #include <linux/netdevice.h>
15 #include <linux/slab.h>
16 #include <linux/export.h>
23 #define dprintk(args...) printk(KERN_DEBUG args)
25 #define dprintk(args...)
39 static void (*llc_type_handlers[2])(
struct llc_sap *sap,
47 llc_type_handlers[type - 1] =
handler;
53 llc_type_handlers[type - 1] =
NULL;
111 static inline int llc_fixup_skb(
struct sk_buff *skb)
116 if (
unlikely(!pskb_may_pull(skb,
sizeof(*pdu))))
124 if (
unlikely(!pskb_may_pull(skb, llc_len)))
130 __be16 pdulen = eth_hdr(skb)->h_proto;
134 !pskb_may_pull(skb, data_size))
136 if (
unlikely(pskb_trim_rcsum(skb, data_size)))
165 if (!net_eq(dev_net(dev), &
init_net))
173 dprintk(
"%s: PACKET_OTHERHOST\n", __func__);
181 pdu = llc_pdu_sn_hdr(skb);
186 dprintk(
"%s: llc_sap_find(%02X) failed!\n", __func__,
195 dest = llc_pdu_type(skb);
199 rcv(skb, dev, pt, orig_dev);
206 rcv(cskb, dev, pt, orig_dev);
208 sap_handler(sap, skb);