1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #ifndef _FRAD_H_
20 #define _FRAD_H_
21
22 #include <uapi/linux/if_frad.h>
23
24
25 #if defined(CONFIG_DLCI) || defined(CONFIG_DLCI_MODULE)
26
27
28 struct frhdr
29 {
30 unsigned char control;
31
32
33 unsigned char pad;
34
35 unsigned char NLPID;
36 unsigned char OUI[3];
37 __be16 PID;
38
39 #define IP_NLPID pad
40 } __packed;
41
42
43 #define FRAD_I_UI 0x03
44
45 #define FRAD_P_PADDING 0x00
46 #define FRAD_P_Q933 0x08
47 #define FRAD_P_SNAP 0x80
48 #define FRAD_P_CLNP 0x81
49 #define FRAD_P_IP 0xCC
50
51 struct dlci_local
52 {
53 struct net_device *master;
54 struct net_device *slave;
55 struct dlci_conf config;
56 int configured;
57 struct list_head list;
58
59
60 void (*receive)(struct sk_buff *skb, struct net_device *);
61 };
62
63 struct frad_local
64 {
65
66 struct net_device *master[CONFIG_DLCI_MAX];
67 short dlci[CONFIG_DLCI_MAX];
68
69 struct frad_conf config;
70 int configured;
71 int initialized;
72
73
74 int (*activate)(struct net_device *, struct net_device *);
75 int (*deactivate)(struct net_device *, struct net_device *);
76 int (*assoc)(struct net_device *, struct net_device *);
77 int (*deassoc)(struct net_device *, struct net_device *);
78 int (*dlci_conf)(struct net_device *, struct net_device *, int get);
79
80
81 struct timer_list timer;
82 struct net_device *dev;
83 int type;
84 int state;
85 int buffer;
86 };
87
88 #endif
89
90 extern void dlci_ioctl_set(int (*hook)(unsigned int, void __user *));
91
92 #endif