Lines Matching refs:x25

504 	struct x25_sock *x25;  in x25_alloc_socket()  local
512 x25 = x25_sk(sk); in x25_alloc_socket()
513 skb_queue_head_init(&x25->ack_queue); in x25_alloc_socket()
514 skb_queue_head_init(&x25->fragment_queue); in x25_alloc_socket()
515 skb_queue_head_init(&x25->interrupt_in_queue); in x25_alloc_socket()
516 skb_queue_head_init(&x25->interrupt_out_queue); in x25_alloc_socket()
525 struct x25_sock *x25; in x25_create() local
543 x25 = x25_sk(sk); in x25_create()
553 x25->t21 = sysctl_x25_call_request_timeout; in x25_create()
554 x25->t22 = sysctl_x25_reset_request_timeout; in x25_create()
555 x25->t23 = sysctl_x25_clear_request_timeout; in x25_create()
556 x25->t2 = sysctl_x25_ack_holdback_timeout; in x25_create()
557 x25->state = X25_STATE_0; in x25_create()
558 x25->cudmatchlength = 0; in x25_create()
559 set_bit(X25_ACCPT_APPRV_FLAG, &x25->flags); /* normally no cud */ in x25_create()
562 x25->facilities.winsize_in = X25_DEFAULT_WINDOW_SIZE; in x25_create()
563 x25->facilities.winsize_out = X25_DEFAULT_WINDOW_SIZE; in x25_create()
564 x25->facilities.pacsize_in = X25_DEFAULT_PACKET_SIZE; in x25_create()
565 x25->facilities.pacsize_out = X25_DEFAULT_PACKET_SIZE; in x25_create()
566 x25->facilities.throughput = 0; /* by default don't negotiate in x25_create()
568 x25->facilities.reverse = X25_DEFAULT_REVERSE; in x25_create()
569 x25->dte_facilities.calling_len = 0; in x25_create()
570 x25->dte_facilities.called_len = 0; in x25_create()
571 memset(x25->dte_facilities.called_ae, '\0', in x25_create()
572 sizeof(x25->dte_facilities.called_ae)); in x25_create()
573 memset(x25->dte_facilities.calling_ae, '\0', in x25_create()
574 sizeof(x25->dte_facilities.calling_ae)); in x25_create()
584 struct x25_sock *x25, *ox25; in x25_make_new() local
592 x25 = x25_sk(sk); in x25_make_new()
604 x25->t21 = ox25->t21; in x25_make_new()
605 x25->t22 = ox25->t22; in x25_make_new()
606 x25->t23 = ox25->t23; in x25_make_new()
607 x25->t2 = ox25->t2; in x25_make_new()
608 x25->flags = ox25->flags; in x25_make_new()
609 x25->facilities = ox25->facilities; in x25_make_new()
610 x25->dte_facilities = ox25->dte_facilities; in x25_make_new()
611 x25->cudmatchlength = ox25->cudmatchlength; in x25_make_new()
613 clear_bit(X25_INTERRUPT_FLAG, &x25->flags); in x25_make_new()
622 struct x25_sock *x25; in x25_release() local
627 x25 = x25_sk(sk); in x25_release()
631 switch (x25->state) { in x25_release()
645 x25->state = X25_STATE_2; in x25_release()
739 struct x25_sock *x25 = x25_sk(sk); in x25_connect() local
778 x25->neighbour = x25_get_neigh(rt->dev); in x25_connect()
779 if (!x25->neighbour) in x25_connect()
782 x25_limit_facilities(&x25->facilities, x25->neighbour); in x25_connect()
784 x25->lci = x25_new_lci(x25->neighbour); in x25_connect()
785 if (!x25->lci) in x25_connect()
792 if (!strcmp(x25->source_addr.x25_addr, null_x25_address.x25_addr)) in x25_connect()
793 memset(&x25->source_addr, '\0', X25_ADDR_LEN); in x25_connect()
795 x25->dest_addr = addr->sx25_addr; in x25_connect()
801 x25->state = X25_STATE_1; in x25_connect()
820 if (rc && x25->neighbour) { in x25_connect()
822 x25_neigh_put(x25->neighbour); in x25_connect()
823 x25->neighbour = NULL; in x25_connect()
825 x25->state = X25_STATE_0; in x25_connect()
910 struct x25_sock *x25 = x25_sk(sk); in x25_getname() local
918 sx25->sx25_addr = x25->dest_addr; in x25_getname()
920 sx25->sx25_addr = x25->source_addr; in x25_getname()
1095 struct x25_sock *x25 = x25_sk(sk); in x25_sendmsg() local
1123 if (!x25->neighbour) in x25_sendmsg()
1132 if (strcmp(x25->dest_addr.x25_addr, sx25.sx25_addr.x25_addr)) in x25_sendmsg()
1148 sx25.sx25_addr = x25->dest_addr; in x25_sendmsg()
1192 if (test_bit(X25_Q_BIT_FLAG, &x25->flags)) { in x25_sendmsg()
1206 if (x25->neighbour->extended) { in x25_sendmsg()
1208 *asmptr++ = ((x25->lci >> 8) & 0x0F) | X25_GFI_EXTSEQ; in x25_sendmsg()
1209 *asmptr++ = (x25->lci >> 0) & 0xFF; in x25_sendmsg()
1213 *asmptr++ = ((x25->lci >> 8) & 0x0F) | X25_GFI_STDSEQ; in x25_sendmsg()
1214 *asmptr++ = (x25->lci >> 0) & 0xFF; in x25_sendmsg()
1218 if (x25->neighbour->extended) { in x25_sendmsg()
1221 *asmptr++ = ((x25->lci >> 8) & 0x0F) | X25_GFI_EXTSEQ; in x25_sendmsg()
1222 *asmptr++ = (x25->lci >> 0) & 0xFF; in x25_sendmsg()
1228 *asmptr++ = ((x25->lci >> 8) & 0x0F) | X25_GFI_STDSEQ; in x25_sendmsg()
1229 *asmptr++ = (x25->lci >> 0) & 0xFF; in x25_sendmsg()
1245 skb_queue_tail(&x25->interrupt_out_queue, skb); in x25_sendmsg()
1251 else if (test_bit(X25_Q_BIT_FLAG, &x25->flags)) in x25_sendmsg()
1270 struct x25_sock *x25 = x25_sk(sk); in x25_recvmsg() local
1280 if (x25->neighbour == NULL) in x25_recvmsg()
1283 header_len = x25->neighbour->extended ? in x25_recvmsg()
1296 !skb_peek(&x25->interrupt_in_queue)) in x25_recvmsg()
1299 skb = skb_dequeue(&x25->interrupt_in_queue); in x25_recvmsg()
1309 if (test_bit(X25_Q_BIT_FLAG, &x25->flags)) { in x25_recvmsg()
1331 if (test_bit(X25_Q_BIT_FLAG, &x25->flags)) { in x25_recvmsg()
1354 sx25->sx25_addr = x25->dest_addr; in x25_recvmsg()
1371 struct x25_sock *x25 = x25_sk(sk); in x25_ioctl() local
1431 rc = copy_to_user(argp, &x25->facilities, in x25_ioctl()
1432 sizeof(x25->facilities)) in x25_ioctl()
1474 x25->facilities = facilities; in x25_ioctl()
1483 rc = copy_to_user(argp, &x25->dte_facilities, in x25_ioctl()
1484 sizeof(x25->dte_facilities)); in x25_ioctl()
1505 x25->dte_facilities = dtefacs; in x25_ioctl()
1514 rc = copy_to_user(argp, &x25->calluserdata, in x25_ioctl()
1515 sizeof(x25->calluserdata)) in x25_ioctl()
1531 x25->calluserdata = calluserdata; in x25_ioctl()
1539 rc = copy_to_user(argp, &x25->causediag, sizeof(x25->causediag)) in x25_ioctl()
1551 x25->causediag = causediag; in x25_ioctl()
1571 x25->cudmatchlength = sub_addr.cudmatchlength; in x25_ioctl()
1582 clear_bit(X25_ACCPT_APPRV_FLAG, &x25->flags); in x25_ioctl()
1595 if (test_bit(X25_ACCPT_APPRV_FLAG, &x25->flags)) in x25_ioctl()
1598 x25->state = X25_STATE_3; in x25_ioctl()