14 #include <linux/module.h>
15 #include <linux/netdevice.h>
17 #include <linux/slab.h>
28 static struct llc_sap *snap_sap;
37 list_for_each_entry_rcu(p, &snap_list,
node) {
38 if (!
memcmp(p->type, desc, 5)) {
58 if (
unlikely(!pskb_may_pull(skb, 5)))
62 proto = find_snap_client(skb_transport_header(skb));
67 rc = proto->
rcvfunc(skb, dev, &snap_packet_type, orig_dev);
100 KERN_CRIT "SNAP - unable to register with 802.2\n";
102 static int __init snap_init(
void)
115 static void __exit snap_exit(
void)
117 llc_sap_put(snap_sap);
134 spin_lock_bh(&snap_lock);
136 if (find_snap_client(desc))
145 list_add_rcu(&proto->
node, &snap_list);
148 spin_unlock_bh(&snap_lock);
158 spin_lock_bh(&snap_lock);
159 list_del_rcu(&proto->
node);
160 spin_unlock_bh(&snap_lock);