tag | line | file | source code |
ax25 | 255 | include/net/sock.h | ax25_cb *ax25; |
ax25 | 184 | net/ax25/af_ax25.c | static void ax25_remove_socket(ax25_cb *ax25) |
ax25 | 192 | net/ax25/af_ax25.c | if ((s = ax25_list) == ax25) { |
ax25 | 199 | net/ax25/af_ax25.c | if (s->next == ax25) { |
ax25 | 200 | net/ax25/af_ax25.c | s->next = ax25->next; |
ax25 | 259 | net/ax25/af_ax25.c | static void ax25_insert_socket(ax25_cb *ax25) |
ax25 | 266 | net/ax25/af_ax25.c | ax25->next = ax25_list; |
ax25 | 267 | net/ax25/af_ax25.c | ax25_list = ax25; |
ax25 | 409 | net/ax25/af_ax25.c | void ax25_destroy_socket(ax25_cb *ax25) /* Not static as its used by the timer */ |
ax25 | 417 | net/ax25/af_ax25.c | del_timer(&ax25->timer); |
ax25 | 419 | net/ax25/af_ax25.c | ax25_remove_socket(ax25); |
ax25 | 420 | net/ax25/af_ax25.c | ax25_clear_queues(ax25); /* Flush the queues */ |
ax25 | 422 | net/ax25/af_ax25.c | if (ax25->sk != NULL) { |
ax25 | 423 | net/ax25/af_ax25.c | while ((skb = skb_dequeue(&ax25->sk->receive_queue)) != NULL) { |
ax25 | 424 | net/ax25/af_ax25.c | if (skb->sk != ax25->sk) { /* A pending connection */ |
ax25 | 426 | net/ax25/af_ax25.c | ax25_set_timer(skb->sk->ax25); |
ax25 | 427 | net/ax25/af_ax25.c | skb->sk->ax25->state = AX25_STATE_0; |
ax25 | 434 | net/ax25/af_ax25.c | if (ax25->sk != NULL) { |
ax25 | 435 | net/ax25/af_ax25.c | if (ax25->sk->wmem_alloc || ax25->sk->rmem_alloc) { /* Defer: outstanding buffers */ |
ax25 | 436 | net/ax25/af_ax25.c | init_timer(&ax25->timer); |
ax25 | 437 | net/ax25/af_ax25.c | ax25->timer.expires = jiffies + 10 * HZ; |
ax25 | 438 | net/ax25/af_ax25.c | ax25->timer.function = ax25_destroy_timer; |
ax25 | 439 | net/ax25/af_ax25.c | ax25->timer.data = (unsigned long)ax25; |
ax25 | 440 | net/ax25/af_ax25.c | add_timer(&ax25->timer); |
ax25 | 442 | net/ax25/af_ax25.c | if (ax25->digipeat != NULL) { |
ax25 | 443 | net/ax25/af_ax25.c | kfree_s(ax25->digipeat, sizeof(ax25_digi)); |
ax25 | 444 | net/ax25/af_ax25.c | ax25->digipeat = NULL; |
ax25 | 447 | net/ax25/af_ax25.c | kfree_s(ax25->sk, sizeof(*ax25->sk)); |
ax25 | 448 | net/ax25/af_ax25.c | kfree_s(ax25, sizeof(*ax25)); |
ax25 | 451 | net/ax25/af_ax25.c | if (ax25->digipeat != NULL) { |
ax25 | 452 | net/ax25/af_ax25.c | kfree_s(ax25->digipeat, sizeof(ax25_digi)); |
ax25 | 453 | net/ax25/af_ax25.c | ax25->digipeat = NULL; |
ax25 | 455 | net/ax25/af_ax25.c | kfree_s(ax25, sizeof(*ax25)); |
ax25 | 539 | net/ax25/af_ax25.c | ax25_cb *ax25; |
ax25 | 551 | net/ax25/af_ax25.c | if ((ax25 = ax25_find_cb(&ax25_ctl.source_addr, &ax25_ctl.dest_addr, dev)) == NULL) |
ax25 | 557 | net/ax25/af_ax25.c | nr_link_failed(&ax25->dest_addr, ax25->device); |
ax25 | 559 | net/ax25/af_ax25.c | ax25_clear_queues(ax25); |
ax25 | 560 | net/ax25/af_ax25.c | ax25_send_control(ax25, DISC, POLLON, C_COMMAND); |
ax25 | 562 | net/ax25/af_ax25.c | ax25->state = AX25_STATE_0; |
ax25 | 563 | net/ax25/af_ax25.c | if (ax25->sk != NULL) { |
ax25 | 564 | net/ax25/af_ax25.c | ax25->sk->state = TCP_CLOSE; |
ax25 | 565 | net/ax25/af_ax25.c | ax25->sk->err = ENETRESET; |
ax25 | 566 | net/ax25/af_ax25.c | if (!ax25->sk->dead) |
ax25 | 567 | net/ax25/af_ax25.c | ax25->sk->state_change(ax25->sk); |
ax25 | 568 | net/ax25/af_ax25.c | ax25->sk->dead = 1; |
ax25 | 571 | net/ax25/af_ax25.c | ax25_dama_off(ax25); |
ax25 | 572 | net/ax25/af_ax25.c | ax25_set_timer(ax25); |
ax25 | 575 | net/ax25/af_ax25.c | if (ax25->modulus == MODULUS) { |
ax25 | 582 | net/ax25/af_ax25.c | ax25->window = ax25_ctl.arg; |
ax25 | 587 | net/ax25/af_ax25.c | ax25->rtt = (ax25_ctl.arg * PR_SLOWHZ) / 2; |
ax25 | 588 | net/ax25/af_ax25.c | ax25->t1 = ax25_ctl.arg * PR_SLOWHZ; |
ax25 | 590 | net/ax25/af_ax25.c | if (ax25->t1timer > ax25->t1) |
ax25 | 591 | net/ax25/af_ax25.c | ax25->t1timer = ax25->t1; |
ax25 | 598 | net/ax25/af_ax25.c | ax25->t2 = ax25_ctl.arg * PR_SLOWHZ; |
ax25 | 599 | net/ax25/af_ax25.c | if (ax25->t2timer > ax25->t2) |
ax25 | 600 | net/ax25/af_ax25.c | ax25->t2timer = ax25->t2; |
ax25 | 606 | net/ax25/af_ax25.c | ax25->n2count = 0; |
ax25 | 607 | net/ax25/af_ax25.c | ax25->n2 = ax25_ctl.arg; |
ax25 | 613 | net/ax25/af_ax25.c | ax25->t3 = ax25_ctl.arg * PR_SLOWHZ; |
ax25 | 614 | net/ax25/af_ax25.c | if (ax25->t3timer != 0) |
ax25 | 615 | net/ax25/af_ax25.c | ax25->t3timer = ax25->t3; |
ax25 | 621 | net/ax25/af_ax25.c | if (ax25->idle == 0) |
ax25 | 624 | net/ax25/af_ax25.c | ax25->idle = ax25_ctl.arg * PR_SLOWHZ * 60; |
ax25 | 625 | net/ax25/af_ax25.c | if (ax25->idletimer != 0) |
ax25 | 626 | net/ax25/af_ax25.c | ax25->idletimer = ax25->idle; |
ax25 | 635 | net/ax25/af_ax25.c | ax25->paclen = ax25_ctl.arg; |
ax25 | 650 | net/ax25/af_ax25.c | ax25_cb *ax25; |
ax25 | 652 | net/ax25/af_ax25.c | if ((ax25 = (ax25_cb *)kmalloc(sizeof(*ax25), GFP_ATOMIC)) == NULL) |
ax25 | 655 | net/ax25/af_ax25.c | skb_queue_head_init(&ax25->write_queue); |
ax25 | 656 | net/ax25/af_ax25.c | skb_queue_head_init(&ax25->frag_queue); |
ax25 | 657 | net/ax25/af_ax25.c | skb_queue_head_init(&ax25->ack_queue); |
ax25 | 658 | net/ax25/af_ax25.c | skb_queue_head_init(&ax25->reseq_queue); |
ax25 | 660 | net/ax25/af_ax25.c | init_timer(&ax25->timer); |
ax25 | 662 | net/ax25/af_ax25.c | ax25->dama_slave = 0; /* dl1bke 951121 */ |
ax25 | 664 | net/ax25/af_ax25.c | ax25->rtt = (AX25_DEF_T1 * PR_SLOWHZ) / 2; |
ax25 | 665 | net/ax25/af_ax25.c | ax25->t1 = AX25_DEF_T1 * PR_SLOWHZ; |
ax25 | 666 | net/ax25/af_ax25.c | ax25->t2 = AX25_DEF_T2 * PR_SLOWHZ; |
ax25 | 667 | net/ax25/af_ax25.c | ax25->t3 = AX25_DEF_T3 * PR_SLOWHZ; |
ax25 | 668 | net/ax25/af_ax25.c | ax25->n2 = AX25_DEF_N2; |
ax25 | 669 | net/ax25/af_ax25.c | ax25->paclen = AX25_DEF_PACLEN; |
ax25 | 670 | net/ax25/af_ax25.c | ax25->idle = 0; |
ax25 | 672 | net/ax25/af_ax25.c | ax25->modulus = AX25_DEF_AXDEFMODE; |
ax25 | 673 | net/ax25/af_ax25.c | ax25->fragno = 0; |
ax25 | 674 | net/ax25/af_ax25.c | ax25->fraglen = 0; |
ax25 | 675 | net/ax25/af_ax25.c | ax25->hdrincl = 0; |
ax25 | 676 | net/ax25/af_ax25.c | ax25->backoff = AX25_DEF_BACKOFF == 'E'; |
ax25 | 677 | net/ax25/af_ax25.c | ax25->condition = 0x00; |
ax25 | 678 | net/ax25/af_ax25.c | ax25->t1timer = 0; |
ax25 | 679 | net/ax25/af_ax25.c | ax25->t2timer = 0; |
ax25 | 680 | net/ax25/af_ax25.c | ax25->t3timer = 0; |
ax25 | 681 | net/ax25/af_ax25.c | ax25->n2count = 0; |
ax25 | 682 | net/ax25/af_ax25.c | ax25->idletimer = 0; |
ax25 | 684 | net/ax25/af_ax25.c | ax25->va = 0; |
ax25 | 685 | net/ax25/af_ax25.c | ax25->vr = 0; |
ax25 | 686 | net/ax25/af_ax25.c | ax25->vs = 0; |
ax25 | 689 | net/ax25/af_ax25.c | ax25->window = AX25_DEF_EWINDOW; |
ax25 | 691 | net/ax25/af_ax25.c | ax25->window = AX25_DEF_WINDOW; |
ax25 | 693 | net/ax25/af_ax25.c | ax25->device = NULL; |
ax25 | 694 | net/ax25/af_ax25.c | ax25->digipeat = NULL; |
ax25 | 695 | net/ax25/af_ax25.c | ax25->sk = NULL; |
ax25 | 697 | net/ax25/af_ax25.c | ax25->state = AX25_STATE_0; |
ax25 | 699 | net/ax25/af_ax25.c | memset(&ax25->dest_addr, '\0', AX25_ADDR_LEN); |
ax25 | 700 | net/ax25/af_ax25.c | memset(&ax25->source_addr, '\0', AX25_ADDR_LEN); |
ax25 | 702 | net/ax25/af_ax25.c | return ax25; |
ax25 | 713 | net/ax25/af_ax25.c | ax25_cb *ax25; |
ax25 | 716 | net/ax25/af_ax25.c | for (ax25 = ax25_list; ax25 != NULL; ax25 = ax25->next) { |
ax25 | 717 | net/ax25/af_ax25.c | if (ax25->device == dev && ax25->dama_slave) { |
ax25 | 730 | net/ax25/af_ax25.c | static void ax25_fillin_cb(ax25_cb *ax25, struct device *dev) |
ax25 | 732 | net/ax25/af_ax25.c | ax25->device = dev; |
ax25 | 734 | net/ax25/af_ax25.c | ax25->rtt = ax25_dev_get_value(dev, AX25_VALUES_T1); |
ax25 | 735 | net/ax25/af_ax25.c | ax25->t1 = ax25_dev_get_value(dev, AX25_VALUES_T1); |
ax25 | 736 | net/ax25/af_ax25.c | ax25->t2 = ax25_dev_get_value(dev, AX25_VALUES_T2); |
ax25 | 737 | net/ax25/af_ax25.c | ax25->t3 = ax25_dev_get_value(dev, AX25_VALUES_T3); |
ax25 | 738 | net/ax25/af_ax25.c | ax25->n2 = ax25_dev_get_value(dev, AX25_VALUES_N2); |
ax25 | 739 | net/ax25/af_ax25.c | ax25->paclen = ax25_dev_get_value(dev, AX25_VALUES_PACLEN); |
ax25 | 741 | net/ax25/af_ax25.c | ax25->dama_slave = 0; |
ax25 | 742 | net/ax25/af_ax25.c | ax25->idle = 0; |
ax25 | 744 | net/ax25/af_ax25.c | ax25->modulus = ax25_dev_get_value(dev, AX25_VALUES_AXDEFMODE); |
ax25 | 746 | net/ax25/af_ax25.c | if (ax25->modulus == MODULUS) { |
ax25 | 747 | net/ax25/af_ax25.c | ax25->window = ax25_dev_get_value(dev, AX25_VALUES_WINDOW); |
ax25 | 749 | net/ax25/af_ax25.c | ax25->window = ax25_dev_get_value(dev, AX25_VALUES_EWINDOW); |
ax25 | 752 | net/ax25/af_ax25.c | ax25->backoff = ax25_dev_get_value(dev, AX25_VALUES_BACKOFF) == 'E'; |
ax25 | 758 | net/ax25/af_ax25.c | ax25_cb *ax25; |
ax25 | 766 | net/ax25/af_ax25.c | for (ax25 = ax25_list; ax25 != NULL; ax25 = ax25->next) { |
ax25 | 767 | net/ax25/af_ax25.c | if (ax25->sk != NULL && ax25->sk->type != SOCK_SEQPACKET) |
ax25 | 770 | net/ax25/af_ax25.c | if (ax25cmp(&ax25->source_addr, src) == 0 && ax25cmp(&ax25->dest_addr, dest) == 0 && ax25->device == dev) { |
ax25 | 771 | net/ax25/af_ax25.c | ax25_output(ax25, skb); |
ax25 | 772 | net/ax25/af_ax25.c | ax25->idletimer = ax25->idle; /* dl1bke 960228 */ |
ax25 | 777 | net/ax25/af_ax25.c | if ((ax25 = ax25_create_cb()) == NULL) |
ax25 | 780 | net/ax25/af_ax25.c | ax25_fillin_cb(ax25, dev); |
ax25 | 782 | net/ax25/af_ax25.c | ax25->source_addr = *src; |
ax25 | 783 | net/ax25/af_ax25.c | ax25->dest_addr = *dest; |
ax25 | 786 | net/ax25/af_ax25.c | if ((ax25->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) { |
ax25 | 787 | net/ax25/af_ax25.c | kfree_s(ax25, sizeof(ax25)); |
ax25 | 790 | net/ax25/af_ax25.c | *ax25->digipeat = *digi; |
ax25 | 792 | net/ax25/af_ax25.c | ax25_rt_build_path(ax25, dest); |
ax25 | 795 | net/ax25/af_ax25.c | if (ax25_dev_is_dama_slave(ax25->device)) /* dl1bke 960116 */ |
ax25 | 796 | net/ax25/af_ax25.c | dama_establish_data_link(ax25); |
ax25 | 798 | net/ax25/af_ax25.c | ax25_establish_data_link(ax25); |
ax25 | 802 | net/ax25/af_ax25.c | ax25->idletimer = ax25->idle = ax25_dev_get_value(ax25->device, AX25_VALUES_IDLE); |
ax25 | 804 | net/ax25/af_ax25.c | ax25_insert_socket(ax25); |
ax25 | 806 | net/ax25/af_ax25.c | ax25->state = AX25_STATE_1; |
ax25 | 808 | net/ax25/af_ax25.c | ax25_set_timer(ax25); |
ax25 | 810 | net/ax25/af_ax25.c | ax25_output(ax25, skb); |
ax25 | 882 | net/ax25/af_ax25.c | if (sk->ax25->modulus == MODULUS) { |
ax25 | 889 | net/ax25/af_ax25.c | sk->ax25->window = opt; |
ax25 | 895 | net/ax25/af_ax25.c | sk->ax25->rtt = (opt * PR_SLOWHZ) / 2; |
ax25 | 901 | net/ax25/af_ax25.c | sk->ax25->t2 = opt * PR_SLOWHZ; |
ax25 | 907 | net/ax25/af_ax25.c | sk->ax25->n2 = opt; |
ax25 | 913 | net/ax25/af_ax25.c | sk->ax25->t3 = opt * PR_SLOWHZ; |
ax25 | 919 | net/ax25/af_ax25.c | sk->ax25->idle = opt * PR_SLOWHZ * 60; |
ax25 | 923 | net/ax25/af_ax25.c | sk->ax25->backoff = opt ? 1 : 0; |
ax25 | 927 | net/ax25/af_ax25.c | sk->ax25->modulus = opt ? EMODULUS : MODULUS; |
ax25 | 931 | net/ax25/af_ax25.c | sk->ax25->hdrincl = opt ? 1 : 0; |
ax25 | 937 | net/ax25/af_ax25.c | sk->ax25->paclen = opt; |
ax25 | 962 | net/ax25/af_ax25.c | val = sk->ax25->window; |
ax25 | 966 | net/ax25/af_ax25.c | val = (sk->ax25->t1 * 2) / PR_SLOWHZ; |
ax25 | 970 | net/ax25/af_ax25.c | val = sk->ax25->t2 / PR_SLOWHZ; |
ax25 | 974 | net/ax25/af_ax25.c | val = sk->ax25->n2; |
ax25 | 978 | net/ax25/af_ax25.c | val = sk->ax25->t3 / PR_SLOWHZ; |
ax25 | 982 | net/ax25/af_ax25.c | val = sk->ax25->idle / (PR_SLOWHZ * 60); |
ax25 | 986 | net/ax25/af_ax25.c | val = sk->ax25->backoff; |
ax25 | 990 | net/ax25/af_ax25.c | val = (sk->ax25->modulus == EMODULUS); |
ax25 | 994 | net/ax25/af_ax25.c | val = sk->ax25->hdrincl; |
ax25 | 998 | net/ax25/af_ax25.c | val = sk->ax25->paclen; |
ax25 | 1046 | net/ax25/af_ax25.c | ax25_cb *ax25; |
ax25 | 1081 | net/ax25/af_ax25.c | if ((ax25 = ax25_create_cb()) == NULL) { |
ax25 | 1125 | net/ax25/af_ax25.c | ax25->sk = sk; |
ax25 | 1126 | net/ax25/af_ax25.c | sk->ax25 = ax25; |
ax25 | 1134 | net/ax25/af_ax25.c | ax25_cb *ax25; |
ax25 | 1139 | net/ax25/af_ax25.c | if ((ax25 = ax25_create_cb()) == NULL) { |
ax25 | 1144 | net/ax25/af_ax25.c | ax25_fillin_cb(ax25, dev); |
ax25 | 1156 | net/ax25/af_ax25.c | kfree_s((void *)ax25, sizeof(*ax25)); |
ax25 | 1193 | net/ax25/af_ax25.c | ax25->modulus = osk->ax25->modulus; |
ax25 | 1194 | net/ax25/af_ax25.c | ax25->backoff = osk->ax25->backoff; |
ax25 | 1195 | net/ax25/af_ax25.c | ax25->hdrincl = osk->ax25->hdrincl; |
ax25 | 1196 | net/ax25/af_ax25.c | ax25->rtt = osk->ax25->rtt; |
ax25 | 1197 | net/ax25/af_ax25.c | ax25->t1 = osk->ax25->t1; |
ax25 | 1198 | net/ax25/af_ax25.c | ax25->t2 = osk->ax25->t2; |
ax25 | 1199 | net/ax25/af_ax25.c | ax25->t3 = osk->ax25->t3; |
ax25 | 1200 | net/ax25/af_ax25.c | ax25->n2 = osk->ax25->n2; |
ax25 | 1201 | net/ax25/af_ax25.c | ax25->idle = osk->ax25->idle; |
ax25 | 1203 | net/ax25/af_ax25.c | ax25->window = osk->ax25->window; |
ax25 | 1205 | net/ax25/af_ax25.c | ax25->source_addr = osk->ax25->source_addr; |
ax25 | 1207 | net/ax25/af_ax25.c | if (osk->ax25->digipeat != NULL) { |
ax25 | 1208 | net/ax25/af_ax25.c | if ((ax25->digipeat = (ax25_digi *)kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) { |
ax25 | 1210 | net/ax25/af_ax25.c | kfree_s(ax25, sizeof(*ax25)); |
ax25 | 1215 | net/ax25/af_ax25.c | *ax25->digipeat = *osk->ax25->digipeat; |
ax25 | 1218 | net/ax25/af_ax25.c | sk->ax25 = ax25; |
ax25 | 1219 | net/ax25/af_ax25.c | ax25->sk = sk; |
ax25 | 1238 | net/ax25/af_ax25.c | switch (sk->ax25->state) { |
ax25 | 1243 | net/ax25/af_ax25.c | ax25_destroy_socket(sk->ax25); |
ax25 | 1247 | net/ax25/af_ax25.c | ax25_send_control(sk->ax25, DISC, POLLON, C_COMMAND); |
ax25 | 1248 | net/ax25/af_ax25.c | sk->ax25->state = AX25_STATE_0; |
ax25 | 1252 | net/ax25/af_ax25.c | ax25_destroy_socket(sk->ax25); |
ax25 | 1256 | net/ax25/af_ax25.c | if (sk->ax25->dama_slave) |
ax25 | 1257 | net/ax25/af_ax25.c | ax25_send_control(sk->ax25, DISC, POLLON, C_COMMAND); |
ax25 | 1259 | net/ax25/af_ax25.c | ax25_send_control(sk->ax25, DM, POLLON, C_RESPONSE); |
ax25 | 1260 | net/ax25/af_ax25.c | sk->ax25->state = AX25_STATE_0; |
ax25 | 1264 | net/ax25/af_ax25.c | ax25_destroy_socket(sk->ax25); |
ax25 | 1269 | net/ax25/af_ax25.c | ax25_clear_queues(sk->ax25); |
ax25 | 1270 | net/ax25/af_ax25.c | sk->ax25->n2count = 0; |
ax25 | 1271 | net/ax25/af_ax25.c | if (!sk->ax25->dama_slave) |
ax25 | 1272 | net/ax25/af_ax25.c | ax25_send_control(sk->ax25, DISC, POLLON, C_COMMAND); |
ax25 | 1273 | net/ax25/af_ax25.c | sk->ax25->t3timer = 0; |
ax25 | 1274 | net/ax25/af_ax25.c | sk->ax25->t1timer = sk->ax25->t1 = ax25_calculate_t1(sk->ax25); |
ax25 | 1275 | net/ax25/af_ax25.c | sk->ax25->state = AX25_STATE_2; |
ax25 | 1289 | net/ax25/af_ax25.c | ax25_destroy_socket(sk->ax25); |
ax25 | 1324 | net/ax25/af_ax25.c | sk->ax25->source_addr = addr->fsa_ax25.sax25_call; |
ax25 | 1326 | net/ax25/af_ax25.c | sk->ax25->source_addr = *call; |
ax25 | 1329 | net/ax25/af_ax25.c | printk("AX25: source address set to %s\n", ax2asc(&sk->ax25->source_addr)); |
ax25 | 1355 | net/ax25/af_ax25.c | ax25_fillin_cb(sk->ax25, dev); |
ax25 | 1356 | net/ax25/af_ax25.c | ax25_insert_socket(sk->ax25); |
ax25 | 1403 | net/ax25/af_ax25.c | if (sk->ax25->digipeat == NULL) { |
ax25 | 1404 | net/ax25/af_ax25.c | if ((sk->ax25->digipeat = (ax25_digi *)kmalloc(sizeof(ax25_digi), GFP_KERNEL)) == NULL) |
ax25 | 1408 | net/ax25/af_ax25.c | sk->ax25->digipeat->ndigi = addr->sax25_ndigis; |
ax25 | 1411 | net/ax25/af_ax25.c | sk->ax25->digipeat->repeated[ct] = 0; |
ax25 | 1412 | net/ax25/af_ax25.c | sk->ax25->digipeat->calls[ct] = fsa->fsa_digipeater[ct]; |
ax25 | 1416 | net/ax25/af_ax25.c | sk->ax25->digipeat->lastrepeat = 0; |
ax25 | 1420 | net/ax25/af_ax25.c | ax25_rt_build_path(sk->ax25, &addr->sax25_call); |
ax25 | 1429 | net/ax25/af_ax25.c | if ((err = ax25_rt_autobind(sk->ax25, &addr->sax25_call)) < 0) |
ax25 | 1431 | net/ax25/af_ax25.c | ax25_fillin_cb(sk->ax25, sk->ax25->device); |
ax25 | 1432 | net/ax25/af_ax25.c | ax25_insert_socket(sk->ax25); |
ax25 | 1434 | net/ax25/af_ax25.c | if (sk->ax25->device == NULL) |
ax25 | 1438 | 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 | 1441 | net/ax25/af_ax25.c | sk->ax25->dest_addr = addr->sax25_call; |
ax25 | 1454 | net/ax25/af_ax25.c | if (ax25_dev_is_dama_slave(sk->ax25->device)) |
ax25 | 1455 | net/ax25/af_ax25.c | dama_establish_data_link(sk->ax25); |
ax25 | 1457 | net/ax25/af_ax25.c | ax25_establish_data_link(sk->ax25); |
ax25 | 1459 | net/ax25/af_ax25.c | sk->ax25->state = AX25_STATE_1; |
ax25 | 1460 | net/ax25/af_ax25.c | ax25_set_timer(sk->ax25); /* Start going SABM SABM until a UA or a give up and DM */ |
ax25 | 1561 | net/ax25/af_ax25.c | addr = &sk->ax25->dest_addr; |
ax25 | 1563 | net/ax25/af_ax25.c | addr = &sk->ax25->source_addr; |
ax25 | 1572 | net/ax25/af_ax25.c | if (sk->ax25->digipeat != NULL) { |
ax25 | 1573 | net/ax25/af_ax25.c | ndigi = sk->ax25->digipeat->ndigi; |
ax25 | 1577 | net/ax25/af_ax25.c | sax->fsa_digipeater[i] = sk->ax25->digipeat->calls[i]; |
ax25 | 1589 | net/ax25/af_ax25.c | ax25_cb *ax25; |
ax25 | 1761 | net/ax25/af_ax25.c | if ((ax25 = ax25_find_cb(&dest, &src, dev)) != NULL) { |
ax25 | 1768 | net/ax25/af_ax25.c | if (ax25_process_rx_frame(ax25, skb, type, dama) == 0) |
ax25 | 1802 | net/ax25/af_ax25.c | ax25 = make->ax25; |
ax25 | 1820 | net/ax25/af_ax25.c | if ((ax25 = ax25_create_cb()) == NULL) { |
ax25 | 1826 | net/ax25/af_ax25.c | ax25_fillin_cb(ax25, dev); |
ax25 | 1827 | net/ax25/af_ax25.c | ax25->idletimer = ax25->idle = ax25_dev_get_value(ax25->device, AX25_VALUES_IDLE); |
ax25 | 1839 | net/ax25/af_ax25.c | ax25->source_addr = dest; |
ax25 | 1840 | net/ax25/af_ax25.c | ax25->dest_addr = src; |
ax25 | 1845 | net/ax25/af_ax25.c | if (dp.ndigi != 0 && ax25->digipeat == NULL && (ax25->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) { |
ax25 | 1847 | net/ax25/af_ax25.c | ax25_destroy_socket(ax25); |
ax25 | 1852 | net/ax25/af_ax25.c | if (ax25->digipeat != NULL) { |
ax25 | 1853 | net/ax25/af_ax25.c | kfree_s(ax25->digipeat, sizeof(ax25_digi)); |
ax25 | 1854 | net/ax25/af_ax25.c | ax25->digipeat = NULL; |
ax25 | 1858 | net/ax25/af_ax25.c | ax25_digi_invert(&dp, ax25->digipeat); |
ax25 | 1862 | net/ax25/af_ax25.c | ax25->modulus = EMODULUS; |
ax25 | 1863 | net/ax25/af_ax25.c | ax25->window = ax25_dev_get_value(dev, AX25_VALUES_EWINDOW); |
ax25 | 1865 | net/ax25/af_ax25.c | ax25->modulus = MODULUS; |
ax25 | 1866 | net/ax25/af_ax25.c | ax25->window = ax25_dev_get_value(dev, AX25_VALUES_WINDOW); |
ax25 | 1869 | net/ax25/af_ax25.c | ax25->device = dev; |
ax25 | 1871 | net/ax25/af_ax25.c | ax25_send_control(ax25, UA, POLLON, C_RESPONSE); |
ax25 | 1873 | net/ax25/af_ax25.c | if (dama) ax25_dama_on(ax25); /* bke 951121 */ |
ax25 | 1875 | net/ax25/af_ax25.c | ax25->dama_slave = dama; |
ax25 | 1876 | net/ax25/af_ax25.c | ax25->t3timer = ax25->t3; |
ax25 | 1877 | net/ax25/af_ax25.c | ax25->state = AX25_STATE_3; |
ax25 | 1879 | net/ax25/af_ax25.c | ax25_insert_socket(ax25); |
ax25 | 1881 | net/ax25/af_ax25.c | ax25_set_timer(ax25); |
ax25 | 1959 | net/ax25/af_ax25.c | if (sk->ax25->device == NULL) |
ax25 | 1987 | net/ax25/af_ax25.c | if (sk->type == SOCK_SEQPACKET && ax25cmp(&sk->ax25->dest_addr, &sax.sax25_call) != 0) |
ax25 | 1997 | net/ax25/af_ax25.c | sax.sax25_call = sk->ax25->dest_addr; |
ax25 | 1998 | net/ax25/af_ax25.c | dp = sk->ax25->digipeat; |
ax25 | 2040 | net/ax25/af_ax25.c | ax25_output(sk->ax25, skb); /* Shove it onto the queue and kick */ |
ax25 | 2053 | net/ax25/af_ax25.c | asmptr += (lv = build_ax25_addr(asmptr, &sk->ax25->source_addr, &sax.sax25_call, dp, C_COMMAND, MODULUS)); |
ax25 | 2066 | net/ax25/af_ax25.c | ax25_queue_xmit(skb, sk->ax25->device, SOPRI_NORMAL); |
ax25 | 2100 | net/ax25/af_ax25.c | if (sk->ax25->hdrincl) { |
ax25 | 2270 | net/ax25/af_ax25.c | ax25_cb *ax25; |
ax25 | 2282 | net/ax25/af_ax25.c | for (ax25 = ax25_list; ax25 != NULL; ax25 = ax25->next) { |
ax25 | 2283 | net/ax25/af_ax25.c | if ((dev = ax25->device) == NULL) |
ax25 | 2288 | net/ax25/af_ax25.c | idletimer = ax25->idletimer / (PR_SLOWHZ * 60); |
ax25 | 2289 | net/ax25/af_ax25.c | idletimer += (ax25->idletimer && ax25->idletimer < ax25->idle)? 1:0; |
ax25 | 2292 | net/ax25/af_ax25.c | ax2asc(&ax25->dest_addr)); |
ax25 | 2294 | net/ax25/af_ax25.c | ax2asc(&ax25->source_addr), devname, |
ax25 | 2295 | net/ax25/af_ax25.c | ax25->state, |
ax25 | 2296 | net/ax25/af_ax25.c | ax25->vs, ax25->vr, ax25->va, |
ax25 | 2297 | net/ax25/af_ax25.c | ax25->t1timer / PR_SLOWHZ, |
ax25 | 2298 | net/ax25/af_ax25.c | ax25->t1 / PR_SLOWHZ, |
ax25 | 2299 | net/ax25/af_ax25.c | ax25->t2timer / PR_SLOWHZ, |
ax25 | 2300 | net/ax25/af_ax25.c | ax25->t2 / PR_SLOWHZ, |
ax25 | 2301 | net/ax25/af_ax25.c | ax25->t3timer / PR_SLOWHZ, |
ax25 | 2302 | net/ax25/af_ax25.c | ax25->t3 / PR_SLOWHZ, |
ax25 | 2304 | net/ax25/af_ax25.c | ax25->idle / (PR_SLOWHZ*60), |
ax25 | 2305 | net/ax25/af_ax25.c | ax25->n2count, ax25->n2, |
ax25 | 2306 | net/ax25/af_ax25.c | ax25->rtt / PR_SLOWHZ, |
ax25 | 2307 | net/ax25/af_ax25.c | ax25->window, |
ax25 | 2308 | net/ax25/af_ax25.c | ax25->paclen); |
ax25 | 2310 | net/ax25/af_ax25.c | len += sprintf(buffer + len, " %s", ax25->dama_slave? " slave" : " no"); |
ax25 | 2312 | net/ax25/af_ax25.c | if (ax25->sk != NULL) { |
ax25 | 2314 | net/ax25/af_ax25.c | ax25->sk->wmem_alloc, |
ax25 | 2315 | net/ax25/af_ax25.c | ax25->sk->rmem_alloc); |
ax25 | 70 | net/ax25/ax25_in.c | static int ax25_rx_fragment(ax25_cb *ax25, struct sk_buff *skb) |
ax25 | 75 | net/ax25/ax25_in.c | if (ax25->fragno != 0) { |
ax25 | 77 | net/ax25/ax25_in.c | if ((ax25->fragno - 1) == (*skb->data & SEG_REM)) { |
ax25 | 81 | net/ax25/ax25_in.c | ax25->fragno = *skb->data & SEG_REM; |
ax25 | 83 | net/ax25/ax25_in.c | ax25->fraglen += skb->len; |
ax25 | 84 | net/ax25/ax25_in.c | skb_queue_tail(&ax25->frag_queue, skb); |
ax25 | 88 | net/ax25/ax25_in.c | if (ax25->fragno == 0) { |
ax25 | 89 | net/ax25/ax25_in.c | if ((skbn = alloc_skb(AX25_MAX_HEADER_LEN + ax25->fraglen, GFP_ATOMIC)) == NULL) |
ax25 | 96 | net/ax25/ax25_in.c | if (ax25->sk != NULL) { |
ax25 | 97 | net/ax25/ax25_in.c | skbn->sk = ax25->sk; |
ax25 | 98 | net/ax25/ax25_in.c | atomic_add(skbn->truesize, &ax25->sk->rmem_alloc); |
ax25 | 103 | net/ax25/ax25_in.c | skbo = skb_dequeue(&ax25->frag_queue); |
ax25 | 119 | net/ax25/ax25_in.c | while ((skbo = skb_dequeue(&ax25->frag_queue)) != NULL) { |
ax25 | 124 | net/ax25/ax25_in.c | ax25->fraglen = 0; /* reset counter */ |
ax25 | 134 | net/ax25/ax25_in.c | if (ax25_rx_iframe(ax25, skbn) == 0) |
ax25 | 145 | net/ax25/ax25_in.c | ax25->fragno = *skb->data & SEG_REM; |
ax25 | 147 | net/ax25/ax25_in.c | ax25->fraglen = skb->len; |
ax25 | 148 | net/ax25/ax25_in.c | skb_queue_tail(&ax25->frag_queue, skb); |
ax25 | 160 | net/ax25/ax25_in.c | static int ax25_rx_iframe(ax25_cb *ax25, struct sk_buff *skb) |
ax25 | 172 | net/ax25/ax25_in.c | ax25->idletimer = ax25->idle = ax25_dev_get_value(ax25->device, AX25_VALUES_IDLE); |
ax25 | 173 | net/ax25/ax25_in.c | if (ax25_dev_get_value(ax25->device, AX25_VALUES_NETROM)) { |
ax25 | 175 | net/ax25/ax25_in.c | queued = nr_route_frame(skb, ax25); |
ax25 | 181 | net/ax25/ax25_in.c | ax25->idletimer = ax25->idle = ax25_dev_get_value(ax25->device, AX25_VALUES_IDLE); |
ax25 | 184 | net/ax25/ax25_in.c | ax25_ip_mode_set(&ax25->dest_addr, ax25->device, 'V'); |
ax25 | 185 | net/ax25/ax25_in.c | ip_rcv(skb, ax25->device, NULL); /* Wrong ptype */ |
ax25 | 191 | net/ax25/ax25_in.c | ax25->idletimer = ax25->idle = ax25_dev_get_value(ax25->device, AX25_VALUES_IDLE); |
ax25 | 193 | net/ax25/ax25_in.c | queued = ax25_rx_fragment(ax25, skb); |
ax25 | 197 | net/ax25/ax25_in.c | ax25->idletimer = ax25->idle = 0; |
ax25 | 198 | net/ax25/ax25_in.c | if (ax25->sk != NULL && ax25_dev_get_value(ax25->device, AX25_VALUES_TEXT) && ax25->sk->protocol == pid) { |
ax25 | 199 | net/ax25/ax25_in.c | if (sock_queue_rcv_skb(ax25->sk, skb) == 0) { |
ax25 | 202 | net/ax25/ax25_in.c | ax25->condition |= OWN_RX_BUSY_CONDITION; |
ax25 | 216 | net/ax25/ax25_in.c | static int ax25_state1_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int pf, int type, int dama) |
ax25 | 220 | net/ax25/ax25_in.c | ax25->modulus = MODULUS; |
ax25 | 221 | net/ax25/ax25_in.c | ax25->window = ax25_dev_get_value(ax25->device, AX25_VALUES_WINDOW); |
ax25 | 222 | net/ax25/ax25_in.c | ax25_send_control(ax25, UA, pf, C_RESPONSE); |
ax25 | 226 | net/ax25/ax25_in.c | ax25->modulus = EMODULUS; |
ax25 | 227 | net/ax25/ax25_in.c | ax25->window = ax25_dev_get_value(ax25->device, AX25_VALUES_EWINDOW); |
ax25 | 228 | net/ax25/ax25_in.c | ax25_send_control(ax25, UA, pf, C_RESPONSE); |
ax25 | 232 | net/ax25/ax25_in.c | ax25_send_control(ax25, DM, pf, C_RESPONSE); |
ax25 | 237 | net/ax25/ax25_in.c | if (dama) ax25_dama_on(ax25); /* bke */ |
ax25 | 239 | net/ax25/ax25_in.c | ax25_calculate_rtt(ax25); |
ax25 | 240 | net/ax25/ax25_in.c | ax25->t1timer = 0; |
ax25 | 241 | net/ax25/ax25_in.c | ax25->t3timer = ax25->t3; |
ax25 | 242 | net/ax25/ax25_in.c | ax25->idletimer = ax25->idle; |
ax25 | 243 | net/ax25/ax25_in.c | ax25->vs = 0; |
ax25 | 244 | net/ax25/ax25_in.c | ax25->va = 0; |
ax25 | 245 | net/ax25/ax25_in.c | ax25->vr = 0; |
ax25 | 246 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_3; |
ax25 | 247 | net/ax25/ax25_in.c | ax25->n2count = 0; |
ax25 | 248 | net/ax25/ax25_in.c | ax25->dama_slave = dama; /* bke */ |
ax25 | 250 | net/ax25/ax25_in.c | if (ax25->sk != NULL) { |
ax25 | 251 | net/ax25/ax25_in.c | ax25->sk->state = TCP_ESTABLISHED; |
ax25 | 253 | net/ax25/ax25_in.c | if (!ax25->sk->dead) |
ax25 | 254 | net/ax25/ax25_in.c | ax25->sk->state_change(ax25->sk); |
ax25 | 261 | net/ax25/ax25_in.c | if (ax25->modulus == MODULUS) { |
ax25 | 262 | net/ax25/ax25_in.c | ax25_clear_queues(ax25); |
ax25 | 263 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_0; |
ax25 | 264 | net/ax25/ax25_in.c | if (ax25->sk != NULL) { |
ax25 | 265 | net/ax25/ax25_in.c | ax25->sk->state = TCP_CLOSE; |
ax25 | 266 | net/ax25/ax25_in.c | ax25->sk->err = ECONNREFUSED; |
ax25 | 267 | net/ax25/ax25_in.c | if (!ax25->sk->dead) |
ax25 | 268 | net/ax25/ax25_in.c | ax25->sk->state_change(ax25->sk); |
ax25 | 269 | net/ax25/ax25_in.c | ax25->sk->dead = 1; |
ax25 | 272 | net/ax25/ax25_in.c | ax25->modulus = MODULUS; |
ax25 | 273 | net/ax25/ax25_in.c | ax25->window = ax25_dev_get_value(ax25->device, AX25_VALUES_WINDOW); |
ax25 | 280 | net/ax25/ax25_in.c | ax25_send_control(ax25, SABM, POLLON, C_COMMAND); |
ax25 | 292 | net/ax25/ax25_in.c | static int ax25_state2_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int pf, int type) |
ax25 | 297 | net/ax25/ax25_in.c | ax25_send_control(ax25, DM, pf, C_RESPONSE); |
ax25 | 298 | net/ax25/ax25_in.c | if (ax25->dama_slave) |
ax25 | 299 | net/ax25/ax25_in.c | ax25_send_control(ax25, DISC, POLLON, C_COMMAND); |
ax25 | 303 | net/ax25/ax25_in.c | ax25_send_control(ax25, UA, pf, C_RESPONSE); |
ax25 | 304 | net/ax25/ax25_in.c | if (ax25->dama_slave) { |
ax25 | 305 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_0; |
ax25 | 306 | net/ax25/ax25_in.c | ax25_dama_off(ax25); |
ax25 | 308 | net/ax25/ax25_in.c | if (ax25->sk != NULL) { |
ax25 | 309 | net/ax25/ax25_in.c | ax25->sk->state = TCP_CLOSE; |
ax25 | 310 | net/ax25/ax25_in.c | ax25->sk->err = 0; |
ax25 | 311 | net/ax25/ax25_in.c | if (!ax25->sk->dead) |
ax25 | 312 | net/ax25/ax25_in.c | ax25->sk->state_change(ax25->sk); |
ax25 | 313 | net/ax25/ax25_in.c | ax25->sk->dead = 1; |
ax25 | 320 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_0; |
ax25 | 321 | net/ax25/ax25_in.c | ax25_dama_off(ax25); |
ax25 | 323 | net/ax25/ax25_in.c | if (ax25->sk != NULL) { |
ax25 | 324 | net/ax25/ax25_in.c | ax25->sk->state = TCP_CLOSE; |
ax25 | 325 | net/ax25/ax25_in.c | ax25->sk->err = 0; |
ax25 | 326 | net/ax25/ax25_in.c | if (!ax25->sk->dead) |
ax25 | 327 | net/ax25/ax25_in.c | ax25->sk->state_change(ax25->sk); |
ax25 | 328 | net/ax25/ax25_in.c | ax25->sk->dead = 1; |
ax25 | 335 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_0; |
ax25 | 336 | net/ax25/ax25_in.c | ax25_dama_off(ax25); |
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 | 353 | net/ax25/ax25_in.c | if (ax25->dama_slave) |
ax25 | 354 | net/ax25/ax25_in.c | ax25_send_control(ax25, DISC, POLLON, C_COMMAND); |
ax25 | 356 | net/ax25/ax25_in.c | ax25_send_control(ax25, DM, POLLON, C_RESPONSE); |
ax25 | 372 | 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, int dama) |
ax25 | 378 | net/ax25/ax25_in.c | if (dama) ax25_dama_on(ax25); |
ax25 | 380 | net/ax25/ax25_in.c | ax25->modulus = MODULUS; |
ax25 | 381 | net/ax25/ax25_in.c | ax25->window = ax25_dev_get_value(ax25->device, AX25_VALUES_WINDOW); |
ax25 | 382 | net/ax25/ax25_in.c | ax25_send_control(ax25, UA, pf, C_RESPONSE); |
ax25 | 383 | net/ax25/ax25_in.c | ax25->condition = 0x00; |
ax25 | 384 | net/ax25/ax25_in.c | ax25->t1timer = 0; |
ax25 | 385 | net/ax25/ax25_in.c | ax25->t3timer = ax25->t3; |
ax25 | 386 | net/ax25/ax25_in.c | ax25->idletimer = ax25->idle; |
ax25 | 387 | net/ax25/ax25_in.c | ax25->vs = 0; |
ax25 | 388 | net/ax25/ax25_in.c | ax25->va = 0; |
ax25 | 389 | net/ax25/ax25_in.c | ax25->vr = 0; |
ax25 | 390 | net/ax25/ax25_in.c | ax25->dama_slave = dama; |
ax25 | 394 | net/ax25/ax25_in.c | if (dama) ax25_dama_on(ax25); |
ax25 | 396 | net/ax25/ax25_in.c | ax25->modulus = EMODULUS; |
ax25 | 397 | net/ax25/ax25_in.c | ax25->window = ax25_dev_get_value(ax25->device, AX25_VALUES_EWINDOW); |
ax25 | 398 | net/ax25/ax25_in.c | ax25_send_control(ax25, UA, pf, C_RESPONSE); |
ax25 | 399 | net/ax25/ax25_in.c | ax25->condition = 0x00; |
ax25 | 400 | net/ax25/ax25_in.c | ax25->t1timer = 0; |
ax25 | 401 | net/ax25/ax25_in.c | ax25->t3timer = ax25->t3; |
ax25 | 402 | net/ax25/ax25_in.c | ax25->idletimer = ax25->idle; |
ax25 | 403 | net/ax25/ax25_in.c | ax25->vs = 0; |
ax25 | 404 | net/ax25/ax25_in.c | ax25->va = 0; |
ax25 | 405 | net/ax25/ax25_in.c | ax25->vr = 0; |
ax25 | 406 | net/ax25/ax25_in.c | ax25->dama_slave = dama; |
ax25 | 410 | net/ax25/ax25_in.c | ax25_clear_queues(ax25); |
ax25 | 411 | net/ax25/ax25_in.c | ax25_send_control(ax25, UA, pf, C_RESPONSE); |
ax25 | 412 | net/ax25/ax25_in.c | ax25->t3timer = 0; |
ax25 | 413 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_0; |
ax25 | 414 | net/ax25/ax25_in.c | ax25_dama_off(ax25); |
ax25 | 416 | net/ax25/ax25_in.c | if (ax25->sk != NULL) { |
ax25 | 417 | net/ax25/ax25_in.c | ax25->sk->state = TCP_CLOSE; |
ax25 | 418 | net/ax25/ax25_in.c | ax25->sk->err = 0; |
ax25 | 419 | net/ax25/ax25_in.c | if (!ax25->sk->dead) |
ax25 | 420 | net/ax25/ax25_in.c | ax25->sk->state_change(ax25->sk); |
ax25 | 421 | net/ax25/ax25_in.c | ax25->sk->dead = 1; |
ax25 | 426 | net/ax25/ax25_in.c | ax25_clear_queues(ax25); |
ax25 | 427 | net/ax25/ax25_in.c | ax25->t3timer = 0; |
ax25 | 428 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_0; |
ax25 | 429 | net/ax25/ax25_in.c | ax25_dama_off(ax25); |
ax25 | 430 | net/ax25/ax25_in.c | if (ax25->sk) { |
ax25 | 431 | net/ax25/ax25_in.c | ax25->sk->state = TCP_CLOSE; |
ax25 | 432 | net/ax25/ax25_in.c | ax25->sk->err = ECONNRESET; |
ax25 | 433 | net/ax25/ax25_in.c | if (!ax25->sk->dead) |
ax25 | 434 | net/ax25/ax25_in.c | ax25->sk->state_change(ax25->sk); |
ax25 | 435 | net/ax25/ax25_in.c | ax25->sk->dead = 1; |
ax25 | 440 | net/ax25/ax25_in.c | ax25->condition |= PEER_RX_BUSY_CONDITION; |
ax25 | 441 | net/ax25/ax25_in.c | ax25_check_need_response(ax25, type, pf); |
ax25 | 442 | net/ax25/ax25_in.c | if (ax25_validate_nr(ax25, nr)) { |
ax25 | 443 | net/ax25/ax25_in.c | ax25_check_iframes_acked(ax25, nr); |
ax25 | 444 | net/ax25/ax25_in.c | dama_check_need_response(ax25, type, pf); |
ax25 | 446 | net/ax25/ax25_in.c | ax25_nr_error_recovery(ax25); |
ax25 | 447 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_1; |
ax25 | 452 | net/ax25/ax25_in.c | ax25->condition &= ~PEER_RX_BUSY_CONDITION; |
ax25 | 453 | net/ax25/ax25_in.c | ax25_check_need_response(ax25, type, pf); |
ax25 | 454 | net/ax25/ax25_in.c | if (ax25_validate_nr(ax25, nr)) { |
ax25 | 455 | net/ax25/ax25_in.c | ax25_check_iframes_acked(ax25, nr); |
ax25 | 456 | net/ax25/ax25_in.c | dama_check_need_response(ax25, type, pf); |
ax25 | 458 | net/ax25/ax25_in.c | ax25_nr_error_recovery(ax25); |
ax25 | 459 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_1; |
ax25 | 464 | net/ax25/ax25_in.c | ax25->condition &= ~PEER_RX_BUSY_CONDITION; |
ax25 | 465 | net/ax25/ax25_in.c | ax25_check_need_response(ax25, type, pf); |
ax25 | 466 | net/ax25/ax25_in.c | if (ax25_validate_nr(ax25, nr)) { |
ax25 | 467 | net/ax25/ax25_in.c | ax25_frames_acked(ax25, nr); |
ax25 | 468 | net/ax25/ax25_in.c | ax25_calculate_rtt(ax25); |
ax25 | 469 | net/ax25/ax25_in.c | ax25->t1timer = 0; |
ax25 | 470 | net/ax25/ax25_in.c | ax25->t3timer = ax25->t3; |
ax25 | 471 | net/ax25/ax25_in.c | ax25_requeue_frames(ax25); |
ax25 | 472 | net/ax25/ax25_in.c | dama_check_need_response(ax25, type, pf); |
ax25 | 474 | net/ax25/ax25_in.c | ax25_nr_error_recovery(ax25); |
ax25 | 475 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_1; |
ax25 | 484 | net/ax25/ax25_in.c | if (!ax25_validate_nr(ax25, nr)) { |
ax25 | 485 | net/ax25/ax25_in.c | ax25_nr_error_recovery(ax25); |
ax25 | 486 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_1; |
ax25 | 489 | net/ax25/ax25_in.c | if (ax25->condition & PEER_RX_BUSY_CONDITION) { |
ax25 | 490 | net/ax25/ax25_in.c | ax25_frames_acked(ax25, nr); |
ax25 | 492 | net/ax25/ax25_in.c | ax25_check_iframes_acked(ax25, nr); |
ax25 | 494 | net/ax25/ax25_in.c | if (ax25->condition & OWN_RX_BUSY_CONDITION) { |
ax25 | 496 | net/ax25/ax25_in.c | if (ax25->dama_slave) /* dl1bke 960114 */ |
ax25 | 497 | net/ax25/ax25_in.c | dama_enquiry_response(ax25); |
ax25 | 499 | net/ax25/ax25_in.c | ax25_enquiry_response(ax25); |
ax25 | 503 | net/ax25/ax25_in.c | if (ns == ax25->vr) { |
ax25 | 504 | net/ax25/ax25_in.c | queued = ax25_rx_iframe(ax25, skb); |
ax25 | 505 | net/ax25/ax25_in.c | if (ax25->condition & OWN_RX_BUSY_CONDITION) { |
ax25 | 507 | net/ax25/ax25_in.c | if (ax25->dama_slave) /* dl1bke 960114 */ |
ax25 | 508 | net/ax25/ax25_in.c | dama_enquiry_response(ax25); |
ax25 | 510 | net/ax25/ax25_in.c | ax25_enquiry_response(ax25); |
ax25 | 514 | net/ax25/ax25_in.c | ax25->vr = (ax25->vr + 1) % ax25->modulus; |
ax25 | 515 | net/ax25/ax25_in.c | ax25->condition &= ~REJECT_CONDITION; |
ax25 | 517 | net/ax25/ax25_in.c | if (ax25->dama_slave) /* dl1bke 960114 */ |
ax25 | 518 | net/ax25/ax25_in.c | dama_enquiry_response(ax25); |
ax25 | 520 | net/ax25/ax25_in.c | ax25_enquiry_response(ax25); |
ax25 | 522 | net/ax25/ax25_in.c | if (!(ax25->condition & ACK_PENDING_CONDITION)) { |
ax25 | 523 | net/ax25/ax25_in.c | ax25->t2timer = ax25->t2; |
ax25 | 524 | net/ax25/ax25_in.c | ax25->condition |= ACK_PENDING_CONDITION; |
ax25 | 528 | net/ax25/ax25_in.c | if (ax25->condition & REJECT_CONDITION) { |
ax25 | 530 | net/ax25/ax25_in.c | if (ax25->dama_slave) /* dl1bke 960114 */ |
ax25 | 531 | net/ax25/ax25_in.c | dama_enquiry_response(ax25); |
ax25 | 533 | net/ax25/ax25_in.c | ax25_enquiry_response(ax25); |
ax25 | 536 | net/ax25/ax25_in.c | ax25->condition |= REJECT_CONDITION; |
ax25 | 537 | net/ax25/ax25_in.c | if (ax25->dama_slave) /* dl1bke 960114 */ |
ax25 | 538 | net/ax25/ax25_in.c | dama_enquiry_response(ax25); |
ax25 | 540 | net/ax25/ax25_in.c | ax25_send_control(ax25, REJ, pf, C_RESPONSE); |
ax25 | 541 | net/ax25/ax25_in.c | ax25->condition &= ~ACK_PENDING_CONDITION; |
ax25 | 548 | net/ax25/ax25_in.c | ax25_establish_data_link(ax25); |
ax25 | 549 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_1; |
ax25 | 564 | 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, int dama) |
ax25 | 570 | net/ax25/ax25_in.c | if (dama) ax25_dama_on(ax25); |
ax25 | 572 | net/ax25/ax25_in.c | ax25->dama_slave = dama; |
ax25 | 573 | net/ax25/ax25_in.c | ax25->modulus = MODULUS; |
ax25 | 574 | net/ax25/ax25_in.c | ax25->window = ax25_dev_get_value(ax25->device, AX25_VALUES_WINDOW); |
ax25 | 575 | net/ax25/ax25_in.c | ax25_send_control(ax25, UA, pf, C_RESPONSE); |
ax25 | 576 | net/ax25/ax25_in.c | ax25->condition = 0x00; |
ax25 | 577 | net/ax25/ax25_in.c | ax25->t1timer = 0; |
ax25 | 578 | net/ax25/ax25_in.c | ax25->t3timer = ax25->t3; |
ax25 | 579 | net/ax25/ax25_in.c | ax25->idletimer = ax25->idle; |
ax25 | 580 | net/ax25/ax25_in.c | ax25->vs = 0; |
ax25 | 581 | net/ax25/ax25_in.c | ax25->va = 0; |
ax25 | 582 | net/ax25/ax25_in.c | ax25->vr = 0; |
ax25 | 583 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_3; |
ax25 | 584 | net/ax25/ax25_in.c | ax25->n2count = 0; |
ax25 | 588 | net/ax25/ax25_in.c | if (dama) ax25_dama_on(ax25); |
ax25 | 590 | net/ax25/ax25_in.c | ax25->dama_slave = dama; |
ax25 | 591 | net/ax25/ax25_in.c | ax25->modulus = EMODULUS; |
ax25 | 592 | net/ax25/ax25_in.c | ax25->window = ax25_dev_get_value(ax25->device, AX25_VALUES_EWINDOW); |
ax25 | 593 | net/ax25/ax25_in.c | ax25_send_control(ax25, UA, pf, C_RESPONSE); |
ax25 | 594 | net/ax25/ax25_in.c | ax25->condition = 0x00; |
ax25 | 595 | net/ax25/ax25_in.c | ax25->t1timer = 0; |
ax25 | 596 | net/ax25/ax25_in.c | ax25->t3timer = ax25->t3; |
ax25 | 597 | net/ax25/ax25_in.c | ax25->idletimer = ax25->idle; |
ax25 | 598 | net/ax25/ax25_in.c | ax25->vs = 0; |
ax25 | 599 | net/ax25/ax25_in.c | ax25->va = 0; |
ax25 | 600 | net/ax25/ax25_in.c | ax25->vr = 0; |
ax25 | 601 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_3; |
ax25 | 602 | net/ax25/ax25_in.c | ax25->n2count = 0; |
ax25 | 606 | net/ax25/ax25_in.c | ax25_clear_queues(ax25); |
ax25 | 607 | net/ax25/ax25_in.c | ax25_send_control(ax25, UA, pf, C_RESPONSE); |
ax25 | 608 | net/ax25/ax25_in.c | ax25->t3timer = 0; |
ax25 | 609 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_0; |
ax25 | 610 | net/ax25/ax25_in.c | ax25_dama_off(ax25); |
ax25 | 612 | net/ax25/ax25_in.c | if (ax25->sk != NULL) { |
ax25 | 613 | net/ax25/ax25_in.c | ax25->sk->state = TCP_CLOSE; |
ax25 | 614 | net/ax25/ax25_in.c | ax25->sk->err = 0; |
ax25 | 615 | net/ax25/ax25_in.c | if (!ax25->sk->dead) |
ax25 | 616 | net/ax25/ax25_in.c | ax25->sk->state_change(ax25->sk); |
ax25 | 617 | net/ax25/ax25_in.c | ax25->sk->dead = 1; |
ax25 | 622 | net/ax25/ax25_in.c | ax25_clear_queues(ax25); |
ax25 | 623 | net/ax25/ax25_in.c | ax25->t3timer = 0; |
ax25 | 624 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_0; |
ax25 | 625 | net/ax25/ax25_in.c | ax25_dama_off(ax25); |
ax25 | 627 | net/ax25/ax25_in.c | if (ax25->sk != NULL) { |
ax25 | 628 | net/ax25/ax25_in.c | ax25->sk->state = TCP_CLOSE; |
ax25 | 629 | net/ax25/ax25_in.c | ax25->sk->err = ECONNRESET; |
ax25 | 630 | net/ax25/ax25_in.c | if (!ax25->sk->dead) |
ax25 | 631 | net/ax25/ax25_in.c | ax25->sk->state_change(ax25->sk); |
ax25 | 632 | net/ax25/ax25_in.c | ax25->sk->dead = 1; |
ax25 | 637 | net/ax25/ax25_in.c | ax25->condition |= PEER_RX_BUSY_CONDITION; |
ax25 | 639 | net/ax25/ax25_in.c | ax25->t1timer = 0; |
ax25 | 640 | net/ax25/ax25_in.c | if (ax25_validate_nr(ax25, nr)) { |
ax25 | 641 | net/ax25/ax25_in.c | ax25_frames_acked(ax25, nr); |
ax25 | 642 | net/ax25/ax25_in.c | if (ax25->vs == ax25->va) { |
ax25 | 643 | net/ax25/ax25_in.c | ax25->t3timer = ax25->t3; |
ax25 | 644 | net/ax25/ax25_in.c | ax25->n2count = 0; |
ax25 | 645 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_3; |
ax25 | 648 | net/ax25/ax25_in.c | ax25_nr_error_recovery(ax25); |
ax25 | 649 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_1; |
ax25 | 654 | net/ax25/ax25_in.c | ax25_check_need_response(ax25, type, pf); |
ax25 | 655 | net/ax25/ax25_in.c | if (ax25_validate_nr(ax25, nr)) { |
ax25 | 656 | net/ax25/ax25_in.c | ax25_frames_acked(ax25, nr); |
ax25 | 657 | net/ax25/ax25_in.c | dama_check_need_response(ax25, type, pf); |
ax25 | 659 | net/ax25/ax25_in.c | ax25_nr_error_recovery(ax25); |
ax25 | 660 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_1; |
ax25 | 665 | net/ax25/ax25_in.c | ax25->condition &= ~PEER_RX_BUSY_CONDITION; |
ax25 | 666 | net/ax25/ax25_in.c | if ( pf && (type == C_RESPONSE || (ax25->dama_slave && type == C_COMMAND)) ) { |
ax25 | 667 | net/ax25/ax25_in.c | ax25->t1timer = 0; |
ax25 | 668 | net/ax25/ax25_in.c | if (ax25_validate_nr(ax25, nr)) { |
ax25 | 669 | net/ax25/ax25_in.c | ax25_frames_acked(ax25, nr); |
ax25 | 670 | net/ax25/ax25_in.c | if (ax25->vs == ax25->va) { |
ax25 | 671 | net/ax25/ax25_in.c | ax25->t3timer = ax25->t3; |
ax25 | 672 | net/ax25/ax25_in.c | ax25->n2count = 0; |
ax25 | 673 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_3; |
ax25 | 675 | net/ax25/ax25_in.c | ax25_requeue_frames(ax25); |
ax25 | 677 | net/ax25/ax25_in.c | dama_check_need_response(ax25, type, pf); |
ax25 | 679 | net/ax25/ax25_in.c | ax25_nr_error_recovery(ax25); |
ax25 | 680 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_1; |
ax25 | 685 | net/ax25/ax25_in.c | ax25_check_need_response(ax25, type, pf); |
ax25 | 686 | net/ax25/ax25_in.c | if (ax25_validate_nr(ax25, nr)) { |
ax25 | 687 | net/ax25/ax25_in.c | ax25_frames_acked(ax25, nr); |
ax25 | 688 | net/ax25/ax25_in.c | dama_check_need_response(ax25, type, pf); |
ax25 | 690 | net/ax25/ax25_in.c | ax25_nr_error_recovery(ax25); |
ax25 | 691 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_1; |
ax25 | 696 | net/ax25/ax25_in.c | ax25->condition &= ~PEER_RX_BUSY_CONDITION; |
ax25 | 697 | net/ax25/ax25_in.c | if ( pf && (type == C_RESPONSE || (ax25->dama_slave && type == C_COMMAND)) ) { |
ax25 | 698 | net/ax25/ax25_in.c | ax25->t1timer = 0; |
ax25 | 699 | net/ax25/ax25_in.c | if (ax25_validate_nr(ax25, nr)) { |
ax25 | 700 | net/ax25/ax25_in.c | ax25_frames_acked(ax25, nr); |
ax25 | 701 | net/ax25/ax25_in.c | if (ax25->vs == ax25->va) { |
ax25 | 702 | net/ax25/ax25_in.c | ax25->t3timer = ax25->t3; |
ax25 | 703 | net/ax25/ax25_in.c | ax25->n2count = 0; |
ax25 | 704 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_3; |
ax25 | 706 | net/ax25/ax25_in.c | ax25_requeue_frames(ax25); |
ax25 | 708 | net/ax25/ax25_in.c | dama_check_need_response(ax25, type, pf); |
ax25 | 710 | net/ax25/ax25_in.c | ax25_nr_error_recovery(ax25); |
ax25 | 711 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_1; |
ax25 | 716 | net/ax25/ax25_in.c | ax25_check_need_response(ax25, type, pf); |
ax25 | 717 | net/ax25/ax25_in.c | if (ax25_validate_nr(ax25, nr)) { |
ax25 | 718 | net/ax25/ax25_in.c | ax25_frames_acked(ax25, nr); |
ax25 | 719 | net/ax25/ax25_in.c | if(ax25->vs != ax25->va) { |
ax25 | 720 | net/ax25/ax25_in.c | ax25_requeue_frames(ax25); |
ax25 | 722 | net/ax25/ax25_in.c | dama_check_need_response(ax25, type, pf); |
ax25 | 724 | net/ax25/ax25_in.c | ax25_nr_error_recovery(ax25); |
ax25 | 725 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_1; |
ax25 | 734 | net/ax25/ax25_in.c | if (!ax25_validate_nr(ax25, nr)) { |
ax25 | 735 | net/ax25/ax25_in.c | ax25_nr_error_recovery(ax25); |
ax25 | 736 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_1; |
ax25 | 739 | net/ax25/ax25_in.c | ax25_frames_acked(ax25, nr); |
ax25 | 740 | net/ax25/ax25_in.c | if (ax25->condition & OWN_RX_BUSY_CONDITION) { |
ax25 | 742 | net/ax25/ax25_in.c | if (ax25->dama_slave) |
ax25 | 743 | net/ax25/ax25_in.c | ax25_enquiry_response(ax25); |
ax25 | 745 | net/ax25/ax25_in.c | dama_enquiry_response(ax25); |
ax25 | 749 | net/ax25/ax25_in.c | if (ns == ax25->vr) { |
ax25 | 750 | net/ax25/ax25_in.c | queued = ax25_rx_iframe(ax25, skb); |
ax25 | 751 | net/ax25/ax25_in.c | if (ax25->condition & OWN_RX_BUSY_CONDITION) { |
ax25 | 753 | net/ax25/ax25_in.c | if (ax25->dama_slave) |
ax25 | 754 | net/ax25/ax25_in.c | dama_enquiry_response(ax25); |
ax25 | 756 | net/ax25/ax25_in.c | ax25_enquiry_response(ax25); |
ax25 | 760 | net/ax25/ax25_in.c | ax25->vr = (ax25->vr + 1) % ax25->modulus; |
ax25 | 761 | net/ax25/ax25_in.c | ax25->condition &= ~REJECT_CONDITION; |
ax25 | 763 | net/ax25/ax25_in.c | if (ax25->dama_slave) /* dl1bke 960114 */ |
ax25 | 764 | net/ax25/ax25_in.c | dama_enquiry_response(ax25); |
ax25 | 766 | net/ax25/ax25_in.c | ax25_enquiry_response(ax25); |
ax25 | 768 | net/ax25/ax25_in.c | if (!(ax25->condition & ACK_PENDING_CONDITION)) { |
ax25 | 769 | net/ax25/ax25_in.c | ax25->t2timer = ax25->t2; |
ax25 | 770 | net/ax25/ax25_in.c | ax25->condition |= ACK_PENDING_CONDITION; |
ax25 | 774 | net/ax25/ax25_in.c | if (ax25->condition & REJECT_CONDITION) { |
ax25 | 776 | net/ax25/ax25_in.c | if (ax25->dama_slave) |
ax25 | 777 | net/ax25/ax25_in.c | dama_enquiry_response(ax25); |
ax25 | 779 | net/ax25/ax25_in.c | ax25_enquiry_response(ax25); |
ax25 | 782 | net/ax25/ax25_in.c | ax25->condition |= REJECT_CONDITION; |
ax25 | 783 | net/ax25/ax25_in.c | if (ax25->dama_slave) /* dl1bke 960114 */ |
ax25 | 784 | net/ax25/ax25_in.c | dama_enquiry_response(ax25); |
ax25 | 786 | net/ax25/ax25_in.c | ax25_send_control(ax25, REJ, pf, C_RESPONSE); |
ax25 | 787 | net/ax25/ax25_in.c | ax25->condition &= ~ACK_PENDING_CONDITION; |
ax25 | 794 | net/ax25/ax25_in.c | ax25_establish_data_link(ax25); |
ax25 | 795 | net/ax25/ax25_in.c | ax25->state = AX25_STATE_1; |
ax25 | 808 | net/ax25/ax25_in.c | int ax25_process_rx_frame(ax25_cb *ax25, struct sk_buff *skb, int type, int dama) |
ax25 | 812 | net/ax25/ax25_in.c | if (ax25->sk != NULL && ax25->state == AX25_STATE_0 && ax25->sk->dead) |
ax25 | 815 | net/ax25/ax25_in.c | if (ax25->state != AX25_STATE_1 && ax25->state != AX25_STATE_2 && |
ax25 | 816 | net/ax25/ax25_in.c | ax25->state != AX25_STATE_3 && ax25->state != AX25_STATE_4) { |
ax25 | 817 | net/ax25/ax25_in.c | printk("ax25_process_rx_frame: frame received - state = %d\n", ax25->state); |
ax25 | 821 | net/ax25/ax25_in.c | del_timer(&ax25->timer); |
ax25 | 823 | net/ax25/ax25_in.c | frametype = ax25_decode(ax25, skb, &ns, &nr, &pf); |
ax25 | 825 | net/ax25/ax25_in.c | switch (ax25->state) { |
ax25 | 827 | net/ax25/ax25_in.c | queued = ax25_state1_machine(ax25, skb, frametype, pf, type, dama); |
ax25 | 830 | net/ax25/ax25_in.c | queued = ax25_state2_machine(ax25, skb, frametype, pf, type); |
ax25 | 833 | net/ax25/ax25_in.c | queued = ax25_state3_machine(ax25, skb, frametype, ns, nr, pf, type, dama); |
ax25 | 836 | net/ax25/ax25_in.c | queued = ax25_state4_machine(ax25, skb, frametype, ns, nr, pf, type, dama); |
ax25 | 840 | net/ax25/ax25_in.c | ax25_set_timer(ax25); |
ax25 | 60 | net/ax25/ax25_out.c | void ax25_output(ax25_cb *ax25, struct sk_buff *skb) |
ax25 | 74 | net/ax25/ax25_out.c | mtu = ax25->paclen; |
ax25 | 135 | net/ax25/ax25_out.c | skb_queue_tail(&ax25->write_queue, skbn); /* Throw it on the queue */ |
ax25 | 141 | net/ax25/ax25_out.c | skb_queue_tail(&ax25->write_queue, skb); /* Throw it on the queue */ |
ax25 | 144 | net/ax25/ax25_out.c | if (ax25->state == AX25_STATE_3 || ax25->state == AX25_STATE_4) { |
ax25 | 145 | net/ax25/ax25_out.c | if (!ax25->dama_slave) /* bke 960114: we aren't allowed to transmit */ |
ax25 | 146 | net/ax25/ax25_out.c | ax25_kick(ax25); /* in DAMA mode unless we received a Poll */ |
ax25 | 154 | net/ax25/ax25_out.c | static void ax25_send_iframe(ax25_cb *ax25, struct sk_buff *skb, int poll_bit) |
ax25 | 161 | net/ax25/ax25_out.c | if (ax25->modulus == MODULUS) { |
ax25 | 166 | net/ax25/ax25_out.c | *frame |= (ax25->vr << 5); |
ax25 | 167 | net/ax25/ax25_out.c | *frame |= (ax25->vs << 1); |
ax25 | 172 | net/ax25/ax25_out.c | frame[0] |= (ax25->vs << 1); |
ax25 | 174 | net/ax25/ax25_out.c | frame[1] |= (ax25->vr << 1); |
ax25 | 177 | net/ax25/ax25_out.c | ax25_transmit_buffer(ax25, skb, C_COMMAND); |
ax25 | 180 | net/ax25/ax25_out.c | void ax25_kick(ax25_cb *ax25) |
ax25 | 186 | net/ax25/ax25_out.c | del_timer(&ax25->timer); |
ax25 | 188 | net/ax25/ax25_out.c | start = (skb_peek(&ax25->ack_queue) == NULL) ? ax25->va : ax25->vs; |
ax25 | 189 | net/ax25/ax25_out.c | end = (ax25->va + ax25->window) % ax25->modulus; |
ax25 | 191 | net/ax25/ax25_out.c | if (!(ax25->condition & PEER_RX_BUSY_CONDITION) && |
ax25 | 193 | net/ax25/ax25_out.c | skb_peek(&ax25->write_queue) != NULL) { |
ax25 | 195 | net/ax25/ax25_out.c | ax25->vs = start; |
ax25 | 206 | net/ax25/ax25_out.c | skb = skb_dequeue(&ax25->write_queue); |
ax25 | 210 | net/ax25/ax25_out.c | skb_queue_head(&ax25->write_queue, skb); |
ax25 | 214 | net/ax25/ax25_out.c | next = (ax25->vs + 1) % ax25->modulus; |
ax25 | 216 | net/ax25/ax25_out.c | last = (next == end) || skb_peek(&ax25->write_queue) == NULL; |
ax25 | 225 | net/ax25/ax25_out.c | ax25_send_iframe(ax25, skbn, (last && !ax25->dama_slave) ? POLLON : POLLOFF); |
ax25 | 227 | net/ax25/ax25_out.c | ax25->vs = next; |
ax25 | 232 | net/ax25/ax25_out.c | skb_queue_tail(&ax25->ack_queue, skb); |
ax25 | 236 | net/ax25/ax25_out.c | } while (!last && (skb = skb_dequeue(&ax25->write_queue)) != NULL); |
ax25 | 238 | net/ax25/ax25_out.c | ax25->condition &= ~ACK_PENDING_CONDITION; |
ax25 | 240 | net/ax25/ax25_out.c | if (ax25->t1timer == 0) { |
ax25 | 241 | net/ax25/ax25_out.c | ax25->t3timer = 0; |
ax25 | 242 | net/ax25/ax25_out.c | ax25->t1timer = ax25->t1 = ax25_calculate_t1(ax25); |
ax25 | 246 | net/ax25/ax25_out.c | ax25_set_timer(ax25); |
ax25 | 249 | net/ax25/ax25_out.c | void ax25_transmit_buffer(ax25_cb *ax25, struct sk_buff *skb, int type) |
ax25 | 253 | net/ax25/ax25_out.c | if (ax25->device == NULL) { |
ax25 | 254 | net/ax25/ax25_out.c | if (ax25->sk != NULL) { |
ax25 | 255 | net/ax25/ax25_out.c | ax25->sk->state = TCP_CLOSE; |
ax25 | 256 | net/ax25/ax25_out.c | ax25->sk->err = ENETUNREACH; |
ax25 | 257 | net/ax25/ax25_out.c | if (!ax25->sk->dead) |
ax25 | 258 | net/ax25/ax25_out.c | ax25->sk->state_change(ax25->sk); |
ax25 | 259 | net/ax25/ax25_out.c | ax25->sk->dead = 1; |
ax25 | 264 | net/ax25/ax25_out.c | if (skb_headroom(skb) < size_ax25_addr(ax25->digipeat)) { |
ax25 | 271 | net/ax25/ax25_out.c | ptr = skb_push(skb, size_ax25_addr(ax25->digipeat)); |
ax25 | 272 | net/ax25/ax25_out.c | build_ax25_addr(ptr, &ax25->source_addr, &ax25->dest_addr, ax25->digipeat, type, ax25->modulus); |
ax25 | 276 | net/ax25/ax25_out.c | ax25_queue_xmit(skb, ax25->device, SOPRI_NORMAL); |
ax25 | 284 | net/ax25/ax25_out.c | void ax25_nr_error_recovery(ax25_cb *ax25) |
ax25 | 286 | net/ax25/ax25_out.c | ax25_establish_data_link(ax25); |
ax25 | 289 | net/ax25/ax25_out.c | void ax25_establish_data_link(ax25_cb *ax25) |
ax25 | 291 | net/ax25/ax25_out.c | ax25->condition = 0x00; |
ax25 | 292 | net/ax25/ax25_out.c | ax25->n2count = 0; |
ax25 | 294 | net/ax25/ax25_out.c | if (ax25->modulus == MODULUS) { |
ax25 | 295 | net/ax25/ax25_out.c | ax25_send_control(ax25, SABM, POLLON, C_COMMAND); |
ax25 | 297 | net/ax25/ax25_out.c | ax25_send_control(ax25, SABME, POLLON, C_COMMAND); |
ax25 | 300 | net/ax25/ax25_out.c | ax25->t3timer = 0; |
ax25 | 301 | net/ax25/ax25_out.c | ax25->t2timer = 0; |
ax25 | 302 | net/ax25/ax25_out.c | ax25->t1timer = ax25->t1 = ax25_calculate_t1(ax25); |
ax25 | 305 | net/ax25/ax25_out.c | void ax25_transmit_enquiry(ax25_cb *ax25) |
ax25 | 307 | net/ax25/ax25_out.c | if (ax25->condition & OWN_RX_BUSY_CONDITION) |
ax25 | 308 | net/ax25/ax25_out.c | ax25_send_control(ax25, RNR, POLLON, C_COMMAND); |
ax25 | 310 | net/ax25/ax25_out.c | ax25_send_control(ax25, RR, POLLON, C_COMMAND); |
ax25 | 312 | net/ax25/ax25_out.c | ax25->condition &= ~ACK_PENDING_CONDITION; |
ax25 | 314 | net/ax25/ax25_out.c | ax25->t1timer = ax25->t1 = ax25_calculate_t1(ax25); |
ax25 | 317 | net/ax25/ax25_out.c | void ax25_enquiry_response(ax25_cb *ax25) |
ax25 | 319 | net/ax25/ax25_out.c | if (ax25->condition & OWN_RX_BUSY_CONDITION) |
ax25 | 320 | net/ax25/ax25_out.c | ax25_send_control(ax25, RNR, POLLON, C_RESPONSE); |
ax25 | 322 | net/ax25/ax25_out.c | ax25_send_control(ax25, RR, POLLON, C_RESPONSE); |
ax25 | 324 | net/ax25/ax25_out.c | ax25->condition &= ~ACK_PENDING_CONDITION; |
ax25 | 327 | net/ax25/ax25_out.c | void ax25_timeout_response(ax25_cb *ax25) |
ax25 | 329 | net/ax25/ax25_out.c | if (ax25->condition & OWN_RX_BUSY_CONDITION) |
ax25 | 330 | net/ax25/ax25_out.c | ax25_send_control(ax25, RNR, POLLOFF, C_RESPONSE); |
ax25 | 332 | net/ax25/ax25_out.c | ax25_send_control(ax25, RR, POLLOFF, C_RESPONSE); |
ax25 | 334 | net/ax25/ax25_out.c | ax25->condition &= ~ACK_PENDING_CONDITION; |
ax25 | 337 | net/ax25/ax25_out.c | void ax25_check_iframes_acked(ax25_cb *ax25, unsigned short nr) |
ax25 | 339 | net/ax25/ax25_out.c | if (ax25->vs == nr) { |
ax25 | 340 | net/ax25/ax25_out.c | ax25_frames_acked(ax25, nr); |
ax25 | 341 | net/ax25/ax25_out.c | ax25_calculate_rtt(ax25); |
ax25 | 342 | net/ax25/ax25_out.c | ax25->t1timer = 0; |
ax25 | 343 | net/ax25/ax25_out.c | ax25->t3timer = ax25->t3; |
ax25 | 345 | net/ax25/ax25_out.c | if (ax25->va != nr) { |
ax25 | 346 | net/ax25/ax25_out.c | ax25_frames_acked(ax25, nr); |
ax25 | 347 | net/ax25/ax25_out.c | ax25->t1timer = ax25->t1 = ax25_calculate_t1(ax25); |
ax25 | 356 | net/ax25/ax25_out.c | void ax25_check_need_response(ax25_cb *ax25, int type, int pf) |
ax25 | 358 | net/ax25/ax25_out.c | if (!ax25->dama_slave && type == C_COMMAND && pf) |
ax25 | 359 | net/ax25/ax25_out.c | ax25_enquiry_response(ax25); |
ax25 | 365 | net/ax25/ax25_out.c | void dama_enquiry_response(ax25_cb *ax25) |
ax25 | 369 | net/ax25/ax25_out.c | if (!(ax25->condition & PEER_RX_BUSY_CONDITION)) { |
ax25 | 370 | net/ax25/ax25_out.c | ax25_requeue_frames(ax25); |
ax25 | 371 | net/ax25/ax25_out.c | ax25_kick(ax25); |
ax25 | 374 | net/ax25/ax25_out.c | if (ax25->state == AX25_STATE_1 || ax25->state == AX25_STATE_2 || |
ax25 | 375 | net/ax25/ax25_out.c | skb_peek(&ax25->ack_queue) != NULL) { |
ax25 | 376 | net/ax25/ax25_out.c | ax25_t1_timeout(ax25); |
ax25 | 378 | net/ax25/ax25_out.c | ax25->n2count = 0; |
ax25 | 381 | net/ax25/ax25_out.c | ax25->t3timer = ax25->t3; |
ax25 | 391 | net/ax25/ax25_out.c | if (ax25->condition & REJECT_CONDITION) |
ax25 | 392 | net/ax25/ax25_out.c | ax25_send_control(ax25, REJ, POLLOFF, C_RESPONSE); |
ax25 | 395 | net/ax25/ax25_out.c | ax25_enquiry_response(ax25); |
ax25 | 402 | net/ax25/ax25_out.c | if (ax25o->device != ax25->device) |
ax25 | 429 | net/ax25/ax25_out.c | void dama_check_need_response(ax25_cb *ax25, int type, int pf) |
ax25 | 431 | net/ax25/ax25_out.c | if (ax25->dama_slave && type == C_COMMAND && pf) |
ax25 | 432 | net/ax25/ax25_out.c | dama_enquiry_response(ax25); |
ax25 | 435 | net/ax25/ax25_out.c | void dama_establish_data_link(ax25_cb *ax25) |
ax25 | 437 | net/ax25/ax25_out.c | ax25->condition = 0x00; |
ax25 | 438 | net/ax25/ax25_out.c | ax25->n2count = 0; |
ax25 | 440 | net/ax25/ax25_out.c | ax25->t3timer = 0; |
ax25 | 441 | net/ax25/ax25_out.c | ax25->t2timer = 0; |
ax25 | 442 | net/ax25/ax25_out.c | ax25->t1timer = ax25->t1 = ax25_calculate_t1(ax25); |
ax25 | 528 | net/ax25/ax25_route.c | int ax25_rt_autobind(ax25_cb *ax25, ax25_address *addr) |
ax25 | 539 | net/ax25/ax25_route.c | if (ax25->device == NULL) |
ax25 | 541 | net/ax25/ax25_route.c | call = (ax25_address *)ax25->device->dev_addr; |
ax25 | 544 | net/ax25/ax25_route.c | ax25->source_addr = *call; |
ax25 | 547 | net/ax25/ax25_route.c | if ((ax25->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) |
ax25 | 549 | net/ax25/ax25_route.c | *ax25->digipeat = *ax25_rt->digipeat; |
ax25 | 550 | net/ax25/ax25_route.c | ax25_adjust_path(addr, ax25->digipeat); |
ax25 | 553 | net/ax25/ax25_route.c | if (ax25->sk != NULL) |
ax25 | 554 | net/ax25/ax25_route.c | ax25->sk->zapped = 0; |
ax25 | 563 | net/ax25/ax25_route.c | void ax25_rt_build_path(ax25_cb *ax25, ax25_address *addr) |
ax25 | 572 | net/ax25/ax25_route.c | if ((ax25->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) |
ax25 | 575 | net/ax25/ax25_route.c | ax25->device = ax25_rt->dev; |
ax25 | 576 | net/ax25/ax25_route.c | *ax25->digipeat = *ax25_rt->digipeat; |
ax25 | 577 | net/ax25/ax25_route.c | ax25_adjust_path(addr, ax25->digipeat); |
ax25 | 61 | net/ax25/ax25_subr.c | void ax25_clear_queues(ax25_cb *ax25) |
ax25 | 65 | net/ax25/ax25_subr.c | while ((skb = skb_dequeue(&ax25->write_queue)) != NULL) { |
ax25 | 70 | net/ax25/ax25_subr.c | while ((skb = skb_dequeue(&ax25->ack_queue)) != NULL) { |
ax25 | 75 | net/ax25/ax25_subr.c | while ((skb = skb_dequeue(&ax25->reseq_queue)) != NULL) { |
ax25 | 79 | net/ax25/ax25_subr.c | while ((skb = skb_dequeue(&ax25->frag_queue)) != NULL) { |
ax25 | 89 | net/ax25/ax25_subr.c | void ax25_frames_acked(ax25_cb *ax25, unsigned short nr) |
ax25 | 96 | net/ax25/ax25_subr.c | if (ax25->va != nr) { |
ax25 | 97 | net/ax25/ax25_subr.c | while (skb_peek(&ax25->ack_queue) != NULL && ax25->va != nr) { |
ax25 | 98 | net/ax25/ax25_subr.c | skb = skb_dequeue(&ax25->ack_queue); |
ax25 | 101 | net/ax25/ax25_subr.c | ax25->va = (ax25->va + 1) % ax25->modulus; |
ax25 | 102 | net/ax25/ax25_subr.c | if (ax25->dama_slave) /* dl1bke 960120 */ |
ax25 | 103 | net/ax25/ax25_subr.c | ax25->n2count = 0; |
ax25 | 112 | net/ax25/ax25_subr.c | void ax25_requeue_frames(ax25_cb *ax25) |
ax25 | 121 | net/ax25/ax25_subr.c | while ((skb = skb_dequeue(&ax25->ack_queue)) != NULL) { |
ax25 | 123 | net/ax25/ax25_subr.c | skb_queue_head(&ax25->write_queue, skb); |
ax25 | 134 | net/ax25/ax25_subr.c | int ax25_validate_nr(ax25_cb *ax25, unsigned short nr) |
ax25 | 136 | net/ax25/ax25_subr.c | unsigned short vc = ax25->va; |
ax25 | 138 | net/ax25/ax25_subr.c | while (vc != ax25->vs) { |
ax25 | 140 | net/ax25/ax25_subr.c | vc = (vc + 1) % ax25->modulus; |
ax25 | 143 | net/ax25/ax25_subr.c | if (nr == ax25->vs) return 1; |
ax25 | 152 | net/ax25/ax25_subr.c | int ax25_decode(ax25_cb *ax25, struct sk_buff *skb, int *ns, int *nr, int *pf) |
ax25 | 160 | net/ax25/ax25_subr.c | if (ax25->modulus == MODULUS) { |
ax25 | 202 | net/ax25/ax25_subr.c | void ax25_send_control(ax25_cb *ax25, int frametype, int poll_bit, int type) |
ax25 | 208 | net/ax25/ax25_subr.c | if ((dev = ax25->device) == NULL) |
ax25 | 211 | net/ax25/ax25_subr.c | if ((skb = alloc_skb(AX25_BPQ_HEADER_LEN + size_ax25_addr(ax25->digipeat) + 2, GFP_ATOMIC)) == NULL) |
ax25 | 214 | net/ax25/ax25_subr.c | skb_reserve(skb, AX25_BPQ_HEADER_LEN + size_ax25_addr(ax25->digipeat)); |
ax25 | 216 | net/ax25/ax25_subr.c | if (ax25->sk != NULL) { |
ax25 | 217 | net/ax25/ax25_subr.c | skb->sk = ax25->sk; |
ax25 | 218 | net/ax25/ax25_subr.c | atomic_add(skb->truesize, &ax25->sk->wmem_alloc); |
ax25 | 222 | net/ax25/ax25_subr.c | if (ax25->modulus == MODULUS) { |
ax25 | 227 | net/ax25/ax25_subr.c | *dptr |= (ax25->vr << 5); |
ax25 | 236 | net/ax25/ax25_subr.c | dptr[1] = (ax25->vr << 1); |
ax25 | 243 | net/ax25/ax25_subr.c | ax25_transmit_buffer(ax25, skb, type); |
ax25 | 288 | net/ax25/ax25_subr.c | unsigned short ax25_calculate_t1(ax25_cb *ax25) |
ax25 | 292 | net/ax25/ax25_subr.c | if (ax25->backoff) { |
ax25 | 293 | net/ax25/ax25_subr.c | for (n = 0; n < ax25->n2count; n++) |
ax25 | 299 | net/ax25/ax25_subr.c | return t * ax25->rtt; |
ax25 | 305 | net/ax25/ax25_subr.c | void ax25_calculate_rtt(ax25_cb *ax25) |
ax25 | 307 | net/ax25/ax25_subr.c | if (ax25->t1timer > 0 && ax25->n2count == 0) |
ax25 | 308 | net/ax25/ax25_subr.c | ax25->rtt = (9 * ax25->rtt + ax25->t1 - ax25->t1timer) / 10; |
ax25 | 312 | net/ax25/ax25_subr.c | if (ax25->rtt < (AX25_T1CLAMPLO)) |
ax25 | 313 | net/ax25/ax25_subr.c | ax25->rtt = (AX25_T1CLAMPLO); |
ax25 | 315 | net/ax25/ax25_subr.c | if (ax25->rtt == 0) |
ax25 | 316 | net/ax25/ax25_subr.c | ax25->rtt = PR_SLOWHZ; |
ax25 | 320 | net/ax25/ax25_subr.c | if (ax25->rtt > (AX25_T1CLAMPHI)) |
ax25 | 321 | net/ax25/ax25_subr.c | ax25->rtt = (AX25_T1CLAMPHI); |
ax25 | 485 | net/ax25/ax25_subr.c | void ax25_kiss_cmd(ax25_cb *ax25, unsigned char cmd, unsigned char param) |
ax25 | 490 | net/ax25/ax25_subr.c | if (ax25->device == NULL) |
ax25 | 499 | net/ax25/ax25_subr.c | if (ax25->sk != NULL) { |
ax25 | 500 | net/ax25/ax25_subr.c | skb->sk = ax25->sk; |
ax25 | 501 | net/ax25/ax25_subr.c | atomic_add(skb->truesize, &ax25->sk->wmem_alloc); |
ax25 | 511 | net/ax25/ax25_subr.c | dev_queue_xmit(skb, ax25->device, SOPRI_NORMAL); |
ax25 | 514 | net/ax25/ax25_subr.c | void ax25_dama_on(ax25_cb *ax25) |
ax25 | 516 | net/ax25/ax25_subr.c | if (ax25_dev_is_dama_slave(ax25->device) == 0) { |
ax25 | 517 | net/ax25/ax25_subr.c | if (ax25->sk != NULL && ax25->sk->debug) |
ax25 | 519 | net/ax25/ax25_subr.c | ax25_kiss_cmd(ax25, 5, 1); |
ax25 | 523 | net/ax25/ax25_subr.c | void ax25_dama_off(ax25_cb *ax25) |
ax25 | 525 | net/ax25/ax25_subr.c | if (ax25->dama_slave == 0) |
ax25 | 528 | net/ax25/ax25_subr.c | ax25->dama_slave = 0; |
ax25 | 529 | net/ax25/ax25_subr.c | if (ax25_dev_is_dama_slave(ax25->device) == 0) { |
ax25 | 530 | net/ax25/ax25_subr.c | if (ax25->sk != NULL && ax25->sk->debug) |
ax25 | 532 | net/ax25/ax25_subr.c | ax25_kiss_cmd(ax25, 5, 0); |
ax25 | 54 | net/ax25/ax25_timer.c | void ax25_set_timer(ax25_cb *ax25) |
ax25 | 60 | net/ax25/ax25_timer.c | del_timer(&ax25->timer); |
ax25 | 63 | net/ax25/ax25_timer.c | ax25->timer.next = ax25->timer.prev = NULL; |
ax25 | 64 | net/ax25/ax25_timer.c | ax25->timer.data = (unsigned long)ax25; |
ax25 | 65 | net/ax25/ax25_timer.c | ax25->timer.function = &ax25_timer; |
ax25 | 67 | net/ax25/ax25_timer.c | ax25->timer.expires = jiffies + 10; |
ax25 | 68 | net/ax25/ax25_timer.c | add_timer(&ax25->timer); |
ax25 | 71 | net/ax25/ax25_timer.c | static void ax25_reset_timer(ax25_cb *ax25) |
ax25 | 77 | net/ax25/ax25_timer.c | del_timer(&ax25->timer); |
ax25 | 80 | net/ax25/ax25_timer.c | ax25->timer.data = (unsigned long)ax25; |
ax25 | 81 | net/ax25/ax25_timer.c | ax25->timer.function = &ax25_timer; |
ax25 | 82 | net/ax25/ax25_timer.c | ax25->timer.expires = jiffies + 10; |
ax25 | 83 | net/ax25/ax25_timer.c | add_timer(&ax25->timer); |
ax25 | 94 | net/ax25/ax25_timer.c | ax25_cb *ax25 = (ax25_cb *)param; |
ax25 | 96 | net/ax25/ax25_timer.c | switch (ax25->state) { |
ax25 | 100 | net/ax25/ax25_timer.c | if (ax25->sk == NULL || ax25->sk->destroy || (ax25->sk->state == TCP_LISTEN && ax25->sk->dead)) { |
ax25 | 101 | net/ax25/ax25_timer.c | del_timer(&ax25->timer); |
ax25 | 102 | net/ax25/ax25_timer.c | ax25_destroy_socket(ax25); |
ax25 | 112 | net/ax25/ax25_timer.c | if (ax25->sk != NULL) { |
ax25 | 113 | net/ax25/ax25_timer.c | if (ax25->sk->rmem_alloc < (ax25->sk->rcvbuf / 2) && (ax25->condition & OWN_RX_BUSY_CONDITION)) { |
ax25 | 114 | net/ax25/ax25_timer.c | ax25->condition &= ~OWN_RX_BUSY_CONDITION; |
ax25 | 115 | net/ax25/ax25_timer.c | if (!ax25->dama_slave) /* dl1bke */ |
ax25 | 116 | net/ax25/ax25_timer.c | ax25_send_control(ax25, RR, POLLOFF, C_RESPONSE); |
ax25 | 117 | net/ax25/ax25_timer.c | ax25->condition &= ~ACK_PENDING_CONDITION; |
ax25 | 124 | net/ax25/ax25_timer.c | if (!ax25->dama_slave) |
ax25 | 125 | net/ax25/ax25_timer.c | ax25_kick(ax25); /* dl1bke 960114 */ |
ax25 | 132 | net/ax25/ax25_timer.c | if (ax25->t2timer > 0 && --ax25->t2timer == 0) { |
ax25 | 133 | net/ax25/ax25_timer.c | if (ax25->state == AX25_STATE_3 || ax25->state == AX25_STATE_4) { |
ax25 | 134 | net/ax25/ax25_timer.c | if (ax25->condition & ACK_PENDING_CONDITION) { |
ax25 | 135 | net/ax25/ax25_timer.c | ax25->condition &= ~ACK_PENDING_CONDITION; |
ax25 | 136 | net/ax25/ax25_timer.c | if (!ax25->dama_slave) /* dl1bke 960114 */ |
ax25 | 137 | net/ax25/ax25_timer.c | ax25_timeout_response(ax25); |
ax25 | 142 | net/ax25/ax25_timer.c | if (ax25->t3timer > 0 && --ax25->t3timer == 0) { |
ax25 | 145 | net/ax25/ax25_timer.c | if (ax25->dama_slave) { |
ax25 | 147 | net/ax25/ax25_timer.c | nr_link_failed(&ax25->dest_addr, ax25->device); |
ax25 | 149 | net/ax25/ax25_timer.c | ax25_clear_queues(ax25); |
ax25 | 150 | net/ax25/ax25_timer.c | ax25_send_control(ax25, DISC, POLLON, C_COMMAND); |
ax25 | 152 | net/ax25/ax25_timer.c | ax25->state = AX25_STATE_0; |
ax25 | 153 | net/ax25/ax25_timer.c | if (ax25->sk != NULL) { |
ax25 | 154 | net/ax25/ax25_timer.c | if (ax25->sk->debug) |
ax25 | 156 | net/ax25/ax25_timer.c | ax25->sk->state = TCP_CLOSE; |
ax25 | 157 | net/ax25/ax25_timer.c | ax25->sk->err = ETIMEDOUT; |
ax25 | 158 | net/ax25/ax25_timer.c | if (!ax25->sk->dead) |
ax25 | 159 | net/ax25/ax25_timer.c | ax25->sk->state_change(ax25->sk); |
ax25 | 160 | net/ax25/ax25_timer.c | ax25->sk->dead = 1; |
ax25 | 163 | net/ax25/ax25_timer.c | ax25_reset_timer(ax25); |
ax25 | 167 | net/ax25/ax25_timer.c | if (ax25->state == AX25_STATE_3) { |
ax25 | 168 | net/ax25/ax25_timer.c | ax25->n2count = 0; |
ax25 | 169 | net/ax25/ax25_timer.c | ax25_transmit_enquiry(ax25); |
ax25 | 170 | net/ax25/ax25_timer.c | ax25->state = AX25_STATE_4; |
ax25 | 172 | net/ax25/ax25_timer.c | ax25->t3timer = ax25->t3; |
ax25 | 175 | net/ax25/ax25_timer.c | if (ax25->idletimer > 0 && --ax25->idletimer == 0) { |
ax25 | 180 | net/ax25/ax25_timer.c | ax25_clear_queues(ax25); |
ax25 | 182 | net/ax25/ax25_timer.c | ax25->n2count = 0; |
ax25 | 183 | net/ax25/ax25_timer.c | if (!ax25->dama_slave) |
ax25 | 184 | net/ax25/ax25_timer.c | ax25_send_control(ax25, DISC, POLLON, C_COMMAND); |
ax25 | 188 | net/ax25/ax25_timer.c | if (ax25->state == AX25_STATE_1 || ax25->state == AX25_STATE_2) |
ax25 | 189 | net/ax25/ax25_timer.c | ax25->state = AX25_STATE_0; |
ax25 | 191 | net/ax25/ax25_timer.c | ax25->state = AX25_STATE_2; |
ax25 | 193 | net/ax25/ax25_timer.c | ax25->t3timer = 0; |
ax25 | 194 | net/ax25/ax25_timer.c | ax25->t1timer = ax25->t1 = ax25_calculate_t1(ax25); |
ax25 | 196 | net/ax25/ax25_timer.c | if (ax25->sk != NULL) |
ax25 | 198 | net/ax25/ax25_timer.c | ax25->sk->state = TCP_CLOSE; |
ax25 | 199 | net/ax25/ax25_timer.c | ax25->sk->err = 0; |
ax25 | 200 | net/ax25/ax25_timer.c | if (!ax25->sk->dead) |
ax25 | 201 | net/ax25/ax25_timer.c | ax25->sk->state_change(ax25->sk); |
ax25 | 202 | net/ax25/ax25_timer.c | ax25->sk->dead = 1; |
ax25 | 203 | net/ax25/ax25_timer.c | ax25->sk->destroy = 1; |
ax25 | 211 | net/ax25/ax25_timer.c | if (ax25->t1timer == 0 || --ax25->t1timer > 0) { |
ax25 | 212 | net/ax25/ax25_timer.c | ax25_reset_timer(ax25); |
ax25 | 216 | net/ax25/ax25_timer.c | if (!ax25_dev_is_dama_slave(ax25->device)) { |
ax25 | 217 | net/ax25/ax25_timer.c | if (ax25->dama_slave) |
ax25 | 218 | net/ax25/ax25_timer.c | ax25->dama_slave = 0; |
ax25 | 219 | net/ax25/ax25_timer.c | ax25_t1_timeout(ax25); |
ax25 | 232 | net/ax25/ax25_timer.c | void ax25_t1_timeout(ax25_cb * ax25) |
ax25 | 234 | net/ax25/ax25_timer.c | switch (ax25->state) { |
ax25 | 236 | net/ax25/ax25_timer.c | if (ax25->n2count == ax25->n2) { |
ax25 | 237 | net/ax25/ax25_timer.c | if (ax25->modulus == MODULUS) { |
ax25 | 239 | net/ax25/ax25_timer.c | nr_link_failed(&ax25->dest_addr, ax25->device); |
ax25 | 241 | net/ax25/ax25_timer.c | ax25_clear_queues(ax25); |
ax25 | 242 | net/ax25/ax25_timer.c | ax25->state = AX25_STATE_0; |
ax25 | 243 | net/ax25/ax25_timer.c | if (ax25->sk != NULL) { |
ax25 | 244 | net/ax25/ax25_timer.c | ax25->sk->state = TCP_CLOSE; |
ax25 | 245 | net/ax25/ax25_timer.c | ax25->sk->err = ETIMEDOUT; |
ax25 | 246 | net/ax25/ax25_timer.c | if (!ax25->sk->dead) |
ax25 | 247 | net/ax25/ax25_timer.c | ax25->sk->state_change(ax25->sk); |
ax25 | 248 | net/ax25/ax25_timer.c | ax25->sk->dead = 1; |
ax25 | 251 | net/ax25/ax25_timer.c | ax25->modulus = MODULUS; |
ax25 | 252 | net/ax25/ax25_timer.c | ax25->window = ax25_dev_get_value(ax25->device, AX25_VALUES_WINDOW); |
ax25 | 253 | net/ax25/ax25_timer.c | ax25->n2count = 0; |
ax25 | 254 | net/ax25/ax25_timer.c | ax25_send_control(ax25, SABM, ax25_dev_is_dama_slave(ax25->device)? POLLOFF : POLLON, C_COMMAND); |
ax25 | 257 | net/ax25/ax25_timer.c | ax25->n2count++; |
ax25 | 258 | net/ax25/ax25_timer.c | if (ax25->modulus == MODULUS) { |
ax25 | 259 | net/ax25/ax25_timer.c | ax25_send_control(ax25, SABM, ax25_dev_is_dama_slave(ax25->device)? POLLOFF : POLLON, C_COMMAND); |
ax25 | 261 | net/ax25/ax25_timer.c | ax25_send_control(ax25, SABME, ax25_dev_is_dama_slave(ax25->device)? POLLOFF : POLLON, C_COMMAND); |
ax25 | 267 | net/ax25/ax25_timer.c | if (ax25->n2count == ax25->n2) { |
ax25 | 269 | net/ax25/ax25_timer.c | nr_link_failed(&ax25->dest_addr, ax25->device); |
ax25 | 271 | net/ax25/ax25_timer.c | ax25_clear_queues(ax25); |
ax25 | 272 | net/ax25/ax25_timer.c | ax25->state = AX25_STATE_0; |
ax25 | 273 | net/ax25/ax25_timer.c | ax25_send_control(ax25, DISC, POLLON, C_COMMAND); /* dl1bke */ |
ax25 | 275 | net/ax25/ax25_timer.c | if (ax25->sk != NULL) { |
ax25 | 276 | net/ax25/ax25_timer.c | ax25->sk->state = TCP_CLOSE; |
ax25 | 277 | net/ax25/ax25_timer.c | ax25->sk->err = ETIMEDOUT; |
ax25 | 278 | net/ax25/ax25_timer.c | if (!ax25->sk->dead) |
ax25 | 279 | net/ax25/ax25_timer.c | ax25->sk->state_change(ax25->sk); |
ax25 | 280 | net/ax25/ax25_timer.c | ax25->sk->dead = 1; |
ax25 | 283 | net/ax25/ax25_timer.c | ax25->n2count++; |
ax25 | 284 | net/ax25/ax25_timer.c | if (!ax25_dev_is_dama_slave(ax25->device)) /* dl1bke */ |
ax25 | 285 | net/ax25/ax25_timer.c | ax25_send_control(ax25, DISC, POLLON, C_COMMAND); |
ax25 | 290 | net/ax25/ax25_timer.c | ax25->n2count = 1; |
ax25 | 291 | net/ax25/ax25_timer.c | if (!ax25->dama_slave) /* dl1bke 960114 */ |
ax25 | 292 | net/ax25/ax25_timer.c | ax25_transmit_enquiry(ax25); |
ax25 | 293 | net/ax25/ax25_timer.c | ax25->state = AX25_STATE_4; |
ax25 | 297 | net/ax25/ax25_timer.c | if (ax25->n2count == ax25->n2) { |
ax25 | 299 | net/ax25/ax25_timer.c | nr_link_failed(&ax25->dest_addr, ax25->device); |
ax25 | 301 | net/ax25/ax25_timer.c | ax25_clear_queues(ax25); |
ax25 | 302 | net/ax25/ax25_timer.c | ax25_send_control(ax25, DM, POLLON, C_RESPONSE); |
ax25 | 303 | net/ax25/ax25_timer.c | ax25->state = AX25_STATE_0; |
ax25 | 304 | net/ax25/ax25_timer.c | if (ax25->sk != NULL) { |
ax25 | 305 | net/ax25/ax25_timer.c | if (ax25->sk->debug) |
ax25 | 307 | net/ax25/ax25_timer.c | ax25->sk->state = TCP_CLOSE; |
ax25 | 308 | net/ax25/ax25_timer.c | ax25->sk->err = ETIMEDOUT; |
ax25 | 309 | net/ax25/ax25_timer.c | if (!ax25->sk->dead) |
ax25 | 310 | net/ax25/ax25_timer.c | ax25->sk->state_change(ax25->sk); |
ax25 | 311 | net/ax25/ax25_timer.c | ax25->sk->dead = 1; |
ax25 | 314 | net/ax25/ax25_timer.c | ax25->n2count++; |
ax25 | 315 | net/ax25/ax25_timer.c | if (!ax25->dama_slave) /* dl1bke 960114 */ |
ax25 | 316 | net/ax25/ax25_timer.c | ax25_transmit_enquiry(ax25); |
ax25 | 321 | net/ax25/ax25_timer.c | ax25->t1timer = ax25->t1 = ax25_calculate_t1(ax25); |
ax25 | 323 | 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 | nr_neigh->callsign = *ax25; |
ax25 | 649 | net/netrom/nr_route.c | int nr_route_frame(struct sk_buff *skb, ax25_cb *ax25) |
ax25 | 659 | net/netrom/nr_route.c | if(ax25 && call_in_firewall(PF_NETROM, skb, skb->data)!=FW_ACCEPT) |
ax25 | 661 | net/netrom/nr_route.c | if(!ax25 && call_out_firewall(PF_NETROM, skb, skb->data)!=FW_ACCEPT) |
ax25 | 667 | net/netrom/nr_route.c | if (ax25 != NULL) |
ax25 | 668 | net/netrom/nr_route.c | nr_add_node(nr_src, "", &ax25->dest_addr, ax25->digipeat, ax25->device, 0, nr_default.obs_count); |
ax25 | 673 | net/netrom/nr_route.c | if (!nr_route_on && ax25 != NULL) |
ax25 | 698 | net/netrom/nr_route.c | if(ax25 && call_fw_firewall(PF_NETROM, skb, skb->data)!=FW_ACCEPT) |