Lines Matching refs:ti
105 tcp_respond(struct tcpcb *tp, struct tcpiphdr *ti, struct mbuf *m, in tcp_respond() argument
113 DEBUG_ARG("ti = %lx", (long)ti); in tcp_respond()
130 *mtod(m, struct tcpiphdr *) = *ti; in tcp_respond()
131 ti = mtod(m, struct tcpiphdr *); in tcp_respond()
138 m->m_data = (caddr_t)ti; in tcp_respond()
143 xchg(ti->ti_dst, ti->ti_src, ipaddr_t); in tcp_respond()
144 xchg(ti->ti_dport, ti->ti_sport, port_t); in tcp_respond()
147 ti->ti_len = htons((u_short)(sizeof (struct tcphdr) + tlen)); in tcp_respond()
151 ti->ti_mbuf = NULL; in tcp_respond()
152 ti->ti_x1 = 0; in tcp_respond()
153 ti->ti_seq = htonl(seq); in tcp_respond()
154 ti->ti_ack = htonl(ack); in tcp_respond()
155 ti->ti_x2 = 0; in tcp_respond()
156 ti->ti_off = sizeof (struct tcphdr) >> 2; in tcp_respond()
157 ti->ti_flags = flags; in tcp_respond()
159 ti->ti_win = htons((u_int16_t) (win >> tp->rcv_scale)); in tcp_respond()
161 ti->ti_win = htons((u_int16_t)win); in tcp_respond()
162 ti->ti_urp = 0; in tcp_respond()
163 ti->ti_sum = 0; in tcp_respond()
164 ti->ti_sum = cksum(m, tlen); in tcp_respond()
165 ((struct ip *)ti)->ip_len = tlen; in tcp_respond()
168 ((struct ip *)ti)->ip_ttl = MAXTTL; in tcp_respond()
170 ((struct ip *)ti)->ip_ttl = IPDEFTTL; in tcp_respond()