Lines Matching refs:ip
89 #include <netinet/ip.h>
542 switch (((struct ip *)hdr)->ip_v) {
545 struct ip *ip = hdr;
549 if (ip->ip_v != 4)
552 if ((ip->ip_tos & IPTOS_ECN_MASK) == IPTOS_ECN_NOTECT)
554 if ((ip->ip_tos & IPTOS_ECN_MASK) == IPTOS_ECN_CE)
561 otos = ip->ip_tos;
562 ip->ip_tos |= IPTOS_ECN_CE;
567 sum = ~ntohs(ip->ip_sum) & 0xffff;
568 sum += (~otos & 0xffff) + ip->ip_tos;
571 ip->ip_sum = htons(~sum & 0xffff);
1159 struct ip *ip;
1175 ip = (struct ip *)pktattr->pattr_hdr;
1185 ip->ip_src.s_addr &&
1187 ip->ip_dst.s_addr)
1227 struct ip *ip;
1239 ip = (struct ip *)pktattr->pattr_hdr;
1241 fve->fve_flow.flow_ip.ip_src = ip->ip_src;
1242 fve->fve_flow.flow_ip.ip_dst = ip->ip_dst;