Release 4.11 net/802/p8022.c
/*
* NET3: Support for 802.2 demultiplexing off Ethernet
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* Demultiplex 802.2 encoded protocols. We match the entry by the
* SSAP/DSAP pair and then deliver to the registered datalink that
* matches. The control byte is ignored and handling of such items
* is up to the routine passed the frame.
*
* Unlike the 802.3 datalink we have a list of 802.2 entries as
* there are multiple protocols to demux. The list is currently
* short (3 or 4 entries at most). The current demux assumes this.
*/
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#include <net/datalink.h>
#include <linux/mm.h>
#include <linux/in.h>
#include <linux/init.h>
#include <net/llc.h>
#include <net/p8022.h>
static int p8022_request(struct datalink_proto *dl, struct sk_buff *skb,
unsigned char *dest)
{
llc_build_and_send_ui_pkt(dl->sap, skb, dest, dl->sap->laddr.lsap);
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Arnaldo Carvalho de Melo | 34 | 79.07% | 3 | 50.00% |
Linus Torvalds (pre-git) | 9 | 20.93% | 3 | 50.00% |
Total | 43 | 100.00% | 6 | 100.00% |
struct datalink_proto *register_8022_client(unsigned char type,
int (*func)(struct sk_buff *skb,
struct net_device *dev,
struct packet_type *pt,
struct net_device *orig_dev))
{
struct datalink_proto *proto;
proto = kmalloc(sizeof(*proto), GFP_ATOMIC);
if (proto) {
proto->type[0] = type;
proto->header_length = 3;
proto->request = p8022_request;
proto->sap = llc_sap_open(type, func);
if (!proto->sap) {
kfree(proto);
proto = NULL;
}
}
return proto;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 72 | 62.61% | 3 | 42.86% |
Arnaldo Carvalho de Melo | 38 | 33.04% | 3 | 42.86% |
David S. Miller | 5 | 4.35% | 1 | 14.29% |
Total | 115 | 100.00% | 7 | 100.00% |
void unregister_8022_client(struct datalink_proto *proto)
{
llc_sap_put(proto->sap);
kfree(proto);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 14 | 63.64% | 1 | 33.33% |
Arnaldo Carvalho de Melo | 8 | 36.36% | 2 | 66.67% |
Total | 22 | 100.00% | 3 | 100.00% |
EXPORT_SYMBOL(register_8022_client);
EXPORT_SYMBOL(unregister_8022_client);
MODULE_LICENSE("GPL");
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Linus Torvalds (pre-git) | 118 | 52.21% | 8 | 44.44% |
Arnaldo Carvalho de Melo | 99 | 43.81% | 7 | 38.89% |
David S. Miller | 5 | 2.21% | 1 | 5.56% |
Tejun Heo | 3 | 1.33% | 1 | 5.56% |
Paul Gortmaker | 1 | 0.44% | 1 | 5.56% |
Total | 226 | 100.00% | 18 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.