Lines Matching defs:ip
61 #include <netinet/ip.h>
596 struct ip *ip = NULL;
707 M_CHECK(sizeof(struct ip));
709 ip = (struct ip *)(eh + 1);
736 M_CHECK(sizeof(struct ip));
737 ip = (struct ip *)(evh + 1);
753 M_CHECK(sizeof(struct ip));
754 ip = mtod(m, struct ip *);
761 if (ip->ip_v == IP6VERSION) {
762 ip = NULL;
763 M_CHECK(sizeof(struct ip6_hdr) - sizeof(struct ip));
775 if ((ip != NULL) && ((ip->ip_off & htons(IP_OFFMASK)) == 0)) {
776 if ((ip->ip_v != IPVERSION) ||
777 ((ip->ip_hl << 2) < sizeof(struct ip)))
783 M_CHECK((ip->ip_hl << 2) - sizeof(struct ip));
787 upper_proto = ip->ip_p;
793 switch (ip->ip_p) {
804 } else if (ip != NULL) {
810 upper_proto = ip->ip_p;
811 if ((ip->ip_v != IPVERSION) ||
812 ((ip->ip_hl << 2) < sizeof(struct ip)))
905 /* Restore ip/ipv6 pointer */
906 if (ip != NULL)
907 ip = (struct ip *)(mtod(m, caddr_t) + l3_off);
941 if (ip != NULL)
942 error = ng_netflow_flow_add(priv, fe, ip, upper_ptr,
957 if (ip != NULL) {