Lines Matching refs:x25
57 #include <net/x25.h>
520 struct x25_sock *x25;
528 x25 = x25_sk(sk);
529 skb_queue_head_init(&x25->ack_queue);
530 skb_queue_head_init(&x25->fragment_queue);
531 skb_queue_head_init(&x25->interrupt_in_queue);
532 skb_queue_head_init(&x25->interrupt_out_queue);
541 struct x25_sock *x25;
559 x25 = x25_sk(sk);
569 x25->t21 = sysctl_x25_call_request_timeout;
570 x25->t22 = sysctl_x25_reset_request_timeout;
571 x25->t23 = sysctl_x25_clear_request_timeout;
572 x25->t2 = sysctl_x25_ack_holdback_timeout;
573 x25->state = X25_STATE_0;
574 x25->cudmatchlength = 0;
575 set_bit(X25_ACCPT_APPRV_FLAG, &x25->flags); /* normally no cud */
578 x25->facilities.winsize_in = X25_DEFAULT_WINDOW_SIZE;
579 x25->facilities.winsize_out = X25_DEFAULT_WINDOW_SIZE;
580 x25->facilities.pacsize_in = X25_DEFAULT_PACKET_SIZE;
581 x25->facilities.pacsize_out = X25_DEFAULT_PACKET_SIZE;
582 x25->facilities.throughput = 0; /* by default don't negotiate
584 x25->facilities.reverse = X25_DEFAULT_REVERSE;
585 x25->dte_facilities.calling_len = 0;
586 x25->dte_facilities.called_len = 0;
587 memset(x25->dte_facilities.called_ae, '\0',
588 sizeof(x25->dte_facilities.called_ae));
589 memset(x25->dte_facilities.calling_ae, '\0',
590 sizeof(x25->dte_facilities.calling_ae));
600 struct x25_sock *x25, *ox25;
608 x25 = x25_sk(sk);
620 x25->t21 = ox25->t21;
621 x25->t22 = ox25->t22;
622 x25->t23 = ox25->t23;
623 x25->t2 = ox25->t2;
624 x25->flags = ox25->flags;
625 x25->facilities = ox25->facilities;
626 x25->dte_facilities = ox25->dte_facilities;
627 x25->cudmatchlength = ox25->cudmatchlength;
629 clear_bit(X25_INTERRUPT_FLAG, &x25->flags);
638 struct x25_sock *x25;
643 x25 = x25_sk(sk);
647 switch (x25->state) {
661 x25->state = X25_STATE_2;
755 struct x25_sock *x25 = x25_sk(sk);
794 x25->neighbour = x25_get_neigh(rt->dev);
795 if (!x25->neighbour)
798 x25_limit_facilities(&x25->facilities, x25->neighbour);
800 x25->lci = x25_new_lci(x25->neighbour);
801 if (!x25->lci)
808 if (!strcmp(x25->source_addr.x25_addr, null_x25_address.x25_addr))
809 memset(&x25->source_addr, '\0', X25_ADDR_LEN);
811 x25->dest_addr = addr->sx25_addr;
817 x25->state = X25_STATE_1;
836 if (rc && x25->neighbour) {
838 x25_neigh_put(x25->neighbour);
839 x25->neighbour = NULL;
841 x25->state = X25_STATE_0;
926 struct x25_sock *x25 = x25_sk(sk);
934 sx25->sx25_addr = x25->dest_addr;
936 sx25->sx25_addr = x25->source_addr;
1111 struct x25_sock *x25 = x25_sk(sk);
1139 if (!x25->neighbour)
1148 if (strcmp(x25->dest_addr.x25_addr, sx25.sx25_addr.x25_addr))
1164 sx25.sx25_addr = x25->dest_addr;
1208 if (test_bit(X25_Q_BIT_FLAG, &x25->flags)) {
1222 if (x25->neighbour->extended) {
1224 *asmptr++ = ((x25->lci >> 8) & 0x0F) | X25_GFI_EXTSEQ;
1225 *asmptr++ = (x25->lci >> 0) & 0xFF;
1229 *asmptr++ = ((x25->lci >> 8) & 0x0F) | X25_GFI_STDSEQ;
1230 *asmptr++ = (x25->lci >> 0) & 0xFF;
1234 if (x25->neighbour->extended) {
1237 *asmptr++ = ((x25->lci >> 8) & 0x0F) | X25_GFI_EXTSEQ;
1238 *asmptr++ = (x25->lci >> 0) & 0xFF;
1244 *asmptr++ = ((x25->lci >> 8) & 0x0F) | X25_GFI_STDSEQ;
1245 *asmptr++ = (x25->lci >> 0) & 0xFF;
1261 skb_queue_tail(&x25->interrupt_out_queue, skb);
1267 else if (test_bit(X25_Q_BIT_FLAG, &x25->flags))
1286 struct x25_sock *x25 = x25_sk(sk);
1296 if (x25->neighbour == NULL)
1299 header_len = x25->neighbour->extended ?
1312 !skb_peek(&x25->interrupt_in_queue))
1315 skb = skb_dequeue(&x25->interrupt_in_queue);
1325 if (test_bit(X25_Q_BIT_FLAG, &x25->flags)) {
1347 if (test_bit(X25_Q_BIT_FLAG, &x25->flags)) {
1370 sx25->sx25_addr = x25->dest_addr;
1387 struct x25_sock *x25 = x25_sk(sk);
1447 rc = copy_to_user(argp, &x25->facilities,
1448 sizeof(x25->facilities))
1490 x25->facilities = facilities;
1499 rc = copy_to_user(argp, &x25->dte_facilities,
1500 sizeof(x25->dte_facilities));
1521 x25->dte_facilities = dtefacs;
1530 rc = copy_to_user(argp, &x25->calluserdata,
1531 sizeof(x25->calluserdata))
1547 x25->calluserdata = calluserdata;
1555 rc = copy_to_user(argp, &x25->causediag, sizeof(x25->causediag))
1567 x25->causediag = causediag;
1587 x25->cudmatchlength = sub_addr.cudmatchlength;
1598 clear_bit(X25_ACCPT_APPRV_FLAG, &x25->flags);
1611 if (test_bit(X25_ACCPT_APPRV_FLAG, &x25->flags))
1614 x25->state = X25_STATE_3;