1
2
3
4
5
6
7
8
9
10
11
12#ifndef IRNET_IRDA_H
13#define IRNET_IRDA_H
14
15
16
17
18#include "irnet.h"
19
20
21
22
23
24
25
26#define IRNET_SERVICE_NAME "IrNetv1"
27
28#define IRNET_IAS_VALUE "IrDA:TinyTP:LsapSel"
29
30#define IRNET_NOTIFY_NAME "IrNET socket"
31
32#define IRNET_NOTIFY_NAME_SERV "IrNET server"
33
34
35
36
37
38
39
40
41typedef struct irnet_root
42{
43 irnet_socket s;
44
45
46 int magic;
47 int running;
48
49
50 hashbin_t * list;
51 spinlock_t spinlock;
52
53
54
55
56 void * skey;
57
58
59 struct ias_object * ias_obj;
60
61} irnet_root;
62
63
64
65
66
67static void
68 irnet_post_event(irnet_socket *,
69 irnet_event,
70 __u32,
71 __u32,
72 char *,
73 __u16);
74
75static inline int
76 irnet_open_tsap(irnet_socket *);
77static inline __u8
78 irnet_ias_to_tsap(irnet_socket *,
79 int,
80 struct ias_value *);
81static inline int
82 irnet_find_lsap_sel(irnet_socket *);
83static inline int
84 irnet_connect_tsap(irnet_socket *);
85static inline int
86 irnet_discover_next_daddr(irnet_socket *);
87static inline int
88 irnet_discover_daddr_and_lsap_sel(irnet_socket *);
89static inline int
90 irnet_dname_to_daddr(irnet_socket *);
91
92static inline int
93 irnet_daddr_to_dname(irnet_socket *);
94static inline irnet_socket *
95 irnet_find_socket(irnet_socket *);
96static inline int
97 irnet_connect_socket(irnet_socket *,
98 irnet_socket *,
99 struct qos_info *,
100 __u32,
101 __u8);
102static inline void
103 irnet_disconnect_server(irnet_socket *,
104 struct sk_buff *);
105static inline int
106 irnet_setup_server(void);
107static inline void
108 irnet_destroy_server(void);
109
110static int
111 irnet_data_indication(void *,
112 void *,
113 struct sk_buff *);
114static void
115 irnet_disconnect_indication(void *,
116 void *,
117 LM_REASON,
118 struct sk_buff *);
119static void
120 irnet_connect_confirm(void *,
121 void *,
122 struct qos_info *,
123 __u32,
124 __u8,
125 struct sk_buff *);
126static void
127 irnet_flow_indication(void *,
128 void *,
129 LOCAL_FLOW);
130static void
131 irnet_status_indication(void *,
132 LINK_STATUS,
133 LOCK_STATUS);
134static void
135 irnet_connect_indication(void *,
136 void *,
137 struct qos_info *,
138 __u32,
139 __u8,
140 struct sk_buff *);
141
142static void
143 irnet_getvalue_confirm(int,
144 __u16,
145 struct ias_value *,
146 void *);
147static void
148 irnet_discovervalue_confirm(int,
149 __u16,
150 struct ias_value *,
151 void *);
152#ifdef DISCOVERY_EVENTS
153static void
154 irnet_discovery_indication(discinfo_t *,
155 DISCOVERY_MODE,
156 void *);
157static void
158 irnet_expiry_indication(discinfo_t *,
159 DISCOVERY_MODE,
160 void *);
161#endif
162
163
164
165
166
167
168static struct irnet_root irnet_server;
169
170
171struct irnet_ctrl_channel irnet_events;
172
173
174#ifdef CONFIG_PROC_FS
175extern struct proc_dir_entry *proc_irda;
176#endif
177
178#endif
179