Lines Matching defs:ip
76 #include <netinet/ip.h>
110 struct ip *ip = (struct ip *)(void *)t->pftag_hdr;
112 if (((uintptr_t)ip + sizeof (*ip)) >
116 if (ip->ip_v != 4)
118 ds_field = ip->ip_tos;
159 struct ip *ip = (struct ip *)(void *)t->pftag_hdr;
163 if (((uintptr_t)ip + sizeof (*ip)) >
167 if (ip->ip_v != 4)
169 old = ip->ip_tos;
173 ip->ip_tos = dsfield;
178 sum = ~ntohs(ip->ip_sum) & 0xffff;
183 ip->ip_sum = htons(~sum & 0xffff);
239 struct ip *ip = hdr;
243 if (((uintptr_t)ip + sizeof (*ip)) >
247 if (ip->ip_v != 4)
249 if ((ip->ip_tos & IPTOS_ECN_MASK) == IPTOS_ECN_NOTECT)
251 if ((ip->ip_tos & IPTOS_ECN_MASK) == IPTOS_ECN_CE)
258 otos = ip->ip_tos;
259 ip->ip_tos |= IPTOS_ECN_CE;
264 sum = ~ntohs(ip->ip_sum) & 0xffff;
265 sum += (~otos & 0xffff) + ip->ip_tos;
268 ip->ip_sum = htons(~sum & 0xffff);