Lines Matching refs:x25
520 struct x25_sock *x25; in x25_alloc_socket() local
528 x25 = x25_sk(sk); in x25_alloc_socket()
529 skb_queue_head_init(&x25->ack_queue); in x25_alloc_socket()
530 skb_queue_head_init(&x25->fragment_queue); in x25_alloc_socket()
531 skb_queue_head_init(&x25->interrupt_in_queue); in x25_alloc_socket()
532 skb_queue_head_init(&x25->interrupt_out_queue); in x25_alloc_socket()
541 struct x25_sock *x25; in x25_create() local
559 x25 = x25_sk(sk); in x25_create()
569 x25->t21 = sysctl_x25_call_request_timeout; in x25_create()
570 x25->t22 = sysctl_x25_reset_request_timeout; in x25_create()
571 x25->t23 = sysctl_x25_clear_request_timeout; in x25_create()
572 x25->t2 = sysctl_x25_ack_holdback_timeout; in x25_create()
573 x25->state = X25_STATE_0; in x25_create()
574 x25->cudmatchlength = 0; in x25_create()
575 set_bit(X25_ACCPT_APPRV_FLAG, &x25->flags); /* normally no cud */ in x25_create()
578 x25->facilities.winsize_in = X25_DEFAULT_WINDOW_SIZE; in x25_create()
579 x25->facilities.winsize_out = X25_DEFAULT_WINDOW_SIZE; in x25_create()
580 x25->facilities.pacsize_in = X25_DEFAULT_PACKET_SIZE; in x25_create()
581 x25->facilities.pacsize_out = X25_DEFAULT_PACKET_SIZE; in x25_create()
582 x25->facilities.throughput = 0; /* by default don't negotiate in x25_create()
584 x25->facilities.reverse = X25_DEFAULT_REVERSE; in x25_create()
585 x25->dte_facilities.calling_len = 0; in x25_create()
586 x25->dte_facilities.called_len = 0; in x25_create()
587 memset(x25->dte_facilities.called_ae, '\0', in x25_create()
588 sizeof(x25->dte_facilities.called_ae)); in x25_create()
589 memset(x25->dte_facilities.calling_ae, '\0', in x25_create()
590 sizeof(x25->dte_facilities.calling_ae)); in x25_create()
600 struct x25_sock *x25, *ox25; in x25_make_new() local
608 x25 = x25_sk(sk); in x25_make_new()
620 x25->t21 = ox25->t21; in x25_make_new()
621 x25->t22 = ox25->t22; in x25_make_new()
622 x25->t23 = ox25->t23; in x25_make_new()
623 x25->t2 = ox25->t2; in x25_make_new()
624 x25->flags = ox25->flags; in x25_make_new()
625 x25->facilities = ox25->facilities; in x25_make_new()
626 x25->dte_facilities = ox25->dte_facilities; in x25_make_new()
627 x25->cudmatchlength = ox25->cudmatchlength; in x25_make_new()
629 clear_bit(X25_INTERRUPT_FLAG, &x25->flags); in x25_make_new()
638 struct x25_sock *x25; in x25_release() local
643 x25 = x25_sk(sk); in x25_release()
647 switch (x25->state) { in x25_release()
661 x25->state = X25_STATE_2; in x25_release()
749 struct x25_sock *x25 = x25_sk(sk); in x25_connect() local
788 x25->neighbour = x25_get_neigh(rt->dev); in x25_connect()
789 if (!x25->neighbour) in x25_connect()
792 x25_limit_facilities(&x25->facilities, x25->neighbour); in x25_connect()
794 x25->lci = x25_new_lci(x25->neighbour); in x25_connect()
795 if (!x25->lci) in x25_connect()
802 if (!strcmp(x25->source_addr.x25_addr, null_x25_address.x25_addr)) in x25_connect()
803 memset(&x25->source_addr, '\0', X25_ADDR_LEN); in x25_connect()
805 x25->dest_addr = addr->sx25_addr; in x25_connect()
811 x25->state = X25_STATE_1; in x25_connect()
830 if (rc && x25->neighbour) { in x25_connect()
832 x25_neigh_put(x25->neighbour); in x25_connect()
833 x25->neighbour = NULL; in x25_connect()
835 x25->state = X25_STATE_0; in x25_connect()
920 struct x25_sock *x25 = x25_sk(sk); in x25_getname() local
928 sx25->sx25_addr = x25->dest_addr; in x25_getname()
930 sx25->sx25_addr = x25->source_addr; in x25_getname()
1103 struct x25_sock *x25 = x25_sk(sk); in x25_sendmsg() local
1131 if (!x25->neighbour) in x25_sendmsg()
1140 if (strcmp(x25->dest_addr.x25_addr, sx25.sx25_addr.x25_addr)) in x25_sendmsg()
1156 sx25.sx25_addr = x25->dest_addr; in x25_sendmsg()
1200 if (test_bit(X25_Q_BIT_FLAG, &x25->flags)) { in x25_sendmsg()
1214 if (x25->neighbour->extended) { in x25_sendmsg()
1216 *asmptr++ = ((x25->lci >> 8) & 0x0F) | X25_GFI_EXTSEQ; in x25_sendmsg()
1217 *asmptr++ = (x25->lci >> 0) & 0xFF; in x25_sendmsg()
1221 *asmptr++ = ((x25->lci >> 8) & 0x0F) | X25_GFI_STDSEQ; in x25_sendmsg()
1222 *asmptr++ = (x25->lci >> 0) & 0xFF; in x25_sendmsg()
1226 if (x25->neighbour->extended) { in x25_sendmsg()
1229 *asmptr++ = ((x25->lci >> 8) & 0x0F) | X25_GFI_EXTSEQ; in x25_sendmsg()
1230 *asmptr++ = (x25->lci >> 0) & 0xFF; in x25_sendmsg()
1236 *asmptr++ = ((x25->lci >> 8) & 0x0F) | X25_GFI_STDSEQ; in x25_sendmsg()
1237 *asmptr++ = (x25->lci >> 0) & 0xFF; in x25_sendmsg()
1253 skb_queue_tail(&x25->interrupt_out_queue, skb); in x25_sendmsg()
1259 else if (test_bit(X25_Q_BIT_FLAG, &x25->flags)) in x25_sendmsg()
1278 struct x25_sock *x25 = x25_sk(sk); in x25_recvmsg() local
1288 if (x25->neighbour == NULL) in x25_recvmsg()
1291 header_len = x25->neighbour->extended ? in x25_recvmsg()
1304 !skb_peek(&x25->interrupt_in_queue)) in x25_recvmsg()
1307 skb = skb_dequeue(&x25->interrupt_in_queue); in x25_recvmsg()
1317 if (test_bit(X25_Q_BIT_FLAG, &x25->flags)) { in x25_recvmsg()
1339 if (test_bit(X25_Q_BIT_FLAG, &x25->flags)) { in x25_recvmsg()
1362 sx25->sx25_addr = x25->dest_addr; in x25_recvmsg()
1379 struct x25_sock *x25 = x25_sk(sk); in x25_ioctl() local
1439 rc = copy_to_user(argp, &x25->facilities, in x25_ioctl()
1440 sizeof(x25->facilities)) in x25_ioctl()
1482 x25->facilities = facilities; in x25_ioctl()
1491 rc = copy_to_user(argp, &x25->dte_facilities, in x25_ioctl()
1492 sizeof(x25->dte_facilities)); in x25_ioctl()
1513 x25->dte_facilities = dtefacs; in x25_ioctl()
1522 rc = copy_to_user(argp, &x25->calluserdata, in x25_ioctl()
1523 sizeof(x25->calluserdata)) in x25_ioctl()
1539 x25->calluserdata = calluserdata; in x25_ioctl()
1547 rc = copy_to_user(argp, &x25->causediag, sizeof(x25->causediag)) in x25_ioctl()
1559 x25->causediag = causediag; in x25_ioctl()
1579 x25->cudmatchlength = sub_addr.cudmatchlength; in x25_ioctl()
1590 clear_bit(X25_ACCPT_APPRV_FLAG, &x25->flags); in x25_ioctl()
1603 if (test_bit(X25_ACCPT_APPRV_FLAG, &x25->flags)) in x25_ioctl()
1606 x25->state = X25_STATE_3; in x25_ioctl()