taglinefilesource code
ax25196include/net/sock.hax25_cb      *ax25;
ax25175net/ax25/af_ax25.cstatic void ax25_remove_socket(ax25_cb *ax25)
ax25183net/ax25/af_ax25.cif ((s = ax25_list) == ax25) {
ax25190net/ax25/af_ax25.cif (s->next == ax25) {
ax25191net/ax25/af_ax25.cs->next = ax25->next;
ax25250net/ax25/af_ax25.cstatic void ax25_insert_socket(ax25_cb *ax25)
ax25257net/ax25/af_ax25.cax25->next = ax25_list;
ax25258net/ax25/af_ax25.cax25_list  = ax25;
ax25400net/ax25/af_ax25.cvoid ax25_destroy_socket(ax25_cb *ax25)  /* Not static as its used by the timer */
ax25408net/ax25/af_ax25.cdel_timer(&ax25->timer);
ax25410net/ax25/af_ax25.cax25_remove_socket(ax25);
ax25411net/ax25/af_ax25.cax25_clear_queues(ax25);  /* Flush the queues */
ax25413net/ax25/af_ax25.cif (ax25->sk != NULL) {
ax25414net/ax25/af_ax25.cwhile ((skb = skb_dequeue(&ax25->sk->receive_queue)) != NULL) {
ax25415net/ax25/af_ax25.cif (skb->sk != ax25->sk) {      /* A pending connection */
ax25417net/ax25/af_ax25.cax25_set_timer(skb->sk->ax25);
ax25418net/ax25/af_ax25.cskb->sk->ax25->state = AX25_STATE_0;
ax25425net/ax25/af_ax25.cif (ax25->digipeat != NULL) {
ax25426net/ax25/af_ax25.ckfree_s(ax25->digipeat, sizeof(ax25_digi));
ax25427net/ax25/af_ax25.cax25->digipeat = NULL;
ax25430net/ax25/af_ax25.cif (ax25->sk != NULL) {
ax25431net/ax25/af_ax25.cif (ax25->sk->wmem_alloc || ax25->sk->rmem_alloc) { /* Defer: outstanding buffers */
ax25432net/ax25/af_ax25.cinit_timer(&ax25->timer);
ax25433net/ax25/af_ax25.cax25->timer.expires  = jiffies + 10 * HZ;
ax25434net/ax25/af_ax25.cax25->timer.function = ax25_destroy_timer;
ax25435net/ax25/af_ax25.cax25->timer.data     = (unsigned long)ax25;
ax25436net/ax25/af_ax25.cadd_timer(&ax25->timer);
ax25438net/ax25/af_ax25.ckfree_s(ax25->sk, sizeof(*ax25->sk));
ax25439net/ax25/af_ax25.ckfree_s(ax25, sizeof(*ax25));
ax25442net/ax25/af_ax25.ckfree_s(ax25, sizeof(*ax25));
ax25521net/ax25/af_ax25.cax25_cb *ax25;
ax25523net/ax25/af_ax25.cif ((ax25 = (ax25_cb *)kmalloc(sizeof(*ax25), GFP_ATOMIC)) == NULL)
ax25526net/ax25/af_ax25.cskb_queue_head_init(&ax25->write_queue);
ax25527net/ax25/af_ax25.cskb_queue_head_init(&ax25->frag_queue);
ax25528net/ax25/af_ax25.cskb_queue_head_init(&ax25->ack_queue);
ax25529net/ax25/af_ax25.cskb_queue_head_init(&ax25->reseq_queue);
ax25531net/ax25/af_ax25.cinit_timer(&ax25->timer);
ax25533net/ax25/af_ax25.cax25->rtt     = (AX25_DEF_T1 * PR_SLOWHZ) / 2;
ax25534net/ax25/af_ax25.cax25->t1      = AX25_DEF_T1 * PR_SLOWHZ;
ax25535net/ax25/af_ax25.cax25->t2      = AX25_DEF_T2 * PR_SLOWHZ;
ax25536net/ax25/af_ax25.cax25->t3      = AX25_DEF_T3 * PR_SLOWHZ;
ax25537net/ax25/af_ax25.cax25->n2      = AX25_DEF_N2;
ax25539net/ax25/af_ax25.cax25->modulus   = AX25_DEF_AXDEFMODE;
ax25540net/ax25/af_ax25.cax25->fragno    = 0;
ax25541net/ax25/af_ax25.cax25->fraglen   = 0;
ax25542net/ax25/af_ax25.cax25->hdrincl   = 0;
ax25543net/ax25/af_ax25.cax25->backoff   = AX25_DEF_BACKOFF == 'E';
ax25544net/ax25/af_ax25.cax25->condition = 0x00;
ax25545net/ax25/af_ax25.cax25->t1timer   = 0;
ax25546net/ax25/af_ax25.cax25->t2timer   = 0;
ax25547net/ax25/af_ax25.cax25->t3timer   = 0;
ax25548net/ax25/af_ax25.cax25->n2count   = 0;
ax25550net/ax25/af_ax25.cax25->va      = 0;
ax25551net/ax25/af_ax25.cax25->vr      = 0;
ax25552net/ax25/af_ax25.cax25->vs      = 0;
ax25555net/ax25/af_ax25.cax25->window = AX25_DEF_EWINDOW;
ax25557net/ax25/af_ax25.cax25->window = AX25_DEF_WINDOW;
ax25559net/ax25/af_ax25.cax25->device   = NULL;
ax25560net/ax25/af_ax25.cax25->digipeat = NULL;
ax25561net/ax25/af_ax25.cax25->sk       = NULL;
ax25563net/ax25/af_ax25.cax25->state    = AX25_STATE_0;
ax25565net/ax25/af_ax25.cmemset(&ax25->dest_addr,   '\0', sizeof(ax25_address));
ax25566net/ax25/af_ax25.cmemset(&ax25->source_addr, '\0', sizeof(ax25_address));
ax25568net/ax25/af_ax25.creturn ax25;
ax25575net/ax25/af_ax25.cstatic void ax25_fillin_cb(ax25_cb *ax25, struct device *dev)
ax25577net/ax25/af_ax25.cax25->device = dev;
ax25579net/ax25/af_ax25.cax25->rtt = ax25_dev_get_value(dev, AX25_VALUES_T1);
ax25580net/ax25/af_ax25.cax25->t1  = ax25_dev_get_value(dev, AX25_VALUES_T1);
ax25581net/ax25/af_ax25.cax25->t2  = ax25_dev_get_value(dev, AX25_VALUES_T2);
ax25582net/ax25/af_ax25.cax25->t3  = ax25_dev_get_value(dev, AX25_VALUES_T3);
ax25583net/ax25/af_ax25.cax25->n2  = ax25_dev_get_value(dev, AX25_VALUES_N2);
ax25585net/ax25/af_ax25.cax25->modulus = ax25_dev_get_value(dev, AX25_VALUES_AXDEFMODE);
ax25587net/ax25/af_ax25.cif (ax25->modulus == MODULUS) {
ax25588net/ax25/af_ax25.cax25->window = ax25_dev_get_value(dev, AX25_VALUES_WINDOW);
ax25590net/ax25/af_ax25.cax25->window = ax25_dev_get_value(dev, AX25_VALUES_EWINDOW);
ax25593net/ax25/af_ax25.cax25->backoff = ax25_dev_get_value(dev, AX25_VALUES_BACKOFF) == 'E';
ax25599net/ax25/af_ax25.cax25_cb *ax25;
ax25607net/ax25/af_ax25.cfor (ax25 = ax25_list; ax25 != NULL; ax25 = ax25->next) {
ax25608net/ax25/af_ax25.cif (ax25->sk != NULL && ax25->sk->type != SOCK_SEQPACKET)
ax25611net/ax25/af_ax25.cif (ax25cmp(&ax25->source_addr, src) == 0 && ax25cmp(&ax25->dest_addr, dest) == 0 && ax25->device == dev) {
ax25612net/ax25/af_ax25.cax25_output(ax25, skb);
ax25617net/ax25/af_ax25.cif ((ax25 = ax25_create_cb()) == NULL)
ax25620net/ax25/af_ax25.cax25_fillin_cb(ax25, dev);
ax25622net/ax25/af_ax25.cmemcpy(&ax25->source_addr, src,  sizeof(ax25_address));
ax25623net/ax25/af_ax25.cmemcpy(&ax25->dest_addr,   dest, sizeof(ax25_address));
ax25626net/ax25/af_ax25.cif ((ax25->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) {
ax25627net/ax25/af_ax25.ckfree_s(ax25, sizeof(ax25));
ax25630net/ax25/af_ax25.cmemcpy(ax25->digipeat, digi, sizeof(ax25_digi));
ax25633net/ax25/af_ax25.cax25_establish_data_link(ax25);
ax25634net/ax25/af_ax25.cax25_insert_socket(ax25);
ax25636net/ax25/af_ax25.cax25->state = AX25_STATE_1;
ax25638net/ax25/af_ax25.cax25_set_timer(ax25);
ax25640net/ax25/af_ax25.cax25_output(ax25, skb);
ax25716net/ax25/af_ax25.cif (sk->ax25->modulus == MODULUS) {
ax25723net/ax25/af_ax25.csk->ax25->window = opt;
ax25729net/ax25/af_ax25.csk->ax25->rtt = (opt * PR_SLOWHZ) / 2;
ax25735net/ax25/af_ax25.csk->ax25->t2 = opt * PR_SLOWHZ;
ax25741net/ax25/af_ax25.csk->ax25->n2 = opt;
ax25747net/ax25/af_ax25.csk->ax25->t3 = opt * PR_SLOWHZ;
ax25751net/ax25/af_ax25.csk->ax25->backoff = opt ? 1 : 0;
ax25755net/ax25/af_ax25.csk->ax25->modulus = opt ? EMODULUS : MODULUS;
ax25759net/ax25/af_ax25.csk->ax25->hdrincl = opt ? 1 : 0;
ax25784net/ax25/af_ax25.cval = sk->ax25->window;
ax25788net/ax25/af_ax25.cval = (sk->ax25->t1 * 2) / PR_SLOWHZ;
ax25792net/ax25/af_ax25.cval = sk->ax25->t2 / PR_SLOWHZ;
ax25796net/ax25/af_ax25.cval = sk->ax25->n2;
ax25800net/ax25/af_ax25.cval = sk->ax25->t3 / PR_SLOWHZ;
ax25804net/ax25/af_ax25.cval = sk->ax25->backoff;
ax25808net/ax25/af_ax25.cval = (sk->ax25->modulus == EMODULUS);
ax25812net/ax25/af_ax25.cval = sk->ax25->hdrincl;
ax25860net/ax25/af_ax25.cax25_cb *ax25;
ax25895net/ax25/af_ax25.cif ((ax25 = ax25_create_cb()) == NULL) {
ax25939net/ax25/af_ax25.cax25->sk = sk;
ax25940net/ax25/af_ax25.csk->ax25 = ax25;
ax25948net/ax25/af_ax25.cax25_cb *ax25;
ax25953net/ax25/af_ax25.cif ((ax25 = ax25_create_cb()) == NULL) {
ax25958net/ax25/af_ax25.cax25_fillin_cb(ax25, dev);
ax25971net/ax25/af_ax25.ckfree_s((void *)ax25, sizeof(*ax25));
ax251008net/ax25/af_ax25.cax25->modulus = osk->ax25->modulus;
ax251009net/ax25/af_ax25.cax25->backoff = osk->ax25->backoff;
ax251010net/ax25/af_ax25.cax25->hdrincl = osk->ax25->hdrincl;
ax251011net/ax25/af_ax25.cax25->rtt     = osk->ax25->rtt;
ax251012net/ax25/af_ax25.cax25->t1      = osk->ax25->t1;
ax251013net/ax25/af_ax25.cax25->t2      = osk->ax25->t2;
ax251014net/ax25/af_ax25.cax25->t3      = osk->ax25->t3;
ax251015net/ax25/af_ax25.cax25->n2      = osk->ax25->n2;
ax251017net/ax25/af_ax25.cax25->window  = osk->ax25->window;
ax251019net/ax25/af_ax25.cmemcpy(&ax25->source_addr, &osk->ax25->source_addr, sizeof(ax25_address));
ax251021net/ax25/af_ax25.cif (osk->ax25->digipeat != NULL) {
ax251022net/ax25/af_ax25.cif ((ax25->digipeat = (ax25_digi *)kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) {
ax251024net/ax25/af_ax25.ckfree_s(ax25, sizeof(*ax25));
ax251029net/ax25/af_ax25.csk->ax25 = ax25;
ax251030net/ax25/af_ax25.cax25->sk = sk;
ax251049net/ax25/af_ax25.cswitch (sk->ax25->state) {
ax251054net/ax25/af_ax25.cax25_destroy_socket(sk->ax25);
ax251058net/ax25/af_ax25.cax25_send_control(sk->ax25, DISC, POLLON, C_COMMAND);
ax251059net/ax25/af_ax25.csk->ax25->state = AX25_STATE_0;
ax251063net/ax25/af_ax25.cax25_destroy_socket(sk->ax25);
ax251067net/ax25/af_ax25.cax25_send_control(sk->ax25, DM, POLLON, C_RESPONSE);
ax251068net/ax25/af_ax25.csk->ax25->state = AX25_STATE_0;
ax251072net/ax25/af_ax25.cax25_destroy_socket(sk->ax25);
ax251077net/ax25/af_ax25.cax25_clear_queues(sk->ax25);
ax251078net/ax25/af_ax25.csk->ax25->n2count = 0;
ax251079net/ax25/af_ax25.cax25_send_control(sk->ax25, DISC, POLLON, C_COMMAND);
ax251080net/ax25/af_ax25.csk->ax25->t3timer = 0;
ax251081net/ax25/af_ax25.csk->ax25->t1timer = sk->ax25->t1 = ax25_calculate_t1(sk->ax25);
ax251082net/ax25/af_ax25.csk->ax25->state   = AX25_STATE_2;
ax251096net/ax25/af_ax25.cax25_destroy_socket(sk->ax25);
ax251139net/ax25/af_ax25.cmemcpy(&sk->ax25->source_addr, &addr->fsa_ax25.sax25_call, sizeof(ax25_address));
ax251141net/ax25/af_ax25.cmemcpy(&sk->ax25->source_addr, call, sizeof(ax25_address));
ax251157net/ax25/af_ax25.cax25_fillin_cb(sk->ax25, dev);
ax251158net/ax25/af_ax25.cax25_insert_socket(sk->ax25);
ax251201net/ax25/af_ax25.cif (sk->ax25->digipeat == NULL) {
ax251202net/ax25/af_ax25.cif ((sk->ax25->digipeat = (ax25_digi *)kmalloc(sizeof(ax25_digi), GFP_KERNEL)) == NULL)
ax251206net/ax25/af_ax25.csk->ax25->digipeat->ndigi = addr->sax25_ndigis;
ax251209net/ax25/af_ax25.csk->ax25->digipeat->repeated[ct] = 0;
ax251210net/ax25/af_ax25.cmemcpy(&sk->ax25->digipeat->calls[ct], &fsa->fsa_digipeater[ct], sizeof(ax25_address));
ax251214net/ax25/af_ax25.csk->ax25->digipeat->lastrepeat = 0;
ax251218net/ax25/af_ax25.cif ((err = ax25_rt_autobind(sk->ax25, &addr->sax25_call)) < 0)
ax251220net/ax25/af_ax25.cax25_insert_socket(sk->ax25);    /* Finish the bind */
ax251223net/ax25/af_ax25.cif (sk->type == SOCK_SEQPACKET && ax25_find_cb(&sk->ax25->source_addr, &addr->sax25_call, sk->ax25->device) != NULL)
ax251226net/ax25/af_ax25.cmemcpy(&sk->ax25->dest_addr, &addr->sax25_call, sizeof(ax25_address));
ax251238net/ax25/af_ax25.cax25_establish_data_link(sk->ax25);
ax251239net/ax25/af_ax25.csk->ax25->state     = AX25_STATE_1;
ax251240net/ax25/af_ax25.cax25_set_timer(sk->ax25);    /* Start going SABM SABM until a UA or a give up and DM */
ax251339net/ax25/af_ax25.caddr = &sk->ax25->dest_addr;
ax251341net/ax25/af_ax25.caddr = &sk->ax25->source_addr;
ax251350net/ax25/af_ax25.cif (sk->ax25->digipeat != NULL) {
ax251351net/ax25/af_ax25.cndigi = sk->ax25->digipeat->ndigi;
ax251355net/ax25/af_ax25.cmemcpy(&sax->fsa_digipeater[i], &sk->ax25->digipeat->calls[i], sizeof(ax25_address));
ax251367net/ax25/af_ax25.cax25_cb *ax25;
ax251529net/ax25/af_ax25.cif ((ax25 = ax25_find_cb(&dest, &src, dev)) != NULL) {
ax251535net/ax25/af_ax25.cif (ax25_process_rx_frame(ax25, skb, type) == 0)
ax251562net/ax25/af_ax25.cax25 = make->ax25;
ax251578net/ax25/af_ax25.cif ((ax25 = ax25_create_cb()) == NULL) {
ax251584net/ax25/af_ax25.cax25_fillin_cb(ax25, dev);
ax251594net/ax25/af_ax25.cmemcpy(&ax25->source_addr, &dest, sizeof(ax25_address));
ax251595net/ax25/af_ax25.cmemcpy(&ax25->dest_addr,   &src,  sizeof(ax25_address));
ax251600net/ax25/af_ax25.cif (dp.ndigi != 0 && ax25->digipeat == NULL && (ax25->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) {
ax251602net/ax25/af_ax25.cax25_destroy_socket(ax25);
ax251607net/ax25/af_ax25.cif (ax25->digipeat != NULL) {
ax251608net/ax25/af_ax25.ckfree_s(ax25->digipeat, sizeof(ax25_digi));
ax251609net/ax25/af_ax25.cax25->digipeat = NULL;
ax251613net/ax25/af_ax25.cax25_digi_invert(&dp, ax25->digipeat);
ax251617net/ax25/af_ax25.cax25->modulus = EMODULUS;
ax251618net/ax25/af_ax25.cax25->window  = ax25_dev_get_value(dev, AX25_VALUES_EWINDOW);
ax251620net/ax25/af_ax25.cax25->modulus = MODULUS;
ax251621net/ax25/af_ax25.cax25->window  = ax25_dev_get_value(dev, AX25_VALUES_WINDOW);
ax251624net/ax25/af_ax25.cax25->device = dev;
ax251626net/ax25/af_ax25.cax25_send_control(ax25, UA, POLLON, C_RESPONSE);
ax251628net/ax25/af_ax25.cax25->t3timer = ax25->t3;
ax251629net/ax25/af_ax25.cax25->state   = AX25_STATE_3;
ax251631net/ax25/af_ax25.cax25_insert_socket(ax25);
ax251633net/ax25/af_ax25.cax25_set_timer(ax25);
ax251709net/ax25/af_ax25.cif (sk->ax25->device == NULL)
ax251737net/ax25/af_ax25.cif (sk->type == SOCK_SEQPACKET && memcmp(&sk->ax25->dest_addr, &sax.sax25_call, sizeof(ax25_address)) != 0)
ax251747net/ax25/af_ax25.cmemcpy(&sax.sax25_call, &sk->ax25->dest_addr, sizeof(ax25_address));
ax251748net/ax25/af_ax25.cdp = sk->ax25->digipeat;
ax251790net/ax25/af_ax25.cax25_output(sk->ax25, skb);  /* Shove it onto the queue and kick */
ax251803net/ax25/af_ax25.casmptr += (lv = build_ax25_addr(asmptr, &sk->ax25->source_addr, &sax.sax25_call, dp, C_COMMAND, MODULUS));
ax251816net/ax25/af_ax25.cax25_queue_xmit(skb, sk->ax25->device, SOPRI_NORMAL);
ax251849net/ax25/af_ax25.cif (sk->ax25->hdrincl) {
ax252005net/ax25/af_ax25.cax25_cb *ax25;
ax252016net/ax25/af_ax25.cfor (ax25 = ax25_list; ax25 != NULL; ax25 = ax25->next) {
ax252017net/ax25/af_ax25.cif ((dev = ax25->device) == NULL)
ax252023net/ax25/af_ax25.cax2asc(&ax25->dest_addr));
ax252025net/ax25/af_ax25.cax2asc(&ax25->source_addr), devname,
ax252026net/ax25/af_ax25.cax25->state,
ax252027net/ax25/af_ax25.cax25->vs, ax25->vr, ax25->va,
ax252028net/ax25/af_ax25.cax25->t1timer / PR_SLOWHZ,
ax252029net/ax25/af_ax25.cax25->t1      / PR_SLOWHZ,
ax252030net/ax25/af_ax25.cax25->t2timer / PR_SLOWHZ,
ax252031net/ax25/af_ax25.cax25->t2      / PR_SLOWHZ,
ax252032net/ax25/af_ax25.cax25->t3timer / PR_SLOWHZ,
ax252033net/ax25/af_ax25.cax25->t3      / PR_SLOWHZ,
ax252034net/ax25/af_ax25.cax25->n2count, ax25->n2,
ax252035net/ax25/af_ax25.cax25->rtt     / PR_SLOWHZ,
ax252036net/ax25/af_ax25.cax25->window);
ax252038net/ax25/af_ax25.cif (ax25->sk != NULL) {
ax252040net/ax25/af_ax25.cax25->sk->wmem_alloc,
ax252041net/ax25/af_ax25.cax25->sk->rmem_alloc);
ax2564net/ax25/ax25_in.cstatic int ax25_rx_fragment(ax25_cb *ax25, struct sk_buff *skb)
ax2569net/ax25/ax25_in.cif (ax25->fragno != 0) {
ax2571net/ax25/ax25_in.cif ((ax25->fragno - 1) == (*skb->data & SEG_REM)) {
ax2572net/ax25/ax25_in.cax25->fragno = *skb->data & SEG_REM;
ax2574net/ax25/ax25_in.cax25->fraglen += skb->len;
ax2575net/ax25/ax25_in.cskb_queue_tail(&ax25->frag_queue, skb);
ax2577net/ax25/ax25_in.cif (ax25->fragno == 0) {
ax2578net/ax25/ax25_in.cif ((skbn = alloc_skb(AX25_MAX_HEADER_LEN + ax25->fraglen, GFP_ATOMIC)) == NULL)
ax2584net/ax25/ax25_in.cif (ax25->sk != NULL) {
ax2585net/ax25/ax25_in.cskbn->sk = ax25->sk;
ax2586net/ax25/ax25_in.cax25->sk->rmem_alloc += skbn->truesize;
ax2592net/ax25/ax25_in.cskbo = skb_dequeue(&ax25->frag_queue);
ax2599net/ax25/ax25_in.cwhile ((skbo = skb_dequeue(&ax25->frag_queue)) != NULL) {
ax25104net/ax25/ax25_in.cax25->fraglen = 0;
ax25106net/ax25/ax25_in.cif (ax25_rx_iframe(ax25, skbn) == 0)
ax25115net/ax25/ax25_in.cax25->fragno = *skb->data & SEG_REM;
ax25117net/ax25/ax25_in.cax25->fraglen = skb->len;
ax25118net/ax25/ax25_in.cskb_queue_tail(&ax25->frag_queue, skb);
ax25130net/ax25/ax25_in.cstatic int ax25_rx_iframe(ax25_cb *ax25, struct sk_buff *skb)
ax25138net/ax25/ax25_in.cif (ax25_dev_get_value(ax25->device, AX25_VALUES_NETROM)) {
ax25140net/ax25/ax25_in.cqueued = nr_route_frame(skb, ax25);
ax25148net/ax25/ax25_in.cax25_ip_mode_set(&ax25->dest_addr, ax25->device, 'V');
ax25155net/ax25/ax25_in.cqueued = ax25_rx_fragment(ax25, skb);
ax25159net/ax25/ax25_in.cif (ax25->sk != NULL && ax25_dev_get_value(ax25->device, AX25_VALUES_TEXT) && ax25->sk->protocol == pid) {
ax25160net/ax25/ax25_in.cif (sock_queue_rcv_skb(ax25->sk, skb) == 0) {
ax25163net/ax25/ax25_in.cax25->condition |= OWN_RX_BUSY_CONDITION;
ax25177net/ax25/ax25_in.cstatic int ax25_state1_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int pf, int type)
ax25181net/ax25/ax25_in.cax25->modulus = MODULUS;
ax25182net/ax25/ax25_in.cax25->window  = ax25_dev_get_value(ax25->device, AX25_VALUES_WINDOW);
ax25183net/ax25/ax25_in.cax25_send_control(ax25, UA, pf, C_RESPONSE);
ax25187net/ax25/ax25_in.cax25->modulus = EMODULUS;
ax25188net/ax25/ax25_in.cax25->window  = ax25_dev_get_value(ax25->device, AX25_VALUES_EWINDOW);
ax25189net/ax25/ax25_in.cax25_send_control(ax25, UA, pf, C_RESPONSE);
ax25193net/ax25/ax25_in.cax25_send_control(ax25, DM, pf, C_RESPONSE);
ax25198net/ax25/ax25_in.cax25_calculate_rtt(ax25);
ax25199net/ax25/ax25_in.cax25->t1timer = 0;
ax25200net/ax25/ax25_in.cax25->t3timer = ax25->t3;
ax25201net/ax25/ax25_in.cax25->vs      = 0;
ax25202net/ax25/ax25_in.cax25->va      = 0;
ax25203net/ax25/ax25_in.cax25->vr      = 0;
ax25204net/ax25/ax25_in.cax25->state   = AX25_STATE_3;
ax25205net/ax25/ax25_in.cax25->n2count = 0;
ax25206net/ax25/ax25_in.cif (ax25->sk != NULL) {
ax25207net/ax25/ax25_in.cax25->sk->state = TCP_ESTABLISHED;
ax25209net/ax25/ax25_in.cif (!ax25->sk->dead)
ax25210net/ax25/ax25_in.cax25->sk->state_change(ax25->sk);
ax25217net/ax25/ax25_in.cif (ax25->modulus == MODULUS) {
ax25218net/ax25/ax25_in.cax25_clear_queues(ax25);
ax25219net/ax25/ax25_in.cax25->state = AX25_STATE_0;
ax25220net/ax25/ax25_in.cif (ax25->sk != NULL) {
ax25221net/ax25/ax25_in.cax25->sk->state = TCP_CLOSE;
ax25222net/ax25/ax25_in.cax25->sk->err   = ECONNREFUSED;
ax25223net/ax25/ax25_in.cif (!ax25->sk->dead)
ax25224net/ax25/ax25_in.cax25->sk->state_change(ax25->sk);
ax25225net/ax25/ax25_in.cax25->sk->dead  = 1;
ax25228net/ax25/ax25_in.cax25->modulus = MODULUS;
ax25229net/ax25/ax25_in.cax25->window  = ax25_dev_get_value(ax25->device, AX25_VALUES_WINDOW);
ax25246net/ax25/ax25_in.cstatic int ax25_state2_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int pf, int type)
ax25251net/ax25/ax25_in.cax25_send_control(ax25, DM, pf, C_RESPONSE);
ax25255net/ax25/ax25_in.cax25_send_control(ax25, UA, pf, C_RESPONSE);
ax25260net/ax25/ax25_in.cax25->state = AX25_STATE_0;
ax25261net/ax25/ax25_in.cif (ax25->sk != NULL) {
ax25262net/ax25/ax25_in.cax25->sk->state = TCP_CLOSE;
ax25263net/ax25/ax25_in.cax25->sk->err   = 0;
ax25264net/ax25/ax25_in.cif (!ax25->sk->dead)
ax25265net/ax25/ax25_in.cax25->sk->state_change(ax25->sk);
ax25266net/ax25/ax25_in.cax25->sk->dead  = 1;
ax25273net/ax25/ax25_in.cax25->state = AX25_STATE_0;
ax25274net/ax25/ax25_in.cif (ax25->sk != NULL) {
ax25275net/ax25/ax25_in.cax25->sk->state = TCP_CLOSE;
ax25276net/ax25/ax25_in.cax25->sk->err   = 0;
ax25277net/ax25/ax25_in.cif (!ax25->sk->dead)
ax25278net/ax25/ax25_in.cax25->sk->state_change(ax25->sk);
ax25279net/ax25/ax25_in.cax25->sk->dead  = 1;
ax25289net/ax25/ax25_in.cax25_send_control(ax25, DM, POLLON, C_RESPONSE);
ax25304net/ax25/ax25_in.cstatic int ax25_state3_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int ns, int nr, int pf, int type)
ax25310net/ax25/ax25_in.cax25->modulus   = MODULUS;
ax25311net/ax25/ax25_in.cax25->window    = ax25_dev_get_value(ax25->device, AX25_VALUES_WINDOW);
ax25312net/ax25/ax25_in.cax25_send_control(ax25, UA, pf, C_RESPONSE);
ax25313net/ax25/ax25_in.cax25->condition = 0x00;
ax25314net/ax25/ax25_in.cax25->t1timer   = 0;
ax25315net/ax25/ax25_in.cax25->t3timer   = ax25->t3;
ax25316net/ax25/ax25_in.cax25->vs        = 0;
ax25317net/ax25/ax25_in.cax25->va        = 0;
ax25318net/ax25/ax25_in.cax25->vr        = 0;
ax25322net/ax25/ax25_in.cax25->modulus   = EMODULUS;
ax25323net/ax25/ax25_in.cax25->window    = ax25_dev_get_value(ax25->device, AX25_VALUES_EWINDOW);
ax25324net/ax25/ax25_in.cax25_send_control(ax25, UA, pf, C_RESPONSE);
ax25325net/ax25/ax25_in.cax25->condition = 0x00;
ax25326net/ax25/ax25_in.cax25->t1timer   = 0;
ax25327net/ax25/ax25_in.cax25->t3timer   = ax25->t3;
ax25328net/ax25/ax25_in.cax25->vs        = 0;
ax25329net/ax25/ax25_in.cax25->va        = 0;
ax25330net/ax25/ax25_in.cax25->vr        = 0;
ax25334net/ax25/ax25_in.cax25_clear_queues(ax25);
ax25335net/ax25/ax25_in.cax25_send_control(ax25, UA, pf, C_RESPONSE);
ax25336net/ax25/ax25_in.cax25->t3timer = 0;
ax25337net/ax25/ax25_in.cax25->state   = AX25_STATE_0;
ax25338net/ax25/ax25_in.cif (ax25->sk != NULL) {
ax25339net/ax25/ax25_in.cax25->sk->state = TCP_CLOSE;
ax25340net/ax25/ax25_in.cax25->sk->err   = 0;
ax25341net/ax25/ax25_in.cif (!ax25->sk->dead)
ax25342net/ax25/ax25_in.cax25->sk->state_change(ax25->sk);
ax25343net/ax25/ax25_in.cax25->sk->dead  = 1;
ax25348net/ax25/ax25_in.cax25_clear_queues(ax25);
ax25349net/ax25/ax25_in.cax25->t3timer = 0;
ax25350net/ax25/ax25_in.cax25->state   = AX25_STATE_0;
ax25351net/ax25/ax25_in.cif (ax25->sk) {
ax25352net/ax25/ax25_in.cax25->sk->state = TCP_CLOSE;
ax25353net/ax25/ax25_in.cax25->sk->err   = ECONNRESET;
ax25354net/ax25/ax25_in.cif (!ax25->sk->dead)
ax25355net/ax25/ax25_in.cax25->sk->state_change(ax25->sk);
ax25356net/ax25/ax25_in.cax25->sk->dead         = 1;
ax25361net/ax25/ax25_in.cax25->condition |= PEER_RX_BUSY_CONDITION;
ax25362net/ax25/ax25_in.cax25_check_need_response(ax25, type, pf);
ax25363net/ax25/ax25_in.cif (ax25_validate_nr(ax25, nr)) {
ax25364net/ax25/ax25_in.cax25_check_iframes_acked(ax25, nr);
ax25366net/ax25/ax25_in.cax25_nr_error_recovery(ax25);
ax25367net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25372net/ax25/ax25_in.cax25->condition &= ~PEER_RX_BUSY_CONDITION;
ax25373net/ax25/ax25_in.cax25_check_need_response(ax25, type, pf);
ax25374net/ax25/ax25_in.cif (ax25_validate_nr(ax25, nr)) {
ax25375net/ax25/ax25_in.cax25_check_iframes_acked(ax25, nr);
ax25377net/ax25/ax25_in.cax25_nr_error_recovery(ax25);
ax25378net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25383net/ax25/ax25_in.cax25->condition &= ~PEER_RX_BUSY_CONDITION;
ax25384net/ax25/ax25_in.cax25_check_need_response(ax25, type, pf);
ax25385net/ax25/ax25_in.cif (ax25_validate_nr(ax25, nr)) {
ax25386net/ax25/ax25_in.cax25_frames_acked(ax25, nr);
ax25387net/ax25/ax25_in.cax25_calculate_rtt(ax25);
ax25388net/ax25/ax25_in.cax25->t1timer = 0;
ax25389net/ax25/ax25_in.cax25->t3timer = ax25->t3;
ax25390net/ax25/ax25_in.cax25_requeue_frames(ax25);
ax25392net/ax25/ax25_in.cax25_nr_error_recovery(ax25);
ax25393net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25402net/ax25/ax25_in.cif (!ax25_validate_nr(ax25, nr)) {
ax25403net/ax25/ax25_in.cax25_nr_error_recovery(ax25);
ax25404net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25407net/ax25/ax25_in.cif (ax25->condition & PEER_RX_BUSY_CONDITION) {
ax25408net/ax25/ax25_in.cax25_frames_acked(ax25, nr);
ax25410net/ax25/ax25_in.cax25_check_iframes_acked(ax25, nr);
ax25412net/ax25/ax25_in.cif (ax25->condition & OWN_RX_BUSY_CONDITION) {
ax25413net/ax25/ax25_in.cif (pf) ax25_enquiry_response(ax25);
ax25416net/ax25/ax25_in.cif (ns == ax25->vr) {
ax25417net/ax25/ax25_in.cqueued = ax25_rx_iframe(ax25, skb);
ax25418net/ax25/ax25_in.cif (ax25->condition & OWN_RX_BUSY_CONDITION) {
ax25419net/ax25/ax25_in.cif (pf) ax25_enquiry_response(ax25);
ax25422net/ax25/ax25_in.cax25->vr = (ax25->vr + 1) % ax25->modulus;
ax25423net/ax25/ax25_in.cax25->condition &= ~REJECT_CONDITION;
ax25425net/ax25/ax25_in.cax25_enquiry_response(ax25);
ax25427net/ax25/ax25_in.cif (!(ax25->condition & ACK_PENDING_CONDITION)) {
ax25428net/ax25/ax25_in.cax25->t2timer = ax25->t2;
ax25429net/ax25/ax25_in.cax25->condition |= ACK_PENDING_CONDITION;
ax25433net/ax25/ax25_in.cif (ax25->condition & REJECT_CONDITION) {
ax25434net/ax25/ax25_in.cif (pf) ax25_enquiry_response(ax25);
ax25436net/ax25/ax25_in.cax25->condition |= REJECT_CONDITION;
ax25437net/ax25/ax25_in.cax25_send_control(ax25, REJ, pf, C_RESPONSE);
ax25438net/ax25/ax25_in.cax25->condition &= ~ACK_PENDING_CONDITION;
ax25445net/ax25/ax25_in.cax25_establish_data_link(ax25);
ax25446net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25461net/ax25/ax25_in.cstatic int ax25_state4_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int ns, int nr, int pf, int type)
ax25467net/ax25/ax25_in.cax25->modulus   = MODULUS;
ax25468net/ax25/ax25_in.cax25->window    = ax25_dev_get_value(ax25->device, AX25_VALUES_WINDOW);
ax25469net/ax25/ax25_in.cax25_send_control(ax25, UA, pf, C_RESPONSE);
ax25470net/ax25/ax25_in.cax25->condition = 0x00;
ax25471net/ax25/ax25_in.cax25->t1timer   = 0;
ax25472net/ax25/ax25_in.cax25->t3timer   = ax25->t3;
ax25473net/ax25/ax25_in.cax25->vs        = 0;
ax25474net/ax25/ax25_in.cax25->va        = 0;
ax25475net/ax25/ax25_in.cax25->vr        = 0;
ax25476net/ax25/ax25_in.cax25->state     = AX25_STATE_3;
ax25477net/ax25/ax25_in.cax25->n2count   = 0;
ax25481net/ax25/ax25_in.cax25->modulus   = EMODULUS;
ax25482net/ax25/ax25_in.cax25->window    = ax25_dev_get_value(ax25->device, AX25_VALUES_EWINDOW);
ax25483net/ax25/ax25_in.cax25_send_control(ax25, UA, pf, C_RESPONSE);
ax25484net/ax25/ax25_in.cax25->condition = 0x00;
ax25485net/ax25/ax25_in.cax25->t1timer   = 0;
ax25486net/ax25/ax25_in.cax25->t3timer   = ax25->t3;
ax25487net/ax25/ax25_in.cax25->vs        = 0;
ax25488net/ax25/ax25_in.cax25->va        = 0;
ax25489net/ax25/ax25_in.cax25->vr        = 0;
ax25490net/ax25/ax25_in.cax25->state     = AX25_STATE_3;
ax25491net/ax25/ax25_in.cax25->n2count   = 0;
ax25495net/ax25/ax25_in.cax25_clear_queues(ax25);
ax25496net/ax25/ax25_in.cax25_send_control(ax25, UA, pf, C_RESPONSE);
ax25497net/ax25/ax25_in.cax25->t3timer = 0;
ax25498net/ax25/ax25_in.cax25->state   = AX25_STATE_0;
ax25499net/ax25/ax25_in.cif (ax25->sk != NULL) {
ax25500net/ax25/ax25_in.cax25->sk->state = TCP_CLOSE;
ax25501net/ax25/ax25_in.cax25->sk->err   = 0;
ax25502net/ax25/ax25_in.cif (!ax25->sk->dead)
ax25503net/ax25/ax25_in.cax25->sk->state_change(ax25->sk);
ax25504net/ax25/ax25_in.cax25->sk->dead  = 1;
ax25509net/ax25/ax25_in.cax25_clear_queues(ax25);
ax25510net/ax25/ax25_in.cax25->t3timer = 0;
ax25511net/ax25/ax25_in.cax25->state   = AX25_STATE_0;
ax25512net/ax25/ax25_in.cif (ax25->sk != NULL) {
ax25513net/ax25/ax25_in.cax25->sk->state = TCP_CLOSE;
ax25514net/ax25/ax25_in.cax25->sk->err   = ECONNRESET;
ax25515net/ax25/ax25_in.cif (!ax25->sk->dead)
ax25516net/ax25/ax25_in.cax25->sk->state_change(ax25->sk);
ax25517net/ax25/ax25_in.cax25->sk->dead  = 1;
ax25522net/ax25/ax25_in.cax25->condition |= PEER_RX_BUSY_CONDITION;
ax25524net/ax25/ax25_in.cax25->t1timer = 0;
ax25525net/ax25/ax25_in.cif (ax25_validate_nr(ax25, nr)) {
ax25526net/ax25/ax25_in.cax25_frames_acked(ax25, nr);
ax25527net/ax25/ax25_in.cif (ax25->vs == ax25->va) {
ax25528net/ax25/ax25_in.cax25->t3timer = ax25->t3;
ax25529net/ax25/ax25_in.cax25->n2count = 0;
ax25530net/ax25/ax25_in.cax25->state   = AX25_STATE_3;
ax25533net/ax25/ax25_in.cax25_nr_error_recovery(ax25);
ax25534net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25539net/ax25/ax25_in.cax25_enquiry_response(ax25);
ax25540net/ax25/ax25_in.cif (ax25_validate_nr(ax25, nr)) {
ax25541net/ax25/ax25_in.cax25_frames_acked(ax25, nr);
ax25543net/ax25/ax25_in.cax25_nr_error_recovery(ax25);
ax25544net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25549net/ax25/ax25_in.cax25->condition &= ~PEER_RX_BUSY_CONDITION;
ax25551net/ax25/ax25_in.cax25->t1timer = 0;
ax25552net/ax25/ax25_in.cif (ax25_validate_nr(ax25, nr)) {
ax25553net/ax25/ax25_in.cax25_frames_acked(ax25, nr);
ax25554net/ax25/ax25_in.cif (ax25->vs == ax25->va) {
ax25555net/ax25/ax25_in.cax25->t3timer = ax25->t3;
ax25556net/ax25/ax25_in.cax25->n2count = 0;
ax25557net/ax25/ax25_in.cax25->state   = AX25_STATE_3;
ax25559net/ax25/ax25_in.cax25_requeue_frames(ax25);
ax25562net/ax25/ax25_in.cax25_nr_error_recovery(ax25);
ax25563net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25568net/ax25/ax25_in.cax25_enquiry_response(ax25);
ax25569net/ax25/ax25_in.cif (ax25_validate_nr(ax25, nr)) {
ax25570net/ax25/ax25_in.cax25_frames_acked(ax25, nr);
ax25572net/ax25/ax25_in.cax25_nr_error_recovery(ax25);
ax25573net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25578net/ax25/ax25_in.cax25->condition &= ~PEER_RX_BUSY_CONDITION;
ax25580net/ax25/ax25_in.cax25->t1timer = 0;
ax25581net/ax25/ax25_in.cif (ax25_validate_nr(ax25, nr)) {
ax25582net/ax25/ax25_in.cax25_frames_acked(ax25, nr);
ax25583net/ax25/ax25_in.cif (ax25->vs == ax25->va) {
ax25584net/ax25/ax25_in.cax25->t3timer = ax25->t3;
ax25585net/ax25/ax25_in.cax25->n2count = 0;
ax25586net/ax25/ax25_in.cax25->state   = AX25_STATE_3;
ax25588net/ax25/ax25_in.cax25_requeue_frames(ax25);
ax25591net/ax25/ax25_in.cax25_nr_error_recovery(ax25);
ax25592net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25597net/ax25/ax25_in.cax25_enquiry_response(ax25);
ax25598net/ax25/ax25_in.cif (ax25_validate_nr(ax25, nr)) {
ax25599net/ax25/ax25_in.cax25_frames_acked(ax25, nr);
ax25600net/ax25/ax25_in.cif(ax25->vs != ax25->va) {
ax25601net/ax25/ax25_in.cax25_requeue_frames(ax25);
ax25604net/ax25/ax25_in.cax25_nr_error_recovery(ax25);
ax25605net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25614net/ax25/ax25_in.cif (!ax25_validate_nr(ax25, nr)) {
ax25615net/ax25/ax25_in.cax25_nr_error_recovery(ax25);
ax25616net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25619net/ax25/ax25_in.cax25_frames_acked(ax25, nr);
ax25620net/ax25/ax25_in.cif (ax25->condition & OWN_RX_BUSY_CONDITION) {
ax25621net/ax25/ax25_in.cif (pf) ax25_enquiry_response(ax25);
ax25624net/ax25/ax25_in.cif (ns == ax25->vr) {
ax25625net/ax25/ax25_in.cqueued = ax25_rx_iframe(ax25, skb);
ax25626net/ax25/ax25_in.cif (ax25->condition & OWN_RX_BUSY_CONDITION) {
ax25627net/ax25/ax25_in.cif (pf) ax25_enquiry_response(ax25);
ax25630net/ax25/ax25_in.cax25->vr = (ax25->vr + 1) % ax25->modulus;
ax25631net/ax25/ax25_in.cax25->condition &= ~REJECT_CONDITION;
ax25633net/ax25/ax25_in.cax25_enquiry_response(ax25);
ax25635net/ax25/ax25_in.cif (!(ax25->condition & ACK_PENDING_CONDITION)) {
ax25636net/ax25/ax25_in.cax25->t2timer = ax25->t2;
ax25637net/ax25/ax25_in.cax25->condition |= ACK_PENDING_CONDITION;
ax25641net/ax25/ax25_in.cif (ax25->condition & REJECT_CONDITION) {
ax25642net/ax25/ax25_in.cif (pf) ax25_enquiry_response(ax25);
ax25644net/ax25/ax25_in.cax25->condition |= REJECT_CONDITION;
ax25645net/ax25/ax25_in.cax25_send_control(ax25, REJ, pf, C_RESPONSE);
ax25646net/ax25/ax25_in.cax25->condition &= ~ACK_PENDING_CONDITION;
ax25653net/ax25/ax25_in.cax25_establish_data_link(ax25);
ax25654net/ax25/ax25_in.cax25->state = AX25_STATE_1;
ax25667net/ax25/ax25_in.cint ax25_process_rx_frame(ax25_cb *ax25, struct sk_buff *skb, int type)
ax25671net/ax25/ax25_in.cif (ax25->sk != NULL && ax25->state == AX25_STATE_0 && ax25->sk->dead)
ax25674net/ax25/ax25_in.cif (ax25->state != AX25_STATE_1 && ax25->state != AX25_STATE_2 &&
ax25675net/ax25/ax25_in.cax25->state != AX25_STATE_3 && ax25->state != AX25_STATE_4) {
ax25676net/ax25/ax25_in.cprintk("ax25_process_rx_frame: frame received - state = %d\n", ax25->state);
ax25680net/ax25/ax25_in.cdel_timer(&ax25->timer);
ax25682net/ax25/ax25_in.cframetype = ax25_decode(ax25, skb, &ns, &nr, &pf);
ax25684net/ax25/ax25_in.cswitch (ax25->state) {
ax25686net/ax25/ax25_in.cqueued = ax25_state1_machine(ax25, skb, frametype, pf, type);
ax25689net/ax25/ax25_in.cqueued = ax25_state2_machine(ax25, skb, frametype, pf, type);
ax25692net/ax25/ax25_in.cqueued = ax25_state3_machine(ax25, skb, frametype, ns, nr, pf, type);
ax25695net/ax25/ax25_in.cqueued = ax25_state4_machine(ax25, skb, frametype, ns, nr, pf, type);
ax25699net/ax25/ax25_in.cax25_set_timer(ax25);
ax2556net/ax25/ax25_out.cvoid ax25_output(ax25_cb *ax25, struct sk_buff *skb)
ax2562net/ax25/ax25_out.cmtu = ax25->device->mtu;
ax25102net/ax25/ax25_out.cskb_queue_tail(&ax25->write_queue, skbn); /* Throw it on the queue */
ax25108net/ax25/ax25_out.cskb_queue_tail(&ax25->write_queue, skb);    /* Throw it on the queue */
ax25111net/ax25/ax25_out.cif (ax25->state == AX25_STATE_3 || ax25->state == AX25_STATE_4)
ax25112net/ax25/ax25_out.cax25_kick(ax25);
ax25119net/ax25/ax25_out.cstatic void ax25_send_iframe(ax25_cb *ax25, struct sk_buff *skb, int poll_bit)
ax25126net/ax25/ax25_out.cif (ax25->modulus == MODULUS) {
ax25131net/ax25/ax25_out.c*frame |= (ax25->vr << 5);
ax25132net/ax25/ax25_out.c*frame |= (ax25->vs << 1);
ax25137net/ax25/ax25_out.cframe[0] |= (ax25->vs << 1);
ax25139net/ax25/ax25_out.cframe[1] |= (ax25->vr << 1);
ax25142net/ax25/ax25_out.cax25_transmit_buffer(ax25, skb, C_COMMAND);  
ax25145net/ax25/ax25_out.cvoid ax25_kick(ax25_cb *ax25)
ax25151net/ax25/ax25_out.cdel_timer(&ax25->timer);
ax25153net/ax25/ax25_out.cstart = (skb_peek(&ax25->ack_queue) == NULL) ? ax25->va : ax25->vs;
ax25154net/ax25/ax25_out.cend   = (ax25->va + ax25->window) % ax25->modulus;
ax25156net/ax25/ax25_out.cif (!(ax25->condition & PEER_RX_BUSY_CONDITION) &&
ax25158net/ax25/ax25_out.cskb_peek(&ax25->write_queue) != NULL) {
ax25160net/ax25/ax25_out.cax25->vs = start;
ax25171net/ax25/ax25_out.cskb  = skb_dequeue(&ax25->write_queue);
ax25175net/ax25/ax25_out.cskb_queue_head(&ax25->write_queue, skb);
ax25179net/ax25/ax25_out.cnext = (ax25->vs + 1) % ax25->modulus;
ax25181net/ax25/ax25_out.clast = (next == end) || skb_peek(&ax25->write_queue) == NULL;
ax25188net/ax25/ax25_out.cax25_send_iframe(ax25, skbn, (last) ? POLLON : POLLOFF);
ax25190net/ax25/ax25_out.cax25->vs = next;
ax25195net/ax25/ax25_out.cskb_queue_tail(&ax25->ack_queue, skb);
ax25199net/ax25/ax25_out.c} while (!last && (skb = skb_dequeue(&ax25->write_queue)) != NULL);
ax25201net/ax25/ax25_out.cax25->condition &= ~ACK_PENDING_CONDITION;
ax25203net/ax25/ax25_out.cif (ax25->t1timer == 0) {
ax25204net/ax25/ax25_out.cax25->t3timer = 0;
ax25205net/ax25/ax25_out.cax25->t1timer = ax25->t1 = ax25_calculate_t1(ax25);
ax25209net/ax25/ax25_out.cax25_set_timer(ax25);
ax25212net/ax25/ax25_out.cvoid ax25_transmit_buffer(ax25_cb *ax25, struct sk_buff *skb, int type)
ax25216net/ax25/ax25_out.cif (ax25->device == NULL) {
ax25217net/ax25/ax25_out.cif (ax25->sk != NULL) {
ax25218net/ax25/ax25_out.cax25->sk->state = TCP_CLOSE;
ax25219net/ax25/ax25_out.cax25->sk->err   = ENETUNREACH;
ax25220net/ax25/ax25_out.cif (!ax25->sk->dead)
ax25221net/ax25/ax25_out.cax25->sk->state_change(ax25->sk);
ax25222net/ax25/ax25_out.cax25->sk->dead  = 1;
ax25227net/ax25/ax25_out.cif (skb_headroom(skb) < size_ax25_addr(ax25->digipeat)) {
ax25234net/ax25/ax25_out.cptr = skb_push(skb, size_ax25_addr(ax25->digipeat));
ax25235net/ax25/ax25_out.cbuild_ax25_addr(ptr, &ax25->source_addr, &ax25->dest_addr, ax25->digipeat, type, ax25->modulus);
ax25239net/ax25/ax25_out.cax25_queue_xmit(skb, ax25->device, SOPRI_NORMAL);
ax25247net/ax25/ax25_out.cvoid ax25_nr_error_recovery(ax25_cb *ax25)
ax25249net/ax25/ax25_out.cax25_establish_data_link(ax25);
ax25252net/ax25/ax25_out.cvoid ax25_establish_data_link(ax25_cb *ax25)
ax25254net/ax25/ax25_out.cax25->condition = 0x00;
ax25255net/ax25/ax25_out.cax25->n2count   = 0;
ax25257net/ax25/ax25_out.cif (ax25->modulus == MODULUS) {
ax25258net/ax25/ax25_out.cax25_send_control(ax25, SABM, POLLON, C_COMMAND);
ax25260net/ax25/ax25_out.cax25_send_control(ax25, SABME, POLLON, C_COMMAND);
ax25263net/ax25/ax25_out.cax25->t3timer = 0;
ax25264net/ax25/ax25_out.cax25->t2timer = 0;
ax25265net/ax25/ax25_out.cax25->t1timer = ax25->t1 = ax25_calculate_t1(ax25);
ax25268net/ax25/ax25_out.cvoid ax25_transmit_enquiry(ax25_cb *ax25)
ax25270net/ax25/ax25_out.cif (ax25->condition & OWN_RX_BUSY_CONDITION)
ax25271net/ax25/ax25_out.cax25_send_control(ax25, RNR, POLLON, C_COMMAND);
ax25273net/ax25/ax25_out.cax25_send_control(ax25, RR, POLLON, C_COMMAND);
ax25275net/ax25/ax25_out.cax25->condition &= ~ACK_PENDING_CONDITION;
ax25277net/ax25/ax25_out.cax25->t1timer = ax25->t1 = ax25_calculate_t1(ax25);
ax25280net/ax25/ax25_out.cvoid ax25_enquiry_response(ax25_cb *ax25)
ax25282net/ax25/ax25_out.cif (ax25->condition & OWN_RX_BUSY_CONDITION)
ax25283net/ax25/ax25_out.cax25_send_control(ax25, RNR, POLLON, C_RESPONSE);
ax25285net/ax25/ax25_out.cax25_send_control(ax25, RR, POLLON, C_RESPONSE);
ax25287net/ax25/ax25_out.cax25->condition &= ~ACK_PENDING_CONDITION;
ax25290net/ax25/ax25_out.cvoid ax25_timeout_response(ax25_cb *ax25)
ax25292net/ax25/ax25_out.cif (ax25->condition & OWN_RX_BUSY_CONDITION)
ax25293net/ax25/ax25_out.cax25_send_control(ax25, RNR, POLLOFF, C_RESPONSE);
ax25295net/ax25/ax25_out.cax25_send_control(ax25, RR, POLLOFF, C_RESPONSE);
ax25297net/ax25/ax25_out.cax25->condition &= ~ACK_PENDING_CONDITION;
ax25300net/ax25/ax25_out.cvoid ax25_check_iframes_acked(ax25_cb *ax25, unsigned short nr)
ax25302net/ax25/ax25_out.cif (ax25->vs == nr) {
ax25303net/ax25/ax25_out.cax25_frames_acked(ax25, nr);
ax25304net/ax25/ax25_out.cax25_calculate_rtt(ax25);
ax25305net/ax25/ax25_out.cax25->t1timer = 0;
ax25306net/ax25/ax25_out.cax25->t3timer = ax25->t3;
ax25308net/ax25/ax25_out.cif (ax25->va != nr) {
ax25309net/ax25/ax25_out.cax25_frames_acked(ax25, nr);
ax25310net/ax25/ax25_out.cax25->t1timer = ax25->t1 = ax25_calculate_t1(ax25);
ax25315net/ax25/ax25_out.cvoid ax25_check_need_response(ax25_cb *ax25, int type, int pf)
ax25318net/ax25/ax25_out.cax25_enquiry_response(ax25);
ax25364net/ax25/ax25_route.cint ax25_rt_autobind(ax25_cb *ax25, ax25_address *addr)
ax25374net/ax25/ax25_route.cif ((ax25->device = ax25_rt->dev) == NULL)
ax25379net/ax25/ax25_route.ccall = (ax25_address *)ax25->device->dev_addr;
ax25381net/ax25/ax25_route.cmemcpy(&ax25->source_addr, call, sizeof(ax25_address));
ax25383net/ax25/ax25_route.cif ((ax25->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL)
ax25385net/ax25/ax25_route.cmemcpy(ax25->digipeat, ax25_rt->digipeat, sizeof(ax25_digi));
ax25387net/ax25/ax25_route.cif (ax25->sk != NULL)
ax25388net/ax25/ax25_route.cax25->sk->zapped = 0;
ax2556net/ax25/ax25_subr.cvoid ax25_clear_queues(ax25_cb *ax25)
ax2560net/ax25/ax25_subr.cwhile ((skb = skb_dequeue(&ax25->write_queue)) != NULL) {
ax2565net/ax25/ax25_subr.cwhile ((skb = skb_dequeue(&ax25->ack_queue)) != NULL) {
ax2570net/ax25/ax25_subr.cwhile ((skb = skb_dequeue(&ax25->reseq_queue)) != NULL) {
ax2574net/ax25/ax25_subr.cwhile ((skb = skb_dequeue(&ax25->frag_queue)) != NULL) {
ax2584net/ax25/ax25_subr.cvoid ax25_frames_acked(ax25_cb *ax25, unsigned short nr)
ax2591net/ax25/ax25_subr.cif (ax25->va != nr) {
ax2592net/ax25/ax25_subr.cwhile (skb_peek(&ax25->ack_queue) != NULL && ax25->va != nr) {
ax2593net/ax25/ax25_subr.cskb = skb_dequeue(&ax25->ack_queue);
ax2596net/ax25/ax25_subr.cax25->va = (ax25->va + 1) % ax25->modulus;
ax25105net/ax25/ax25_subr.cvoid ax25_requeue_frames(ax25_cb *ax25)
ax25114net/ax25/ax25_subr.cwhile ((skb = skb_dequeue(&ax25->ack_queue)) != NULL) {
ax25116net/ax25/ax25_subr.cskb_queue_head(&ax25->write_queue, skb);
ax25127net/ax25/ax25_subr.cint ax25_validate_nr(ax25_cb *ax25, unsigned short nr)
ax25129net/ax25/ax25_subr.cunsigned short vc = ax25->va;
ax25131net/ax25/ax25_subr.cwhile (vc != ax25->vs) {
ax25133net/ax25/ax25_subr.cvc = (vc + 1) % ax25->modulus;
ax25136net/ax25/ax25_subr.cif (nr == ax25->vs) return 1;
ax25145net/ax25/ax25_subr.cint ax25_decode(ax25_cb *ax25, struct sk_buff *skb, int *ns, int *nr, int *pf)
ax25153net/ax25/ax25_subr.cif (ax25->modulus == MODULUS) {
ax25195net/ax25/ax25_subr.cvoid ax25_send_control(ax25_cb *ax25, int frametype, int poll_bit, int type)
ax25201net/ax25/ax25_subr.cif ((dev = ax25->device) == NULL)
ax25204net/ax25/ax25_subr.cif ((skb = alloc_skb(AX25_BPQ_HEADER_LEN + size_ax25_addr(ax25->digipeat) + 2, GFP_ATOMIC)) == NULL)
ax25207net/ax25/ax25_subr.cskb_reserve(skb, AX25_BPQ_HEADER_LEN + size_ax25_addr(ax25->digipeat));
ax25209net/ax25/ax25_subr.cif (ax25->sk != NULL) {
ax25210net/ax25/ax25_subr.cskb->sk = ax25->sk;
ax25211net/ax25/ax25_subr.cax25->sk->wmem_alloc += skb->truesize;
ax25215net/ax25/ax25_subr.cif (ax25->modulus == MODULUS) {
ax25220net/ax25/ax25_subr.c*dptr |= (ax25->vr << 5);
ax25229net/ax25/ax25_subr.cdptr[1] = (ax25->vr << 1);
ax25236net/ax25/ax25_subr.cax25_transmit_buffer(ax25, skb, type);
ax25281net/ax25/ax25_subr.cunsigned short ax25_calculate_t1(ax25_cb *ax25)
ax25285net/ax25/ax25_subr.cif (ax25->backoff) {
ax25286net/ax25/ax25_subr.cfor (n = 0; n < ax25->n2count; n++)
ax25292net/ax25/ax25_subr.creturn t * ax25->rtt;
ax25298net/ax25/ax25_subr.cvoid ax25_calculate_rtt(ax25_cb *ax25)
ax25300net/ax25/ax25_subr.cif (ax25->t1timer > 0 && ax25->n2count == 0)
ax25301net/ax25/ax25_subr.cax25->rtt = (9 * ax25->rtt + ax25->t1 - ax25->t1timer) / 10;
ax25305net/ax25/ax25_subr.cif (ax25->rtt < (AX25_T1CLAMPLO))
ax25306net/ax25/ax25_subr.cax25->rtt = (AX25_T1CLAMPLO);
ax25308net/ax25/ax25_subr.cif (ax25->rtt == 0)
ax25309net/ax25/ax25_subr.cax25->rtt = PR_SLOWHZ;
ax25313net/ax25/ax25_subr.cif (ax25->rtt > (AX25_T1CLAMPHI))
ax25314net/ax25/ax25_subr.cax25->rtt = (AX25_T1CLAMPHI);
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 = jiffies + 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  = jiffies + 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->destroy || (ax25->sk->state == TCP_LISTEN && ax25->sk->dead)) {
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, POLLOFF, 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_timeout_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) {
ax25155net/ax25/ax25_timer.cif (ax25->modulus == MODULUS) {
ax25157net/ax25/ax25_timer.cnr_link_failed(&ax25->dest_addr, ax25->device);
ax25159net/ax25/ax25_timer.cax25_clear_queues(ax25);
ax25160net/ax25/ax25_timer.cax25->state = AX25_STATE_0;
ax25161net/ax25/ax25_timer.cif (ax25->sk != NULL) {
ax25162net/ax25/ax25_timer.cax25->sk->state = TCP_CLOSE;
ax25163net/ax25/ax25_timer.cax25->sk->err   = ETIMEDOUT;
ax25164net/ax25/ax25_timer.cif (!ax25->sk->dead)
ax25165net/ax25/ax25_timer.cax25->sk->state_change(ax25->sk);
ax25166net/ax25/ax25_timer.cax25->sk->dead  = 1;
ax25169net/ax25/ax25_timer.cax25->modulus = MODULUS;
ax25170net/ax25/ax25_timer.cax25->window  = ax25_dev_get_value(ax25->device, AX25_VALUES_WINDOW);
ax25171net/ax25/ax25_timer.cax25->n2count = 0;
ax25172net/ax25/ax25_timer.cax25_send_control(ax25, SABM, POLLON, C_COMMAND);
ax25175net/ax25/ax25_timer.cax25->n2count++;
ax25176net/ax25/ax25_timer.cif (ax25->modulus == MODULUS) {
ax25177net/ax25/ax25_timer.cax25_send_control(ax25, SABM, POLLON, C_COMMAND);
ax25179net/ax25/ax25_timer.cax25_send_control(ax25, SABME, POLLON, C_COMMAND);
ax25185net/ax25/ax25_timer.cif (ax25->n2count == ax25->n2) {
ax25187net/ax25/ax25_timer.cnr_link_failed(&ax25->dest_addr, ax25->device);
ax25189net/ax25/ax25_timer.cax25_clear_queues(ax25);
ax25190net/ax25/ax25_timer.cax25->state = AX25_STATE_0;
ax25191net/ax25/ax25_timer.cif (ax25->sk != NULL) {
ax25192net/ax25/ax25_timer.cax25->sk->state = TCP_CLOSE;
ax25193net/ax25/ax25_timer.cax25->sk->err   = ETIMEDOUT;
ax25194net/ax25/ax25_timer.cif (!ax25->sk->dead)
ax25195net/ax25/ax25_timer.cax25->sk->state_change(ax25->sk);
ax25196net/ax25/ax25_timer.cax25->sk->dead  = 1;
ax25199net/ax25/ax25_timer.cax25->n2count++;
ax25200net/ax25/ax25_timer.cax25_send_control(ax25, DISC, POLLON, C_COMMAND);
ax25205net/ax25/ax25_timer.cax25->n2count = 1;
ax25206net/ax25/ax25_timer.cax25_transmit_enquiry(ax25);
ax25207net/ax25/ax25_timer.cax25->state   = AX25_STATE_4;
ax25211net/ax25/ax25_timer.cif (ax25->n2count == ax25->n2) {
ax25213net/ax25/ax25_timer.cnr_link_failed(&ax25->dest_addr, ax25->device);
ax25215net/ax25/ax25_timer.cax25_clear_queues(ax25);
ax25216net/ax25/ax25_timer.cax25_send_control(ax25, DM, POLLON, C_RESPONSE);
ax25217net/ax25/ax25_timer.cax25->state = AX25_STATE_0;
ax25218net/ax25/ax25_timer.cif (ax25->sk != NULL) {
ax25219net/ax25/ax25_timer.cax25->sk->state = TCP_CLOSE;
ax25220net/ax25/ax25_timer.cax25->sk->err   = ETIMEDOUT;
ax25221net/ax25/ax25_timer.cif (!ax25->sk->dead)
ax25222net/ax25/ax25_timer.cax25->sk->state_change(ax25->sk);
ax25223net/ax25/ax25_timer.cax25->sk->dead  = 1;
ax25226net/ax25/ax25_timer.cax25->n2count++;
ax25227net/ax25/ax25_timer.cax25_transmit_enquiry(ax25);
ax25232net/ax25/ax25_timer.cax25->t1timer = ax25->t1 = ax25_calculate_t1(ax25);
ax25234net/ax25/ax25_timer.cax25_set_timer(ax25);
ax2567net/netrom/nr_route.cstatic int nr_add_node(ax25_address *nr, const char *mnemonic, ax25_address *ax25,
ax2581net/netrom/nr_route.cif (ax25cmp(ax25, &nr_neigh->callsign) == 0 && nr_neigh->dev == dev)
ax2591net/netrom/nr_route.cmemcpy(&nr_neigh->callsign, ax25, sizeof(ax25_address));
ax25650net/netrom/nr_route.cint nr_route_frame(struct sk_buff *skb, ax25_cb *ax25)
ax25660net/netrom/nr_route.cif(ax25 && call_in_firewall(PF_NETROM, skb, skb->data)!=FW_ACCEPT)
ax25662net/netrom/nr_route.cif(!ax25 && call_out_firewall(PF_NETROM, skb, skb->data)!=FW_ACCEPT)
ax25668net/netrom/nr_route.cif (ax25 != NULL)
ax25669net/netrom/nr_route.cnr_add_node(nr_src, "", &ax25->dest_addr, ax25->digipeat, ax25->device, 0, nr_default.obs_count);
ax25674net/netrom/nr_route.cif (!nr_route_on && ax25 != NULL)
ax25699net/netrom/nr_route.cif(ax25 && call_fw_firewall(PF_NETROM, skb, skb->data)!=FW_ACCEPT)