12 #include <linux/errno.h>
13 #include <linux/types.h>
14 #include <linux/socket.h>
16 #include <linux/kernel.h>
18 #include <linux/string.h>
20 #include <linux/net.h>
21 #include <linux/slab.h>
24 #include <linux/netdevice.h>
28 #include <asm/uaccess.h>
29 #include <linux/fcntl.h>
84 unsigned short vc = ax25->
va;
86 while (vc != ax25->
vs) {
87 if (nr == vc)
return 1;
91 if (nr == ax25->
vs)
return 1;
102 unsigned char *
frame;
109 if ((frame[0] &
AX25_S) == 0) {
111 *ns = (frame[0] >> 1) & 0x07;
112 *nr = (frame[0] >> 5) & 0x07;
114 }
else if ((frame[0] &
AX25_U) == 1) {
115 frametype = frame[0] & 0x0F;
116 *nr = (frame[0] >> 5) & 0x07;
118 }
else if ((frame[0] & AX25_U) == 3) {
119 frametype = frame[0] & ~
AX25_PF;
124 if ((frame[0] &
AX25_S) == 0) {
126 *ns = (frame[0] >> 1) & 0x7F;
127 *nr = (frame[1] >> 1) & 0x7F;
130 }
else if ((frame[0] &
AX25_U) == 1) {
131 frametype = frame[0] & 0x0F;
132 *nr = (frame[1] >> 1) & 0x7F;
135 }
else if ((frame[0] & AX25_U) == 3) {
136 frametype = frame[0] & ~
AX25_PF;
158 skb_reserve(skb, ax25->
ax25_dev->
dev->hard_header_len);
160 skb_reset_network_header(skb);
166 *dptr |= (poll_bit) ?
AX25_PF : 0;
168 *dptr |= (ax25->
vr << 5);
173 *dptr |= (poll_bit) ?
AX25_PF : 0;
177 dptr[1] = (ax25->
vr << 1);
178 dptr[1] |= (poll_bit) ?
AX25_EPF : 0;
203 skb_reset_network_header(skb);
236 for (n = 0; n < ax25->
n2count; n++)
242 ax25->
t1 = t * ax25->
rtt;
283 ax25->
sk->sk_state_change(ax25->
sk);