Lines Matching refs:to

14  *    may be used to endorse or promote products derived from this software
142 struct tcphdr *th, struct tcpopt *to,
151 struct tcpopt *to, long len, int tso)
158 hhook_data.to = to;
201 struct tcpopt to;
234 * to send, then transmit; otherwise, investigate further.
249 * snd_nxt. There may be SACK information that allows us to avoid
264 * to send out new data (when sendalot is 1), bypass this function.
270 * Still in sack recovery , reset rxmit flag to zero.
287 * snd_recover. Check to see if we can rexmit data
306 KASSERT(off >= 0,("%s: sack block to the left of una : %d",
331 * and go to transmit state.
336 * If we still have some data to send, then
348 * to send then the probe will be the FIN
366 * to snd_max after the fast-retransmit.
369 * be set to snd_una, the offset will be 0, and the length may
392 * isn't really necessary), to work around a gcc
393 * optimization issue - to force gcc to compute
429 * Be careful not to send data and/or FIN on SYN segments.
430 * This measure is needed to prevent interoperability problems
442 * original SYN|ACK to have been dropped by a middlebox.
452 * but we haven't been called to retransmit,
454 * after we sent into it. If window shrank to 0,
456 * to (closed) window, and set the persist timer
460 * We also do a general check here to ensure that
462 * to send, but a 0-byte window. This makes sure
482 * size is not optimally adjusted to the actual network conditions
489 * The criteria to step up the send buffer one notch are:
492 * 2. send buffer is filled to 7/8th with data (so we actually
493 * have data to make use of it);
505 * what is strictly necessary to make full use of a given
507 * to be much of an problem. At worst we are trading wasting
512 * with congestion window. Requires another timer. Has to
538 * makes it impossible to transmit any options which vary per generated
543 * the right thing below to provide length of just ip options and thus
544 * checking for ipoptlen is enough to decide if ip options are present.
604 * - we need to retransmit
612 * us to flush a buffer queued with moretocome. XXX
635 * Window updates are important when we close our window due to a
638 * remote end starts to send again the ACK clock takes over and
643 * update to be sent. We also should avoid sending a flurry of
652 * In all other situations the ACK's to new incoming data will
710 * and we have not yet done so, then we need to send.
716 * In SACK, it is possible for tcp_output to fail to send a segment
729 * using ``persist'' packets is used to insure receipt of window
732 * persisting to move a small or zero window
738 * is set when we are called to send a persist packet.
743 * If send window is too small, there is data to transmit, and no
744 * retransmit or persist is pending, then go to persist state.
756 * No reason to send a segment, just return.
772 * unless TCP set not to do any options.
788 * We only have to care about SYN and established connection
792 to.to_flags = 0;
797 to.to_mss = tcp_mssopt(&tp->t_inpcb->inp_inc);
798 to.to_flags |= TOF_MSS;
805 * SYN|ACK to have been dropped by a middlebox.
810 to.to_tfo_len = TCP_FASTOPEN_COOKIE_LEN;
811 to.to_tfo_cookie = (u_char *)&tp->t_tfo_cookie;
812 to.to_flags |= TOF_FASTOPEN;
818 to.to_wscale = tp->request_r_scale;
819 to.to_flags |= TOF_SCALE;
824 to.to_tsval = tcp_ts_getticks() + tp->ts_offset;
825 to.to_tsecr = tp->ts_recent;
826 to.to_flags |= TOF_TS;
837 to.to_flags |= TOF_SACKPERM;
841 to.to_flags |= TOF_SACK;
842 to.to_nsacks = tp->rcv_numsacks;
843 to.to_sacks = (u_char *)tp->sackblks;
849 * Check that TCP_MD5SIG is enabled in tcpcb to
850 * account the size needed to set this TCP option.
853 to.to_flags |= TOF_SIGNATURE;
857 hdrlen += optlen = tcp_addoptions(&to, opt);
883 * Limit a TSO burst to prevent it from
915 * be prepended to this mbuf chain
918 * chain to if_hw_tsomaxsegcount.
992 * to clear the FIN flag on all but the
1018 * This KASSERT is here to catch edge cases at a well defined place.
1024 * Grab a header mbuf, attaching a copy of data to
1061 * to the offset in the socket buffer chain.
1083 * give data to the user when a buffer fills or
1137 * If resending a FIN, be sure not to use a new sequence number.
1230 * According to RFC1323 the window field in a SYN (i.e., a <SYN>
1242 * a 0 window. This may cause the remote transmitter to stall. This
1243 * flag tells soreceive() to disable delayed acknowledgements when
1245 * to read more data than can be buffered prior to transmitting on
1258 * If no urgent pointer to send, then we pull
1259 * the urgent pointer to the left edge of the send window
1273 if (to.to_flags & TOF_SIGNATURE) {
1281 (u_char *)(th + 1) + (to.to_signature - opt))) != 0) {
1294 * There is no need to fill in ip6_plen right now.
1339 hhook_run_tcp_est_out(tp, th, &to, len, tso);
1364 * Fill in IP length and desired time to live and
1365 * send to IP level. There should be a better way
1366 * to handle ttl and tos; we could keep them in
1367 * the template, but need a way to checksum without them.
1377 * user might want to change the value via setsockopt.
1385 * ip6_output() will set it properly; it's supposed to include
1427 * This might not be the best thing to do according to RFC3390
1431 * NB: Don't set DF on small MTU/MSS to have a safe fallback.
1518 * 1) A -> B: packet with enough data to fill the window
1524 * because it chose to send a packet. Unless tcp_output
1568 * due to a firewall reconfiguration cycle. So we treat
1599 * to send segments changed to another or lowered
1645 * it to four packets (1.5Kx4 = 6K window).
1675 * Insert TCP options according to the supplied parameters to the place
1687 * At minimum we need 10 bytes (to generate 1 SACK block). If both
1692 tcp_addoptions(struct tcpopt *to, u_char *optp)
1697 if ((to->to_flags & mask) != mask)
1701 switch (to->to_flags & mask) {
1712 to->to_mss = htons(to->to_mss);
1713 bcopy((u_char *)&to->to_mss, optp, sizeof(to->to_mss));
1714 optp += sizeof(to->to_mss);
1726 *optp++ = to->to_wscale;
1749 to->to_tsval = htonl(to->to_tsval);
1750 to->to_tsecr = htonl(to->to_tsecr);
1751 bcopy((u_char *)&to->to_tsval, optp, sizeof(to->to_tsval));
1752 optp += sizeof(to->to_tsval);
1753 bcopy((u_char *)&to->to_tsecr, optp, sizeof(to->to_tsecr));
1754 optp += sizeof(to->to_tsecr);
1765 to->to_flags &= ~TOF_SIGNATURE;
1771 to->to_signature = optp;
1779 struct sackblk *sack = (struct sackblk *)to->to_sacks;
1790 sackblks = min(to->to_nsacks,
1811 /* XXX is there any point to aligning this option? */
1812 total_len = TCPOLEN_FAST_OPEN_EMPTY + to->to_tfo_len;
1817 if (to->to_tfo_len > 0) {
1818 bcopy(to->to_tfo_cookie, optp, to->to_tfo_len);
1819 optp += to->to_tfo_len;
1831 /* Terminate and pad TCP options to a 4 byte boundary. */
1837 * According to RFC 793 (STD0007):