Lines Matching refs:scp
69 struct dn_scp *scp = DN_SK(sk); in dn_nsp_send() local
74 scp->stamp = jiffies; in dn_nsp_send()
86 fld.saddr = dn_saddr2dn(&scp->addr); in dn_nsp_send()
87 fld.daddr = dn_saddr2dn(&scp->peer); in dn_nsp_send()
88 dn_sk_ports_copy(&fld, scp); in dn_nsp_send()
136 struct dn_scp *scp = DN_SK(sk); in dn_nsp_persist() local
138 unsigned long t = ((scp->nsp_srtt >> 2) + scp->nsp_rttvar) >> 1; in dn_nsp_persist()
140 t *= nsp_backoff[scp->nsp_rxtshift]; in dn_nsp_persist()
145 if (scp->nsp_rxtshift < NSP_MAXRXTSHIFT) in dn_nsp_persist()
146 scp->nsp_rxtshift++; in dn_nsp_persist()
159 struct dn_scp *scp = DN_SK(sk); in dn_nsp_rtt() local
160 long srtt = (long)scp->nsp_srtt; in dn_nsp_rtt()
161 long rttvar = (long)scp->nsp_rttvar; in dn_nsp_rtt()
177 scp->nsp_srtt = (unsigned long)srtt; in dn_nsp_rtt()
179 scp->nsp_srtt = 1; in dn_nsp_rtt()
187 scp->nsp_rttvar = (unsigned long)rttvar; in dn_nsp_rtt()
189 scp->nsp_rttvar = 1; in dn_nsp_rtt()
232 struct dn_scp *scp = DN_SK(sk); in dn_nsp_output() local
239 if ((skb = skb_peek(&scp->other_xmit_queue)) != NULL) in dn_nsp_output()
247 if (reduce_win || (scp->flowrem_sw != DN_SEND)) in dn_nsp_output()
250 if ((skb = skb_peek(&scp->data_xmit_queue)) != NULL) in dn_nsp_output()
260 scp->snd_window >>= 1; in dn_nsp_output()
261 if (scp->snd_window < NSP_MIN_WINDOW) in dn_nsp_output()
262 scp->snd_window = NSP_MIN_WINDOW; in dn_nsp_output()
268 struct dn_scp *scp = DN_SK(sk); in dn_nsp_xmit_timeout() local
272 if (!skb_queue_empty(&scp->data_xmit_queue) || in dn_nsp_xmit_timeout()
273 !skb_queue_empty(&scp->other_xmit_queue)) in dn_nsp_xmit_timeout()
274 scp->persist = dn_nsp_persist(sk); in dn_nsp_xmit_timeout()
279 static inline __le16 *dn_mk_common_header(struct dn_scp *scp, struct sk_buff *skb, unsigned char ms… in dn_mk_common_header() argument
286 *((__le16 *)ptr) = scp->addrrem; in dn_mk_common_header()
288 *((__le16 *)ptr) = scp->addrloc; in dn_mk_common_header()
295 struct dn_scp *scp = DN_SK(sk); in dn_mk_ack_header() local
296 unsigned short acknum = scp->numdat_rcv & 0x0FFF; in dn_mk_ack_header()
297 unsigned short ackcrs = scp->numoth_rcv & 0x0FFF; in dn_mk_ack_header()
302 scp->ackxmt_dat = acknum; in dn_mk_ack_header()
303 scp->ackxmt_oth = ackcrs; in dn_mk_ack_header()
314 ptr = dn_mk_common_header(scp, skb, msgflag, hlen); in dn_mk_ack_header()
324 struct dn_scp *scp = DN_SK(sk); in dn_nsp_mk_data_header() local
329 cb->segnum = scp->numoth; in dn_nsp_mk_data_header()
330 seq_add(&scp->numoth, 1); in dn_nsp_mk_data_header()
332 cb->segnum = scp->numdat; in dn_nsp_mk_data_header()
333 seq_add(&scp->numdat, 1); in dn_nsp_mk_data_header()
343 struct dn_scp *scp = DN_SK(sk); in dn_nsp_queue_xmit() local
345 unsigned long t = ((scp->nsp_srtt >> 2) + scp->nsp_rttvar) >> 1; in dn_nsp_queue_xmit()
354 if ((jiffies - scp->stamp) > t) in dn_nsp_queue_xmit()
355 scp->snd_window = NSP_MIN_WINDOW; in dn_nsp_queue_xmit()
358 skb_queue_tail(&scp->other_xmit_queue, skb); in dn_nsp_queue_xmit()
360 skb_queue_tail(&scp->data_xmit_queue, skb); in dn_nsp_queue_xmit()
362 if (scp->flowrem_sw != DN_SEND) in dn_nsp_queue_xmit()
372 struct dn_scp *scp = DN_SK(sk); in dn_nsp_check_xmit_queue() local
422 if (scp->snd_window < scp->max_window) in dn_nsp_check_xmit_queue()
423 scp->snd_window++; in dn_nsp_check_xmit_queue()
469 struct dn_scp *scp = DN_SK(sk); in dn_send_conn_ack() local
478 msg->dstaddr = scp->addrrem; in dn_send_conn_ack()
485 struct dn_scp *scp = DN_SK(sk); in dn_nsp_retrans_conn_conf() local
487 if (scp->state == DN_CC) in dn_nsp_retrans_conn_conf()
495 struct dn_scp *scp = DN_SK(sk); in dn_send_conn_conf() local
498 __u8 len = (__u8)le16_to_cpu(scp->conndata_out.opt_optl); in dn_send_conn_conf()
505 msg->dstaddr = scp->addrrem; in dn_send_conn_conf()
506 msg->srcaddr = scp->addrloc; in dn_send_conn_conf()
507 msg->services = scp->services_loc; in dn_send_conn_conf()
508 msg->info = scp->info_loc; in dn_send_conn_conf()
509 msg->segsize = cpu_to_le16(scp->segsize_loc); in dn_send_conn_conf()
514 skb_put_data(skb, scp->conndata_out.opt_data, len); in dn_send_conn_conf()
519 scp->persist = dn_nsp_persist(sk); in dn_send_conn_conf()
520 scp->persist_fxn = dn_nsp_retrans_conn_conf; in dn_send_conn_conf()
570 struct dn_scp *scp = DN_SK(sk); in dn_nsp_send_disc() local
574 ddl = le16_to_cpu(scp->discdata_out.opt_optl); in dn_nsp_send_disc()
577 reason = le16_to_cpu(scp->discdata_out.opt_status); in dn_nsp_send_disc()
580 scp->discdata_out.opt_data, scp->addrrem, scp->addrloc); in dn_nsp_send_disc()
598 struct dn_scp *scp = DN_SK(sk); in dn_nsp_send_link() local
614 scp->persist = dn_nsp_persist(sk); in dn_nsp_send_link()
615 scp->persist_fxn = dn_nsp_xmit_timeout; in dn_nsp_send_link()
620 struct dn_scp *scp = DN_SK(sk); in dn_nsp_retrans_conninit() local
622 if (scp->state == DN_CI) in dn_nsp_retrans_conninit()
630 struct dn_scp *scp = DN_SK(sk); in dn_nsp_send_conninit() local
648 msg->srcaddr = scp->addrloc; in dn_nsp_send_conninit()
649 msg->services = scp->services_loc; /* Requested flow control */ in dn_nsp_send_conninit()
650 msg->info = scp->info_loc; /* Version Number */ in dn_nsp_send_conninit()
651 msg->segsize = cpu_to_le16(scp->segsize_loc); /* Max segment size */ in dn_nsp_send_conninit()
653 if (scp->peer.sdn_objnum) in dn_nsp_send_conninit()
656 skb_put(skb, dn_sockaddr2username(&scp->peer, in dn_nsp_send_conninit()
658 skb_put(skb, dn_sockaddr2username(&scp->addr, in dn_nsp_send_conninit()
662 if (scp->peer.sdn_flags & SDF_PROXY) in dn_nsp_send_conninit()
664 if (scp->peer.sdn_flags & SDF_UICPROXY) in dn_nsp_send_conninit()
669 aux = scp->accessdata.acc_userl; in dn_nsp_send_conninit()
672 skb_put_data(skb, scp->accessdata.acc_user, aux); in dn_nsp_send_conninit()
674 aux = scp->accessdata.acc_passl; in dn_nsp_send_conninit()
677 skb_put_data(skb, scp->accessdata.acc_pass, aux); in dn_nsp_send_conninit()
679 aux = scp->accessdata.acc_accl; in dn_nsp_send_conninit()
682 skb_put_data(skb, scp->accessdata.acc_acc, aux); in dn_nsp_send_conninit()
684 aux = (__u8)le16_to_cpu(scp->conndata_out.opt_optl); in dn_nsp_send_conninit()
687 skb_put_data(skb, scp->conndata_out.opt_data, aux); in dn_nsp_send_conninit()
689 scp->persist = dn_nsp_persist(sk); in dn_nsp_send_conninit()
690 scp->persist_fxn = dn_nsp_retrans_conninit; in dn_nsp_send_conninit()