Lines Matching defs:ip
85 #include <netinet/ip.h>
285 struct ip *ip;
287 ip = mtod(m, struct ip *);
290 (u_int32_t)ntohl(ip->ip_src.s_addr),
291 (u_int32_t)ntohl(ip->ip_dst.s_addr),
336 struct ip *ip = NULL;
343 size_t hlen = 0; /* ip header len */
374 ip = mtod(m, struct ip *);
376 hlen = IP_VHL_HL(ip->ip_vhl) << 2;
378 hlen = ip->ip_hl << 2;
405 if (ip->ip_p != IPPROTO_UDP) {
480 if (esphlen < (IP_MAXPACKET - ntohs(ip->ip_len)))
481 ip->ip_len = htons(ntohs(ip->ip_len) + esphlen);
532 struct ip *ip = NULL;
669 ip = mtod(m, struct ip *);
670 if (extendsiz < (IP_MAXPACKET - ntohs(ip->ip_len)))
671 ip->ip_len = htons(ntohs(ip->ip_len) + extendsiz);
733 struct ip *ip;
783 ip = mtod(m, struct ip *);
784 if (siz < (IP_MAXPACKET - ntohs(ip->ip_len)))
785 ip->ip_len = htons(ntohs(ip->ip_len) + siz);
805 struct ip *ip;
806 ip = mtod(m, struct ip *);
807 udp->uh_ulen = htons(ntohs(ip->ip_len) - (IP_VHL_HL(ip->ip_vhl) << 2));
839 struct ip *ip;
840 if (m->m_len < sizeof(struct ip)) {
845 ip = mtod(m, struct ip *);
847 return esp_output(m, &ip->ip_p, m->m_next, AF_INET, sav);