Lines Matching refs:x25
57 #include <net/x25.h>
510 struct x25_sock *x25;
518 x25 = x25_sk(sk);
519 skb_queue_head_init(&x25->ack_queue);
520 skb_queue_head_init(&x25->fragment_queue);
521 skb_queue_head_init(&x25->interrupt_in_queue);
522 skb_queue_head_init(&x25->interrupt_out_queue);
531 struct x25_sock *x25;
549 x25 = x25_sk(sk);
559 x25->t21 = sysctl_x25_call_request_timeout;
560 x25->t22 = sysctl_x25_reset_request_timeout;
561 x25->t23 = sysctl_x25_clear_request_timeout;
562 x25->t2 = sysctl_x25_ack_holdback_timeout;
563 x25->state = X25_STATE_0;
564 x25->cudmatchlength = 0;
565 set_bit(X25_ACCPT_APPRV_FLAG, &x25->flags); /* normally no cud */
568 x25->facilities.winsize_in = X25_DEFAULT_WINDOW_SIZE;
569 x25->facilities.winsize_out = X25_DEFAULT_WINDOW_SIZE;
570 x25->facilities.pacsize_in = X25_DEFAULT_PACKET_SIZE;
571 x25->facilities.pacsize_out = X25_DEFAULT_PACKET_SIZE;
572 x25->facilities.throughput = 0; /* by default don't negotiate
574 x25->facilities.reverse = X25_DEFAULT_REVERSE;
575 x25->dte_facilities.calling_len = 0;
576 x25->dte_facilities.called_len = 0;
577 memset(x25->dte_facilities.called_ae, '\0',
578 sizeof(x25->dte_facilities.called_ae));
579 memset(x25->dte_facilities.calling_ae, '\0',
580 sizeof(x25->dte_facilities.calling_ae));
590 struct x25_sock *x25, *ox25;
598 x25 = x25_sk(sk);
610 x25->t21 = ox25->t21;
611 x25->t22 = ox25->t22;
612 x25->t23 = ox25->t23;
613 x25->t2 = ox25->t2;
614 x25->flags = ox25->flags;
615 x25->facilities = ox25->facilities;
616 x25->dte_facilities = ox25->dte_facilities;
617 x25->cudmatchlength = ox25->cudmatchlength;
619 clear_bit(X25_INTERRUPT_FLAG, &x25->flags);
628 struct x25_sock *x25;
633 x25 = x25_sk(sk);
637 switch (x25->state) {
651 x25->state = X25_STATE_2;
750 struct x25_sock *x25 = x25_sk(sk);
789 x25->neighbour = x25_get_neigh(rt->dev);
790 if (!x25->neighbour)
793 x25_limit_facilities(&x25->facilities, x25->neighbour);
795 x25->lci = x25_new_lci(x25->neighbour);
796 if (!x25->lci)
803 if (!strcmp(x25->source_addr.x25_addr, null_x25_address.x25_addr))
804 memset(&x25->source_addr, '\0', X25_ADDR_LEN);
806 x25->dest_addr = addr->sx25_addr;
812 x25->state = X25_STATE_1;
831 if (rc && x25->neighbour) {
833 x25_neigh_put(x25->neighbour);
834 x25->neighbour = NULL;
836 x25->state = X25_STATE_0;
921 struct x25_sock *x25 = x25_sk(sk);
929 sx25->sx25_addr = x25->dest_addr;
931 sx25->sx25_addr = x25->source_addr;
1106 struct x25_sock *x25 = x25_sk(sk);
1134 if (!x25->neighbour)
1143 if (strcmp(x25->dest_addr.x25_addr, sx25.sx25_addr.x25_addr))
1159 sx25.sx25_addr = x25->dest_addr;
1203 if (test_bit(X25_Q_BIT_FLAG, &x25->flags)) {
1217 if (x25->neighbour->extended) {
1219 *asmptr++ = ((x25->lci >> 8) & 0x0F) | X25_GFI_EXTSEQ;
1220 *asmptr++ = (x25->lci >> 0) & 0xFF;
1224 *asmptr++ = ((x25->lci >> 8) & 0x0F) | X25_GFI_STDSEQ;
1225 *asmptr++ = (x25->lci >> 0) & 0xFF;
1229 if (x25->neighbour->extended) {
1232 *asmptr++ = ((x25->lci >> 8) & 0x0F) | X25_GFI_EXTSEQ;
1233 *asmptr++ = (x25->lci >> 0) & 0xFF;
1239 *asmptr++ = ((x25->lci >> 8) & 0x0F) | X25_GFI_STDSEQ;
1240 *asmptr++ = (x25->lci >> 0) & 0xFF;
1256 skb_queue_tail(&x25->interrupt_out_queue, skb);
1262 else if (test_bit(X25_Q_BIT_FLAG, &x25->flags))
1281 struct x25_sock *x25 = x25_sk(sk);
1291 if (x25->neighbour == NULL)
1294 header_len = x25->neighbour->extended ?
1307 !skb_peek(&x25->interrupt_in_queue))
1310 skb = skb_dequeue(&x25->interrupt_in_queue);
1320 if (test_bit(X25_Q_BIT_FLAG, &x25->flags)) {
1341 if (test_bit(X25_Q_BIT_FLAG, &x25->flags)) {
1364 sx25->sx25_addr = x25->dest_addr;
1381 struct x25_sock *x25 = x25_sk(sk);
1441 rc = copy_to_user(argp, &x25->facilities,
1442 sizeof(x25->facilities))
1484 x25->facilities = facilities;
1493 rc = copy_to_user(argp, &x25->dte_facilities,
1494 sizeof(x25->dte_facilities));
1515 x25->dte_facilities = dtefacs;
1524 rc = copy_to_user(argp, &x25->calluserdata,
1525 sizeof(x25->calluserdata))
1541 x25->calluserdata = calluserdata;
1549 rc = copy_to_user(argp, &x25->causediag, sizeof(x25->causediag))
1561 x25->causediag = causediag;
1581 x25->cudmatchlength = sub_addr.cudmatchlength;
1592 clear_bit(X25_ACCPT_APPRV_FLAG, &x25->flags);
1605 if (test_bit(X25_ACCPT_APPRV_FLAG, &x25->flags))
1608 x25->state = X25_STATE_3;