taglinefilesource code
ax25155include/net/sock.hax25_cb      *ax25;
ax25164net/ax25/af_ax25.cstatic void ax25_remove_socket(ax25_cb *ax25)
ax25172net/ax25/af_ax25.cif ((s = ax25_list) == ax25) {
ax25179net/ax25/af_ax25.cif (s->next == ax25) {
ax25180net/ax25/af_ax25.cs->next = ax25->next;
ax25230net/ax25/af_ax25.cstatic void ax25_insert_socket(ax25_cb *ax25)
ax25237net/ax25/af_ax25.cax25->next = ax25_list;
ax25238net/ax25/af_ax25.cax25_list  = ax25;
ax25380net/ax25/af_ax25.cvoid ax25_destroy_socket(ax25_cb *ax25)  /* Not static as its used by the timer */
ax25388net/ax25/af_ax25.cdel_timer(&ax25->timer);
ax25390net/ax25/af_ax25.cax25_remove_socket(ax25);
ax25391net/ax25/af_ax25.cax25_clear_tx_queue(ax25);  /* Flush the send queue */
ax25393net/ax25/af_ax25.cif (ax25->sk != NULL) {
ax25394net/ax25/af_ax25.cwhile ((skb = skb_dequeue(&ax25->sk->receive_queue)) != NULL) {
ax25395net/ax25/af_ax25.cif (skb->sk != ax25->sk) {      /* A pending connection */
ax25397net/ax25/af_ax25.cax25_set_timer(skb->sk->ax25);
ax25398net/ax25/af_ax25.cskb->sk->ax25->state = AX25_STATE_0;
ax25405net/ax25/af_ax25.cif (ax25->digipeat != NULL) {
ax25406net/ax25/af_ax25.ckfree_s(ax25->digipeat, sizeof(ax25_digi));
ax25407net/ax25/af_ax25.cax25->digipeat = NULL;
ax25410net/ax25/af_ax25.cif (ax25->sk != NULL) {
ax25411net/ax25/af_ax25.cif (ax25->sk->wmem_alloc || ax25->sk->rmem_alloc) { /* Defer: outstanding buffers */
ax25412net/ax25/af_ax25.cinit_timer(&ax25->timer);
ax25413net/ax25/af_ax25.cax25->timer.expires  = 10 * HZ;
ax25414net/ax25/af_ax25.cax25->timer.function = ax25_destroy_timer;
ax25415net/ax25/af_ax25.cax25->timer.data     = (unsigned long)ax25;
ax25416net/ax25/af_ax25.cadd_timer(&ax25->timer);
ax25418net/ax25/af_ax25.ckfree_s(ax25->sk, sizeof(*ax25->sk));
ax25419net/ax25/af_ax25.ckfree_s(ax25, sizeof(*ax25));
ax25422net/ax25/af_ax25.ckfree_s(ax25, sizeof(*ax25));
ax25499net/ax25/af_ax25.cax25_cb *ax25;
ax25501net/ax25/af_ax25.cif ((ax25 = (ax25_cb *)kmalloc(sizeof(*ax25), GFP_ATOMIC)) == NULL)
ax25504net/ax25/af_ax25.cskb_queue_head_init(&ax25->write_queue);
ax25505net/ax25/af_ax25.cskb_queue_head_init(&ax25->ack_queue);
ax25507net/ax25/af_ax25.cinit_timer(&ax25->timer);
ax25509net/ax25/af_ax25.cax25->rtt     = DEFAULT_T1;
ax25510net/ax25/af_ax25.cax25->t1      = DEFAULT_T1;
ax25511net/ax25/af_ax25.cax25->t2      = DEFAULT_T2;
ax25512net/ax25/af_ax25.cax25->n2      = DEFAULT_N2;
ax25513net/ax25/af_ax25.cax25->t3      = DEFAULT_T3;
ax25515net/ax25/af_ax25.cax25->backoff   = 1;
ax25516net/ax25/af_ax25.cax25->condition = 0x00;
ax25517net/ax25/af_ax25.cax25->t1timer   = 0;
ax25518net/ax25/af_ax25.cax25->t2timer   = 0;
ax25519net/ax25/af_ax25.cax25->t3timer   = 0;
ax25520net/ax25/af_ax25.cax25->n2count   = 0;
ax25522net/ax25/af_ax25.cax25->va      = 0;
ax25523net/ax25/af_ax25.cax25->vr      = 0;
ax25524net/ax25/af_ax25.cax25->vs      = 0;
ax25526net/ax25/af_ax25.cax25->window   = DEFAULT_WINDOW;
ax25527net/ax25/af_ax25.cax25->device   = NULL;
ax25528net/ax25/af_ax25.cax25->digipeat = NULL;
ax25529net/ax25/af_ax25.cax25->sk       = NULL;
ax25531net/ax25/af_ax25.cax25->state    = AX25_STATE_0;
ax25533net/ax25/af_ax25.cmemset(&ax25->dest_addr,   '\0', sizeof(ax25_address));
ax25534net/ax25/af_ax25.cmemset(&ax25->source_addr, '\0', sizeof(ax25_address));
ax25536net/ax25/af_ax25.creturn ax25;
ax25542net/ax25/af_ax25.cax25_cb *ax25;
ax25550net/ax25/af_ax25.cfor (ax25 = ax25_list; ax25 != NULL; ax25 = ax25->next) {
ax25551net/ax25/af_ax25.cif (ax25->sk != NULL && ax25->sk->type != SOCK_SEQPACKET)
ax25554net/ax25/af_ax25.cif (ax25cmp(&ax25->source_addr, src) == 0 && ax25cmp(&ax25->dest_addr, dest) == 0 && ax25->device == dev) {
ax25555net/ax25/af_ax25.cax25_output(ax25, skb);
ax25560net/ax25/af_ax25.cif ((ax25 = ax25_create_cb()) == NULL)
ax25563net/ax25/af_ax25.cax25->device = dev;
ax25565net/ax25/af_ax25.cmemcpy(&ax25->source_addr, src,  sizeof(ax25_address));
ax25566net/ax25/af_ax25.cmemcpy(&ax25->dest_addr,   dest, sizeof(ax25_address));
ax25569net/ax25/af_ax25.cif ((ax25->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) {
ax25570net/ax25/af_ax25.ckfree_s(ax25, sizeof(ax25));
ax25573net/ax25/af_ax25.cmemcpy(ax25->digipeat, digi, sizeof(ax25_digi));
ax25576net/ax25/af_ax25.cax25_establish_data_link(ax25);
ax25577net/ax25/af_ax25.cax25_insert_socket(ax25);
ax25579net/ax25/af_ax25.cax25->state = AX25_STATE_1;
ax25581net/ax25/af_ax25.cax25_set_timer(ax25);
ax25583net/ax25/af_ax25.cax25_output(ax25, skb);
ax25661net/ax25/af_ax25.csk->ax25->window = opt;
ax25667net/ax25/af_ax25.csk->ax25->rtt = (opt * PR_SLOWHZ) / 2;
ax25673net/ax25/af_ax25.csk->ax25->t2 = opt * PR_SLOWHZ;
ax25679net/ax25/af_ax25.csk->ax25->n2 = opt;
ax25685net/ax25/af_ax25.csk->ax25->t3 = opt * PR_SLOWHZ;
ax25689net/ax25/af_ax25.csk->ax25->backoff = opt ? 1 : 0;
ax25714net/ax25/af_ax25.cval = sk->ax25->window;
ax25718net/ax25/af_ax25.cval = sk->ax25->t1 / PR_SLOWHZ;
ax25722net/ax25/af_ax25.cval = sk->ax25->t2 / PR_SLOWHZ;
ax25726net/ax25/af_ax25.cval = sk->ax25->n2;
ax25730net/ax25/af_ax25.cval = sk->ax25->t3 / PR_SLOWHZ;
ax25734net/ax25/af_ax25.cval = sk->ax25->backoff;
ax25782net/ax25/af_ax25.cax25_cb *ax25;
ax25787net/ax25/af_ax25.cif ((ax25 = ax25_create_cb()) == NULL) {
ax25804net/ax25/af_ax25.ckfree_s((void *)ax25, sizeof(*ax25));
ax25844net/ax25/af_ax25.cax25->sk = sk;
ax25845net/ax25/af_ax25.csk->ax25 = ax25;
ax25853net/ax25/af_ax25.cax25_cb *ax25;
ax25858net/ax25/af_ax25.cif ((ax25 = ax25_create_cb()) == NULL) {
ax25874net/ax25/af_ax25.ckfree_s((void *)ax25, sizeof(*ax25));
ax25910net/ax25/af_ax25.cax25->backoff = osk->ax25->backoff;
ax25911net/ax25/af_ax25.cax25->rtt     = osk->ax25->rtt;
ax25912net/ax25/af_ax25.cax25->t1      = osk->ax25->t1;
ax25913net/ax25/af_ax25.cax25->t2      = osk->ax25->t2;
ax25914net/ax25/af_ax25.cax25->t3      = osk->ax25->t3;
ax25915net/ax25/af_ax25.cax25->n2      = osk->ax25->n2;
ax25917net/ax25/af_ax25.cax25->window  = osk->ax25->window;
ax25918net/ax25/af_ax25.cax25->device  = dev;
ax25920net/ax25/af_ax25.cmemcpy(&ax25->source_addr, &osk->ax25->source_addr, sizeof(ax25_address));
ax25922net/ax25/af_ax25.cif (osk->ax25->digipeat != NULL) {
ax25923net/ax25/af_ax25.cif ((ax25->digipeat = (ax25_digi *)kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) {
ax25925net/ax25/af_ax25.ckfree_s(ax25, sizeof(*ax25));
ax25930net/ax25/af_ax25.csk->ax25 = ax25;
ax25931net/ax25/af_ax25.cax25->sk = sk;
ax25950net/ax25/af_ax25.cswitch (sk->ax25->state) {
ax25954net/ax25/af_ax25.cax25_destroy_socket(sk->ax25);
ax25958net/ax25/af_ax25.cax25_send_control(sk->ax25, DISC | PF, C_COMMAND);
ax25959net/ax25/af_ax25.csk->ax25->state = AX25_STATE_0;
ax25962net/ax25/af_ax25.cax25_destroy_socket(sk->ax25);
ax25966net/ax25/af_ax25.cax25_send_control(sk->ax25, DM | PF, C_RESPONSE);
ax25967net/ax25/af_ax25.csk->ax25->state = AX25_STATE_0;
ax25970net/ax25/af_ax25.cax25_destroy_socket(sk->ax25);
ax25975net/ax25/af_ax25.cax25_clear_tx_queue(sk->ax25);
ax25976net/ax25/af_ax25.csk->ax25->n2count = 0;
ax25977net/ax25/af_ax25.cax25_send_control(sk->ax25, DISC | PF, C_COMMAND);
ax25978net/ax25/af_ax25.csk->ax25->t3timer = 0;
ax25979net/ax25/af_ax25.csk->ax25->t1timer = sk->ax25->t1 = ax25_calculate_t1(sk->ax25);
ax25980net/ax25/af_ax25.csk->ax25->state   = AX25_STATE_2;
ax25991net/ax25/af_ax25.cax25_destroy_socket(sk->ax25);
ax251033net/ax25/af_ax25.cmemcpy(&sk->ax25->source_addr, &addr->fsa_ax25.sax25_call, sizeof(ax25_address));
ax251035net/ax25/af_ax25.cmemcpy(&sk->ax25->source_addr, call, sizeof(ax25_address));
ax251051net/ax25/af_ax25.csk->ax25->device = dev;
ax251052net/ax25/af_ax25.cax25_insert_socket(sk->ax25);
ax251100net/ax25/af_ax25.cif (sk->ax25->digipeat == NULL) {
ax251101net/ax25/af_ax25.cif ((sk->ax25->digipeat = (ax25_digi *)kmalloc(sizeof(ax25_digi), GFP_KERNEL)) == NULL)
ax251105net/ax25/af_ax25.csk->ax25->digipeat->ndigi = ndigi;
ax251108net/ax25/af_ax25.csk->ax25->digipeat->repeated[ct] = 0;
ax251109net/ax25/af_ax25.cmemcpy(&sk->ax25->digipeat->calls[ct], &ap[ct], sizeof(ax25_address));
ax251113net/ax25/af_ax25.csk->ax25->digipeat->lastrepeat = 0;
ax251121net/ax25/af_ax25.cif ((err = ax25_rt_autobind(sk->ax25, &addr->sax25_call)) < 0)
ax251123net/ax25/af_ax25.cax25_insert_socket(sk->ax25);    /* Finish the bind */
ax251126net/ax25/af_ax25.cif (sk->type == SOCK_SEQPACKET && ax25_find_cb(&sk->ax25->source_addr, &addr->sax25_call, sk->ax25->device) != NULL)
ax251129net/ax25/af_ax25.cmemcpy(&sk->ax25->dest_addr, &addr->sax25_call, sizeof(ax25_address));
ax251141net/ax25/af_ax25.cax25_establish_data_link(sk->ax25);
ax251142net/ax25/af_ax25.csk->ax25->state     = AX25_STATE_1;
ax251143net/ax25/af_ax25.cax25_set_timer(sk->ax25);    /* Start going SABM SABM until a UA or a give up and DM */
ax251240net/ax25/af_ax25.caddr = &sk->ax25->dest_addr;
ax251242net/ax25/af_ax25.caddr = &sk->ax25->source_addr;
ax251251net/ax25/af_ax25.cif (sk->ax25->digipeat != NULL) {
ax251252net/ax25/af_ax25.cndigi = sk->ax25->digipeat->ndigi;
ax251256net/ax25/af_ax25.cmemcpy(&sax->fsa_digipeater[i], &sk->ax25->digipeat->calls[i], sizeof(ax25_address));
ax251268net/ax25/af_ax25.cax25_cb *ax25;
ax251389net/ax25/af_ax25.cif ((ax25 = ax25_find_cb(&dest, &src, dev)) != NULL) {
ax251395net/ax25/af_ax25.cif (ax25_process_rx_frame(ax25, skb, type) == 0)
ax251422net/ax25/af_ax25.cax25 = make->ax25;
ax251438net/ax25/af_ax25.cif ((ax25 = ax25_create_cb()) == NULL) {
ax251452net/ax25/af_ax25.cmemcpy(&ax25->source_addr, &dest, sizeof(ax25_address));
ax251453net/ax25/af_ax25.cmemcpy(&ax25->dest_addr,   &src,  sizeof(ax25_address));
ax251458net/ax25/af_ax25.cif (dp.ndigi != 0 && ax25->digipeat == NULL && (ax25->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) {
ax251460net/ax25/af_ax25.cax25_destroy_socket(ax25);
ax251465net/ax25/af_ax25.cif (ax25->digipeat != NULL) {
ax251466net/ax25/af_ax25.ckfree_s(ax25->digipeat, sizeof(ax25_digi));
ax251467net/ax25/af_ax25.cax25->digipeat = NULL;
ax251471net/ax25/af_ax25.cax25_digi_invert(&dp, ax25->digipeat);
ax251474net/ax25/af_ax25.cax25->device = dev;
ax251476net/ax25/af_ax25.cax25_send_control(ax25, UA | PF, C_RESPONSE);
ax251478net/ax25/af_ax25.cax25->t3timer = ax25->t3;
ax251479net/ax25/af_ax25.cax25->state   = AX25_STATE_3;
ax251481net/ax25/af_ax25.cax25_insert_socket(ax25);
ax251483net/ax25/af_ax25.cax25_set_timer(ax25);
ax251562net/ax25/af_ax25.cif (sk->ax25->device == NULL)
ax251597net/ax25/af_ax25.cif (sk->type == SOCK_SEQPACKET && memcmp(&sk->ax25->dest_addr, &sax.sax25_call, sizeof(ax25_address)) != 0)
ax251609net/ax25/af_ax25.cmemcpy(&sax.sax25_call, &sk->ax25->dest_addr, sizeof(ax25_address));
ax251610net/ax25/af_ax25.cdp = sk->ax25->digipeat;
ax251652net/ax25/af_ax25.cax25_output(sk->ax25, skb);  /* Shove it onto the queue and kick */
ax251665net/ax25/af_ax25.casmptr += (lv = build_ax25_addr(asmptr, &sk->ax25->source_addr, &sax.sax25_call, dp, C_COMMAND));
ax251678net/ax25/af_ax25.cax25_queue_xmit(skb, sk->ax25->device, SOPRI_NORMAL);
ax251868net/ax25/af_ax25.cax25_cb *ax25;
ax251879net/ax25/af_ax25.cfor (ax25 = ax25_list; ax25 != NULL; ax25 = ax25->next) {
ax251880net/ax25/af_ax25.cif ((dev = ax25->device) == NULL)
ax251886net/ax25/af_ax25.cax2asc(&ax25->dest_addr));
ax251888net/ax25/af_ax25.cax2asc(&ax25->source_addr), devname,
ax251889net/ax25/af_ax25.cax25->state,
ax251890net/ax25/af_ax25.cax25->vs, ax25->vr, ax25->va,
ax251891net/ax25/af_ax25.cax25->t1timer / PR_SLOWHZ,
ax251892net/ax25/af_ax25.cax25->t1      / PR_SLOWHZ,
ax251893net/ax25/af_ax25.cax25->t2timer / PR_SLOWHZ,
ax251894net/ax25/af_ax25.cax25->t2      / PR_SLOWHZ,
ax251895net/ax25/af_ax25.cax25->t3timer / PR_SLOWHZ,
ax251896net/ax25/af_ax25.cax25->t3      / PR_SLOWHZ,
ax251897net/ax25/af_ax25.cax25->n2count, ax25->n2,
ax251898net/ax25/af_ax25.cax25->rtt     / PR_SLOWHZ,
ax251899net/ax25/af_ax25.cax25->window);
ax251901net/ax25/af_ax25.cif (ax25->sk != NULL) {
ax251903net/ax25/af_ax25.cax25->sk->wmem_alloc,
ax251904net/ax25/af_ax25.cax25->sk->rmem_alloc);
ax2560net/ax25/ax25_in.cstatic int ax25_rx_iframe(ax25_cb *ax25, struct sk_buff *skb)
ax2570net/ax25/ax25_in.cqueued = nr_route_frame(skb, ax25);
ax2575net/ax25/ax25_in.cax25_ip_mode_set(&ax25->dest_addr, ax25->device, 'V');
ax2583net/ax25/ax25_in.cif (ax25->sk != NULL) {
ax2584net/ax25/ax25_in.cif (sock_queue_rcv_skb(ax25->sk, skb) == 0) {
ax2587net/ax25/ax25_in.cax25->condition |= OWN_RX_BUSY_CONDITION;
ax25104net/ax25/ax25_in.cstatic int ax25_state1_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int type)
ax25110net/ax25/ax25_in.cax25_send_control(ax25, UA | pf, C_RESPONSE);
ax25114net/ax25/ax25_in.cax25_send_control(ax25, DM | pf, C_RESPONSE);
ax25119net/ax25/ax25_in.cax25_calculate_rtt(ax25);
ax25120net/ax25/ax25_in.cax25->t1timer = 0;
ax25121net/ax25/ax25_in.cax25->t3timer = ax25->t3;
ax25122net/ax25/ax25_in.cax25->vs      = 0;
ax25123net/ax25/ax25_in.cax25->va      = 0;
ax25124net/ax25/ax25_in.cax25->vr      = 0;
ax25125net/ax25/ax25_in.cax25->state   = AX25_STATE_3;
ax25126net/ax25/ax25_in.cax25->n2count = 0;
ax25127net/ax25/ax25_in.cif (ax25->sk != NULL) {
ax25128net/ax25/ax25_in.cax25->sk->state = TCP_ESTABLISHED;
ax25130net/ax25/ax25_in.cif (!ax25->sk->dead)
ax25131net/ax25/ax25_in.cax25->sk->state_change(ax25->sk);
ax25138net/ax25/ax25_in.cax25_clear_tx_queue(ax25);
ax25139net/ax25/ax25_in.cax25->state = AX25_STATE_0;
ax25140net/ax25/ax25_in.cif (ax25->sk != NULL) {
ax25141net/ax25/ax25_in.cax25->sk->state = TCP_CLOSE;
ax25142net/ax25/ax25_in.cax25->sk->err   = ECONNREFUSED;
ax25143net/ax25/ax25_in.cif (!ax25->sk->dead)
ax25144net/ax25/ax25_in.cax25->sk->state_change(ax25->sk);
ax25145net/ax25/ax25_in.cax25->sk->dead  = 1;
ax25162net/ax25/ax25_in.cstatic int ax25_state2_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int type)
ax25168net/ax25/ax25_in.cax25_send_control(ax25, DM | pf, C_RESPONSE);
ax25172net/ax25/ax25_in.cax25_send_control(ax25, UA | pf, C_RESPONSE);
ax25177net/ax25/ax25_in.cax25->state = AX25_STATE_0;
ax25178net/ax25/ax25_in.cif (ax25->sk != NULL) {
ax25179net/ax25/ax25_in.cax25->sk->state = TCP_CLOSE;
ax25180net/ax25/ax25_in.cax25->sk->err   = 0;
ax25181net/ax25/ax25_in.cif (!ax25->sk->dead)
ax25182net/ax25/ax25_in.cax25->sk->state_change(ax25->sk);
ax25183net/ax25/ax25_in.cax25->sk->dead  = 1;
ax25190net/ax25/ax25_in.cax25->state = AX25_STATE_0;
ax25191net/ax25/ax25_in.cif (ax25->sk != NULL) {
ax25192net/ax25/ax25_in.cax25->sk->state = TCP_CLOSE;
ax25193net/ax25/ax25_in.cax25->sk->err   = 0;
ax25194net/ax25/ax25_in.cif (!ax25->sk->dead)
ax25195net/ax25/ax25_in.cax25->sk->state_change(ax25->sk);
ax25196net/ax25/ax25_in.cax25->sk->dead  = 1;
ax25206net/ax25/ax25_in.cax25_send_control(ax25, DM | PF, C_RESPONSE);
ax25221net/ax25/ax25_in.cstatic int ax25_state3_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int type)
ax25230net/ax25/ax25_in.cax25_send_control(ax25, UA | pf, C_RESPONSE);
ax25231net/ax25/ax25_in.cax25->condition = 0x00;
ax25232net/ax25/ax25_in.cax25->t1timer   = 0;
ax25233net/ax25/ax25_in.cax25->t3timer   = ax25->t3;
ax25234net/ax25/ax25_in.cax25->vs        = 0;
ax25235net/ax25/ax25_in.cax25->va        = 0;
ax25236net/ax25/ax25_in.cax25->vr        = 0;
ax25240net/ax25/ax25_in.cax25_clear_tx_queue(ax25);
ax25241net/ax25/ax25_in.cax25_send_control(ax25, UA | pf, C_RESPONSE);
ax25242net/ax25/ax25_in.cax25->t3timer = 0;
ax25243net/ax25/ax25_in.cax25->state   = AX25_STATE_0;
ax25244net/ax25/ax25_in.cif (ax25->sk != NULL) {
ax25245net/ax25/ax25_in.cax25->sk->state = TCP_CLOSE;
ax25246net/ax25/ax25_in.cax25->sk->err   = 0;
ax25247net/ax25/ax25_in.cif (!ax25->sk->dead)
ax25248net/ax25/ax25_in.cax25->sk->state_change(ax25->sk);
ax25249net/ax25/ax25_in.cax25->sk->dead  = 1;
ax25254net/ax25/ax25_in.cax25_establish_data_link(ax25);
ax25255net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25259net/ax25/ax25_in.cax25_clear_tx_queue(ax25);
ax25260net/ax25/ax25_in.cax25->t3timer = 0;
ax25261net/ax25/ax25_in.cax25->state   = AX25_STATE_0;
ax25262net/ax25/ax25_in.cif (ax25->sk) {
ax25263net/ax25/ax25_in.cax25->sk->state = TCP_CLOSE;
ax25264net/ax25/ax25_in.cax25->sk->err   = ECONNRESET;
ax25265net/ax25/ax25_in.cif (!ax25->sk->dead)
ax25266net/ax25/ax25_in.cax25->sk->state_change(ax25->sk);
ax25267net/ax25/ax25_in.cax25->sk->dead         = 1;
ax25272net/ax25/ax25_in.cax25->condition |= PEER_RX_BUSY_CONDITION;
ax25273net/ax25/ax25_in.cax25_check_need_response(ax25, type, pf);
ax25274net/ax25/ax25_in.cif (ax25_validate_nr(ax25, nr)) {
ax25275net/ax25/ax25_in.cax25_check_iframes_acked(ax25, nr);
ax25277net/ax25/ax25_in.cax25_nr_error_recovery(ax25);
ax25278net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25283net/ax25/ax25_in.cax25->condition &= ~PEER_RX_BUSY_CONDITION;
ax25284net/ax25/ax25_in.cax25_check_need_response(ax25, type, pf);
ax25285net/ax25/ax25_in.cif (ax25_validate_nr(ax25, nr)) {
ax25286net/ax25/ax25_in.cax25_check_iframes_acked(ax25, nr);
ax25288net/ax25/ax25_in.cax25_nr_error_recovery(ax25);
ax25289net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25294net/ax25/ax25_in.cax25->condition &= ~PEER_RX_BUSY_CONDITION;
ax25295net/ax25/ax25_in.cax25_check_need_response(ax25, type, pf);
ax25296net/ax25/ax25_in.cif (ax25_validate_nr(ax25, nr)) {
ax25297net/ax25/ax25_in.cax25_frames_acked(ax25, nr);
ax25298net/ax25/ax25_in.cax25_calculate_rtt(ax25);
ax25299net/ax25/ax25_in.cax25->t1timer = 0;
ax25300net/ax25/ax25_in.cax25->t3timer = ax25->t3;
ax25302net/ax25/ax25_in.cax25_nr_error_recovery(ax25);
ax25303net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25310net/ax25/ax25_in.cif (!ax25_validate_nr(ax25, nr)) {
ax25311net/ax25/ax25_in.cax25_nr_error_recovery(ax25);
ax25312net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25315net/ax25/ax25_in.cif (ax25->condition & PEER_RX_BUSY_CONDITION) {
ax25316net/ax25/ax25_in.cax25_frames_acked(ax25, nr);
ax25318net/ax25/ax25_in.cax25_check_iframes_acked(ax25, nr);
ax25320net/ax25/ax25_in.cif (ax25->condition & OWN_RX_BUSY_CONDITION) {
ax25321net/ax25/ax25_in.cif (pf) ax25_enquiry_response(ax25);
ax25324net/ax25/ax25_in.cif (ns == ax25->vr) {
ax25325net/ax25/ax25_in.cqueued = ax25_rx_iframe(ax25, skb);
ax25326net/ax25/ax25_in.cif (ax25->condition & OWN_RX_BUSY_CONDITION) {
ax25327net/ax25/ax25_in.cif (pf) ax25_enquiry_response(ax25);
ax25330net/ax25/ax25_in.cax25->vr = (ax25->vr + 1) % MODULUS;
ax25331net/ax25/ax25_in.cax25->condition &= ~REJECT_CONDITION;
ax25333net/ax25/ax25_in.cax25_enquiry_response(ax25);
ax25335net/ax25/ax25_in.cif (!(ax25->condition & ACK_PENDING_CONDITION)) {
ax25336net/ax25/ax25_in.cax25->t2timer = ax25->t2;
ax25337net/ax25/ax25_in.cax25->condition |= ACK_PENDING_CONDITION;
ax25341net/ax25/ax25_in.cif (ax25->condition & REJECT_CONDITION) {
ax25342net/ax25/ax25_in.cif (pf) ax25_enquiry_response(ax25);
ax25344net/ax25/ax25_in.cax25->condition |= REJECT_CONDITION;
ax25345net/ax25/ax25_in.cax25_send_control(ax25, REJ | pf, C_RESPONSE);
ax25346net/ax25/ax25_in.cax25->condition &= ~ACK_PENDING_CONDITION;
ax25353net/ax25/ax25_in.cax25_establish_data_link(ax25);
ax25354net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25369net/ax25/ax25_in.cstatic int ax25_state4_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int type)
ax25378net/ax25/ax25_in.cax25_send_control(ax25, UA | pf, C_RESPONSE);
ax25379net/ax25/ax25_in.cax25->condition = 0x00;
ax25380net/ax25/ax25_in.cax25->t1timer   = 0;
ax25381net/ax25/ax25_in.cax25->t3timer   = ax25->t3;
ax25382net/ax25/ax25_in.cax25->vs        = 0;
ax25383net/ax25/ax25_in.cax25->va        = 0;
ax25384net/ax25/ax25_in.cax25->vr        = 0;
ax25385net/ax25/ax25_in.cax25->state     = AX25_STATE_3;
ax25386net/ax25/ax25_in.cax25->n2count   = 0;
ax25390net/ax25/ax25_in.cax25_clear_tx_queue(ax25);
ax25391net/ax25/ax25_in.cax25_send_control(ax25, UA | pf, C_RESPONSE);
ax25392net/ax25/ax25_in.cax25->t3timer = 0;
ax25393net/ax25/ax25_in.cax25->state   = AX25_STATE_0;
ax25394net/ax25/ax25_in.cif (ax25->sk != NULL) {
ax25395net/ax25/ax25_in.cax25->sk->state = TCP_CLOSE;
ax25396net/ax25/ax25_in.cax25->sk->err   = 0;
ax25397net/ax25/ax25_in.cif (!ax25->sk->dead)
ax25398net/ax25/ax25_in.cax25->sk->state_change(ax25->sk);
ax25399net/ax25/ax25_in.cax25->sk->dead  = 1;
ax25404net/ax25/ax25_in.cax25_establish_data_link(ax25);
ax25405net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25409net/ax25/ax25_in.cax25_clear_tx_queue(ax25);
ax25410net/ax25/ax25_in.cax25->t3timer = 0;
ax25411net/ax25/ax25_in.cax25->state   = AX25_STATE_0;
ax25412net/ax25/ax25_in.cif (ax25->sk != NULL) {
ax25413net/ax25/ax25_in.cax25->sk->state = TCP_CLOSE;
ax25414net/ax25/ax25_in.cax25->sk->err   = ECONNRESET;
ax25415net/ax25/ax25_in.cif (!ax25->sk->dead)
ax25416net/ax25/ax25_in.cax25->sk->state_change(ax25->sk);
ax25417net/ax25/ax25_in.cax25->sk->dead  = 1;
ax25422net/ax25/ax25_in.cax25->condition |= PEER_RX_BUSY_CONDITION;
ax25424net/ax25/ax25_in.cax25->t1timer = 0;
ax25425net/ax25/ax25_in.cif (ax25_validate_nr(ax25, nr)) {
ax25426net/ax25/ax25_in.cax25_frames_acked(ax25, nr);
ax25427net/ax25/ax25_in.cif (ax25->vs == ax25->va) {
ax25428net/ax25/ax25_in.cax25->t3timer = ax25->t3;
ax25429net/ax25/ax25_in.cax25->n2count = 0;
ax25430net/ax25/ax25_in.cax25->state   = AX25_STATE_3;
ax25433net/ax25/ax25_in.cax25_nr_error_recovery(ax25);
ax25434net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25439net/ax25/ax25_in.cax25_enquiry_response(ax25);
ax25440net/ax25/ax25_in.cif (ax25_validate_nr(ax25, nr)) {
ax25441net/ax25/ax25_in.cax25_frames_acked(ax25, nr);
ax25443net/ax25/ax25_in.cax25_nr_error_recovery(ax25);
ax25444net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25449net/ax25/ax25_in.cax25->condition &= ~PEER_RX_BUSY_CONDITION;
ax25451net/ax25/ax25_in.cax25->t1timer = 0;
ax25452net/ax25/ax25_in.cif (ax25_validate_nr(ax25, nr)) {
ax25453net/ax25/ax25_in.cax25_frames_acked(ax25, nr);
ax25454net/ax25/ax25_in.cif (ax25->vs == ax25->va) {
ax25455net/ax25/ax25_in.cax25->t3timer = ax25->t3;
ax25456net/ax25/ax25_in.cax25->n2count = 0;
ax25457net/ax25/ax25_in.cax25->state   = AX25_STATE_3;
ax25460net/ax25/ax25_in.cax25_nr_error_recovery(ax25);
ax25461net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25466net/ax25/ax25_in.cax25_enquiry_response(ax25);
ax25467net/ax25/ax25_in.cif (ax25_validate_nr(ax25, nr)) {
ax25468net/ax25/ax25_in.cax25_frames_acked(ax25, nr);
ax25470net/ax25/ax25_in.cax25_nr_error_recovery(ax25);
ax25471net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25476net/ax25/ax25_in.cax25->condition &= ~PEER_RX_BUSY_CONDITION;
ax25478net/ax25/ax25_in.cax25->t1timer = 0;
ax25479net/ax25/ax25_in.cif (ax25_validate_nr(ax25, nr)) {
ax25480net/ax25/ax25_in.cax25_frames_acked(ax25, nr);
ax25481net/ax25/ax25_in.cif (ax25->vs == ax25->va) {
ax25482net/ax25/ax25_in.cax25->t3timer = ax25->t3;
ax25483net/ax25/ax25_in.cax25->n2count = 0;
ax25484net/ax25/ax25_in.cax25->state   = AX25_STATE_3;
ax25487net/ax25/ax25_in.cax25_nr_error_recovery(ax25);
ax25488net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25493net/ax25/ax25_in.cax25_enquiry_response(ax25);
ax25494net/ax25/ax25_in.cif (ax25_validate_nr(ax25, nr)) {
ax25495net/ax25/ax25_in.cax25_frames_acked(ax25, nr);
ax25497net/ax25/ax25_in.cax25_nr_error_recovery(ax25);
ax25498net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25505net/ax25/ax25_in.cif (!ax25_validate_nr(ax25, nr)) {
ax25506net/ax25/ax25_in.cax25_nr_error_recovery(ax25);
ax25507net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25510net/ax25/ax25_in.cax25_frames_acked(ax25, nr);
ax25511net/ax25/ax25_in.cif (ax25->condition & OWN_RX_BUSY_CONDITION) {
ax25512net/ax25/ax25_in.cif (pf) ax25_enquiry_response(ax25);
ax25515net/ax25/ax25_in.cif (ns == ax25->vr) {
ax25516net/ax25/ax25_in.cqueued = ax25_rx_iframe(ax25, skb);
ax25517net/ax25/ax25_in.cif (ax25->condition & OWN_RX_BUSY_CONDITION) {
ax25518net/ax25/ax25_in.cif (pf) ax25_enquiry_response(ax25);
ax25521net/ax25/ax25_in.cax25->vr = (ax25->vr + 1) % MODULUS;
ax25522net/ax25/ax25_in.cax25->condition &= ~REJECT_CONDITION;
ax25524net/ax25/ax25_in.cax25_enquiry_response(ax25);
ax25526net/ax25/ax25_in.cif (!(ax25->condition & ACK_PENDING_CONDITION)) {
ax25527net/ax25/ax25_in.cax25->t2timer = ax25->t2;
ax25528net/ax25/ax25_in.cax25->condition |= ACK_PENDING_CONDITION;
ax25532net/ax25/ax25_in.cif (ax25->condition & REJECT_CONDITION) {
ax25533net/ax25/ax25_in.cif (pf) ax25_enquiry_response(ax25);
ax25535net/ax25/ax25_in.cax25->condition |= REJECT_CONDITION;
ax25536net/ax25/ax25_in.cax25_send_control(ax25, REJ | pf, C_RESPONSE);
ax25537net/ax25/ax25_in.cax25->condition &= ~ACK_PENDING_CONDITION;
ax25544net/ax25/ax25_in.cax25_establish_data_link(ax25);
ax25545net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25558net/ax25/ax25_in.cint ax25_process_rx_frame(ax25_cb *ax25, struct sk_buff *skb, int type)
ax25562net/ax25/ax25_in.cif (ax25->state != AX25_STATE_1 && ax25->state != AX25_STATE_2 &&
ax25563net/ax25/ax25_in.cax25->state != AX25_STATE_3 && ax25->state != AX25_STATE_4) {
ax25564net/ax25/ax25_in.cprintk("ax25_process_rx_frame: frame received - state = %d\n", ax25->state);
ax25568net/ax25/ax25_in.cdel_timer(&ax25->timer);
ax25572net/ax25/ax25_in.cswitch (ax25->state) {
ax25574net/ax25/ax25_in.cqueued = ax25_state1_machine(ax25, skb, frametype, type);
ax25577net/ax25/ax25_in.cqueued = ax25_state2_machine(ax25, skb, frametype, type);
ax25580net/ax25/ax25_in.cqueued = ax25_state3_machine(ax25, skb, frametype, type);
ax25583net/ax25/ax25_in.cqueued = ax25_state4_machine(ax25, skb, frametype, type);
ax25587net/ax25/ax25_in.cax25_set_timer(ax25);
ax2550net/ax25/ax25_out.cint ax25_output(ax25_cb *ax25, struct sk_buff *skb)
ax2552net/ax25/ax25_out.cskb_queue_tail(&ax25->write_queue, skb);  /* Throw it on the queue */
ax2554net/ax25/ax25_out.cif (ax25->state == AX25_STATE_3 || ax25->state == AX25_STATE_4)
ax2555net/ax25/ax25_out.cax25_kick(ax25);
ax2564net/ax25/ax25_out.cstatic void ax25_send_iframe(ax25_cb *ax25, struct sk_buff *skb, int poll_bit)
ax2575net/ax25/ax25_out.c*frame |= (ax25->vr << 5);
ax2576net/ax25/ax25_out.c*frame |= (ax25->vs << 1);
ax2578net/ax25/ax25_out.cax25_transmit_buffer(ax25, skb, C_COMMAND);  
ax2581net/ax25/ax25_out.cvoid ax25_kick(ax25_cb *ax25)
ax2587net/ax25/ax25_out.cdel_timer(&ax25->timer);
ax2589net/ax25/ax25_out.cstart = (skb_peek(&ax25->ack_queue) == NULL) ? ax25->va : ax25->vs;
ax2590net/ax25/ax25_out.cend   = (ax25->va + ax25->window) % MODULUS;
ax2592net/ax25/ax25_out.cif (!(ax25->condition & PEER_RX_BUSY_CONDITION) &&
ax2594net/ax25/ax25_out.cskb_peek(&ax25->write_queue) != NULL) {
ax2596net/ax25/ax25_out.cax25->vs = start;
ax25107net/ax25/ax25_out.cskb  = skb_dequeue(&ax25->write_queue);
ax25110net/ax25/ax25_out.cskb_queue_head(&ax25->write_queue, skb);
ax25114net/ax25/ax25_out.cnext = (ax25->vs + 1) % MODULUS;
ax25116net/ax25/ax25_out.clast = (next == end) || skb_peek(&ax25->write_queue) == NULL;
ax25123net/ax25/ax25_out.cax25_send_iframe(ax25, skbn, (last) ? PF : 0);
ax25125net/ax25/ax25_out.cax25->vs = next;
ax25130net/ax25/ax25_out.cskb_queue_tail(&ax25->ack_queue, skb);
ax25134net/ax25/ax25_out.c} while (!last && skb_peek(&ax25->write_queue) != NULL);
ax25136net/ax25/ax25_out.cax25->condition &= ~ACK_PENDING_CONDITION;
ax25138net/ax25/ax25_out.cif (ax25->t1timer == 0) {
ax25139net/ax25/ax25_out.cax25->t3timer = 0;
ax25140net/ax25/ax25_out.cax25->t1timer = ax25->t1 = ax25_calculate_t1(ax25);
ax25144net/ax25/ax25_out.cax25_set_timer(ax25);
ax25147net/ax25/ax25_out.cvoid ax25_transmit_buffer(ax25_cb *ax25, struct sk_buff *skb, int type)
ax25151net/ax25/ax25_out.cif (ax25->device == NULL) {
ax25152net/ax25/ax25_out.cif (ax25->sk != NULL) {
ax25153net/ax25/ax25_out.cax25->sk->state = TCP_CLOSE;
ax25154net/ax25/ax25_out.cax25->sk->err   = ENETUNREACH;
ax25155net/ax25/ax25_out.cif (!ax25->sk->dead)
ax25156net/ax25/ax25_out.cax25->sk->state_change(ax25->sk);
ax25157net/ax25/ax25_out.cax25->sk->dead  = 1;
ax25162net/ax25/ax25_out.cif (skb_headroom(skb) < size_ax25_addr(ax25->digipeat)) {
ax25169net/ax25/ax25_out.cptr = skb_push(skb, size_ax25_addr(ax25->digipeat));
ax25170net/ax25/ax25_out.cbuild_ax25_addr(ptr, &ax25->source_addr, &ax25->dest_addr, ax25->digipeat, type);
ax25174net/ax25/ax25_out.cax25_queue_xmit(skb, ax25->device, SOPRI_NORMAL);
ax25182net/ax25/ax25_out.cvoid ax25_nr_error_recovery(ax25_cb *ax25)
ax25184net/ax25/ax25_out.cax25_establish_data_link(ax25);
ax25187net/ax25/ax25_out.cvoid ax25_establish_data_link(ax25_cb *ax25)
ax25189net/ax25/ax25_out.cax25->condition = 0x00;
ax25190net/ax25/ax25_out.cax25->n2count   = 0;
ax25192net/ax25/ax25_out.cax25_send_control(ax25, SABM | PF, C_COMMAND);
ax25194net/ax25/ax25_out.cax25->t3timer = 0;
ax25195net/ax25/ax25_out.cax25->t2timer = 0;
ax25196net/ax25/ax25_out.cax25->t1timer = ax25->t1 = ax25_calculate_t1(ax25);
ax25199net/ax25/ax25_out.cvoid ax25_transmit_enquiry(ax25_cb *ax25)
ax25201net/ax25/ax25_out.cif (ax25->condition & OWN_RX_BUSY_CONDITION)
ax25202net/ax25/ax25_out.cax25_send_control(ax25, RNR | PF, C_COMMAND);
ax25204net/ax25/ax25_out.cax25_send_control(ax25, RR | PF, C_COMMAND);
ax25206net/ax25/ax25_out.cax25->condition &= ~ACK_PENDING_CONDITION;
ax25208net/ax25/ax25_out.cax25->t1timer = ax25->t1 = ax25_calculate_t1(ax25);
ax25211net/ax25/ax25_out.cvoid ax25_enquiry_response(ax25_cb *ax25)
ax25213net/ax25/ax25_out.cif (ax25->condition & OWN_RX_BUSY_CONDITION)
ax25214net/ax25/ax25_out.cax25_send_control(ax25, RNR | PF, C_RESPONSE);
ax25216net/ax25/ax25_out.cax25_send_control(ax25, RR | PF, C_RESPONSE);
ax25218net/ax25/ax25_out.cax25->condition &= ~ACK_PENDING_CONDITION;
ax25221net/ax25/ax25_out.cvoid ax25_check_iframes_acked(ax25_cb *ax25, unsigned short nr)
ax25223net/ax25/ax25_out.cif (ax25->vs == nr) {
ax25224net/ax25/ax25_out.cax25_frames_acked(ax25, nr);
ax25225net/ax25/ax25_out.cax25_calculate_rtt(ax25);
ax25226net/ax25/ax25_out.cax25->t1timer = 0;
ax25227net/ax25/ax25_out.cax25->t3timer = ax25->t3;
ax25229net/ax25/ax25_out.cif (ax25->va != nr) {
ax25230net/ax25/ax25_out.cax25_frames_acked(ax25, nr);
ax25231net/ax25/ax25_out.cax25->t1timer = ax25->t1 = ax25_calculate_t1(ax25);
ax25236net/ax25/ax25_out.cvoid ax25_check_need_response(ax25_cb *ax25, int type, int pf)
ax25239net/ax25/ax25_out.cax25_enquiry_response(ax25);
ax25230net/ax25/ax25_route.cint ax25_rt_autobind(ax25_cb *ax25, ax25_address *addr)
ax25240net/ax25/ax25_route.cif ((ax25->device = ax25_rt->dev) == NULL)
ax25245net/ax25/ax25_route.ccall = (ax25_address *)ax25->device->dev_addr;
ax25247net/ax25/ax25_route.cmemcpy(&ax25->source_addr, call, sizeof(ax25_address));
ax25248net/ax25/ax25_route.cif (ax25->sk != NULL)
ax25249net/ax25/ax25_route.cax25->sk->zapped = 0;
ax2554net/ax25/ax25_subr.cvoid ax25_clear_tx_queue(ax25_cb *ax25)
ax2558net/ax25/ax25_subr.cwhile ((skb = skb_dequeue(&ax25->write_queue)) != NULL) {
ax2563net/ax25/ax25_subr.cwhile ((skb = skb_dequeue(&ax25->ack_queue)) != NULL) {
ax2574net/ax25/ax25_subr.cvoid ax25_frames_acked(ax25_cb *ax25, unsigned short nr)
ax2581net/ax25/ax25_subr.cif (ax25->va != nr) {
ax2582net/ax25/ax25_subr.cwhile (skb_peek(&ax25->ack_queue) != NULL && ax25->va != nr) {
ax2583net/ax25/ax25_subr.cskb = skb_dequeue(&ax25->ack_queue);
ax2586net/ax25/ax25_subr.cax25->va = (ax25->va + 1) % MODULUS;
ax2595net/ax25/ax25_subr.cwhile ((skb = skb_dequeue(&ax25->ack_queue)) != NULL) {
ax2597net/ax25/ax25_subr.cskb_queue_head(&ax25->write_queue, skb);
ax25108net/ax25/ax25_subr.cint ax25_validate_nr(ax25_cb *ax25, unsigned short nr)
ax25110net/ax25/ax25_subr.cunsigned short vc = ax25->va;
ax25112net/ax25/ax25_subr.cwhile (vc != ax25->vs) {
ax25117net/ax25/ax25_subr.cif (nr == ax25->vs) return 1;
ax25141net/ax25/ax25_subr.cvoid ax25_send_control(ax25_cb *ax25, int frametype, int type)
ax25147net/ax25/ax25_subr.cif ((dev = ax25->device) == NULL)
ax25150net/ax25/ax25_subr.cif ((skb = alloc_skb(AX25_BPQ_HEADER_LEN + size_ax25_addr(ax25->digipeat) + 1, GFP_ATOMIC)) == NULL)
ax25153net/ax25/ax25_subr.cskb_reserve(skb, AX25_BPQ_HEADER_LEN + size_ax25_addr(ax25->digipeat));
ax25155net/ax25/ax25_subr.cif (ax25->sk != NULL) {
ax25156net/ax25/ax25_subr.cskb->sk = ax25->sk;
ax25157net/ax25/ax25_subr.cax25->sk->wmem_alloc += skb->truesize;
ax25164net/ax25/ax25_subr.cframetype |= (ax25->vr << 5);
ax25170net/ax25/ax25_subr.cax25_transmit_buffer(ax25, skb, type);
ax25215net/ax25/ax25_subr.cunsigned short ax25_calculate_t1(ax25_cb *ax25)
ax25220net/ax25/ax25_subr.cif (ax25->backoff)
ax25221net/ax25/ax25_subr.cfor (n = 0; n < ax25->n2count; n++)
ax25224net/ax25/ax25_subr.creturn t * ax25->rtt;
ax25226net/ax25/ax25_subr.creturn 2 * ax25->rtt;
ax25233net/ax25/ax25_subr.cvoid ax25_calculate_rtt(ax25_cb *ax25)
ax25235net/ax25/ax25_subr.cif (ax25->t1timer > 0 && ax25->n2count == 0)
ax25236net/ax25/ax25_subr.cax25->rtt = (9 * ax25->rtt + ax25->t1 - ax25->t1timer) / 10;
ax25239net/ax25/ax25_subr.cif (ax25->rtt < 1 * PR_SLOWHZ)
ax25240net/ax25/ax25_subr.cax25->rtt = 1 * PR_SLOWHZ;
ax2553net/ax25/ax25_timer.cvoid ax25_set_timer(ax25_cb *ax25)
ax2559net/ax25/ax25_timer.cdel_timer(&ax25->timer);
ax2562net/ax25/ax25_timer.cax25->timer.next     = ax25->timer.prev = NULL;  
ax2563net/ax25/ax25_timer.cax25->timer.data     = (unsigned long)ax25;
ax2564net/ax25/ax25_timer.cax25->timer.function = &ax25_timer;
ax2566net/ax25/ax25_timer.cax25->timer.expires = 10;
ax2567net/ax25/ax25_timer.cadd_timer(&ax25->timer);
ax2570net/ax25/ax25_timer.cstatic void ax25_reset_timer(ax25_cb *ax25)
ax2576net/ax25/ax25_timer.cdel_timer(&ax25->timer);
ax2579net/ax25/ax25_timer.cax25->timer.data     = (unsigned long)ax25;
ax2580net/ax25/ax25_timer.cax25->timer.function = &ax25_timer;
ax2581net/ax25/ax25_timer.cax25->timer.expires  = 10;
ax2582net/ax25/ax25_timer.cadd_timer(&ax25->timer);
ax2593net/ax25/ax25_timer.cax25_cb *ax25 = (ax25_cb *)param;
ax2595net/ax25/ax25_timer.cswitch (ax25->state) {
ax2599net/ax25/ax25_timer.cif ((ax25->sk != NULL && ax25->sk->dead) || ax25->sk == NULL) {
ax25100net/ax25/ax25_timer.cdel_timer(&ax25->timer);
ax25101net/ax25/ax25_timer.cax25_destroy_socket(ax25);
ax25111net/ax25/ax25_timer.cif (ax25->sk != NULL) {
ax25112net/ax25/ax25_timer.cif (ax25->sk->rmem_alloc < (ax25->sk->rcvbuf / 2) && (ax25->condition & OWN_RX_BUSY_CONDITION)) {
ax25113net/ax25/ax25_timer.cax25->condition &= ~OWN_RX_BUSY_CONDITION;
ax25114net/ax25/ax25_timer.cax25_send_control(ax25, RR, C_RESPONSE);
ax25115net/ax25/ax25_timer.cax25->condition &= ~ACK_PENDING_CONDITION;
ax25122net/ax25/ax25_timer.cax25_kick(ax25);
ax25129net/ax25/ax25_timer.cif (ax25->t2timer > 0 && --ax25->t2timer == 0) {
ax25130net/ax25/ax25_timer.cif (ax25->state == AX25_STATE_3 || ax25->state == AX25_STATE_4) {
ax25131net/ax25/ax25_timer.cif (ax25->condition & ACK_PENDING_CONDITION) {
ax25132net/ax25/ax25_timer.cax25->condition &= ~ACK_PENDING_CONDITION;
ax25133net/ax25/ax25_timer.cax25_enquiry_response(ax25);
ax25138net/ax25/ax25_timer.cif (ax25->t3timer > 0 && --ax25->t3timer == 0) {
ax25139net/ax25/ax25_timer.cif (ax25->state == AX25_STATE_3) {
ax25140net/ax25/ax25_timer.cax25->n2count = 0;
ax25141net/ax25/ax25_timer.cax25_transmit_enquiry(ax25);
ax25142net/ax25/ax25_timer.cax25->state   = AX25_STATE_4;
ax25144net/ax25/ax25_timer.cax25->t3timer = ax25->t3;
ax25147net/ax25/ax25_timer.cif (ax25->t1timer == 0 || --ax25->t1timer > 0) {
ax25148net/ax25/ax25_timer.cax25_reset_timer(ax25);
ax25152net/ax25/ax25_timer.cswitch (ax25->state) {
ax25154net/ax25/ax25_timer.cif (ax25->n2count == ax25->n2) {
ax25156net/ax25/ax25_timer.cnr_link_failed(&ax25->dest_addr, ax25->device);
ax25158net/ax25/ax25_timer.cax25_clear_tx_queue(ax25);
ax25159net/ax25/ax25_timer.cax25->state = AX25_STATE_0;
ax25160net/ax25/ax25_timer.cif (ax25->sk != NULL) {
ax25161net/ax25/ax25_timer.cax25->sk->state = TCP_CLOSE;
ax25162net/ax25/ax25_timer.cax25->sk->err   = ETIMEDOUT;
ax25163net/ax25/ax25_timer.cif (!ax25->sk->dead)
ax25164net/ax25/ax25_timer.cax25->sk->state_change(ax25->sk);
ax25165net/ax25/ax25_timer.cax25->sk->dead  = 1;
ax25168net/ax25/ax25_timer.cax25->n2count++;
ax25169net/ax25/ax25_timer.cax25_send_control(ax25, SABM | PF, C_COMMAND);
ax25174net/ax25/ax25_timer.cif (ax25->n2count == ax25->n2) {
ax25176net/ax25/ax25_timer.cnr_link_failed(&ax25->dest_addr, ax25->device);
ax25178net/ax25/ax25_timer.cax25_clear_tx_queue(ax25);
ax25179net/ax25/ax25_timer.cax25->state = AX25_STATE_0;
ax25180net/ax25/ax25_timer.cif (ax25->sk != NULL) {
ax25181net/ax25/ax25_timer.cax25->sk->state = TCP_CLOSE;
ax25182net/ax25/ax25_timer.cax25->sk->err   = ETIMEDOUT;
ax25183net/ax25/ax25_timer.cif (!ax25->sk->dead)
ax25184net/ax25/ax25_timer.cax25->sk->state_change(ax25->sk);
ax25185net/ax25/ax25_timer.cax25->sk->dead  = 1;
ax25188net/ax25/ax25_timer.cax25->n2count++;
ax25189net/ax25/ax25_timer.cax25_send_control(ax25, DISC | PF, C_COMMAND);
ax25194net/ax25/ax25_timer.cax25->n2count = 1;
ax25195net/ax25/ax25_timer.cax25_transmit_enquiry(ax25);
ax25196net/ax25/ax25_timer.cax25->state   = AX25_STATE_4;
ax25200net/ax25/ax25_timer.cif (ax25->n2count == ax25->n2) {
ax25202net/ax25/ax25_timer.cnr_link_failed(&ax25->dest_addr, ax25->device);
ax25204net/ax25/ax25_timer.cax25_clear_tx_queue(ax25);
ax25205net/ax25/ax25_timer.cax25_send_control(ax25, DM | PF, C_RESPONSE);
ax25206net/ax25/ax25_timer.cax25->state = AX25_STATE_0;
ax25207net/ax25/ax25_timer.cif (ax25->sk != NULL) {
ax25208net/ax25/ax25_timer.cax25->sk->state = TCP_CLOSE;
ax25209net/ax25/ax25_timer.cax25->sk->err   = ETIMEDOUT;
ax25210net/ax25/ax25_timer.cif (!ax25->sk->dead)
ax25211net/ax25/ax25_timer.cax25->sk->state_change(ax25->sk);
ax25212net/ax25/ax25_timer.cax25->sk->dead  = 1;
ax25215net/ax25/ax25_timer.cax25->n2count++;
ax25216net/ax25/ax25_timer.cax25_transmit_enquiry(ax25);
ax25221net/ax25/ax25_timer.cax25->t1timer = ax25->t1 = ax25_calculate_t1(ax25);
ax25223net/ax25/ax25_timer.cax25_set_timer(ax25);
ax2564net/netrom/nr_route.cstatic int nr_add_node(ax25_address *nr, char *mnemonic, ax25_address *ax25,
ax2578net/netrom/nr_route.cif (ax25cmp(ax25, &nr_neigh->callsign) == 0 && nr_neigh->dev == dev)
ax2588net/netrom/nr_route.cmemcpy(&nr_neigh->callsign, ax25, sizeof(ax25_address));
ax25638net/netrom/nr_route.cint nr_route_frame(struct sk_buff *skb, ax25_cb *ax25)
ax25649net/netrom/nr_route.cif (ax25 != NULL)
ax25650net/netrom/nr_route.cnr_add_node(nr_src, "", &ax25->dest_addr, ax25->digipeat, ax25->device, 0, nr_default.obs_count);