Lines Matching defs:oip
554 struct ip *oip, *ip;
571 oip = mtod(msrc, struct ip *);
572 LogFunc(("msrc: %RTnaipv4 -> %RTnaipv4\n", oip->ip_src, oip->ip_dst));
574 if (oip->ip_src.s_addr == INADDR_ANY)
577 if (oip->ip_off & IP_OFFMASK)
580 ohlen = oip->ip_hl * 4;
583 olen = oip->ip_len;
586 if (oip->ip_p == IPPROTO_ICMP)
588 struct icmp *oicp = (struct icmp *)((char *)oip + ohlen);
598 HTONS(oip->ip_len);
599 HTONS(oip->ip_id);
600 HTONS(oip->ip_off);
613 ip->ip_tos = ((oip->ip_tos & 0x1E) | 0xC0); /* high priority for errors */
619 ip->ip_dst = oip->ip_src;
632 memcpy(payload, oip, olen);