Lines Matching defs:ip
86 #include <netinet/ip.h>
132 struct ip *ip;
159 ip = mtod(m, struct ip *);
160 ah = (struct ah *)(void *)(((caddr_t)ip) + off);
165 ip = mtod(m, struct ip *);
176 hlen = IP_VHL_HL(ip->ip_vhl) << 2;
178 hlen = ip->ip_hl << 2;
185 (caddr_t)&ip->ip_src, (caddr_t)&ip->ip_dst,
249 ipsec4_logpacketstr(ip, spi)));
257 ipsec4_logpacketstr(ip, spi)));
273 ip = mtod(m, struct ip *);
274 ah = (struct ah *)(void *)(((caddr_t)ip) + off);
297 ipsec4_logpacketstr(ip, spi), ipsec_logsastr(sav)));
318 ip->ip_len = htons(ip->ip_len + hlen);
319 ip->ip_off = htons(ip->ip_off);
329 ip->ip_len = ntohs(ip->ip_len) - hlen;
330 ip->ip_off = ntohs(ip->ip_off);
346 ipsec4_logpacketstr(ip, spi), ipsec_logsastr(sav)));
364 struct ip *nip;
380 nip = (struct ip *)((u_char *)(ah + 1) + sizoff + siz1);
381 if (nip->ip_src.s_addr != ip->ip_src.s_addr
382 || nip->ip_dst.s_addr != ip->ip_dst.s_addr) {
405 ipsec4_logpacketstr(ip, spi), ipsec_logsastr(sav)));
446 tos = ip->ip_tos;
448 if (m->m_len < sizeof(*ip)) {
449 m = m_pullup(m, sizeof(*ip));
455 ip = mtod(m, struct ip *);
457 ip_ecn_egress(ip4_ipsec_ecn, &tos, &ip->ip_tos);
459 (caddr_t)&ip->ip_src, (caddr_t)&ip->ip_dst)) {
462 ipsec4_logpacketstr(ip, spi), ipsec_logsastr(sav)));
505 ipaddr->sin_addr = ip->ip_dst;
522 ip = mtod(m, struct ip *);
528 ovbcopy((caddr_t)ip, (caddr_t)(((u_char *)ip) + stripsiz), off);
538 ovbcopy((caddr_t)ip, ((caddr_t)ip) + stripsiz, off);
561 if (m->m_len < sizeof(*ip)) {
562 m = m_pullup(m, sizeof(*ip));
568 ip = mtod(m, struct ip *);
570 ip->ip_len = ip->ip_len - stripsiz;
572 ip->ip_len = htons(ntohs(ip->ip_len) - stripsiz);
574 ip->ip_p = nxt;
584 struct ip *, ip, struct ifnet *, m->m_pkthdr.rcvif,
585 struct ip *, ip, struct ip6_hdr *, NULL);