Lines Matching defs:ip
163 struct ip_hdr *ip = (struct ip_hdr *)np->payload;
165 u16_t ilen = IPH_HL(ip);
178 if (IPH_PROTO(ip) != IP_PROTO_TCP) {
187 if ((IPH_OFFSET(ip) & PP_HTONS(0x3fff)) || np->tot_len < 40) {
190 th = (struct tcp_hdr *)&((struct vj_u32_t*)ip)[ilen];
216 ip = (struct ip_hdr *)np->payload;
226 if (!ip4_addr_cmp(&ip->src, &cs->cs_ip.src)
227 || !ip4_addr_cmp(&ip->dest, &cs->cs_ip.dest)
247 if (ip4_addr_cmp(&ip->src, &cs->cs_ip.src)
248 && ip4_addr_cmp(&ip->dest, &cs->cs_ip.dest)
293 if ((((struct vj_u16_t*)ip)[0]).v != (((struct vj_u16_t*)&cs->cs_ip)[0]).v
294 || (((struct vj_u16_t*)ip)[3]).v != (((struct vj_u16_t*)&cs->cs_ip)[3]).v
295 || (((struct vj_u16_t*)ip)[4]).v != (((struct vj_u16_t*)&cs->cs_ip)[4]).v
297 || (deltaS > 5 && BCMP(ip + 1, &cs->cs_ip + 1, (deltaS - 5) << 2))
353 if (IPH_LEN(ip) != IPH_LEN(&cs->cs_ip) &&
387 deltaS = (u16_t)(lwip_ntohs(IPH_ID(ip)) - lwip_ntohs(IPH_ID(&cs->cs_ip)));
400 MEMCPY(&cs->cs_ip, ip, hlen);
439 * a regular ip/tcp packet but with the 'conversation id' we hope
443 MEMCPY(&cs->cs_ip, ip, hlen);
444 IPH_PROTO_SET(ip, cs->cs_id);
468 struct ip_hdr *ip;
470 ip = (struct ip_hdr *)nb->payload;
471 hlen = IPH_HL(ip) << 2;
472 if (IPH_PROTO(ip) >= MAX_SLOTS
474 || (hlen += TCPH_HDRLEN(((struct tcp_hdr *)&((char *)ip)[hlen])) << 2)
478 IPH_PROTO(ip), hlen, nb->len));
483 cs = &comp->rstate[comp->last_recv = IPH_PROTO(ip)];
485 IPH_PROTO_SET(ip, IP_PROTO_TCP);
486 MEMCPY(&cs->cs_ip, ip, hlen);
615 /* recompute the ip header checksum */