+ struct inpcb *inp = tp->t_inpcb;
+ struct ip_out_args ipoa;
+ struct route ro;
+#if CONFIG_OUT_IF
+ unsigned int outif;
+#endif /* CONFIG_OUT_IF */
+
+ /* If socket was bound to an ifindex, tell ip_output about it */
+ ipoa.ipoa_ifscope = (inp->inp_flags & INP_BOUND_IF) ?
+ inp->inp_boundif : IFSCOPE_NONE;
+ flags |= IP_OUTARGS;
+
+ /* Copy the cached route and take an extra reference */
+ inp_route_copyout(inp, &ro);
+
+ /*
+ * Data sent (as far as we can tell).
+ * If this advertises a larger window than any other segment,
+ * then remember the size of the advertised window.
+ * Make sure ACK/DELACK conditions are cleared before
+ * we unlock the socket.
+ */
+ if (recwin > 0 && SEQ_GT(tp->rcv_nxt + recwin, tp->rcv_adv))
+ tp->rcv_adv = tp->rcv_nxt + recwin;
+ tp->last_ack_sent = tp->rcv_nxt;
+ tp->t_flags &= ~(TF_ACKNOW | TF_DELACK);