Lines Matching refs:ip
140 register struct ip_hdr *ip = (struct ip_hdr *)pb->payload;
142 register u_short hlen = IPH_HL(ip);
154 if (IPH_PROTO(ip) != IP_PROTO_TCP) {
163 if ((IPH_OFFSET(ip) & PP_HTONS(0x3fff)) || pb->tot_len < 40) {
166 th = (struct tcp_hdr *)&((long *)ip)[hlen];
178 if (!ip_addr_cmp(&ip->src, &cs->cs_ip.src)
179 || !ip_addr_cmp(&ip->dest, &cs->cs_ip.dest)
199 if (ip_addr_cmp(&ip->src, &cs->cs_ip.src)
200 && ip_addr_cmp(&ip->dest, &cs->cs_ip.dest)
258 if (((u_short *)ip)[0] != ((u_short *)&cs->cs_ip)[0]
259 || ((u_short *)ip)[3] != ((u_short *)&cs->cs_ip)[3]
260 || ((u_short *)ip)[4] != ((u_short *)&cs->cs_ip)[4]
262 || (deltaS > 5 && BCMP(ip + 1, &cs->cs_ip + 1, (deltaS - 5) << 2))
318 if (IPH_LEN(ip) != IPH_LEN(&cs->cs_ip) &&
350 deltaS = (u_short)(ntohs(IPH_ID(ip)) - ntohs(IPH_ID(&cs->cs_ip)));
363 BCOPY(ip, &cs->cs_ip, hlen);
402 * a regular ip/tcp packet but with the 'conversation id' we hope
406 BCOPY(ip, &cs->cs_ip, hlen);
407 IPH_PROTO_SET(ip, cs->cs_id);
431 register struct ip_hdr *ip;
433 ip = (struct ip_hdr *)nb->payload;
434 hlen = IPH_HL(ip) << 2;
435 if (IPH_PROTO(ip) >= MAX_SLOTS
437 || (hlen += TCPH_HDRLEN(((struct tcp_hdr *)&((char *)ip)[hlen])) << 2)
441 IPH_PROTO(ip), hlen, nb->len));
446 cs = &comp->rstate[comp->last_recv = IPH_PROTO(ip)];
448 IPH_PROTO_SET(ip, IP_PROTO_TCP);
449 BCOPY(ip, &cs->cs_ip, hlen);
578 /* recompute the ip header checksum */