Lines Matching refs:x25

41 	struct x25_sock *x25 = x25_sk(sk);  in x25_clear_queues()  local
44 skb_queue_purge(&x25->ack_queue); in x25_clear_queues()
45 skb_queue_purge(&x25->interrupt_in_queue); in x25_clear_queues()
46 skb_queue_purge(&x25->interrupt_out_queue); in x25_clear_queues()
47 skb_queue_purge(&x25->fragment_queue); in x25_clear_queues()
59 struct x25_sock *x25 = x25_sk(sk); in x25_frames_acked() local
60 int modulus = x25->neighbour->extended ? X25_EMODULUS : X25_SMODULUS; in x25_frames_acked()
65 if (x25->va != nr) in x25_frames_acked()
66 while (skb_peek(&x25->ack_queue) && x25->va != nr) { in x25_frames_acked()
67 skb = skb_dequeue(&x25->ack_queue); in x25_frames_acked()
69 x25->va = (x25->va + 1) % modulus; in x25_frames_acked()
97 struct x25_sock *x25 = x25_sk(sk); in x25_validate_nr() local
98 unsigned short vc = x25->va; in x25_validate_nr()
99 int modulus = x25->neighbour->extended ? X25_EMODULUS : X25_SMODULUS; in x25_validate_nr()
101 while (vc != x25->vs) { in x25_validate_nr()
107 return nr == x25->vs ? 1 : 0; in x25_validate_nr()
116 struct x25_sock *x25 = x25_sk(sk); in x25_write_internal() local
135 if (x25->facilities.reverse & 0x80) { in x25_write_internal()
170 lci1 = (x25->lci >> 8) & 0x0F; in x25_write_internal()
171 lci2 = (x25->lci >> 0) & 0xFF; in x25_write_internal()
173 if (x25->neighbour->extended) { in x25_write_internal()
189 len = x25_addr_aton(addresses, &x25->dest_addr, in x25_write_internal()
190 &x25->source_addr); in x25_write_internal()
194 &x25->facilities, in x25_write_internal()
195 &x25->dte_facilities, in x25_write_internal()
196 x25->neighbour->global_facil_mask); in x25_write_internal()
199 dptr = skb_put(skb, x25->calluserdata.cudlength); in x25_write_internal()
200 memcpy(dptr, x25->calluserdata.cuddata, in x25_write_internal()
201 x25->calluserdata.cudlength); in x25_write_internal()
202 x25->calluserdata.cudlength = 0; in x25_write_internal()
210 &x25->facilities, in x25_write_internal()
211 &x25->dte_facilities, in x25_write_internal()
212 x25->vc_facil_mask); in x25_write_internal()
219 if(x25->facilities.reverse & 0x80) { in x25_write_internal()
221 x25->calluserdata.cudlength); in x25_write_internal()
222 memcpy(dptr, x25->calluserdata.cuddata, in x25_write_internal()
223 x25->calluserdata.cudlength); in x25_write_internal()
225 x25->calluserdata.cudlength = 0; in x25_write_internal()
231 *dptr++ = x25->causediag.cause; in x25_write_internal()
232 *dptr++ = x25->causediag.diagnostic; in x25_write_internal()
245 if (x25->neighbour->extended) { in x25_write_internal()
248 *dptr++ = (x25->vr << 1) & 0xFE; in x25_write_internal()
252 *dptr++ |= (x25->vr << 5) & 0xE0; in x25_write_internal()
264 x25_transmit_link(skb, x25->neighbour); in x25_write_internal()
273 struct x25_sock *x25 = x25_sk(sk); in x25_decode() local
299 if (x25->neighbour->extended) { in x25_decode()
319 if (x25->neighbour->extended) { in x25_decode()
352 struct x25_sock *x25 = x25_sk(sk); in x25_disconnect() local
357 x25->lci = 0; in x25_disconnect()
358 x25->state = X25_STATE_0; in x25_disconnect()
360 x25->causediag.cause = cause; in x25_disconnect()
361 x25->causediag.diagnostic = diagnostic; in x25_disconnect()
379 struct x25_sock *x25 = x25_sk(sk); in x25_check_rbuf() local
382 (x25->condition & X25_COND_OWN_RX_BUSY)) { in x25_check_rbuf()
383 x25->condition &= ~X25_COND_OWN_RX_BUSY; in x25_check_rbuf()
384 x25->condition &= ~X25_COND_ACK_PENDING; in x25_check_rbuf()
385 x25->vl = x25->vr; in x25_check_rbuf()