• Home
  • Raw
  • Download

Lines Matching refs:ax25

39 static int ax25_std_state1_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int pf, int t…  in ax25_std_state1_machine()  argument
43 ax25->modulus = AX25_MODULUS; in ax25_std_state1_machine()
44 ax25->window = ax25->ax25_dev->values[AX25_VALUES_WINDOW]; in ax25_std_state1_machine()
45 ax25_send_control(ax25, AX25_UA, pf, AX25_RESPONSE); in ax25_std_state1_machine()
49 ax25->modulus = AX25_EMODULUS; in ax25_std_state1_machine()
50 ax25->window = ax25->ax25_dev->values[AX25_VALUES_EWINDOW]; in ax25_std_state1_machine()
51 ax25_send_control(ax25, AX25_UA, pf, AX25_RESPONSE); in ax25_std_state1_machine()
55 ax25_send_control(ax25, AX25_DM, pf, AX25_RESPONSE); in ax25_std_state1_machine()
60 ax25_calculate_rtt(ax25); in ax25_std_state1_machine()
61 ax25_stop_t1timer(ax25); in ax25_std_state1_machine()
62 ax25_start_t3timer(ax25); in ax25_std_state1_machine()
63 ax25_start_idletimer(ax25); in ax25_std_state1_machine()
64 ax25->vs = 0; in ax25_std_state1_machine()
65 ax25->va = 0; in ax25_std_state1_machine()
66 ax25->vr = 0; in ax25_std_state1_machine()
67 ax25->state = AX25_STATE_3; in ax25_std_state1_machine()
68 ax25->n2count = 0; in ax25_std_state1_machine()
69 if (ax25->sk != NULL) { in ax25_std_state1_machine()
70 bh_lock_sock(ax25->sk); in ax25_std_state1_machine()
71 ax25->sk->sk_state = TCP_ESTABLISHED; in ax25_std_state1_machine()
73 if (!sock_flag(ax25->sk, SOCK_DEAD)) in ax25_std_state1_machine()
74 ax25->sk->sk_state_change(ax25->sk); in ax25_std_state1_machine()
75 bh_unlock_sock(ax25->sk); in ax25_std_state1_machine()
82 if (ax25->modulus == AX25_MODULUS) { in ax25_std_state1_machine()
83 ax25_disconnect(ax25, ECONNREFUSED); in ax25_std_state1_machine()
85 ax25->modulus = AX25_MODULUS; in ax25_std_state1_machine()
86 ax25->window = ax25->ax25_dev->values[AX25_VALUES_WINDOW]; in ax25_std_state1_machine()
103 static int ax25_std_state2_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int pf, int t… in ax25_std_state2_machine() argument
108 ax25_send_control(ax25, AX25_DM, pf, AX25_RESPONSE); in ax25_std_state2_machine()
112 ax25_send_control(ax25, AX25_UA, pf, AX25_RESPONSE); in ax25_std_state2_machine()
113 ax25_disconnect(ax25, 0); in ax25_std_state2_machine()
119 ax25_disconnect(ax25, 0); in ax25_std_state2_machine()
126 if (pf) ax25_send_control(ax25, AX25_DM, AX25_POLLON, AX25_RESPONSE); in ax25_std_state2_machine()
141 static int ax25_std_state3_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int ns, int n… in ax25_std_state3_machine() argument
149 ax25->modulus = AX25_MODULUS; in ax25_std_state3_machine()
150 ax25->window = ax25->ax25_dev->values[AX25_VALUES_WINDOW]; in ax25_std_state3_machine()
152 ax25->modulus = AX25_EMODULUS; in ax25_std_state3_machine()
153 ax25->window = ax25->ax25_dev->values[AX25_VALUES_EWINDOW]; in ax25_std_state3_machine()
155 ax25_send_control(ax25, AX25_UA, pf, AX25_RESPONSE); in ax25_std_state3_machine()
156 ax25_stop_t1timer(ax25); in ax25_std_state3_machine()
157 ax25_stop_t2timer(ax25); in ax25_std_state3_machine()
158 ax25_start_t3timer(ax25); in ax25_std_state3_machine()
159 ax25_start_idletimer(ax25); in ax25_std_state3_machine()
160 ax25->condition = 0x00; in ax25_std_state3_machine()
161 ax25->vs = 0; in ax25_std_state3_machine()
162 ax25->va = 0; in ax25_std_state3_machine()
163 ax25->vr = 0; in ax25_std_state3_machine()
164 ax25_requeue_frames(ax25); in ax25_std_state3_machine()
168 ax25_send_control(ax25, AX25_UA, pf, AX25_RESPONSE); in ax25_std_state3_machine()
169 ax25_disconnect(ax25, 0); in ax25_std_state3_machine()
173 ax25_disconnect(ax25, ECONNRESET); in ax25_std_state3_machine()
179 ax25->condition &= ~AX25_COND_PEER_RX_BUSY; in ax25_std_state3_machine()
181 ax25->condition |= AX25_COND_PEER_RX_BUSY; in ax25_std_state3_machine()
183 ax25_std_enquiry_response(ax25); in ax25_std_state3_machine()
184 if (ax25_validate_nr(ax25, nr)) { in ax25_std_state3_machine()
185 ax25_check_iframes_acked(ax25, nr); in ax25_std_state3_machine()
187 ax25_std_nr_error_recovery(ax25); in ax25_std_state3_machine()
188 ax25->state = AX25_STATE_1; in ax25_std_state3_machine()
193 ax25->condition &= ~AX25_COND_PEER_RX_BUSY; in ax25_std_state3_machine()
195 ax25_std_enquiry_response(ax25); in ax25_std_state3_machine()
196 if (ax25_validate_nr(ax25, nr)) { in ax25_std_state3_machine()
197 ax25_frames_acked(ax25, nr); in ax25_std_state3_machine()
198 ax25_calculate_rtt(ax25); in ax25_std_state3_machine()
199 ax25_stop_t1timer(ax25); in ax25_std_state3_machine()
200 ax25_start_t3timer(ax25); in ax25_std_state3_machine()
201 ax25_requeue_frames(ax25); in ax25_std_state3_machine()
203 ax25_std_nr_error_recovery(ax25); in ax25_std_state3_machine()
204 ax25->state = AX25_STATE_1; in ax25_std_state3_machine()
209 if (!ax25_validate_nr(ax25, nr)) { in ax25_std_state3_machine()
210 ax25_std_nr_error_recovery(ax25); in ax25_std_state3_machine()
211 ax25->state = AX25_STATE_1; in ax25_std_state3_machine()
214 if (ax25->condition & AX25_COND_PEER_RX_BUSY) { in ax25_std_state3_machine()
215 ax25_frames_acked(ax25, nr); in ax25_std_state3_machine()
217 ax25_check_iframes_acked(ax25, nr); in ax25_std_state3_machine()
219 if (ax25->condition & AX25_COND_OWN_RX_BUSY) { in ax25_std_state3_machine()
220 if (pf) ax25_std_enquiry_response(ax25); in ax25_std_state3_machine()
223 if (ns == ax25->vr) { in ax25_std_state3_machine()
224 ax25->vr = (ax25->vr + 1) % ax25->modulus; in ax25_std_state3_machine()
225 queued = ax25_rx_iframe(ax25, skb); in ax25_std_state3_machine()
226 if (ax25->condition & AX25_COND_OWN_RX_BUSY) in ax25_std_state3_machine()
227 ax25->vr = ns; /* ax25->vr - 1 */ in ax25_std_state3_machine()
228 ax25->condition &= ~AX25_COND_REJECT; in ax25_std_state3_machine()
230 ax25_std_enquiry_response(ax25); in ax25_std_state3_machine()
232 if (!(ax25->condition & AX25_COND_ACK_PENDING)) { in ax25_std_state3_machine()
233 ax25->condition |= AX25_COND_ACK_PENDING; in ax25_std_state3_machine()
234 ax25_start_t2timer(ax25); in ax25_std_state3_machine()
238 if (ax25->condition & AX25_COND_REJECT) { in ax25_std_state3_machine()
239 if (pf) ax25_std_enquiry_response(ax25); in ax25_std_state3_machine()
241 ax25->condition |= AX25_COND_REJECT; in ax25_std_state3_machine()
242 ax25_send_control(ax25, AX25_REJ, pf, AX25_RESPONSE); in ax25_std_state3_machine()
243 ax25->condition &= ~AX25_COND_ACK_PENDING; in ax25_std_state3_machine()
250 ax25_std_establish_data_link(ax25); in ax25_std_state3_machine()
251 ax25->state = AX25_STATE_1; in ax25_std_state3_machine()
266 static int ax25_std_state4_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int ns, int n… in ax25_std_state4_machine() argument
274 ax25->modulus = AX25_MODULUS; in ax25_std_state4_machine()
275 ax25->window = ax25->ax25_dev->values[AX25_VALUES_WINDOW]; in ax25_std_state4_machine()
277 ax25->modulus = AX25_EMODULUS; in ax25_std_state4_machine()
278 ax25->window = ax25->ax25_dev->values[AX25_VALUES_EWINDOW]; in ax25_std_state4_machine()
280 ax25_send_control(ax25, AX25_UA, pf, AX25_RESPONSE); in ax25_std_state4_machine()
281 ax25_stop_t1timer(ax25); in ax25_std_state4_machine()
282 ax25_stop_t2timer(ax25); in ax25_std_state4_machine()
283 ax25_start_t3timer(ax25); in ax25_std_state4_machine()
284 ax25_start_idletimer(ax25); in ax25_std_state4_machine()
285 ax25->condition = 0x00; in ax25_std_state4_machine()
286 ax25->vs = 0; in ax25_std_state4_machine()
287 ax25->va = 0; in ax25_std_state4_machine()
288 ax25->vr = 0; in ax25_std_state4_machine()
289 ax25->state = AX25_STATE_3; in ax25_std_state4_machine()
290 ax25->n2count = 0; in ax25_std_state4_machine()
291 ax25_requeue_frames(ax25); in ax25_std_state4_machine()
295 ax25_send_control(ax25, AX25_UA, pf, AX25_RESPONSE); in ax25_std_state4_machine()
296 ax25_disconnect(ax25, 0); in ax25_std_state4_machine()
300 ax25_disconnect(ax25, ECONNRESET); in ax25_std_state4_machine()
306 ax25->condition &= ~AX25_COND_PEER_RX_BUSY; in ax25_std_state4_machine()
308 ax25->condition |= AX25_COND_PEER_RX_BUSY; in ax25_std_state4_machine()
310 ax25_stop_t1timer(ax25); in ax25_std_state4_machine()
311 ax25->n2count = 0; in ax25_std_state4_machine()
312 if (ax25_validate_nr(ax25, nr)) { in ax25_std_state4_machine()
313 ax25_frames_acked(ax25, nr); in ax25_std_state4_machine()
314 if (ax25->vs == ax25->va) { in ax25_std_state4_machine()
315 ax25_start_t3timer(ax25); in ax25_std_state4_machine()
316 ax25->state = AX25_STATE_3; in ax25_std_state4_machine()
318 ax25_requeue_frames(ax25); in ax25_std_state4_machine()
321 ax25_std_nr_error_recovery(ax25); in ax25_std_state4_machine()
322 ax25->state = AX25_STATE_1; in ax25_std_state4_machine()
327 ax25_std_enquiry_response(ax25); in ax25_std_state4_machine()
328 if (ax25_validate_nr(ax25, nr)) { in ax25_std_state4_machine()
329 ax25_frames_acked(ax25, nr); in ax25_std_state4_machine()
331 ax25_std_nr_error_recovery(ax25); in ax25_std_state4_machine()
332 ax25->state = AX25_STATE_1; in ax25_std_state4_machine()
337 ax25->condition &= ~AX25_COND_PEER_RX_BUSY; in ax25_std_state4_machine()
339 ax25_stop_t1timer(ax25); in ax25_std_state4_machine()
340 ax25->n2count = 0; in ax25_std_state4_machine()
341 if (ax25_validate_nr(ax25, nr)) { in ax25_std_state4_machine()
342 ax25_frames_acked(ax25, nr); in ax25_std_state4_machine()
343 if (ax25->vs == ax25->va) { in ax25_std_state4_machine()
344 ax25_start_t3timer(ax25); in ax25_std_state4_machine()
345 ax25->state = AX25_STATE_3; in ax25_std_state4_machine()
347 ax25_requeue_frames(ax25); in ax25_std_state4_machine()
350 ax25_std_nr_error_recovery(ax25); in ax25_std_state4_machine()
351 ax25->state = AX25_STATE_1; in ax25_std_state4_machine()
356 ax25_std_enquiry_response(ax25); in ax25_std_state4_machine()
357 if (ax25_validate_nr(ax25, nr)) { in ax25_std_state4_machine()
358 ax25_frames_acked(ax25, nr); in ax25_std_state4_machine()
359 ax25_requeue_frames(ax25); in ax25_std_state4_machine()
361 ax25_std_nr_error_recovery(ax25); in ax25_std_state4_machine()
362 ax25->state = AX25_STATE_1; in ax25_std_state4_machine()
367 if (!ax25_validate_nr(ax25, nr)) { in ax25_std_state4_machine()
368 ax25_std_nr_error_recovery(ax25); in ax25_std_state4_machine()
369 ax25->state = AX25_STATE_1; in ax25_std_state4_machine()
372 ax25_frames_acked(ax25, nr); in ax25_std_state4_machine()
373 if (ax25->condition & AX25_COND_OWN_RX_BUSY) { in ax25_std_state4_machine()
375 ax25_std_enquiry_response(ax25); in ax25_std_state4_machine()
378 if (ns == ax25->vr) { in ax25_std_state4_machine()
379 ax25->vr = (ax25->vr + 1) % ax25->modulus; in ax25_std_state4_machine()
380 queued = ax25_rx_iframe(ax25, skb); in ax25_std_state4_machine()
381 if (ax25->condition & AX25_COND_OWN_RX_BUSY) in ax25_std_state4_machine()
382 ax25->vr = ns; /* ax25->vr - 1 */ in ax25_std_state4_machine()
383 ax25->condition &= ~AX25_COND_REJECT; in ax25_std_state4_machine()
385 ax25_std_enquiry_response(ax25); in ax25_std_state4_machine()
387 if (!(ax25->condition & AX25_COND_ACK_PENDING)) { in ax25_std_state4_machine()
388 ax25->condition |= AX25_COND_ACK_PENDING; in ax25_std_state4_machine()
389 ax25_start_t2timer(ax25); in ax25_std_state4_machine()
393 if (ax25->condition & AX25_COND_REJECT) { in ax25_std_state4_machine()
394 if (pf) ax25_std_enquiry_response(ax25); in ax25_std_state4_machine()
396 ax25->condition |= AX25_COND_REJECT; in ax25_std_state4_machine()
397 ax25_send_control(ax25, AX25_REJ, pf, AX25_RESPONSE); in ax25_std_state4_machine()
398 ax25->condition &= ~AX25_COND_ACK_PENDING; in ax25_std_state4_machine()
405 ax25_std_establish_data_link(ax25); in ax25_std_state4_machine()
406 ax25->state = AX25_STATE_1; in ax25_std_state4_machine()
419 int ax25_std_frame_in(ax25_cb *ax25, struct sk_buff *skb, int type) in ax25_std_frame_in() argument
423 frametype = ax25_decode(ax25, skb, &ns, &nr, &pf); in ax25_std_frame_in()
425 switch (ax25->state) { in ax25_std_frame_in()
427 queued = ax25_std_state1_machine(ax25, skb, frametype, pf, type); in ax25_std_frame_in()
430 queued = ax25_std_state2_machine(ax25, skb, frametype, pf, type); in ax25_std_frame_in()
433 queued = ax25_std_state3_machine(ax25, skb, frametype, ns, nr, pf, type); in ax25_std_frame_in()
436 queued = ax25_std_state4_machine(ax25, skb, frametype, ns, nr, pf, type); in ax25_std_frame_in()
440 ax25_kick(ax25); in ax25_std_frame_in()