/* * 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 #include #include #include #include #include #include #include #include #include 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; } 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; } void unregister_8022_client(struct datalink_proto *proto) { llc_sap_put(proto->sap); kfree(proto); } EXPORT_SYMBOL(register_8022_client); EXPORT_SYMBOL(unregister_8022_client); MODULE_LICENSE("GPL"); f='/cgit.cgi/linux/net-next.git/commit/net/ipv4?h=nds-private-remove&id=1a94e38d254b3622d5d53f74b3b716b0fcab0ba8'>commitdiff
path: root/net/ipv4
AgeCommit message (Expand)AuthorFilesLines
2017-02-03Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-nextDavid S. Miller9-47/+31
2017-02-03tcp: clear pfmemalloc on outgoing skbEric Dumazet1-0/+7
2017-02-03tcp: add tcp_mss_clamp() helperEric Dumazet3-19/+7
2017-02-02net: add LINUX_MIB_PFMEMALLOCDROP counterEric Dumazet1-0/+1
2017-02-02net: ipv4: remove fib_lookup.h from devinet.c include listDavid Ahern1-2/+0
2017-02-02Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-2/+4
2017-02-02netfilter: allow logging from non-init namespacesMichal Kubeček2-2/+2
2017-02-02netfilter: add and use nf_ct_set helperFlorian Westphal3-6/+3
2017-02-02skbuff: add and use skb_nfct helperFlorian Westphal4-8/+8
2017-02-02netfilter: reset netfilter state when duplicating packetFlorian Westphal1-1/+1
2017-02-02netfilter: conntrack: no need to pass ctinfo to error handlerFlorian Westphal1-6/+6