Home | History | Annotate | Download | only in src

Lines Matching defs:ip

46 #include <netinet/ip.h>
158 struct ip * ip,
164 register u_int hlen = ip->ip_hl;
173 * Bail if this is an IP fragment or if the TCP packet isn't `compressible'
175 * the caller has already made sure the packet is IP proto TCP).
177 if ((ip->ip_off & htons(0x3fff)) || m->m_len < 40) {
179 ip->ip_off, (unsigned long)m->m_len);
183 th = (struct tcphdr *) & ((int *) ip)[hlen];
198 if (ip->ip_src.s_addr != cs->cs_ip.ip_src.s_addr ||
199 ip->ip_dst.s_addr != cs->cs_ip.ip_dst.s_addr ||
219 if (ip->ip_src.s_addr == cs->cs_ip.ip_src.s_addr
220 && ip->ip_dst.s_addr == cs->cs_ip.ip_dst.s_addr
257 * the `if' checks the IP protocol version, header length & type of
261 * checks IP options, if any. The 6th line checks TCP options, if any. If
272 if (((u_short *) ip)[0] != ((u_short *) & cs->cs_ip)[0] ||
273 ((u_short *) ip)[3] != ((u_short *) & cs->cs_ip)[3] ||
274 ((u_short *) ip)[4] != ((u_short *) & cs->cs_ip)[4] ||
277 memcmp(ip + 1, &cs->cs_ip + 1, (deltaS - 5) << 2)) ||
333 if (ip->ip_len != cs->cs_ip.ip_len &&
366 deltaS = ntohs(ip->ip_id) - ntohs(cs->cs_ip.ip_id);
379 memcpy(&cs->cs_ip, ip, hlen);
390 cp = (u_char *) ip;
418 * means a regular ip/tcp packet but with the 'conversation id' we hope to
422 memcpy(&cs->cs_ip, ip, hlen);
423 ip->ip_p = cs->cs_id;
437 register struct ip *ip;
443 ip = (struct ip *) * bufp;
444 if (ip->ip_p > max_state)
446 cs = &comp->rstate[comp->last_recv = ip->ip_p];
448 ip->ip_p = IPPROTO_TCP;
451 * Calculate the size of the TCP/IP header and make sure that we don't
454 hlen = ip->ip_hl << 2;
457 th = (struct tcphdr *) & ((char *) ip)[hlen];
461 memcpy(&cs->cs_ip, ip, hlen);
552 * Back up cp by the tcp/ip header length to make room for the
555 * for the new header & fill in the IP total length.
569 /* recompute the ip header checksum */