Lines Matching refs:skb

37 static int x25_queue_rx_frame(struct sock *sk, struct sk_buff *skb, int more)  in x25_queue_rx_frame()  argument
39 struct sk_buff *skbo, *skbn = skb; in x25_queue_rx_frame()
43 x25->fraglen += skb->len; in x25_queue_rx_frame()
44 skb_queue_tail(&x25->fragment_queue, skb); in x25_queue_rx_frame()
45 skb_set_owner_r(skb, sk); in x25_queue_rx_frame()
50 int len = x25->fraglen + skb->len; in x25_queue_rx_frame()
53 kfree_skb(skb); in x25_queue_rx_frame()
57 skb_queue_tail(&x25->fragment_queue, skb); in x25_queue_rx_frame()
92 static int x25_state1_machine(struct sock *sk, struct sk_buff *skb, int frametype) in x25_state1_machine() argument
112 if (!pskb_may_pull(skb, X25_STD_MIN_LEN)) in x25_state1_machine()
114 skb_pull(skb, X25_STD_MIN_LEN); in x25_state1_machine()
116 len = x25_parse_address_block(skb, &source_addr, in x25_state1_machine()
119 skb_pull(skb, len); in x25_state1_machine()
123 len = x25_parse_facilities(skb, &x25->facilities, in x25_state1_machine()
127 skb_pull(skb, len); in x25_state1_machine()
133 if (skb->len > 0) { in x25_state1_machine()
134 if (skb->len > X25_MAX_CUD_LEN) in x25_state1_machine()
137 skb_copy_bits(skb, 0, x25->calluserdata.cuddata, in x25_state1_machine()
138 skb->len); in x25_state1_machine()
139 x25->calluserdata.cudlength = skb->len; in x25_state1_machine()
146 if (!pskb_may_pull(skb, X25_STD_MIN_LEN + 2)) in x25_state1_machine()
150 x25_disconnect(sk, ECONNREFUSED, skb->data[3], skb->data[4]); in x25_state1_machine()
171 static int x25_state2_machine(struct sock *sk, struct sk_buff *skb, int frametype) in x25_state2_machine() argument
176 if (!pskb_may_pull(skb, X25_STD_MIN_LEN + 2)) in x25_state2_machine()
180 x25_disconnect(sk, 0, skb->data[3], skb->data[4]); in x25_state2_machine()
204 static int x25_state3_machine(struct sock *sk, struct sk_buff *skb, int frametype, int ns, int nr, … in x25_state3_machine() argument
226 if (!pskb_may_pull(skb, X25_STD_MIN_LEN + 2)) in x25_state3_machine()
230 x25_disconnect(sk, 0, skb->data[3], skb->data[4]); in x25_state3_machine()
271 if (x25_queue_rx_frame(sk, skb, m) == 0) { in x25_state3_machine()
311 queued = !sock_queue_rcv_skb(sk, skb); in x25_state3_machine()
313 skb_set_owner_r(skb, sk); in x25_state3_machine()
314 skb_queue_tail(&x25->interrupt_in_queue, skb); in x25_state3_machine()
340 static int x25_state4_machine(struct sock *sk, struct sk_buff *skb, int frametype) in x25_state4_machine() argument
360 if (!pskb_may_pull(skb, X25_STD_MIN_LEN + 2)) in x25_state4_machine()
364 x25_disconnect(sk, 0, skb->data[3], skb->data[4]); in x25_state4_machine()
381 int x25_process_rx_frame(struct sock *sk, struct sk_buff *skb) in x25_process_rx_frame() argument
389 frametype = x25_decode(sk, skb, &ns, &nr, &q, &d, &m); in x25_process_rx_frame()
393 queued = x25_state1_machine(sk, skb, frametype); in x25_process_rx_frame()
396 queued = x25_state2_machine(sk, skb, frametype); in x25_process_rx_frame()
399 queued = x25_state3_machine(sk, skb, frametype, ns, nr, q, d, m); in x25_process_rx_frame()
402 queued = x25_state4_machine(sk, skb, frametype); in x25_process_rx_frame()
411 int x25_backlog_rcv(struct sock *sk, struct sk_buff *skb) in x25_backlog_rcv() argument
413 int queued = x25_process_rx_frame(sk, skb); in x25_backlog_rcv()
416 kfree_skb(skb); in x25_backlog_rcv()