This source file includes following definitions.
- p8023_request
- make_8023_client
- destroy_8023_client
1
2
3
4
5
6
7
8
9
10
11
12 #include <linux/in.h>
13 #include <linux/mm.h>
14 #include <linux/module.h>
15 #include <linux/netdevice.h>
16 #include <linux/skbuff.h>
17 #include <linux/slab.h>
18
19 #include <net/datalink.h>
20 #include <net/p8022.h>
21
22
23
24
25
26 static int p8023_request(struct datalink_proto *dl,
27 struct sk_buff *skb, unsigned char *dest_node)
28 {
29 struct net_device *dev = skb->dev;
30
31 dev_hard_header(skb, dev, ETH_P_802_3, dest_node, NULL, skb->len);
32 return dev_queue_xmit(skb);
33 }
34
35
36
37
38 struct datalink_proto *make_8023_client(void)
39 {
40 struct datalink_proto *proto = kmalloc(sizeof(*proto), GFP_ATOMIC);
41
42 if (proto) {
43 proto->header_length = 0;
44 proto->request = p8023_request;
45 }
46 return proto;
47 }
48
49
50
51
52 void destroy_8023_client(struct datalink_proto *dl)
53 {
54 kfree(dl);
55 }
56
57 EXPORT_SYMBOL(destroy_8023_client);
58 EXPORT_SYMBOL(make_8023_client);
59
60 MODULE_LICENSE("GPL");