• Home
  • Raw
  • Download

Lines Matching refs:scp

137 	struct dn_scp scp;  member
159 struct dn_scp *scp = DN_SK(sk); in dn_find_list() local
161 if (scp->addr.sdn_flags & SDF_WILD) in dn_find_list()
164 return &dn_sk_hash[le16_to_cpu(scp->addrloc) & DN_SK_HASH_MASK]; in dn_find_list()
178 struct dn_scp *scp = DN_SK(sk); in check_port() local
179 if (scp->addrloc == port) in check_port()
187 struct dn_scp *scp = DN_SK(sk); in port_alloc() local
196 scp->addrloc = cpu_to_le16(port); in port_alloc()
208 struct dn_scp *scp = DN_SK(sk); in dn_hash_sock() local
216 if (!scp->addrloc && !port_alloc(sk)) in dn_hash_sock()
268 struct dn_scp *scp = DN_SK(sk); in dn_rehash_sock() local
270 if (scp->addr.sdn_flags & SDF_WILD) in dn_rehash_sock()
375 struct dn_scp *scp = DN_SK(sk); in dn_sklist_find_listener() local
378 if (scp->addr.sdn_objnum) { in dn_sklist_find_listener()
379 if (scp->addr.sdn_objnum != addr->sdn_objnum) in dn_sklist_find_listener()
384 if (scp->addr.sdn_objnamel != addr->sdn_objnamel) in dn_sklist_find_listener()
386 if (memcmp(scp->addr.sdn_objname, addr->sdn_objname, le16_to_cpu(addr->sdn_objnamel)) != 0) in dn_sklist_find_listener()
410 struct dn_scp *scp; in dn_find_by_skb() local
414 scp = DN_SK(sk); in dn_find_by_skb()
415 if (cb->src != dn_saddr2dn(&scp->peer)) in dn_find_by_skb()
417 if (cb->dst_port != scp->addrloc) in dn_find_by_skb()
419 if (scp->addrrem && (cb->src_port != scp->addrrem)) in dn_find_by_skb()
434 struct dn_scp *scp = DN_SK(sk); in dn_destruct() local
436 skb_queue_purge(&scp->data_xmit_queue); in dn_destruct()
437 skb_queue_purge(&scp->other_xmit_queue); in dn_destruct()
438 skb_queue_purge(&scp->other_receive_queue); in dn_destruct()
467 struct dn_scp *scp; in dn_alloc_sock() local
487 scp = DN_SK(sk); in dn_alloc_sock()
488 scp->state = DN_O; /* Open */ in dn_alloc_sock()
489 scp->numdat = 1; /* Next data seg to tx */ in dn_alloc_sock()
490 scp->numoth = 1; /* Next oth data to tx */ in dn_alloc_sock()
491 scp->ackxmt_dat = 0; /* Last data seg ack'ed */ in dn_alloc_sock()
492 scp->ackxmt_oth = 0; /* Last oth data ack'ed */ in dn_alloc_sock()
493 scp->ackrcv_dat = 0; /* Highest data ack recv*/ in dn_alloc_sock()
494 scp->ackrcv_oth = 0; /* Last oth data ack rec*/ in dn_alloc_sock()
495 scp->flowrem_sw = DN_SEND; in dn_alloc_sock()
496 scp->flowloc_sw = DN_SEND; in dn_alloc_sock()
497 scp->flowrem_dat = 0; in dn_alloc_sock()
498 scp->flowrem_oth = 1; in dn_alloc_sock()
499 scp->flowloc_dat = 0; in dn_alloc_sock()
500 scp->flowloc_oth = 1; in dn_alloc_sock()
501 scp->services_rem = 0; in dn_alloc_sock()
502 scp->services_loc = 1 | NSP_FC_NONE; in dn_alloc_sock()
503 scp->info_rem = 0; in dn_alloc_sock()
504 scp->info_loc = 0x03; /* NSP version 4.1 */ in dn_alloc_sock()
505 scp->segsize_rem = 230 - DN_MAX_NSP_DATA_HEADER; /* Default: Updated by remote segsize */ in dn_alloc_sock()
506 scp->nonagle = 0; in dn_alloc_sock()
507 scp->multi_ireq = 1; in dn_alloc_sock()
508 scp->accept_mode = ACC_IMMED; in dn_alloc_sock()
509 scp->addr.sdn_family = AF_DECnet; in dn_alloc_sock()
510 scp->peer.sdn_family = AF_DECnet; in dn_alloc_sock()
511 scp->accessdata.acc_accl = 5; in dn_alloc_sock()
512 memcpy(scp->accessdata.acc_acc, "LINUX", 5); in dn_alloc_sock()
514 scp->max_window = NSP_MAX_WINDOW; in dn_alloc_sock()
515 scp->snd_window = NSP_MIN_WINDOW; in dn_alloc_sock()
516 scp->nsp_srtt = NSP_INITIAL_SRTT; in dn_alloc_sock()
517 scp->nsp_rttvar = NSP_INITIAL_RTTVAR; in dn_alloc_sock()
518 scp->nsp_rxtshift = 0; in dn_alloc_sock()
520 skb_queue_head_init(&scp->data_xmit_queue); in dn_alloc_sock()
521 skb_queue_head_init(&scp->other_xmit_queue); in dn_alloc_sock()
522 skb_queue_head_init(&scp->other_receive_queue); in dn_alloc_sock()
524 scp->persist = 0; in dn_alloc_sock()
525 scp->persist_fxn = NULL; in dn_alloc_sock()
526 scp->keepalive = 10 * HZ; in dn_alloc_sock()
527 scp->keepalive_fxn = dn_keepalive; in dn_alloc_sock()
540 struct dn_scp *scp = DN_SK(sk); in dn_keepalive() local
547 if (skb_queue_empty(&scp->other_xmit_queue)) in dn_keepalive()
561 struct dn_scp *scp = DN_SK(sk); in dn_destroy_timer() local
563 scp->persist = dn_nsp_persist(sk); in dn_destroy_timer()
565 switch (scp->state) { in dn_destroy_timer()
568 if (scp->nsp_rxtshift >= decnet_di_count) in dn_destroy_timer()
569 scp->state = DN_CN; in dn_destroy_timer()
574 if (scp->nsp_rxtshift >= decnet_dr_count) in dn_destroy_timer()
575 scp->state = DN_DRC; in dn_destroy_timer()
579 if (scp->nsp_rxtshift < decnet_dn_count) { in dn_destroy_timer()
587 scp->persist = (HZ * decnet_time_wait); in dn_destroy_timer()
592 if (time_after_eq(jiffies, scp->stamp + HZ * decnet_time_wait)) { in dn_destroy_timer()
603 struct dn_scp *scp = DN_SK(sk); in dn_destroy_sock() local
605 scp->nsp_rxtshift = 0; /* reset back off */ in dn_destroy_sock()
614 switch (scp->state) { in dn_destroy_sock()
618 scp->persist_fxn = dn_destroy_timer; in dn_destroy_sock()
619 scp->persist = dn_nsp_persist(sk); in dn_destroy_sock()
622 scp->state = DN_DR; in dn_destroy_sock()
625 scp->state = DN_DI; in dn_destroy_sock()
640 scp->persist_fxn = dn_destroy_timer; in dn_destroy_sock()
641 scp->persist = dn_nsp_persist(sk); in dn_destroy_sock()
721 struct dn_scp *scp = DN_SK(sk); in dn_bind() local
766 memcpy(&scp->addr, saddr, addr_len); in dn_bind()
782 struct dn_scp *scp = DN_SK(sk); in dn_auto_bind() local
787 scp->addr.sdn_flags = 0; in dn_auto_bind()
788 scp->addr.sdn_objnum = 0; in dn_auto_bind()
794 if ((scp->accessdata.acc_accl != 0) && in dn_auto_bind()
795 (scp->accessdata.acc_accl <= 12)) { in dn_auto_bind()
797 scp->addr.sdn_objnamel = cpu_to_le16(scp->accessdata.acc_accl); in dn_auto_bind()
798 memcpy(scp->addr.sdn_objname, scp->accessdata.acc_acc, le16_to_cpu(scp->addr.sdn_objnamel)); in dn_auto_bind()
800 scp->accessdata.acc_accl = 0; in dn_auto_bind()
801 memset(scp->accessdata.acc_acc, 0, 40); in dn_auto_bind()
805 scp->addr.sdn_add.a_len = cpu_to_le16(2); in dn_auto_bind()
806 rv = dn_dev_bind_default((__le16 *)scp->addr.sdn_add.a_addr); in dn_auto_bind()
818 struct dn_scp *scp = DN_SK(sk); in dn_confirm_accept() local
822 if (scp->state != DN_CR) in dn_confirm_accept()
825 scp->state = DN_CC; in dn_confirm_accept()
826 scp->segsize_loc = dst_metric_advmss(__sk_dst_get(sk)); in dn_confirm_accept()
832 if (scp->state == DN_CC) in dn_confirm_accept()
836 if (scp->state == DN_RUN) in dn_confirm_accept()
851 } else if (scp->state != DN_CC) { in dn_confirm_accept()
859 struct dn_scp *scp = DN_SK(sk); in dn_wait_run() local
863 if (scp->state == DN_RUN) in dn_wait_run()
872 if (scp->state == DN_CI || scp->state == DN_CC) in dn_wait_run()
876 if (scp->state == DN_RUN) in dn_wait_run()
892 } else if (scp->state != DN_CI && scp->state != DN_CC) { in dn_wait_run()
901 struct dn_scp *scp = DN_SK(sk); in __dn_connect() local
911 if (scp->state == DN_RUN) { in __dn_connect()
916 if (scp->state != DN_CI && scp->state != DN_CC) { in __dn_connect()
924 if (scp->state != DN_O) in __dn_connect()
940 memcpy(&scp->peer, addr, sizeof(struct sockaddr_dn)); in __dn_connect()
945 fld.daddr = dn_saddr2dn(&scp->peer); in __dn_connect()
946 fld.saddr = dn_saddr2dn(&scp->addr); in __dn_connect()
947 dn_sk_ports_copy(&fld, scp); in __dn_connect()
954 scp->state = DN_CI; in __dn_connect()
955 scp->segsize_loc = dst_metric_advmss(dst); in __dn_connect()
982 struct dn_scp *scp = DN_SK(sk); in dn_check_state() local
984 switch (scp->state) { in dn_check_state()
1177 struct dn_scp *scp = DN_SK(sk); in dn_getname() local
1184 scp->accept_mode == ACC_IMMED) { in dn_getname()
1189 memcpy(sa, &scp->peer, sizeof(struct sockaddr_dn)); in dn_getname()
1191 memcpy(sa, &scp->addr, sizeof(struct sockaddr_dn)); in dn_getname()
1203 struct dn_scp *scp = DN_SK(sk); in dn_poll() local
1206 if (!skb_queue_empty_lockless(&scp->other_receive_queue)) in dn_poll()
1215 struct dn_scp *scp = DN_SK(sk); in dn_ioctl() local
1229 val = !skb_queue_empty(&scp->other_receive_queue); in dn_ioctl()
1230 if (scp->state != DN_RUN) in dn_ioctl()
1244 skb = skb_peek(&scp->other_receive_queue); in dn_ioctl()
1292 struct dn_scp *scp = DN_SK(sk); in dn_shutdown() local
1305 if (scp->state == DN_O) in dn_shutdown()
1344 struct dn_scp *scp = DN_SK(sk); in __dn_setsockopt() local
1370 if ((scp->state != DN_O) && (scp->state != DN_CR)) in __dn_setsockopt()
1379 memcpy(&scp->conndata_out, &u.opt, optlen); in __dn_setsockopt()
1384 scp->accept_mode == ACC_IMMED) in __dn_setsockopt()
1393 memcpy(&scp->discdata_out, &u.opt, optlen); in __dn_setsockopt()
1399 if (scp->state != DN_O) in __dn_setsockopt()
1410 memcpy(&scp->accessdata, &u.acc, optlen); in __dn_setsockopt()
1416 if (scp->state != DN_O) in __dn_setsockopt()
1425 scp->accept_mode = (unsigned char)u.mode; in __dn_setsockopt()
1429 if (scp->state != DN_CR) in __dn_setsockopt()
1436 if (scp->state != DN_CR) in __dn_setsockopt()
1439 scp->state = DN_DR; in __dn_setsockopt()
1451 scp->max_window = u.win; in __dn_setsockopt()
1452 if (scp->snd_window > u.win) in __dn_setsockopt()
1453 scp->snd_window = u.win; in __dn_setsockopt()
1459 if (scp->nonagle == TCP_NAGLE_CORK) in __dn_setsockopt()
1461 scp->nonagle = (u.val == 0) ? 0 : TCP_NAGLE_OFF; in __dn_setsockopt()
1468 if (scp->nonagle == TCP_NAGLE_OFF) in __dn_setsockopt()
1470 scp->nonagle = (u.val == 0) ? 0 : TCP_NAGLE_CORK; in __dn_setsockopt()
1481 scp->services_loc = u.services; in __dn_setsockopt()
1489 scp->info_loc = u.info; in __dn_setsockopt()
1531 struct dn_scp *scp = DN_SK(sk); in __dn_getsockopt() local
1544 r_data = &scp->conndata_in; in __dn_getsockopt()
1550 r_data = &scp->discdata_in; in __dn_getsockopt()
1556 r_data = &scp->accessdata; in __dn_getsockopt()
1562 r_data = &scp->accept_mode; in __dn_getsockopt()
1585 link.idn_segsize = scp->segsize_rem; in __dn_getsockopt()
1592 r_data = &scp->max_window; in __dn_getsockopt()
1598 val = (scp->nonagle == TCP_NAGLE_OFF); in __dn_getsockopt()
1605 val = (scp->nonagle == TCP_NAGLE_CORK); in __dn_getsockopt()
1612 r_data = &scp->services_rem; in __dn_getsockopt()
1618 r_data = &scp->info_rem; in __dn_getsockopt()
1674 struct dn_scp *scp = DN_SK(sk); in dn_recvmsg() local
1706 queue = &scp->other_receive_queue; in dn_recvmsg()
1721 if (!skb_queue_empty(&scp->other_receive_queue)) { in dn_recvmsg()
1724 if (!scp->other_report) { in dn_recvmsg()
1725 scp->other_report = 1; in dn_recvmsg()
1731 if (scp->state != DN_RUN) in dn_recvmsg()
1779 if ((scp->flowloc_sw == DN_DONTSEND) && !dn_congested(sk)) { in dn_recvmsg()
1780 scp->flowloc_sw = DN_SEND; in dn_recvmsg()
1811 memcpy(msg->msg_name, &scp->peer, sizeof(struct sockaddr_dn)); in dn_recvmsg()
1821 static inline int dn_queue_too_long(struct dn_scp *scp, struct sk_buff_head *queue, int flags) in dn_queue_too_long() argument
1823 unsigned char fctype = scp->services_rem & NSP_FC_MASK; in dn_queue_too_long()
1824 if (skb_queue_len(queue) >= scp->snd_window) in dn_queue_too_long()
1828 if (scp->flowrem_oth == 0) in dn_queue_too_long()
1831 if (scp->flowrem_dat == 0) in dn_queue_too_long()
1871 struct dn_scp *scp = DN_SK(sk); in dn_current_mss() local
1872 int mss_now = min_t(int, scp->segsize_loc, scp->segsize_rem); in dn_current_mss()
1909 struct dn_scp *scp = DN_SK(sk); in dn_sendmsg() local
1911 struct sk_buff_head *queue = &scp->data_xmit_queue; in dn_sendmsg()
1959 mss = scp->segsize_rem; in dn_sendmsg()
1960 fctype = scp->services_rem & NSP_FC_MASK; in dn_sendmsg()
1965 queue = &scp->other_xmit_queue; in dn_sendmsg()
1972 scp->persist_fxn = dn_nsp_xmit_timeout; in dn_sendmsg()
1996 if (dn_queue_too_long(scp, queue, flags)) { in dn_sendmsg()
2007 !dn_queue_too_long(scp, queue, flags), &wait); in dn_sendmsg()
2040 scp->flowrem_oth--; in dn_sendmsg()
2043 if (scp->seg_total == 0) in dn_sendmsg()
2046 scp->seg_total += len; in dn_sendmsg()
2050 scp->seg_total = 0; in dn_sendmsg()
2052 scp->flowrem_dat--; in dn_sendmsg()
2055 scp->flowrem_dat--; in dn_sendmsg()
2062 scp->persist = dn_nsp_persist(sk); in dn_sendmsg()
2258 struct dn_scp *scp = DN_SK(sk); in dn_socket_format_entry() local
2264 dn_printable_object(&scp->addr, local_object); in dn_socket_format_entry()
2265 dn_printable_object(&scp->peer, remote_object); in dn_socket_format_entry()
2270 dn_addr2asc(le16_to_cpu(dn_saddr2dn(&scp->addr)), buf1), in dn_socket_format_entry()
2271 scp->addrloc, in dn_socket_format_entry()
2272 scp->numdat, in dn_socket_format_entry()
2273 scp->numoth, in dn_socket_format_entry()
2274 scp->ackxmt_dat, in dn_socket_format_entry()
2275 scp->ackxmt_oth, in dn_socket_format_entry()
2276 scp->flowloc_sw, in dn_socket_format_entry()
2278 dn_addr2asc(le16_to_cpu(dn_saddr2dn(&scp->peer)), buf2), in dn_socket_format_entry()
2279 scp->addrrem, in dn_socket_format_entry()
2280 scp->numdat_rcv, in dn_socket_format_entry()
2281 scp->numoth_rcv, in dn_socket_format_entry()
2282 scp->ackrcv_dat, in dn_socket_format_entry()
2283 scp->ackrcv_oth, in dn_socket_format_entry()
2284 scp->flowrem_sw, in dn_socket_format_entry()
2286 dn_state2asc(scp->state), in dn_socket_format_entry()
2287 ((scp->accept_mode == ACC_IMMED) ? "IMMED" : "DEFER")); in dn_socket_format_entry()