10 #include <linux/errno.h>
11 #include <linux/types.h>
12 #include <linux/socket.h>
14 #include <linux/kernel.h>
16 #include <linux/string.h>
18 #include <linux/net.h>
19 #include <linux/slab.h>
22 #include <linux/netdevice.h>
26 #include <asm/uaccess.h>
27 #include <linux/fcntl.h>
54 skb_reset_transport_header(skbn);
57 skb_copy_from_linear_data(skbo,
74 static int nr_state1_machine(
struct sock *sk,
struct sk_buff *skb,
118 static int nr_state2_machine(
struct sock *sk,
struct sk_buff *skb,
149 static int nr_state3_machine(
struct sock *sk,
struct sk_buff *skb,
int frametype)
154 unsigned short save_vr;
155 unsigned short nr,
ns;
206 case NR_INFO | NR_NAK_FLAG | NR_CHOKE_FLAG:
210 if (frametype & NR_CHOKE_FLAG) {
218 if (frametype & NR_NAK_FLAG) {
233 skb_queue_head_init(&temp_queue);
238 if (ns == nrom->
vr) {
239 if (nr_queue_rx_frame(sk, skbn, frametype &
NR_MORE_FLAG) == 0) {
254 }
while (save_vr != nrom->
vr);
283 int queued = 0, frametype;
288 frametype = skb->
data[19];
292 queued = nr_state1_machine(sk, skb, frametype);
295 queued = nr_state2_machine(sk, skb, frametype);
298 queued = nr_state3_machine(sk, skb, frametype);