diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1997-04-29 21:13:14 +0000 |
---|---|---|
committer | <ralf@linux-mips.org> | 1997-04-29 21:13:14 +0000 |
commit | 19c9bba94152148523ba0f7ef7cffe3d45656b11 (patch) | |
tree | 40b1cb534496a7f1ca0f5c314a523c69f1fee464 /net/802/psnap.c | |
parent | 7206675c40394c78a90e74812bbdbf8cf3cca1be (diff) |
Import of Linux/MIPS 2.1.36
Diffstat (limited to 'net/802/psnap.c')
-rw-r--r-- | net/802/psnap.c | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/net/802/psnap.c b/net/802/psnap.c index 4f17352ab..bdcb5efd2 100644 --- a/net/802/psnap.c +++ b/net/802/psnap.c @@ -9,7 +9,8 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ - + +#include <linux/config.h> #include <linux/module.h> #include <linux/netdevice.h> #include <linux/skbuff.h> @@ -25,7 +26,7 @@ static struct datalink_proto *snap_dl = NULL; /* 802.2 DL for SNAP */ /* * Find a snap client by matching the 5 bytes. */ - + static struct datalink_proto *find_snap_client(unsigned char *desc) { struct datalink_proto *proto; @@ -37,27 +38,27 @@ static struct datalink_proto *find_snap_client(unsigned char *desc) /* * A SNAP packet has arrived */ - + int snap_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt) { - static struct packet_type psnap_packet_type = + static struct packet_type psnap_packet_type = { - 0, + 0, NULL, /* All Devices */ snap_rcv, NULL, NULL, }; - + struct datalink_proto *proto; proto = find_snap_client(skb->h.raw); - if (proto != NULL) + if (proto != NULL) { /* * Pass the frame on. */ - + skb->h.raw += 5; skb_pull(skb,5); if (psnap_packet_type.type == 0) @@ -72,7 +73,7 @@ int snap_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt) /* * Put a SNAP header on a frame and pass to 802.2 */ - + static void snap_datalink_header(struct datalink_proto *dl, struct sk_buff *skb, unsigned char *dest_node) { memcpy(skb_push(skb,5),dl->type,5); @@ -83,25 +84,20 @@ static void snap_datalink_header(struct datalink_proto *dl, struct sk_buff *skb, * Set up the SNAP layer */ -static struct symbol_table snap_proto_syms = { -#include <linux/symtab_begin.h> - X(register_snap_client), - X(unregister_snap_client), -#include <linux/symtab_end.h> -}; - +EXPORT_SYMBOL(register_snap_client); +EXPORT_SYMBOL(unregister_snap_client); + void snap_proto_init(struct net_proto *pro) { snap_dl=register_8022_client(0xAA, snap_rcv); if(snap_dl==NULL) printk("SNAP - unable to register with 802.2\n"); - register_symtab(&snap_proto_syms); } - + /* * Register SNAP clients. We don't yet use this for IP or IPX. */ - + struct datalink_proto *register_snap_client(unsigned char *desc, int (*rcvfunc)(struct sk_buff *, struct device *, struct packet_type *)) { struct datalink_proto *proto; @@ -110,7 +106,7 @@ struct datalink_proto *register_snap_client(unsigned char *desc, int (*rcvfunc)( return NULL; proto = (struct datalink_proto *) kmalloc(sizeof(*proto), GFP_ATOMIC); - if (proto != NULL) + if (proto != NULL) { memcpy(proto->type, desc,5); proto->type_len = 5; @@ -152,4 +148,3 @@ void unregister_snap_client(unsigned char *desc) restore_flags(flags); } - |