Lines Matching refs:nr
46 skb_queue_purge(&sk->protinfo.nr->ack_queue); in nr_clear_queues()
47 skb_queue_purge(&sk->protinfo.nr->reseq_queue); in nr_clear_queues()
48 skb_queue_purge(&sk->protinfo.nr->frag_queue); in nr_clear_queues()
56 void nr_frames_acked(struct sock *sk, unsigned short nr) in nr_frames_acked() argument
63 if (sk->protinfo.nr->va != nr) { in nr_frames_acked()
64 while (skb_peek(&sk->protinfo.nr->ack_queue) != NULL && sk->protinfo.nr->va != nr) { in nr_frames_acked()
65 skb = skb_dequeue(&sk->protinfo.nr->ack_queue); in nr_frames_acked()
67 sk->protinfo.nr->va = (sk->protinfo.nr->va + 1) % NR_MODULUS; in nr_frames_acked()
81 while ((skb = skb_dequeue(&sk->protinfo.nr->ack_queue)) != NULL) { in nr_requeue_frames()
94 int nr_validate_nr(struct sock *sk, unsigned short nr) in nr_validate_nr() argument
96 unsigned short vc = sk->protinfo.nr->va; in nr_validate_nr()
98 while (vc != sk->protinfo.nr->vs) { in nr_validate_nr()
99 if (nr == vc) return 1; in nr_validate_nr()
103 if (nr == sk->protinfo.nr->vs) return 1; in nr_validate_nr()
113 unsigned short vc = sk->protinfo.nr->vr; in nr_in_rx_window()
114 unsigned short vt = (sk->protinfo.nr->vl + sk->protinfo.nr->window) % NR_MODULUS; in nr_in_rx_window()
141 len += (sk->protinfo.nr->bpqext) ? 2 : 1; in nr_write_internal()
165 timeout = sk->protinfo.nr->t1 / HZ; in nr_write_internal()
166 *dptr++ = sk->protinfo.nr->my_index; in nr_write_internal()
167 *dptr++ = sk->protinfo.nr->my_id; in nr_write_internal()
171 *dptr++ = sk->protinfo.nr->window; in nr_write_internal()
172 memcpy(dptr, &sk->protinfo.nr->user_addr, AX25_ADDR_LEN); in nr_write_internal()
177 memcpy(dptr, &sk->protinfo.nr->source_addr, AX25_ADDR_LEN); in nr_write_internal()
187 *dptr++ = sk->protinfo.nr->your_index; in nr_write_internal()
188 *dptr++ = sk->protinfo.nr->your_id; in nr_write_internal()
189 *dptr++ = sk->protinfo.nr->my_index; in nr_write_internal()
190 *dptr++ = sk->protinfo.nr->my_id; in nr_write_internal()
192 *dptr++ = sk->protinfo.nr->window; in nr_write_internal()
193 if (sk->protinfo.nr->bpqext) *dptr++ = sysctl_netrom_network_ttl_initialiser; in nr_write_internal()
198 *dptr++ = sk->protinfo.nr->your_index; in nr_write_internal()
199 *dptr++ = sk->protinfo.nr->your_id; in nr_write_internal()
206 *dptr++ = sk->protinfo.nr->your_index; in nr_write_internal()
207 *dptr++ = sk->protinfo.nr->your_id; in nr_write_internal()
209 *dptr++ = sk->protinfo.nr->vr; in nr_write_internal()
278 sk->protinfo.nr->state = NR_STATE_0; in nr_disconnect()