Lines Matching refs:ip
50 #include <netinet/ip.h>
147 * and "ip" must be == mtod(m, struct ip *). "comp" supplies the
155 sl_compress_tcp(struct mbuf *m, struct ip *ip, struct slcompress *comp,
159 u_int hlen = ip->ip_hl;
173 if ((ip->ip_off & htons(0x3fff)) || m->m_len < 40)
176 th = (struct tcphdr *)&((int32_t *)ip)[hlen];
187 if (ip->ip_src.s_addr != cs->cs_ip.ip_src.s_addr ||
188 ip->ip_dst.s_addr != cs->cs_ip.ip_dst.s_addr ||
208 if (ip->ip_src.s_addr == cs->cs_ip.ip_src.s_addr
209 && ip->ip_dst.s_addr == cs->cs_ip.ip_dst.s_addr
262 if (((u_int16_t *)ip)[0] != ((u_int16_t *)&cs->cs_ip)[0] ||
263 ((u_int16_t *)ip)[3] != ((u_int16_t *)&cs->cs_ip)[3] ||
264 ((u_int16_t *)ip)[4] != ((u_int16_t *)&cs->cs_ip)[4] ||
267 BCMP(ip + 1, &cs->cs_ip + 1, (deltaS - 5) << 2)) ||
322 if (ip->ip_len != cs->cs_ip.ip_len &&
354 deltaS = ntohs(ip->ip_id) - ntohs(cs->cs_ip.ip_id);
366 BCOPY(ip, &cs->cs_ip, hlen);
378 cp = (u_char *)ip;
400 * means a regular ip/tcp packet but with the 'conversation id' we hope
404 BCOPY(ip, &cs->cs_ip, hlen);
405 ip->ip_p = cs->cs_id;
430 * data down so the ip & tcp headers will be aligned. Then back up
431 * cp by the tcp/ip header length to make room for the reconstructed
463 struct ip *ip;
470 ip = (struct ip *) buf;
471 if (ip->ip_p >= MAX_STATES)
473 cs = &comp->rstate[comp->last_recv = ip->ip_p];
475 ip->ip_p = IPPROTO_TCP;
480 hlen = ip->ip_hl << 2;
483 hlen += ((struct tcphdr *)&((char *)ip)[hlen])->th_off << 2;
486 BCOPY(ip, &cs->cs_ip, hlen);
578 /* recompute the ip header checksum */