14 #include <linux/errno.h>
15 #include <linux/types.h>
16 #include <linux/socket.h>
18 #include <linux/kernel.h>
20 #include <linux/string.h>
22 #include <linux/net.h>
25 #include <linux/netdevice.h>
29 #include <linux/fcntl.h>
39 static int rose_state1_machine(
struct sock *
sk,
struct sk_buff *
skb,
int frametype)
76 static int rose_state2_machine(
struct sock *sk,
struct sk_buff *skb,
int frametype)
104 static int rose_state3_machine(
struct sock *sk,
struct sk_buff *skb,
int frametype,
int ns,
int nr,
int q,
int d,
int m)
165 if (ns == rose->
vr) {
214 static int rose_state4_machine(
struct sock *sk,
struct sk_buff *skb,
int frametype)
251 static int rose_state5_machine(
struct sock *sk,
struct sk_buff *skb,
int frametype)
266 int queued = 0, frametype,
ns,
nr,
q,
d,
m;
271 frametype =
rose_decode(skb, &ns, &nr, &q, &d, &m);
273 switch (rose->
state) {
275 queued = rose_state1_machine(sk, skb, frametype);
278 queued = rose_state2_machine(sk, skb, frametype);
281 queued = rose_state3_machine(sk, skb, frametype, ns, nr, q, d, m);
284 queued = rose_state4_machine(sk, skb, frametype);
287 queued = rose_state5_machine(sk, skb, frametype);