Lines Matching defs:to

16  *    may be used to endorse or promote products derived from this software
138 "Modify threshold for auto send buffer growth to account for SO_SNDLOWAT");
156 struct tcpopt *to, uint32_t len, int tso)
163 hhook_data.to = to;
211 struct tcpopt to;
253 * to send, then transmit; otherwise, investigate further.
269 * snd_nxt. There may be SACK information that allows us to avoid
284 * to send out new data (when sendalot is 1), bypass this function.
290 * Still in sack recovery , reset rxmit flag to zero.
306 * snd_recover. Check to see if we can rexmit data
329 KASSERT(off >= 0,("%s: sack block to the left of una : %d",
350 * and go to transmit state.
355 * If we still have some data to send, then
367 * to send then the probe will be the FIN
385 * to snd_max after the fast-retransmit.
388 * be set to snd_una, the offset will be 0, and the length may
411 * isn't really necessary), to work around a gcc
412 * optimization issue - to force gcc to compute
446 * Be careful not to send data and/or FIN on SYN segments.
447 * This measure is needed to prevent interoperability problems
482 * but we haven't been called to retransmit,
484 * after we sent into it. If window shrank to 0,
486 * to (closed) window, and set the persist timer
490 * We also do a general check here to ensure that
492 * to send, but a 0-byte window. This makes sure
521 * makes it impossible to transmit any options which vary per generated
526 * the right thing below to provide length of just ip options and thus
527 * checking for ipoptlen is enough to decide if ip options are present.
585 * - we need to retransmit
607 * us to flush a buffer queued with moretocome. XXX
630 * Window updates are important when we close our window due to a
633 * remote end starts to send again the ACK clock takes over and
638 * update to be sent. We also should avoid sending a flurry of
647 * In all other situations the ACK's to new incoming data will
708 * and we have not yet done so, then we need to send.
714 * In SACK, it is possible for tcp_output to fail to send a segment
727 * using ``persist'' packets is used to insure receipt of window
730 * persisting to move a small or zero window
736 * is set when we are called to send a persist packet.
741 * If send window is too small, there is data to transmit, and no
742 * retransmit or persist is pending, then go to persist state.
754 * No reason to send a segment, just return.
770 * unless TCP set not to do any options.
790 * We only have to care about SYN and established connection
794 to.to_flags = 0;
798 to.to_mss = tcp_mssopt(&inp->inp_inc);
800 to.to_mss -= V_tcp_udp_tunneling_overhead;
801 to.to_flags |= TOF_MSS;
807 * have caused the original SYN or SYN|ACK to have
813 to.to_tfo_len = TCP_FASTOPEN_COOKIE_LEN;
814 to.to_tfo_cookie =
816 to.to_flags |= TOF_FASTOPEN;
819 to.to_tfo_len =
821 to.to_tfo_cookie =
823 to.to_flags |= TOF_FASTOPEN;
826 * If we wind up having more data to
838 to.to_wscale = tp->request_r_scale;
839 to.to_flags |= TOF_SCALE;
845 to.to_tsval = curticks + tp->ts_offset;
846 to.to_tsecr = tp->ts_recent;
847 to.to_flags |= TOF_TS;
860 to.to_flags |= TOF_SACKPERM;
863 to.to_flags |= TOF_SACK;
864 to.to_nsacks = tp->rcv_numsacks;
865 to.to_sacks = (u_char *)tp->sackblks;
871 * Check that TCP_MD5SIG is enabled in tcpcb to
872 * account the size needed to set this TCP option.
875 to.to_flags |= TOF_SIGNATURE;
879 hdrlen += optlen = tcp_addoptions(&to, opt);
881 * If we wanted a TFO option to be added, but it was unable
882 * to fit, ensure no data is sent.
885 !(to.to_flags & TOF_FASTOPEN))
916 * Limit a TSO burst to prevent it from
968 * to clear the FIN flag on all but the
976 * Since we don't have enough space to put
1009 * This KASSERT is here to catch edge cases at a well defined place.
1015 * Grab a header mbuf, attaching a copy of data to
1076 * to the offset in the socket buffer chain.
1096 * shorten it to no longer need tso. Lets
1114 * give data to the user when a buffer fills or
1185 * If resending a FIN, be sure not to use a new sequence number.
1281 * According to RFC1323 the window field in a SYN (i.e., a <SYN>
1296 * a 0 window. This may cause the remote transmitter to stall. This
1297 * flag tells soreceive() to disable delayed acknowledgements when
1299 * to read more data than can be buffered prior to transmitting on
1312 * If no urgent pointer to send, then we pull
1313 * the urgent pointer to the left edge of the send window
1326 if (to.to_flags & TOF_SIGNATURE) {
1334 (u_char *)(th + 1) + (to.to_signature - opt))) != 0) {
1347 * There is no need to fill in ip6_plen right now.
1408 hhook_run_tcp_est_out(tp, th, &to, len, tso);
1413 /* We're getting ready to send; log now. */
1424 * Fill in IP length and desired time to live and
1425 * send to IP level. There should be a better way
1426 * to handle ttl and tos; we could keep them in
1427 * the template, but need a way to checksum without them.
1437 * user might want to change the value via setsockopt.
1445 * ip6_output() will set it properly; it's supposed to include
1486 * This might not be the best thing to do according to RFC3390
1490 * NB: Don't set DF on small MTU/MSS to have a safe fallback.
1555 * added new data to an empty socket buffer.
1604 * 1) A -> B: packet with enough data to fill the window
1610 * because it chose to send a packet. Unless tcp_output
1653 * due to a firewall reconfiguration cycle. So we treat
1691 * to send segments changed to another or lowered
1771 * Insert TCP options according to the supplied parameters to the place
1783 * At minimum we need 10 bytes (to generate 1 SACK block). If both
1788 tcp_addoptions(struct tcpopt *to, u_char *optp)
1793 if ((to->to_flags & mask) != mask)
1797 switch (to->to_flags & mask) {
1808 to->to_mss = htons(to->to_mss);
1809 bcopy((u_char *)&to->to_mss, optp, sizeof(to->to_mss));
1810 optp += sizeof(to->to_mss);
1822 *optp++ = to->to_wscale;
1845 to->to_tsval = htonl(to->to_tsval);
1846 to->to_tsecr = htonl(to->to_tsecr);
1847 bcopy((u_char *)&to->to_tsval, optp, sizeof(to->to_tsval));
1848 optp += sizeof(to->to_tsval);
1849 bcopy((u_char *)&to->to_tsecr, optp, sizeof(to->to_tsecr));
1850 optp += sizeof(to->to_tsecr);
1861 to->to_flags &= ~TOF_SIGNATURE;
1867 to->to_signature = optp;
1875 struct sackblk *sack = (struct sackblk *)to->to_sacks;
1886 sackblks = min(to->to_nsacks,
1906 /* XXX is there any point to aligning this option? */
1907 total_len = TCPOLEN_FAST_OPEN_EMPTY + to->to_tfo_len;
1909 to->to_flags &= ~TOF_FASTOPEN;
1914 if (to->to_tfo_len > 0) {
1915 bcopy(to->to_tfo_cookie, optp, to->to_tfo_len);
1916 optp += to->to_tfo_len;
1927 /* Terminate and pad TCP options to a 4 byte boundary. */
1933 * According to RFC 793 (STD0007):
2032 * It is cheaper to just add the segments
2033 * than it is to take the cache miss to look
2122 * size is not optimally adjusted to the actual network conditions
2129 * The criteria to step up the send buffer one notch are:
2132 * 2. send buffer is filled to 7/8th with data (so we actually
2133 * have data to make use of it);
2145 * what is strictly necessary to make full use of a given
2147 * to be much of an problem. At worst we are trading wasting
2152 * with congestion window. Requires another timer. Has to