tag | line | file | source code |
ax25 | 196 | include/net/sock.h | ax25_cb *ax25; |
ax25 | 175 | net/ax25/af_ax25.c | static void ax25_remove_socket(ax25_cb *ax25) |
ax25 | 183 | net/ax25/af_ax25.c | if ((s = ax25_list) == ax25) { |
ax25 | 190 | net/ax25/af_ax25.c | if (s->next == ax25) { |
ax25 | 191 | net/ax25/af_ax25.c | s->next = ax25->next; |
ax25 | 250 | net/ax25/af_ax25.c | static void ax25_insert_socket(ax25_cb *ax25) |
ax25 | 257 | net/ax25/af_ax25.c | ax25->next = ax25_list; |
ax25 | 258 | net/ax25/af_ax25.c | ax25_list = ax25; |
ax25 | 400 | net/ax25/af_ax25.c | void ax25_destroy_socket(ax25_cb *ax25) /* Not static as its used by the timer */ |
ax25 | 408 | net/ax25/af_ax25.c | del_timer(&ax25->timer); |
ax25 | 410 | net/ax25/af_ax25.c | ax25_remove_socket(ax25); |
ax25 | 411 | net/ax25/af_ax25.c | ax25_clear_queues(ax25); /* Flush the queues */ |
ax25 | 413 | net/ax25/af_ax25.c | if (ax25->sk != NULL) { |
ax25 | 414 | net/ax25/af_ax25.c | while ((skb = skb_dequeue(&ax25->sk->receive_queue)) != NULL) { |
ax25 | 415 | net/ax25/af_ax25.c | if (skb->sk != ax25->sk) { /* A pending connection */ |
ax25 | 417 | net/ax25/af_ax25.c | ax25_set_timer(skb->sk->ax25); |
ax25 | 418 | net/ax25/af_ax25.c | skb->sk->ax25->state = AX25_STATE_0; |
ax25 | 425 | net/ax25/af_ax25.c | if (ax25->digipeat != NULL) { |
ax25 | 426 | net/ax25/af_ax25.c | kfree_s(ax25->digipeat, sizeof(ax25_digi)); |
ax25 | 427 | net/ax25/af_ax25.c | ax25->digipeat = NULL; |
ax25 | 430 | net/ax25/af_ax25.c | if (ax25->sk != NULL) { |
ax25 | 431 | net/ax25/af_ax25.c | if (ax25->sk->wmem_alloc || ax25->sk->rmem_alloc) { /* Defer: outstanding buffers */ |
ax25 | 432 | net/ax25/af_ax25.c | init_timer(&ax25->timer); |
ax25 | 433 | net/ax25/af_ax25.c | ax25->timer.expires = jiffies + 10 * HZ; |
ax25 | 434 | net/ax25/af_ax25.c | ax25->timer.function = ax25_destroy_timer; |
ax25 | 435 | net/ax25/af_ax25.c | ax25->timer.data = (unsigned long)ax25; |
ax25 | 436 | net/ax25/af_ax25.c | add_timer(&ax25->timer); |
ax25 | 438 | net/ax25/af_ax25.c | kfree_s(ax25->sk, sizeof(*ax25->sk)); |
ax25 | 439 | net/ax25/af_ax25.c | kfree_s(ax25, sizeof(*ax25)); |
ax25 | 442 | net/ax25/af_ax25.c | kfree_s(ax25, sizeof(*ax25)); |
ax25 | 521 | net/ax25/af_ax25.c | ax25_cb *ax25; |
ax25 | 523 | net/ax25/af_ax25.c | if ((ax25 = (ax25_cb *)kmalloc(sizeof(*ax25), GFP_ATOMIC)) == NULL) |
ax25 | 526 | net/ax25/af_ax25.c | skb_queue_head_init(&ax25->write_queue); |
ax25 | 527 | net/ax25/af_ax25.c | skb_queue_head_init(&ax25->frag_queue); |
ax25 | 528 | net/ax25/af_ax25.c | skb_queue_head_init(&ax25->ack_queue); |
ax25 | 529 | net/ax25/af_ax25.c | skb_queue_head_init(&ax25->reseq_queue); |
ax25 | 531 | net/ax25/af_ax25.c | init_timer(&ax25->timer); |
ax25 | 533 | net/ax25/af_ax25.c | ax25->rtt = (AX25_DEF_T1 * PR_SLOWHZ) / 2; |
ax25 | 534 | net/ax25/af_ax25.c | ax25->t1 = AX25_DEF_T1 * PR_SLOWHZ; |
ax25 | 535 | net/ax25/af_ax25.c | ax25->t2 = AX25_DEF_T2 * PR_SLOWHZ; |
ax25 | 536 | net/ax25/af_ax25.c | ax25->t3 = AX25_DEF_T3 * PR_SLOWHZ; |
ax25 | 537 | net/ax25/af_ax25.c | ax25->n2 = AX25_DEF_N2; |
ax25 | 539 | net/ax25/af_ax25.c | ax25->modulus = AX25_DEF_AXDEFMODE; |
ax25 | 540 | net/ax25/af_ax25.c | ax25->fragno = 0; |
ax25 | 541 | net/ax25/af_ax25.c | ax25->fraglen = 0; |
ax25 | 542 | net/ax25/af_ax25.c | ax25->hdrincl = 0; |
ax25 | 543 | net/ax25/af_ax25.c | ax25->backoff = AX25_DEF_BACKOFF == 'E'; |
ax25 | 544 | net/ax25/af_ax25.c | ax25->condition = 0x00; |
ax25 | 545 | net/ax25/af_ax25.c | ax25->t1timer = 0; |
ax25 | 546 | net/ax25/af_ax25.c | ax25->t2timer = 0; |
ax25 | 547 | net/ax25/af_ax25.c | ax25->t3timer = 0; |
ax25 | 548 | net/ax25/af_ax25.c | ax25->n2count = 0; |
ax25 | 550 | net/ax25/af_ax25.c | ax25->va = 0; |
ax25 | 551 | net/ax25/af_ax25.c | ax25->vr = 0; |
ax25 | 552 | net/ax25/af_ax25.c | ax25->vs = 0; |
ax25 | 555 | net/ax25/af_ax25.c | ax25->window = AX25_DEF_EWINDOW; |
ax25 | 557 | net/ax25/af_ax25.c | ax25->window = AX25_DEF_WINDOW; |
ax25 | 559 | net/ax25/af_ax25.c | ax25->device = NULL; |
ax25 | 560 | net/ax25/af_ax25.c | ax25->digipeat = NULL; |
ax25 | 561 | net/ax25/af_ax25.c | ax25->sk = NULL; |
ax25 | 563 | net/ax25/af_ax25.c | ax25->state = AX25_STATE_0; |
ax25 | 565 | net/ax25/af_ax25.c | memset(&ax25->dest_addr, '\0', sizeof(ax25_address)); |
ax25 | 566 | net/ax25/af_ax25.c | memset(&ax25->source_addr, '\0', sizeof(ax25_address)); |
ax25 | 568 | net/ax25/af_ax25.c | return ax25; |
ax25 | 575 | net/ax25/af_ax25.c | static void ax25_fillin_cb(ax25_cb *ax25, struct device *dev) |
ax25 | 577 | net/ax25/af_ax25.c | ax25->device = dev; |
ax25 | 579 | net/ax25/af_ax25.c | ax25->rtt = ax25_dev_get_value(dev, AX25_VALUES_T1); |
ax25 | 580 | net/ax25/af_ax25.c | ax25->t1 = ax25_dev_get_value(dev, AX25_VALUES_T1); |
ax25 | 581 | net/ax25/af_ax25.c | ax25->t2 = ax25_dev_get_value(dev, AX25_VALUES_T2); |
ax25 | 582 | net/ax25/af_ax25.c | ax25->t3 = ax25_dev_get_value(dev, AX25_VALUES_T3); |
ax25 | 583 | net/ax25/af_ax25.c | ax25->n2 = ax25_dev_get_value(dev, AX25_VALUES_N2); |
ax25 | 585 | net/ax25/af_ax25.c | ax25->modulus = ax25_dev_get_value(dev, AX25_VALUES_AXDEFMODE); |
ax25 | 587 | net/ax25/af_ax25.c | if (ax25->modulus == MODULUS) { |
ax25 | 588 | net/ax25/af_ax25.c | ax25->window = ax25_dev_get_value(dev, AX25_VALUES_WINDOW); |
ax25 | 590 | net/ax25/af_ax25.c | ax25->window = ax25_dev_get_value(dev, AX25_VALUES_EWINDOW); |
ax25 | 593 | net/ax25/af_ax25.c | ax25->backoff = ax25_dev_get_value(dev, AX25_VALUES_BACKOFF) == 'E'; |
ax25 | 599 | net/ax25/af_ax25.c | ax25_cb *ax25; |
ax25 | 607 | net/ax25/af_ax25.c | for (ax25 = ax25_list; ax25 != NULL; ax25 = ax25->next) { |
ax25 | 608 | net/ax25/af_ax25.c | if (ax25->sk != NULL && ax25->sk->type != SOCK_SEQPACKET) |
ax25 | 611 | net/ax25/af_ax25.c | if (ax25cmp(&ax25->source_addr, src) == 0 && ax25cmp(&ax25->dest_addr, dest) == 0 && ax25->device == dev) { |
ax25 | 612 | net/ax25/af_ax25.c | ax25_output(ax25, skb); |
ax25 | 617 | net/ax25/af_ax25.c | if ((ax25 = ax25_create_cb()) == NULL) |
ax25 | 620 | net/ax25/af_ax25.c | ax25_fillin_cb(ax25, dev); |
ax25 | 622 | net/ax25/af_ax25.c | memcpy(&ax25->source_addr, src, sizeof(ax25_address)); |
ax25 | 623 | net/ax25/af_ax25.c | memcpy(&ax25->dest_addr, dest, sizeof(ax25_address)); |
ax25 | 626 | net/ax25/af_ax25.c | if ((ax25->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) { |
ax25 | 627 | net/ax25/af_ax25.c | kfree_s(ax25, sizeof(ax25)); |
ax25 | 630 | net/ax25/af_ax25.c | memcpy(ax25->digipeat, digi, sizeof(ax25_digi)); |
ax25 | 633 | net/ax25/af_ax25.c | ax25_establish_data_link(ax25); |
ax25 | 634 | net/ax25/af_ax25.c | ax25_insert_socket(ax25); |
ax25 | 636 | net/ax25/af_ax25.c | ax25->state = AX25_STATE_1; |
ax25 | 638 | net/ax25/af_ax25.c | ax25_set_timer(ax25); |
ax25 | 640 | net/ax25/af_ax25.c | ax25_output(ax25, skb); |
ax25 | 716 | net/ax25/af_ax25.c | if (sk->ax25->modulus == MODULUS) { |
ax25 | 723 | net/ax25/af_ax25.c | sk->ax25->window = opt; |
ax25 | 729 | net/ax25/af_ax25.c | sk->ax25->rtt = (opt * PR_SLOWHZ) / 2; |
ax25 | 735 | net/ax25/af_ax25.c | sk->ax25->t2 = opt * PR_SLOWHZ; |
ax25 | 741 | net/ax25/af_ax25.c | sk->ax25->n2 = opt; |
ax25 | 747 | net/ax25/af_ax25.c | sk->ax25->t3 = opt * PR_SLOWHZ; |
ax25 | 751 | net/ax25/af_ax25.c | sk->ax25->backoff = opt ? 1 : 0; |
ax25 | 755 | net/ax25/af_ax25.c | sk->ax25->modulus = opt ? EMODULUS : MODULUS; |
ax25 | 759 | net/ax25/af_ax25.c | sk->ax25->hdrincl = opt ? 1 : 0; |
ax25 | 784 | net/ax25/af_ax25.c | val = sk->ax25->window; |
ax25 | 788 | net/ax25/af_ax25.c | val = (sk->ax25->t1 * 2) / PR_SLOWHZ; |
ax25 | 792 | net/ax25/af_ax25.c | val = sk->ax25->t2 / PR_SLOWHZ; |
ax25 | 796 | net/ax25/af_ax25.c | val = sk->ax25->n2; |
ax25 | 800 | net/ax25/af_ax25.c | val = sk->ax25->t3 / PR_SLOWHZ; |
ax25 | 804 | net/ax25/af_ax25.c | val = sk->ax25->backoff; |
ax25 | 808 | net/ax25/af_ax25.c | val = (sk->ax25->modulus == EMODULUS); |
ax25 | 812 | net/ax25/af_ax25.c | val = sk->ax25->hdrincl; |
ax25 | 860 | net/ax25/af_ax25.c | ax25_cb *ax25; |
ax25 | 895 | net/ax25/af_ax25.c | if ((ax25 = ax25_create_cb()) == NULL) { |
ax25 | 939 | net/ax25/af_ax25.c | ax25->sk = sk; |
ax25 | 940 | net/ax25/af_ax25.c | sk->ax25 = ax25; |
ax25 | 948 | net/ax25/af_ax25.c | ax25_cb *ax25; |
ax25 | 953 | net/ax25/af_ax25.c | if ((ax25 = ax25_create_cb()) == NULL) { |
ax25 | 958 | net/ax25/af_ax25.c | ax25_fillin_cb(ax25, dev); |
ax25 | 971 | net/ax25/af_ax25.c | kfree_s((void *)ax25, sizeof(*ax25)); |
ax25 | 1008 | net/ax25/af_ax25.c | ax25->modulus = osk->ax25->modulus; |
ax25 | 1009 | net/ax25/af_ax25.c | ax25->backoff = osk->ax25->backoff; |
ax25 | 1010 | net/ax25/af_ax25.c | ax25->hdrincl = osk->ax25->hdrincl; |
ax25 | 1011 | net/ax25/af_ax25.c | ax25->rtt = osk->ax25->rtt; |
ax25 | 1012 | net/ax25/af_ax25.c | ax25->t1 = osk->ax25->t1; |
ax25 | 1013 | net/ax25/af_ax25.c | ax25->t2 = osk->ax25->t2; |
ax25 | 1014 | net/ax25/af_ax25.c | ax25->t3 = osk->ax25->t3; |
ax25 | 1015 | net/ax25/af_ax25.c | ax25->n2 = osk->ax25->n2; |
ax25 | 1017 | net/ax25/af_ax25.c | ax25->window = osk->ax25->window; |
ax25 | 1019 | net/ax25/af_ax25.c | memcpy(&ax25->source_addr, &osk->ax25->source_addr, sizeof(ax25_address)); |
ax25 | 1021 | net/ax25/af_ax25.c | if (osk->ax25->digipeat != NULL) { |
ax25 | 1022 | net/ax25/af_ax25.c | if ((ax25->digipeat = (ax25_digi *)kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) { |
ax25 | 1024 | net/ax25/af_ax25.c | kfree_s(ax25, sizeof(*ax25)); |
ax25 | 1029 | net/ax25/af_ax25.c | sk->ax25 = ax25; |
ax25 | 1030 | net/ax25/af_ax25.c | ax25->sk = sk; |
ax25 | 1049 | net/ax25/af_ax25.c | switch (sk->ax25->state) { |
ax25 | 1054 | net/ax25/af_ax25.c | ax25_destroy_socket(sk->ax25); |
ax25 | 1058 | net/ax25/af_ax25.c | ax25_send_control(sk->ax25, DISC, POLLON, C_COMMAND); |
ax25 | 1059 | net/ax25/af_ax25.c | sk->ax25->state = AX25_STATE_0; |
ax25 | 1063 | net/ax25/af_ax25.c | ax25_destroy_socket(sk->ax25); |
ax25 | 1067 | net/ax25/af_ax25.c | ax25_send_control(sk->ax25, DM, POLLON, C_RESPONSE); |
ax25 | 1068 | net/ax25/af_ax25.c | sk->ax25->state = AX25_STATE_0; |
ax25 | 1072 | net/ax25/af_ax25.c | ax25_destroy_socket(sk->ax25); |
ax25 | 1077 | net/ax25/af_ax25.c | ax25_clear_queues(sk->ax25); |
ax25 | 1078 | net/ax25/af_ax25.c | sk->ax25->n2count = 0; |
ax25 | 1079 | net/ax25/af_ax25.c | ax25_send_control(sk->ax25, DISC, POLLON, C_COMMAND); |
ax25 | 1080 | net/ax25/af_ax25.c | sk->ax25->t3timer = 0; |
ax25 | 1081 | net/ax25/af_ax25.c | sk->ax25->t1timer = sk->ax25->t1 = ax25_calculate_t1(sk->ax25); |
ax25 | 1082 | net/ax25/af_ax25.c | sk->ax25->state = AX25_STATE_2; |
ax25 | 1096 | net/ax25/af_ax25.c | ax25_destroy_socket(sk->ax25); |
ax25 | 1139 | net/ax25/af_ax25.c | memcpy(&sk->ax25->source_addr, &addr->fsa_ax25.sax25_call, sizeof(ax25_address)); |
ax25 | 1141 | net/ax25/af_ax25.c | memcpy(&sk->ax25->source_addr, call, sizeof(ax25_address)); |
ax25 | 1157 | net/ax25/af_ax25.c | ax25_fillin_cb(sk->ax25, dev); |
ax25 | 1158 | net/ax25/af_ax25.c | ax25_insert_socket(sk->ax25); |
ax25 | 1201 | net/ax25/af_ax25.c | if (sk->ax25->digipeat == NULL) { |
ax25 | 1202 | net/ax25/af_ax25.c | if ((sk->ax25->digipeat = (ax25_digi *)kmalloc(sizeof(ax25_digi), GFP_KERNEL)) == NULL) |
ax25 | 1206 | net/ax25/af_ax25.c | sk->ax25->digipeat->ndigi = addr->sax25_ndigis; |
ax25 | 1209 | net/ax25/af_ax25.c | sk->ax25->digipeat->repeated[ct] = 0; |
ax25 | 1210 | net/ax25/af_ax25.c | memcpy(&sk->ax25->digipeat->calls[ct], &fsa->fsa_digipeater[ct], sizeof(ax25_address)); |
ax25 | 1214 | net/ax25/af_ax25.c | sk->ax25->digipeat->lastrepeat = 0; |
ax25 | 1218 | net/ax25/af_ax25.c | if ((err = ax25_rt_autobind(sk->ax25, &addr->sax25_call)) < 0) |
ax25 | 1220 | net/ax25/af_ax25.c | ax25_insert_socket(sk->ax25); /* Finish the bind */ |
ax25 | 1223 | net/ax25/af_ax25.c | if (sk->type == SOCK_SEQPACKET && ax25_find_cb(&sk->ax25->source_addr, &addr->sax25_call, sk->ax25->device) != NULL) |
ax25 | 1226 | net/ax25/af_ax25.c | memcpy(&sk->ax25->dest_addr, &addr->sax25_call, sizeof(ax25_address)); |
ax25 | 1238 | net/ax25/af_ax25.c | ax25_establish_data_link(sk->ax25); |
ax25 | 1239 | net/ax25/af_ax25.c | sk->ax25->state = AX25_STATE_1; |
ax25 | 1240 | net/ax25/af_ax25.c | ax25_set_timer(sk->ax25); /* Start going SABM SABM until a UA or a give up and DM */ |
ax25 | 1339 | net/ax25/af_ax25.c | addr = &sk->ax25->dest_addr; |
ax25 | 1341 | net/ax25/af_ax25.c | addr = &sk->ax25->source_addr; |
ax25 | 1350 | net/ax25/af_ax25.c | if (sk->ax25->digipeat != NULL) { |
ax25 | 1351 | net/ax25/af_ax25.c | ndigi = sk->ax25->digipeat->ndigi; |
ax25 | 1355 | net/ax25/af_ax25.c | memcpy(&sax->fsa_digipeater[i], &sk->ax25->digipeat->calls[i], sizeof(ax25_address)); |
ax25 | 1367 | net/ax25/af_ax25.c | ax25_cb *ax25; |
ax25 | 1529 | net/ax25/af_ax25.c | if ((ax25 = ax25_find_cb(&dest, &src, dev)) != NULL) { |
ax25 | 1535 | net/ax25/af_ax25.c | if (ax25_process_rx_frame(ax25, skb, type) == 0) |
ax25 | 1562 | net/ax25/af_ax25.c | ax25 = make->ax25; |
ax25 | 1578 | net/ax25/af_ax25.c | if ((ax25 = ax25_create_cb()) == NULL) { |
ax25 | 1584 | net/ax25/af_ax25.c | ax25_fillin_cb(ax25, dev); |
ax25 | 1594 | net/ax25/af_ax25.c | memcpy(&ax25->source_addr, &dest, sizeof(ax25_address)); |
ax25 | 1595 | net/ax25/af_ax25.c | memcpy(&ax25->dest_addr, &src, sizeof(ax25_address)); |
ax25 | 1600 | net/ax25/af_ax25.c | if (dp.ndigi != 0 && ax25->digipeat == NULL && (ax25->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) { |
ax25 | 1602 | net/ax25/af_ax25.c | ax25_destroy_socket(ax25); |
ax25 | 1607 | net/ax25/af_ax25.c | if (ax25->digipeat != NULL) { |
ax25 | 1608 | net/ax25/af_ax25.c | kfree_s(ax25->digipeat, sizeof(ax25_digi)); |
ax25 | 1609 | net/ax25/af_ax25.c | ax25->digipeat = NULL; |
ax25 | 1613 | net/ax25/af_ax25.c | ax25_digi_invert(&dp, ax25->digipeat); |
ax25 | 1617 | net/ax25/af_ax25.c | ax25->modulus = EMODULUS; |
ax25 | 1618 | net/ax25/af_ax25.c | ax25->window = ax25_dev_get_value(dev, AX25_VALUES_EWINDOW); |
ax25 | 1620 | net/ax25/af_ax25.c | ax25->modulus = MODULUS; |
ax25 | 1621 | net/ax25/af_ax25.c | ax25->window = ax25_dev_get_value(dev, AX25_VALUES_WINDOW); |
ax25 | 1624 | net/ax25/af_ax25.c | ax25->device = dev; |
ax25 | 1626 | net/ax25/af_ax25.c | ax25_send_control(ax25, UA, POLLON, C_RESPONSE); |
ax25 | 1628 | net/ax25/af_ax25.c | ax25->t3timer = ax25->t3; |
ax25 | 1629 | net/ax25/af_ax25.c | ax25->state = AX25_STATE_3; |
ax25 | 1631 | net/ax25/af_ax25.c | ax25_insert_socket(ax25); |
ax25 | 1633 | net/ax25/af_ax25.c | ax25_set_timer(ax25); |
ax25 | 1709 | net/ax25/af_ax25.c | if (sk->ax25->device == NULL) |
ax25 | 1737 | net/ax25/af_ax25.c | if (sk->type == SOCK_SEQPACKET && memcmp(&sk->ax25->dest_addr, &sax.sax25_call, sizeof(ax25_address)) != 0) |
ax25 | 1747 | net/ax25/af_ax25.c | memcpy(&sax.sax25_call, &sk->ax25->dest_addr, sizeof(ax25_address)); |
ax25 | 1748 | net/ax25/af_ax25.c | dp = sk->ax25->digipeat; |
ax25 | 1790 | net/ax25/af_ax25.c | ax25_output(sk->ax25, skb); /* Shove it onto the queue and kick */ |
ax25 | 1803 | net/ax25/af_ax25.c | asmptr += (lv = build_ax25_addr(asmptr, &sk->ax25->source_addr, &sax.sax25_call, dp, C_COMMAND, MODULUS)); |
ax25 | 1816 | net/ax25/af_ax25.c | ax25_queue_xmit(skb, sk->ax25->device, SOPRI_NORMAL); |
ax25 | 1849 | net/ax25/af_ax25.c | if (sk->ax25->hdrincl) { |
ax25 | 2005 | net/ax25/af_ax25.c | ax25_cb *ax25; |
ax25 | 2016 | net/ax25/af_ax25.c | for (ax25 = ax25_list; ax25 != NULL; ax25 = ax25->next) { |
ax25 | 2017 | net/ax25/af_ax25.c | if ((dev = ax25->device) == NULL) |
ax25 | 2023 | net/ax25/af_ax25.c | ax2asc(&ax25->dest_addr)); |
ax25 | 2025 | net/ax25/af_ax25.c | ax2asc(&ax25->source_addr), devname, |
ax25 | 2026 | net/ax25/af_ax25.c | ax25->state, |
ax25 | 2027 | net/ax25/af_ax25.c | ax25->vs, ax25->vr, ax25->va, |
ax25 | 2028 | net/ax25/af_ax25.c | ax25->t1timer / PR_SLOWHZ, |
ax25 | 2029 | net/ax25/af_ax25.c | ax25->t1 / PR_SLOWHZ, |
ax25 | 2030 | net/ax25/af_ax25.c | ax25->t2timer / PR_SLOWHZ, |
ax25 | 2031 | net/ax25/af_ax25.c | ax25->t2 / PR_SLOWHZ, |
ax25 | 2032 | net/ax25/af_ax25.c | ax25->t3timer / PR_SLOWHZ, |
ax25 | 2033 | net/ax25/af_ax25.c | ax25->t3 / PR_SLOWHZ, |
ax25 | 2034 | net/ax25/af_ax25.c | ax25->n2count, ax25->n2, |
ax25 | 2035 | net/ax25/af_ax25.c | ax25->rtt / PR_SLOWHZ, |
ax25 | 2036 | net/ax25/af_ax25.c | ax25->window); |
ax25 | 2038 | net/ax25/af_ax25.c | if (ax25->sk != NULL) { |
ax25 | 2040 | net/ax25/af_ax25.c | ax25->sk->wmem_alloc, |
ax25 | 2041 | net/ax25/af_ax25.c | ax25->sk->rmem_alloc); |
ax25 | 64 | net/ax25/ax25_in.c | static int ax25_rx_fragment(ax25_cb *ax25, struct sk_buff *skb) |
ax25 | 69 | net/ax25/ax25_in.c | if (ax25->fragno != 0) { |
ax25 | 71 | net/ax25/ax25_in.c | if ((ax25->fragno - 1) == (*skb->data & SEG_REM)) { |
ax25 | 72 | net/ax25/ax25_in.c | ax25->fragno = *skb->data & SEG_REM; |
ax25 | 74 | net/ax25/ax25_in.c | ax25->fraglen += skb->len; |
ax25 | 75 | net/ax25/ax25_in.c | skb_queue_tail(&ax25->frag_queue, skb); |
ax25 | 77 | net/ax25/ax25_in.c | if (ax25->fragno == 0) { |
ax25 | 78 | net/ax25/ax25_in.c | if ((skbn = alloc_skb(AX25_MAX_HEADER_LEN + ax25->fraglen, GFP_ATOMIC)) == NULL) |
ax25 | 84 | net/ax25/ax25_in.c | if (ax25->sk != NULL) { |
ax25 | 85 | net/ax25/ax25_in.c | skbn->sk = ax25->sk; |
ax25 | 86 | net/ax25/ax25_in.c | ax25->sk->rmem_alloc += skbn->truesize; |
ax25 | 92 | net/ax25/ax25_in.c | skbo = skb_dequeue(&ax25->frag_queue); |
ax25 | 99 | net/ax25/ax25_in.c | while ((skbo = skb_dequeue(&ax25->frag_queue)) != NULL) { |
ax25 | 104 | net/ax25/ax25_in.c | ax25->fraglen = 0; |
ax25 | 106 | net/ax25/ax25_in.c | if (ax25_rx_iframe(ax25, skbn) == 0) |
ax25 | 115 | net/ax25/ax25_in.c | ax25->fragno = *skb->data & SEG_REM; |
ax25 | 117 | net/ax25/ax25_in.c | ax25->fraglen = skb->len; |
ax25 | 118 | net/ax25/ax25_in.c | skb_queue_tail(&ax25->frag_queue, skb); |
ax25 | 130 | net/ax25/ax25_in.c | static int ax25_rx_iframe(ax25_cb *ax25, struct sk_buff *skb) |
ax25 | 138 | net/ax25/ax25_in.c | if (ax25_dev_get_value(ax25->device, AX25_VALUES_NETROM)) { |
ax25 | 140 | net/ax25/ax25_in.c | queued = nr_route_frame(skb, ax25); |
ax25 | 148 | net/ax25/ax25_in.c | ax25_ip_mode_set(&ax25->dest_addr, ax25->device, 'V'); |
ax25 | 155 | net/ax25/ax25_in.c | queued = ax25_rx_fragment(ax25, skb); |
ax25 | 159 | net/ax25/ax25_in.c | if (ax25->sk != NULL && ax25_dev_get_value(ax25->device, AX25_VALUES_TEXT) && ax25->sk->protocol == pid) { |
ax25 | 160 | net/ax25/ax25_in.c | if (sock_queue_rcv_skb(ax25->sk, skb) == 0) { |
ax25 | 163 | net/ax25/ax25_in.c | ax25->condition |= OWN_RX_BUSY_CONDITION; |
ax25 | 177 | net/ax25/ax25_in.c | static int ax25_state1_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int pf, int type) |
ax25 | 181 | net/ax25/ax25_in.c | ax25->modulus = MODULUS; |
ax25 | 182 | net/ax25/ax25_in.c | ax25->window = ax25_dev_get_value(ax25->device, AX25_VALUES_WINDOW); |
ax25 | 183 | net/ax25/ax25_in.c | ax25_send_control(ax25, UA, pf, C_RESPONSE); |
ax25 | 187 | net/ax25/ax25_in.c | ax25->modulus = EMODULUS; |
ax25 | 188 | net/ax25/ax25_in.c | ax25->window = ax25_dev_get_value(ax25->device, AX25_VALUES_EWINDOW); |
ax25 | 189 | net/ax25/ax25_in.c | ax25_send_control(ax25, UA, pf, C_RESPONSE); |
ax25 | 193 | net/ax25/ax25_in.c | ax25_send_control(ax25, DM, pf, C_RESPONSE); |
ax25 | 198 | net/ax25/ax25_in.c | ax25_calculate_rtt(ax25); |
ax25 | 199 | net/ax25/ax25_in.c | ax25->t1timer = 0; |
ax25 | 200 | net/ax25/ax25_in.c | ax25->t3timer = ax25->t3; |
ax25 | 201 | net/ax25/ax25_in.c | ax25->vs = 0; |
ax25 | 202 | net/ax25/ax25_in.c | ax25->va = 0; |
ax25 | 203 | net/ax25/ax25_in.c | ax25->vr = 0; |
ax25 | 204 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_3; |
ax25 | 205 | net/ax25/ax25_in.c | ax25->n2count = 0; |
ax25 | 206 | net/ax25/ax25_in.c | if (ax25->sk != NULL) { |
ax25 | 207 | net/ax25/ax25_in.c | ax25->sk->state = TCP_ESTABLISHED; |
ax25 | 209 | net/ax25/ax25_in.c | if (!ax25->sk->dead) |
ax25 | 210 | net/ax25/ax25_in.c | ax25->sk->state_change(ax25->sk); |
ax25 | 217 | net/ax25/ax25_in.c | if (ax25->modulus == MODULUS) { |
ax25 | 218 | net/ax25/ax25_in.c | ax25_clear_queues(ax25); |
ax25 | 219 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_0; |
ax25 | 220 | net/ax25/ax25_in.c | if (ax25->sk != NULL) { |
ax25 | 221 | net/ax25/ax25_in.c | ax25->sk->state = TCP_CLOSE; |
ax25 | 222 | net/ax25/ax25_in.c | ax25->sk->err = ECONNREFUSED; |
ax25 | 223 | net/ax25/ax25_in.c | if (!ax25->sk->dead) |
ax25 | 224 | net/ax25/ax25_in.c | ax25->sk->state_change(ax25->sk); |
ax25 | 225 | net/ax25/ax25_in.c | ax25->sk->dead = 1; |
ax25 | 228 | net/ax25/ax25_in.c | ax25->modulus = MODULUS; |
ax25 | 229 | net/ax25/ax25_in.c | ax25->window = ax25_dev_get_value(ax25->device, AX25_VALUES_WINDOW); |
ax25 | 246 | net/ax25/ax25_in.c | static int ax25_state2_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int pf, int type) |
ax25 | 251 | net/ax25/ax25_in.c | ax25_send_control(ax25, DM, pf, C_RESPONSE); |
ax25 | 255 | net/ax25/ax25_in.c | ax25_send_control(ax25, UA, pf, C_RESPONSE); |
ax25 | 260 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_0; |
ax25 | 261 | net/ax25/ax25_in.c | if (ax25->sk != NULL) { |
ax25 | 262 | net/ax25/ax25_in.c | ax25->sk->state = TCP_CLOSE; |
ax25 | 263 | net/ax25/ax25_in.c | ax25->sk->err = 0; |
ax25 | 264 | net/ax25/ax25_in.c | if (!ax25->sk->dead) |
ax25 | 265 | net/ax25/ax25_in.c | ax25->sk->state_change(ax25->sk); |
ax25 | 266 | net/ax25/ax25_in.c | ax25->sk->dead = 1; |
ax25 | 273 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_0; |
ax25 | 274 | net/ax25/ax25_in.c | if (ax25->sk != NULL) { |
ax25 | 275 | net/ax25/ax25_in.c | ax25->sk->state = TCP_CLOSE; |
ax25 | 276 | net/ax25/ax25_in.c | ax25->sk->err = 0; |
ax25 | 277 | net/ax25/ax25_in.c | if (!ax25->sk->dead) |
ax25 | 278 | net/ax25/ax25_in.c | ax25->sk->state_change(ax25->sk); |
ax25 | 279 | net/ax25/ax25_in.c | ax25->sk->dead = 1; |
ax25 | 289 | net/ax25/ax25_in.c | ax25_send_control(ax25, DM, POLLON, C_RESPONSE); |
ax25 | 304 | net/ax25/ax25_in.c | static int ax25_state3_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int ns, int nr, int pf, int type) |
ax25 | 310 | net/ax25/ax25_in.c | ax25->modulus = MODULUS; |
ax25 | 311 | net/ax25/ax25_in.c | ax25->window = ax25_dev_get_value(ax25->device, AX25_VALUES_WINDOW); |
ax25 | 312 | net/ax25/ax25_in.c | ax25_send_control(ax25, UA, pf, C_RESPONSE); |
ax25 | 313 | net/ax25/ax25_in.c | ax25->condition = 0x00; |
ax25 | 314 | net/ax25/ax25_in.c | ax25->t1timer = 0; |
ax25 | 315 | net/ax25/ax25_in.c | ax25->t3timer = ax25->t3; |
ax25 | 316 | net/ax25/ax25_in.c | ax25->vs = 0; |
ax25 | 317 | net/ax25/ax25_in.c | ax25->va = 0; |
ax25 | 318 | net/ax25/ax25_in.c | ax25->vr = 0; |
ax25 | 322 | net/ax25/ax25_in.c | ax25->modulus = EMODULUS; |
ax25 | 323 | net/ax25/ax25_in.c | ax25->window = ax25_dev_get_value(ax25->device, AX25_VALUES_EWINDOW); |
ax25 | 324 | net/ax25/ax25_in.c | ax25_send_control(ax25, UA, pf, C_RESPONSE); |
ax25 | 325 | net/ax25/ax25_in.c | ax25->condition = 0x00; |
ax25 | 326 | net/ax25/ax25_in.c | ax25->t1timer = 0; |
ax25 | 327 | net/ax25/ax25_in.c | ax25->t3timer = ax25->t3; |
ax25 | 328 | net/ax25/ax25_in.c | ax25->vs = 0; |
ax25 | 329 | net/ax25/ax25_in.c | ax25->va = 0; |
ax25 | 330 | net/ax25/ax25_in.c | ax25->vr = 0; |
ax25 | 334 | net/ax25/ax25_in.c | ax25_clear_queues(ax25); |
ax25 | 335 | net/ax25/ax25_in.c | ax25_send_control(ax25, UA, pf, C_RESPONSE); |
ax25 | 336 | net/ax25/ax25_in.c | ax25->t3timer = 0; |
ax25 | 337 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_0; |
ax25 | 338 | net/ax25/ax25_in.c | if (ax25->sk != NULL) { |
ax25 | 339 | net/ax25/ax25_in.c | ax25->sk->state = TCP_CLOSE; |
ax25 | 340 | net/ax25/ax25_in.c | ax25->sk->err = 0; |
ax25 | 341 | net/ax25/ax25_in.c | if (!ax25->sk->dead) |
ax25 | 342 | net/ax25/ax25_in.c | ax25->sk->state_change(ax25->sk); |
ax25 | 343 | net/ax25/ax25_in.c | ax25->sk->dead = 1; |
ax25 | 348 | net/ax25/ax25_in.c | ax25_clear_queues(ax25); |
ax25 | 349 | net/ax25/ax25_in.c | ax25->t3timer = 0; |
ax25 | 350 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_0; |
ax25 | 351 | net/ax25/ax25_in.c | if (ax25->sk) { |
ax25 | 352 | net/ax25/ax25_in.c | ax25->sk->state = TCP_CLOSE; |
ax25 | 353 | net/ax25/ax25_in.c | ax25->sk->err = ECONNRESET; |
ax25 | 354 | net/ax25/ax25_in.c | if (!ax25->sk->dead) |
ax25 | 355 | net/ax25/ax25_in.c | ax25->sk->state_change(ax25->sk); |
ax25 | 356 | net/ax25/ax25_in.c | ax25->sk->dead = 1; |
ax25 | 361 | net/ax25/ax25_in.c | ax25->condition |= PEER_RX_BUSY_CONDITION; |
ax25 | 362 | net/ax25/ax25_in.c | ax25_check_need_response(ax25, type, pf); |
ax25 | 363 | net/ax25/ax25_in.c | if (ax25_validate_nr(ax25, nr)) { |
ax25 | 364 | net/ax25/ax25_in.c | ax25_check_iframes_acked(ax25, nr); |
ax25 | 366 | net/ax25/ax25_in.c | ax25_nr_error_recovery(ax25); |
ax25 | 367 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_1; |
ax25 | 372 | net/ax25/ax25_in.c | ax25->condition &= ~PEER_RX_BUSY_CONDITION; |
ax25 | 373 | net/ax25/ax25_in.c | ax25_check_need_response(ax25, type, pf); |
ax25 | 374 | net/ax25/ax25_in.c | if (ax25_validate_nr(ax25, nr)) { |
ax25 | 375 | net/ax25/ax25_in.c | ax25_check_iframes_acked(ax25, nr); |
ax25 | 377 | net/ax25/ax25_in.c | ax25_nr_error_recovery(ax25); |
ax25 | 378 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_1; |
ax25 | 383 | net/ax25/ax25_in.c | ax25->condition &= ~PEER_RX_BUSY_CONDITION; |
ax25 | 384 | net/ax25/ax25_in.c | ax25_check_need_response(ax25, type, pf); |
ax25 | 385 | net/ax25/ax25_in.c | if (ax25_validate_nr(ax25, nr)) { |
ax25 | 386 | net/ax25/ax25_in.c | ax25_frames_acked(ax25, nr); |
ax25 | 387 | net/ax25/ax25_in.c | ax25_calculate_rtt(ax25); |
ax25 | 388 | net/ax25/ax25_in.c | ax25->t1timer = 0; |
ax25 | 389 | net/ax25/ax25_in.c | ax25->t3timer = ax25->t3; |
ax25 | 390 | net/ax25/ax25_in.c | ax25_requeue_frames(ax25); |
ax25 | 392 | net/ax25/ax25_in.c | ax25_nr_error_recovery(ax25); |
ax25 | 393 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_1; |
ax25 | 402 | net/ax25/ax25_in.c | if (!ax25_validate_nr(ax25, nr)) { |
ax25 | 403 | net/ax25/ax25_in.c | ax25_nr_error_recovery(ax25); |
ax25 | 404 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_1; |
ax25 | 407 | net/ax25/ax25_in.c | if (ax25->condition & PEER_RX_BUSY_CONDITION) { |
ax25 | 408 | net/ax25/ax25_in.c | ax25_frames_acked(ax25, nr); |
ax25 | 410 | net/ax25/ax25_in.c | ax25_check_iframes_acked(ax25, nr); |
ax25 | 412 | net/ax25/ax25_in.c | if (ax25->condition & OWN_RX_BUSY_CONDITION) { |
ax25 | 413 | net/ax25/ax25_in.c | if (pf) ax25_enquiry_response(ax25); |
ax25 | 416 | net/ax25/ax25_in.c | if (ns == ax25->vr) { |
ax25 | 417 | net/ax25/ax25_in.c | queued = ax25_rx_iframe(ax25, skb); |
ax25 | 418 | net/ax25/ax25_in.c | if (ax25->condition & OWN_RX_BUSY_CONDITION) { |
ax25 | 419 | net/ax25/ax25_in.c | if (pf) ax25_enquiry_response(ax25); |
ax25 | 422 | net/ax25/ax25_in.c | ax25->vr = (ax25->vr + 1) % ax25->modulus; |
ax25 | 423 | net/ax25/ax25_in.c | ax25->condition &= ~REJECT_CONDITION; |
ax25 | 425 | net/ax25/ax25_in.c | ax25_enquiry_response(ax25); |
ax25 | 427 | net/ax25/ax25_in.c | if (!(ax25->condition & ACK_PENDING_CONDITION)) { |
ax25 | 428 | net/ax25/ax25_in.c | ax25->t2timer = ax25->t2; |
ax25 | 429 | net/ax25/ax25_in.c | ax25->condition |= ACK_PENDING_CONDITION; |
ax25 | 433 | net/ax25/ax25_in.c | if (ax25->condition & REJECT_CONDITION) { |
ax25 | 434 | net/ax25/ax25_in.c | if (pf) ax25_enquiry_response(ax25); |
ax25 | 436 | net/ax25/ax25_in.c | ax25->condition |= REJECT_CONDITION; |
ax25 | 437 | net/ax25/ax25_in.c | ax25_send_control(ax25, REJ, pf, C_RESPONSE); |
ax25 | 438 | net/ax25/ax25_in.c | ax25->condition &= ~ACK_PENDING_CONDITION; |
ax25 | 445 | net/ax25/ax25_in.c | ax25_establish_data_link(ax25); |
ax25 | 446 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_1; |
ax25 | 461 | net/ax25/ax25_in.c | static int ax25_state4_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int ns, int nr, int pf, int type) |
ax25 | 467 | net/ax25/ax25_in.c | ax25->modulus = MODULUS; |
ax25 | 468 | net/ax25/ax25_in.c | ax25->window = ax25_dev_get_value(ax25->device, AX25_VALUES_WINDOW); |
ax25 | 469 | net/ax25/ax25_in.c | ax25_send_control(ax25, UA, pf, C_RESPONSE); |
ax25 | 470 | net/ax25/ax25_in.c | ax25->condition = 0x00; |
ax25 | 471 | net/ax25/ax25_in.c | ax25->t1timer = 0; |
ax25 | 472 | net/ax25/ax25_in.c | ax25->t3timer = ax25->t3; |
ax25 | 473 | net/ax25/ax25_in.c | ax25->vs = 0; |
ax25 | 474 | net/ax25/ax25_in.c | ax25->va = 0; |
ax25 | 475 | net/ax25/ax25_in.c | ax25->vr = 0; |
ax25 | 476 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_3; |
ax25 | 477 | net/ax25/ax25_in.c | ax25->n2count = 0; |
ax25 | 481 | net/ax25/ax25_in.c | ax25->modulus = EMODULUS; |
ax25 | 482 | net/ax25/ax25_in.c | ax25->window = ax25_dev_get_value(ax25->device, AX25_VALUES_EWINDOW); |
ax25 | 483 | net/ax25/ax25_in.c | ax25_send_control(ax25, UA, pf, C_RESPONSE); |
ax25 | 484 | net/ax25/ax25_in.c | ax25->condition = 0x00; |
ax25 | 485 | net/ax25/ax25_in.c | ax25->t1timer = 0; |
ax25 | 486 | net/ax25/ax25_in.c | ax25->t3timer = ax25->t3; |
ax25 | 487 | net/ax25/ax25_in.c | ax25->vs = 0; |
ax25 | 488 | net/ax25/ax25_in.c | ax25->va = 0; |
ax25 | 489 | net/ax25/ax25_in.c | ax25->vr = 0; |
ax25 | 490 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_3; |
ax25 | 491 | net/ax25/ax25_in.c | ax25->n2count = 0; |
ax25 | 495 | net/ax25/ax25_in.c | ax25_clear_queues(ax25); |
ax25 | 496 | net/ax25/ax25_in.c | ax25_send_control(ax25, UA, pf, C_RESPONSE); |
ax25 | 497 | net/ax25/ax25_in.c | ax25->t3timer = 0; |
ax25 | 498 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_0; |
ax25 | 499 | net/ax25/ax25_in.c | if (ax25->sk != NULL) { |
ax25 | 500 | net/ax25/ax25_in.c | ax25->sk->state = TCP_CLOSE; |
ax25 | 501 | net/ax25/ax25_in.c | ax25->sk->err = 0; |
ax25 | 502 | net/ax25/ax25_in.c | if (!ax25->sk->dead) |
ax25 | 503 | net/ax25/ax25_in.c | ax25->sk->state_change(ax25->sk); |
ax25 | 504 | net/ax25/ax25_in.c | ax25->sk->dead = 1; |
ax25 | 509 | net/ax25/ax25_in.c | ax25_clear_queues(ax25); |
ax25 | 510 | net/ax25/ax25_in.c | ax25->t3timer = 0; |
ax25 | 511 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_0; |
ax25 | 512 | net/ax25/ax25_in.c | if (ax25->sk != NULL) { |
ax25 | 513 | net/ax25/ax25_in.c | ax25->sk->state = TCP_CLOSE; |
ax25 | 514 | net/ax25/ax25_in.c | ax25->sk->err = ECONNRESET; |
ax25 | 515 | net/ax25/ax25_in.c | if (!ax25->sk->dead) |
ax25 | 516 | net/ax25/ax25_in.c | ax25->sk->state_change(ax25->sk); |
ax25 | 517 | net/ax25/ax25_in.c | ax25->sk->dead = 1; |
ax25 | 522 | net/ax25/ax25_in.c | ax25->condition |= PEER_RX_BUSY_CONDITION; |
ax25 | 524 | net/ax25/ax25_in.c | ax25->t1timer = 0; |
ax25 | 525 | net/ax25/ax25_in.c | if (ax25_validate_nr(ax25, nr)) { |
ax25 | 526 | net/ax25/ax25_in.c | ax25_frames_acked(ax25, nr); |
ax25 | 527 | net/ax25/ax25_in.c | if (ax25->vs == ax25->va) { |
ax25 | 528 | net/ax25/ax25_in.c | ax25->t3timer = ax25->t3; |
ax25 | 529 | net/ax25/ax25_in.c | ax25->n2count = 0; |
ax25 | 530 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_3; |
ax25 | 533 | net/ax25/ax25_in.c | ax25_nr_error_recovery(ax25); |
ax25 | 534 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_1; |
ax25 | 539 | net/ax25/ax25_in.c | ax25_enquiry_response(ax25); |
ax25 | 540 | net/ax25/ax25_in.c | if (ax25_validate_nr(ax25, nr)) { |
ax25 | 541 | net/ax25/ax25_in.c | ax25_frames_acked(ax25, nr); |
ax25 | 543 | net/ax25/ax25_in.c | ax25_nr_error_recovery(ax25); |
ax25 | 544 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_1; |
ax25 | 549 | net/ax25/ax25_in.c | ax25->condition &= ~PEER_RX_BUSY_CONDITION; |
ax25 | 551 | net/ax25/ax25_in.c | ax25->t1timer = 0; |
ax25 | 552 | net/ax25/ax25_in.c | if (ax25_validate_nr(ax25, nr)) { |
ax25 | 553 | net/ax25/ax25_in.c | ax25_frames_acked(ax25, nr); |
ax25 | 554 | net/ax25/ax25_in.c | if (ax25->vs == ax25->va) { |
ax25 | 555 | net/ax25/ax25_in.c | ax25->t3timer = ax25->t3; |
ax25 | 556 | net/ax25/ax25_in.c | ax25->n2count = 0; |
ax25 | 557 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_3; |
ax25 | 559 | net/ax25/ax25_in.c | ax25_requeue_frames(ax25); |
ax25 | 562 | net/ax25/ax25_in.c | ax25_nr_error_recovery(ax25); |
ax25 | 563 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_1; |
ax25 | 568 | net/ax25/ax25_in.c | ax25_enquiry_response(ax25); |
ax25 | 569 | net/ax25/ax25_in.c | if (ax25_validate_nr(ax25, nr)) { |
ax25 | 570 | net/ax25/ax25_in.c | ax25_frames_acked(ax25, nr); |
ax25 | 572 | net/ax25/ax25_in.c | ax25_nr_error_recovery(ax25); |
ax25 | 573 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_1; |
ax25 | 578 | net/ax25/ax25_in.c | ax25->condition &= ~PEER_RX_BUSY_CONDITION; |
ax25 | 580 | net/ax25/ax25_in.c | ax25->t1timer = 0; |
ax25 | 581 | net/ax25/ax25_in.c | if (ax25_validate_nr(ax25, nr)) { |
ax25 | 582 | net/ax25/ax25_in.c | ax25_frames_acked(ax25, nr); |
ax25 | 583 | net/ax25/ax25_in.c | if (ax25->vs == ax25->va) { |
ax25 | 584 | net/ax25/ax25_in.c | ax25->t3timer = ax25->t3; |
ax25 | 585 | net/ax25/ax25_in.c | ax25->n2count = 0; |
ax25 | 586 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_3; |
ax25 | 588 | net/ax25/ax25_in.c | ax25_requeue_frames(ax25); |
ax25 | 591 | net/ax25/ax25_in.c | ax25_nr_error_recovery(ax25); |
ax25 | 592 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_1; |
ax25 | 597 | net/ax25/ax25_in.c | ax25_enquiry_response(ax25); |
ax25 | 598 | net/ax25/ax25_in.c | if (ax25_validate_nr(ax25, nr)) { |
ax25 | 599 | net/ax25/ax25_in.c | ax25_frames_acked(ax25, nr); |
ax25 | 600 | net/ax25/ax25_in.c | if(ax25->vs != ax25->va) { |
ax25 | 601 | net/ax25/ax25_in.c | ax25_requeue_frames(ax25); |
ax25 | 604 | net/ax25/ax25_in.c | ax25_nr_error_recovery(ax25); |
ax25 | 605 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_1; |
ax25 | 614 | net/ax25/ax25_in.c | if (!ax25_validate_nr(ax25, nr)) { |
ax25 | 615 | net/ax25/ax25_in.c | ax25_nr_error_recovery(ax25); |
ax25 | 616 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_1; |
ax25 | 619 | net/ax25/ax25_in.c | ax25_frames_acked(ax25, nr); |
ax25 | 620 | net/ax25/ax25_in.c | if (ax25->condition & OWN_RX_BUSY_CONDITION) { |
ax25 | 621 | net/ax25/ax25_in.c | if (pf) ax25_enquiry_response(ax25); |
ax25 | 624 | net/ax25/ax25_in.c | if (ns == ax25->vr) { |
ax25 | 625 | net/ax25/ax25_in.c | queued = ax25_rx_iframe(ax25, skb); |
ax25 | 626 | net/ax25/ax25_in.c | if (ax25->condition & OWN_RX_BUSY_CONDITION) { |
ax25 | 627 | net/ax25/ax25_in.c | if (pf) ax25_enquiry_response(ax25); |
ax25 | 630 | net/ax25/ax25_in.c | ax25->vr = (ax25->vr + 1) % ax25->modulus; |
ax25 | 631 | net/ax25/ax25_in.c | ax25->condition &= ~REJECT_CONDITION; |
ax25 | 633 | net/ax25/ax25_in.c | ax25_enquiry_response(ax25); |
ax25 | 635 | net/ax25/ax25_in.c | if (!(ax25->condition & ACK_PENDING_CONDITION)) { |
ax25 | 636 | net/ax25/ax25_in.c | ax25->t2timer = ax25->t2; |
ax25 | 637 | net/ax25/ax25_in.c | ax25->condition |= ACK_PENDING_CONDITION; |
ax25 | 641 | net/ax25/ax25_in.c | if (ax25->condition & REJECT_CONDITION) { |
ax25 | 642 | net/ax25/ax25_in.c | if (pf) ax25_enquiry_response(ax25); |
ax25 | 644 | net/ax25/ax25_in.c | ax25->condition |= REJECT_CONDITION; |
ax25 | 645 | net/ax25/ax25_in.c | ax25_send_control(ax25, REJ, pf, C_RESPONSE); |
ax25 | 646 | net/ax25/ax25_in.c | ax25->condition &= ~ACK_PENDING_CONDITION; |
ax25 | 653 | net/ax25/ax25_in.c | ax25_establish_data_link(ax25); |
ax25 | 654 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_1; |
ax25 | 667 | net/ax25/ax25_in.c | int ax25_process_rx_frame(ax25_cb *ax25, struct sk_buff *skb, int type) |
ax25 | 671 | net/ax25/ax25_in.c | if (ax25->sk != NULL && ax25->state == AX25_STATE_0 && ax25->sk->dead) |
ax25 | 674 | net/ax25/ax25_in.c | if (ax25->state != AX25_STATE_1 && ax25->state != AX25_STATE_2 && |
ax25 | 675 | net/ax25/ax25_in.c | ax25->state != AX25_STATE_3 && ax25->state != AX25_STATE_4) { |
ax25 | 676 | net/ax25/ax25_in.c | printk("ax25_process_rx_frame: frame received - state = %d\n", ax25->state); |
ax25 | 680 | net/ax25/ax25_in.c | del_timer(&ax25->timer); |
ax25 | 682 | net/ax25/ax25_in.c | frametype = ax25_decode(ax25, skb, &ns, &nr, &pf); |
ax25 | 684 | net/ax25/ax25_in.c | switch (ax25->state) { |
ax25 | 686 | net/ax25/ax25_in.c | queued = ax25_state1_machine(ax25, skb, frametype, pf, type); |
ax25 | 689 | net/ax25/ax25_in.c | queued = ax25_state2_machine(ax25, skb, frametype, pf, type); |
ax25 | 692 | net/ax25/ax25_in.c | queued = ax25_state3_machine(ax25, skb, frametype, ns, nr, pf, type); |
ax25 | 695 | net/ax25/ax25_in.c | queued = ax25_state4_machine(ax25, skb, frametype, ns, nr, pf, type); |
ax25 | 699 | net/ax25/ax25_in.c | ax25_set_timer(ax25); |
ax25 | 56 | net/ax25/ax25_out.c | void ax25_output(ax25_cb *ax25, struct sk_buff *skb) |
ax25 | 62 | net/ax25/ax25_out.c | mtu = ax25->device->mtu; |
ax25 | 102 | net/ax25/ax25_out.c | skb_queue_tail(&ax25->write_queue, skbn); /* Throw it on the queue */ |
ax25 | 108 | net/ax25/ax25_out.c | skb_queue_tail(&ax25->write_queue, skb); /* Throw it on the queue */ |
ax25 | 111 | net/ax25/ax25_out.c | if (ax25->state == AX25_STATE_3 || ax25->state == AX25_STATE_4) |
ax25 | 112 | net/ax25/ax25_out.c | ax25_kick(ax25); |
ax25 | 119 | net/ax25/ax25_out.c | static void ax25_send_iframe(ax25_cb *ax25, struct sk_buff *skb, int poll_bit) |
ax25 | 126 | net/ax25/ax25_out.c | if (ax25->modulus == MODULUS) { |
ax25 | 131 | net/ax25/ax25_out.c | *frame |= (ax25->vr << 5); |
ax25 | 132 | net/ax25/ax25_out.c | *frame |= (ax25->vs << 1); |
ax25 | 137 | net/ax25/ax25_out.c | frame[0] |= (ax25->vs << 1); |
ax25 | 139 | net/ax25/ax25_out.c | frame[1] |= (ax25->vr << 1); |
ax25 | 142 | net/ax25/ax25_out.c | ax25_transmit_buffer(ax25, skb, C_COMMAND); |
ax25 | 145 | net/ax25/ax25_out.c | void ax25_kick(ax25_cb *ax25) |
ax25 | 151 | net/ax25/ax25_out.c | del_timer(&ax25->timer); |
ax25 | 153 | net/ax25/ax25_out.c | start = (skb_peek(&ax25->ack_queue) == NULL) ? ax25->va : ax25->vs; |
ax25 | 154 | net/ax25/ax25_out.c | end = (ax25->va + ax25->window) % ax25->modulus; |
ax25 | 156 | net/ax25/ax25_out.c | if (!(ax25->condition & PEER_RX_BUSY_CONDITION) && |
ax25 | 158 | net/ax25/ax25_out.c | skb_peek(&ax25->write_queue) != NULL) { |
ax25 | 160 | net/ax25/ax25_out.c | ax25->vs = start; |
ax25 | 171 | net/ax25/ax25_out.c | skb = skb_dequeue(&ax25->write_queue); |
ax25 | 175 | net/ax25/ax25_out.c | skb_queue_head(&ax25->write_queue, skb); |
ax25 | 179 | net/ax25/ax25_out.c | next = (ax25->vs + 1) % ax25->modulus; |
ax25 | 181 | net/ax25/ax25_out.c | last = (next == end) || skb_peek(&ax25->write_queue) == NULL; |
ax25 | 188 | net/ax25/ax25_out.c | ax25_send_iframe(ax25, skbn, (last) ? POLLON : POLLOFF); |
ax25 | 190 | net/ax25/ax25_out.c | ax25->vs = next; |
ax25 | 195 | net/ax25/ax25_out.c | skb_queue_tail(&ax25->ack_queue, skb); |
ax25 | 199 | net/ax25/ax25_out.c | } while (!last && (skb = skb_dequeue(&ax25->write_queue)) != NULL); |
ax25 | 201 | net/ax25/ax25_out.c | ax25->condition &= ~ACK_PENDING_CONDITION; |
ax25 | 203 | net/ax25/ax25_out.c | if (ax25->t1timer == 0) { |
ax25 | 204 | net/ax25/ax25_out.c | ax25->t3timer = 0; |
ax25 | 205 | net/ax25/ax25_out.c | ax25->t1timer = ax25->t1 = ax25_calculate_t1(ax25); |
ax25 | 209 | net/ax25/ax25_out.c | ax25_set_timer(ax25); |
ax25 | 212 | net/ax25/ax25_out.c | void ax25_transmit_buffer(ax25_cb *ax25, struct sk_buff *skb, int type) |
ax25 | 216 | net/ax25/ax25_out.c | if (ax25->device == NULL) { |
ax25 | 217 | net/ax25/ax25_out.c | if (ax25->sk != NULL) { |
ax25 | 218 | net/ax25/ax25_out.c | ax25->sk->state = TCP_CLOSE; |
ax25 | 219 | net/ax25/ax25_out.c | ax25->sk->err = ENETUNREACH; |
ax25 | 220 | net/ax25/ax25_out.c | if (!ax25->sk->dead) |
ax25 | 221 | net/ax25/ax25_out.c | ax25->sk->state_change(ax25->sk); |
ax25 | 222 | net/ax25/ax25_out.c | ax25->sk->dead = 1; |
ax25 | 227 | net/ax25/ax25_out.c | if (skb_headroom(skb) < size_ax25_addr(ax25->digipeat)) { |
ax25 | 234 | net/ax25/ax25_out.c | ptr = skb_push(skb, size_ax25_addr(ax25->digipeat)); |
ax25 | 235 | net/ax25/ax25_out.c | build_ax25_addr(ptr, &ax25->source_addr, &ax25->dest_addr, ax25->digipeat, type, ax25->modulus); |
ax25 | 239 | net/ax25/ax25_out.c | ax25_queue_xmit(skb, ax25->device, SOPRI_NORMAL); |
ax25 | 247 | net/ax25/ax25_out.c | void ax25_nr_error_recovery(ax25_cb *ax25) |
ax25 | 249 | net/ax25/ax25_out.c | ax25_establish_data_link(ax25); |
ax25 | 252 | net/ax25/ax25_out.c | void ax25_establish_data_link(ax25_cb *ax25) |
ax25 | 254 | net/ax25/ax25_out.c | ax25->condition = 0x00; |
ax25 | 255 | net/ax25/ax25_out.c | ax25->n2count = 0; |
ax25 | 257 | net/ax25/ax25_out.c | if (ax25->modulus == MODULUS) { |
ax25 | 258 | net/ax25/ax25_out.c | ax25_send_control(ax25, SABM, POLLON, C_COMMAND); |
ax25 | 260 | net/ax25/ax25_out.c | ax25_send_control(ax25, SABME, POLLON, C_COMMAND); |
ax25 | 263 | net/ax25/ax25_out.c | ax25->t3timer = 0; |
ax25 | 264 | net/ax25/ax25_out.c | ax25->t2timer = 0; |
ax25 | 265 | net/ax25/ax25_out.c | ax25->t1timer = ax25->t1 = ax25_calculate_t1(ax25); |
ax25 | 268 | net/ax25/ax25_out.c | void ax25_transmit_enquiry(ax25_cb *ax25) |
ax25 | 270 | net/ax25/ax25_out.c | if (ax25->condition & OWN_RX_BUSY_CONDITION) |
ax25 | 271 | net/ax25/ax25_out.c | ax25_send_control(ax25, RNR, POLLON, C_COMMAND); |
ax25 | 273 | net/ax25/ax25_out.c | ax25_send_control(ax25, RR, POLLON, C_COMMAND); |
ax25 | 275 | net/ax25/ax25_out.c | ax25->condition &= ~ACK_PENDING_CONDITION; |
ax25 | 277 | net/ax25/ax25_out.c | ax25->t1timer = ax25->t1 = ax25_calculate_t1(ax25); |
ax25 | 280 | net/ax25/ax25_out.c | void ax25_enquiry_response(ax25_cb *ax25) |
ax25 | 282 | net/ax25/ax25_out.c | if (ax25->condition & OWN_RX_BUSY_CONDITION) |
ax25 | 283 | net/ax25/ax25_out.c | ax25_send_control(ax25, RNR, POLLON, C_RESPONSE); |
ax25 | 285 | net/ax25/ax25_out.c | ax25_send_control(ax25, RR, POLLON, C_RESPONSE); |
ax25 | 287 | net/ax25/ax25_out.c | ax25->condition &= ~ACK_PENDING_CONDITION; |
ax25 | 290 | net/ax25/ax25_out.c | void ax25_timeout_response(ax25_cb *ax25) |
ax25 | 292 | net/ax25/ax25_out.c | if (ax25->condition & OWN_RX_BUSY_CONDITION) |
ax25 | 293 | net/ax25/ax25_out.c | ax25_send_control(ax25, RNR, POLLOFF, C_RESPONSE); |
ax25 | 295 | net/ax25/ax25_out.c | ax25_send_control(ax25, RR, POLLOFF, C_RESPONSE); |
ax25 | 297 | net/ax25/ax25_out.c | ax25->condition &= ~ACK_PENDING_CONDITION; |
ax25 | 300 | net/ax25/ax25_out.c | void ax25_check_iframes_acked(ax25_cb *ax25, unsigned short nr) |
ax25 | 302 | net/ax25/ax25_out.c | if (ax25->vs == nr) { |
ax25 | 303 | net/ax25/ax25_out.c | ax25_frames_acked(ax25, nr); |
ax25 | 304 | net/ax25/ax25_out.c | ax25_calculate_rtt(ax25); |
ax25 | 305 | net/ax25/ax25_out.c | ax25->t1timer = 0; |
ax25 | 306 | net/ax25/ax25_out.c | ax25->t3timer = ax25->t3; |
ax25 | 308 | net/ax25/ax25_out.c | if (ax25->va != nr) { |
ax25 | 309 | net/ax25/ax25_out.c | ax25_frames_acked(ax25, nr); |
ax25 | 310 | net/ax25/ax25_out.c | ax25->t1timer = ax25->t1 = ax25_calculate_t1(ax25); |
ax25 | 315 | net/ax25/ax25_out.c | void ax25_check_need_response(ax25_cb *ax25, int type, int pf) |
ax25 | 318 | net/ax25/ax25_out.c | ax25_enquiry_response(ax25); |
ax25 | 364 | net/ax25/ax25_route.c | int ax25_rt_autobind(ax25_cb *ax25, ax25_address *addr) |
ax25 | 374 | net/ax25/ax25_route.c | if ((ax25->device = ax25_rt->dev) == NULL) |
ax25 | 379 | net/ax25/ax25_route.c | call = (ax25_address *)ax25->device->dev_addr; |
ax25 | 381 | net/ax25/ax25_route.c | memcpy(&ax25->source_addr, call, sizeof(ax25_address)); |
ax25 | 383 | net/ax25/ax25_route.c | if ((ax25->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) |
ax25 | 385 | net/ax25/ax25_route.c | memcpy(ax25->digipeat, ax25_rt->digipeat, sizeof(ax25_digi)); |
ax25 | 387 | net/ax25/ax25_route.c | if (ax25->sk != NULL) |
ax25 | 388 | net/ax25/ax25_route.c | ax25->sk->zapped = 0; |
ax25 | 56 | net/ax25/ax25_subr.c | void ax25_clear_queues(ax25_cb *ax25) |
ax25 | 60 | net/ax25/ax25_subr.c | while ((skb = skb_dequeue(&ax25->write_queue)) != NULL) { |
ax25 | 65 | net/ax25/ax25_subr.c | while ((skb = skb_dequeue(&ax25->ack_queue)) != NULL) { |
ax25 | 70 | net/ax25/ax25_subr.c | while ((skb = skb_dequeue(&ax25->reseq_queue)) != NULL) { |
ax25 | 74 | net/ax25/ax25_subr.c | while ((skb = skb_dequeue(&ax25->frag_queue)) != NULL) { |
ax25 | 84 | net/ax25/ax25_subr.c | void ax25_frames_acked(ax25_cb *ax25, unsigned short nr) |
ax25 | 91 | net/ax25/ax25_subr.c | if (ax25->va != nr) { |
ax25 | 92 | net/ax25/ax25_subr.c | while (skb_peek(&ax25->ack_queue) != NULL && ax25->va != nr) { |
ax25 | 93 | net/ax25/ax25_subr.c | skb = skb_dequeue(&ax25->ack_queue); |
ax25 | 96 | net/ax25/ax25_subr.c | ax25->va = (ax25->va + 1) % ax25->modulus; |
ax25 | 105 | net/ax25/ax25_subr.c | void ax25_requeue_frames(ax25_cb *ax25) |
ax25 | 114 | net/ax25/ax25_subr.c | while ((skb = skb_dequeue(&ax25->ack_queue)) != NULL) { |
ax25 | 116 | net/ax25/ax25_subr.c | skb_queue_head(&ax25->write_queue, skb); |
ax25 | 127 | net/ax25/ax25_subr.c | int ax25_validate_nr(ax25_cb *ax25, unsigned short nr) |
ax25 | 129 | net/ax25/ax25_subr.c | unsigned short vc = ax25->va; |
ax25 | 131 | net/ax25/ax25_subr.c | while (vc != ax25->vs) { |
ax25 | 133 | net/ax25/ax25_subr.c | vc = (vc + 1) % ax25->modulus; |
ax25 | 136 | net/ax25/ax25_subr.c | if (nr == ax25->vs) return 1; |
ax25 | 145 | net/ax25/ax25_subr.c | int ax25_decode(ax25_cb *ax25, struct sk_buff *skb, int *ns, int *nr, int *pf) |
ax25 | 153 | net/ax25/ax25_subr.c | if (ax25->modulus == MODULUS) { |
ax25 | 195 | net/ax25/ax25_subr.c | void ax25_send_control(ax25_cb *ax25, int frametype, int poll_bit, int type) |
ax25 | 201 | net/ax25/ax25_subr.c | if ((dev = ax25->device) == NULL) |
ax25 | 204 | net/ax25/ax25_subr.c | if ((skb = alloc_skb(AX25_BPQ_HEADER_LEN + size_ax25_addr(ax25->digipeat) + 2, GFP_ATOMIC)) == NULL) |
ax25 | 207 | net/ax25/ax25_subr.c | skb_reserve(skb, AX25_BPQ_HEADER_LEN + size_ax25_addr(ax25->digipeat)); |
ax25 | 209 | net/ax25/ax25_subr.c | if (ax25->sk != NULL) { |
ax25 | 210 | net/ax25/ax25_subr.c | skb->sk = ax25->sk; |
ax25 | 211 | net/ax25/ax25_subr.c | ax25->sk->wmem_alloc += skb->truesize; |
ax25 | 215 | net/ax25/ax25_subr.c | if (ax25->modulus == MODULUS) { |
ax25 | 220 | net/ax25/ax25_subr.c | *dptr |= (ax25->vr << 5); |
ax25 | 229 | net/ax25/ax25_subr.c | dptr[1] = (ax25->vr << 1); |
ax25 | 236 | net/ax25/ax25_subr.c | ax25_transmit_buffer(ax25, skb, type); |
ax25 | 281 | net/ax25/ax25_subr.c | unsigned short ax25_calculate_t1(ax25_cb *ax25) |
ax25 | 285 | net/ax25/ax25_subr.c | if (ax25->backoff) { |
ax25 | 286 | net/ax25/ax25_subr.c | for (n = 0; n < ax25->n2count; n++) |
ax25 | 292 | net/ax25/ax25_subr.c | return t * ax25->rtt; |
ax25 | 298 | net/ax25/ax25_subr.c | void ax25_calculate_rtt(ax25_cb *ax25) |
ax25 | 300 | net/ax25/ax25_subr.c | if (ax25->t1timer > 0 && ax25->n2count == 0) |
ax25 | 301 | net/ax25/ax25_subr.c | ax25->rtt = (9 * ax25->rtt + ax25->t1 - ax25->t1timer) / 10; |
ax25 | 305 | net/ax25/ax25_subr.c | if (ax25->rtt < (AX25_T1CLAMPLO)) |
ax25 | 306 | net/ax25/ax25_subr.c | ax25->rtt = (AX25_T1CLAMPLO); |
ax25 | 308 | net/ax25/ax25_subr.c | if (ax25->rtt == 0) |
ax25 | 309 | net/ax25/ax25_subr.c | ax25->rtt = PR_SLOWHZ; |
ax25 | 313 | net/ax25/ax25_subr.c | if (ax25->rtt > (AX25_T1CLAMPHI)) |
ax25 | 314 | net/ax25/ax25_subr.c | ax25->rtt = (AX25_T1CLAMPHI); |
ax25 | 53 | net/ax25/ax25_timer.c | void ax25_set_timer(ax25_cb *ax25) |
ax25 | 59 | net/ax25/ax25_timer.c | del_timer(&ax25->timer); |
ax25 | 62 | net/ax25/ax25_timer.c | ax25->timer.next = ax25->timer.prev = NULL; |
ax25 | 63 | net/ax25/ax25_timer.c | ax25->timer.data = (unsigned long)ax25; |
ax25 | 64 | net/ax25/ax25_timer.c | ax25->timer.function = &ax25_timer; |
ax25 | 66 | net/ax25/ax25_timer.c | ax25->timer.expires = jiffies + 10; |
ax25 | 67 | net/ax25/ax25_timer.c | add_timer(&ax25->timer); |
ax25 | 70 | net/ax25/ax25_timer.c | static void ax25_reset_timer(ax25_cb *ax25) |
ax25 | 76 | net/ax25/ax25_timer.c | del_timer(&ax25->timer); |
ax25 | 79 | net/ax25/ax25_timer.c | ax25->timer.data = (unsigned long)ax25; |
ax25 | 80 | net/ax25/ax25_timer.c | ax25->timer.function = &ax25_timer; |
ax25 | 81 | net/ax25/ax25_timer.c | ax25->timer.expires = jiffies + 10; |
ax25 | 82 | net/ax25/ax25_timer.c | add_timer(&ax25->timer); |
ax25 | 93 | net/ax25/ax25_timer.c | ax25_cb *ax25 = (ax25_cb *)param; |
ax25 | 95 | net/ax25/ax25_timer.c | switch (ax25->state) { |
ax25 | 99 | net/ax25/ax25_timer.c | if (ax25->sk == NULL || ax25->sk->destroy || (ax25->sk->state == TCP_LISTEN && ax25->sk->dead)) { |
ax25 | 100 | net/ax25/ax25_timer.c | del_timer(&ax25->timer); |
ax25 | 101 | net/ax25/ax25_timer.c | ax25_destroy_socket(ax25); |
ax25 | 111 | net/ax25/ax25_timer.c | if (ax25->sk != NULL) { |
ax25 | 112 | net/ax25/ax25_timer.c | if (ax25->sk->rmem_alloc < (ax25->sk->rcvbuf / 2) && (ax25->condition & OWN_RX_BUSY_CONDITION)) { |
ax25 | 113 | net/ax25/ax25_timer.c | ax25->condition &= ~OWN_RX_BUSY_CONDITION; |
ax25 | 114 | net/ax25/ax25_timer.c | ax25_send_control(ax25, RR, POLLOFF, C_RESPONSE); |
ax25 | 115 | net/ax25/ax25_timer.c | ax25->condition &= ~ACK_PENDING_CONDITION; |
ax25 | 122 | net/ax25/ax25_timer.c | ax25_kick(ax25); |
ax25 | 129 | net/ax25/ax25_timer.c | if (ax25->t2timer > 0 && --ax25->t2timer == 0) { |
ax25 | 130 | net/ax25/ax25_timer.c | if (ax25->state == AX25_STATE_3 || ax25->state == AX25_STATE_4) { |
ax25 | 131 | net/ax25/ax25_timer.c | if (ax25->condition & ACK_PENDING_CONDITION) { |
ax25 | 132 | net/ax25/ax25_timer.c | ax25->condition &= ~ACK_PENDING_CONDITION; |
ax25 | 133 | net/ax25/ax25_timer.c | ax25_timeout_response(ax25); |
ax25 | 138 | net/ax25/ax25_timer.c | if (ax25->t3timer > 0 && --ax25->t3timer == 0) { |
ax25 | 139 | net/ax25/ax25_timer.c | if (ax25->state == AX25_STATE_3) { |
ax25 | 140 | net/ax25/ax25_timer.c | ax25->n2count = 0; |
ax25 | 141 | net/ax25/ax25_timer.c | ax25_transmit_enquiry(ax25); |
ax25 | 142 | net/ax25/ax25_timer.c | ax25->state = AX25_STATE_4; |
ax25 | 144 | net/ax25/ax25_timer.c | ax25->t3timer = ax25->t3; |
ax25 | 147 | net/ax25/ax25_timer.c | if (ax25->t1timer == 0 || --ax25->t1timer > 0) { |
ax25 | 148 | net/ax25/ax25_timer.c | ax25_reset_timer(ax25); |
ax25 | 152 | net/ax25/ax25_timer.c | switch (ax25->state) { |
ax25 | 154 | net/ax25/ax25_timer.c | if (ax25->n2count == ax25->n2) { |
ax25 | 155 | net/ax25/ax25_timer.c | if (ax25->modulus == MODULUS) { |
ax25 | 157 | net/ax25/ax25_timer.c | nr_link_failed(&ax25->dest_addr, ax25->device); |
ax25 | 159 | net/ax25/ax25_timer.c | ax25_clear_queues(ax25); |
ax25 | 160 | net/ax25/ax25_timer.c | ax25->state = AX25_STATE_0; |
ax25 | 161 | net/ax25/ax25_timer.c | if (ax25->sk != NULL) { |
ax25 | 162 | net/ax25/ax25_timer.c | ax25->sk->state = TCP_CLOSE; |
ax25 | 163 | net/ax25/ax25_timer.c | ax25->sk->err = ETIMEDOUT; |
ax25 | 164 | net/ax25/ax25_timer.c | if (!ax25->sk->dead) |
ax25 | 165 | net/ax25/ax25_timer.c | ax25->sk->state_change(ax25->sk); |
ax25 | 166 | net/ax25/ax25_timer.c | ax25->sk->dead = 1; |
ax25 | 169 | net/ax25/ax25_timer.c | ax25->modulus = MODULUS; |
ax25 | 170 | net/ax25/ax25_timer.c | ax25->window = ax25_dev_get_value(ax25->device, AX25_VALUES_WINDOW); |
ax25 | 171 | net/ax25/ax25_timer.c | ax25->n2count = 0; |
ax25 | 172 | net/ax25/ax25_timer.c | ax25_send_control(ax25, SABM, POLLON, C_COMMAND); |
ax25 | 175 | net/ax25/ax25_timer.c | ax25->n2count++; |
ax25 | 176 | net/ax25/ax25_timer.c | if (ax25->modulus == MODULUS) { |
ax25 | 177 | net/ax25/ax25_timer.c | ax25_send_control(ax25, SABM, POLLON, C_COMMAND); |
ax25 | 179 | net/ax25/ax25_timer.c | ax25_send_control(ax25, SABME, POLLON, C_COMMAND); |
ax25 | 185 | net/ax25/ax25_timer.c | if (ax25->n2count == ax25->n2) { |
ax25 | 187 | net/ax25/ax25_timer.c | nr_link_failed(&ax25->dest_addr, ax25->device); |
ax25 | 189 | net/ax25/ax25_timer.c | ax25_clear_queues(ax25); |
ax25 | 190 | net/ax25/ax25_timer.c | ax25->state = AX25_STATE_0; |
ax25 | 191 | net/ax25/ax25_timer.c | if (ax25->sk != NULL) { |
ax25 | 192 | net/ax25/ax25_timer.c | ax25->sk->state = TCP_CLOSE; |
ax25 | 193 | net/ax25/ax25_timer.c | ax25->sk->err = ETIMEDOUT; |
ax25 | 194 | net/ax25/ax25_timer.c | if (!ax25->sk->dead) |
ax25 | 195 | net/ax25/ax25_timer.c | ax25->sk->state_change(ax25->sk); |
ax25 | 196 | net/ax25/ax25_timer.c | ax25->sk->dead = 1; |
ax25 | 199 | net/ax25/ax25_timer.c | ax25->n2count++; |
ax25 | 200 | net/ax25/ax25_timer.c | ax25_send_control(ax25, DISC, POLLON, C_COMMAND); |
ax25 | 205 | net/ax25/ax25_timer.c | ax25->n2count = 1; |
ax25 | 206 | net/ax25/ax25_timer.c | ax25_transmit_enquiry(ax25); |
ax25 | 207 | net/ax25/ax25_timer.c | ax25->state = AX25_STATE_4; |
ax25 | 211 | net/ax25/ax25_timer.c | if (ax25->n2count == ax25->n2) { |
ax25 | 213 | net/ax25/ax25_timer.c | nr_link_failed(&ax25->dest_addr, ax25->device); |
ax25 | 215 | net/ax25/ax25_timer.c | ax25_clear_queues(ax25); |
ax25 | 216 | net/ax25/ax25_timer.c | ax25_send_control(ax25, DM, POLLON, C_RESPONSE); |
ax25 | 217 | net/ax25/ax25_timer.c | ax25->state = AX25_STATE_0; |
ax25 | 218 | net/ax25/ax25_timer.c | if (ax25->sk != NULL) { |
ax25 | 219 | net/ax25/ax25_timer.c | ax25->sk->state = TCP_CLOSE; |
ax25 | 220 | net/ax25/ax25_timer.c | ax25->sk->err = ETIMEDOUT; |
ax25 | 221 | net/ax25/ax25_timer.c | if (!ax25->sk->dead) |
ax25 | 222 | net/ax25/ax25_timer.c | ax25->sk->state_change(ax25->sk); |
ax25 | 223 | net/ax25/ax25_timer.c | ax25->sk->dead = 1; |
ax25 | 226 | net/ax25/ax25_timer.c | ax25->n2count++; |
ax25 | 227 | net/ax25/ax25_timer.c | ax25_transmit_enquiry(ax25); |
ax25 | 232 | net/ax25/ax25_timer.c | ax25->t1timer = ax25->t1 = ax25_calculate_t1(ax25); |
ax25 | 234 | net/ax25/ax25_timer.c | ax25_set_timer(ax25); |
ax25 | 67 | net/netrom/nr_route.c | static int nr_add_node(ax25_address *nr, const char *mnemonic, ax25_address *ax25, |
ax25 | 81 | net/netrom/nr_route.c | if (ax25cmp(ax25, &nr_neigh->callsign) == 0 && nr_neigh->dev == dev) |
ax25 | 91 | net/netrom/nr_route.c | memcpy(&nr_neigh->callsign, ax25, sizeof(ax25_address)); |
ax25 | 650 | net/netrom/nr_route.c | int nr_route_frame(struct sk_buff *skb, ax25_cb *ax25) |
ax25 | 660 | net/netrom/nr_route.c | if(ax25 && call_in_firewall(PF_NETROM, skb, skb->data)!=FW_ACCEPT) |
ax25 | 662 | net/netrom/nr_route.c | if(!ax25 && call_out_firewall(PF_NETROM, skb, skb->data)!=FW_ACCEPT) |
ax25 | 668 | net/netrom/nr_route.c | if (ax25 != NULL) |
ax25 | 669 | net/netrom/nr_route.c | nr_add_node(nr_src, "", &ax25->dest_addr, ax25->digipeat, ax25->device, 0, nr_default.obs_count); |
ax25 | 674 | net/netrom/nr_route.c | if (!nr_route_on && ax25 != NULL) |
ax25 | 699 | net/netrom/nr_route.c | if(ax25 && call_fw_firewall(PF_NETROM, skb, skb->data)!=FW_ACCEPT) |