Lines Matching refs:ip
98 #include <netinet/ip.h>
106 sizeof(struct ip) + \
113 struct ip *ip;
219 struct ip sc_template;
646 struct ip *ip = mtod(m, struct ip *);
673 if (ip->ip_ttl != PFSYNC_DFLTTL) {
678 offset = ip->ip_hl << 2;
689 ip = mtod(m, struct ip *);
691 ph = (struct pfsync_header *)((char *)ip + offset);
706 pkt.ip = ip;
707 pkt.src = ip->ip_src;
1387 struct ip *ip;
1440 sifp->if_mtu < MCLBYTES - sizeof(struct ip)))
1460 ip = &sc->sc_template;
1461 bzero(ip, sizeof(*ip));
1462 ip->ip_v = IPVERSION;
1463 ip->ip_hl = sizeof(sc->sc_template) >> 2;
1464 ip->ip_tos = IPTOS_LOWDELAY;
1466 ip->ip_off = htons(IP_DF);
1467 ip->ip_ttl = PFSYNC_DFLTTL;
1468 ip->ip_p = IPPROTO_PFSYNC;
1469 ip->ip_src.s_addr = INADDR_ANY;
1470 ip->ip_dst.s_addr = sc->sc_sync_peer.s_addr;
1578 struct ip *ip;
1606 /* build the ip header */
1607 ip = (struct ip *)m->m_data;
1608 bcopy(&sc->sc_template, ip, sizeof(*ip));
1609 offset = sizeof(*ip);
1611 ip->ip_len = htons(m->m_pkthdr.len);
1612 ip_fillid(ip);
1620 ph->len = htons(b->b_len - sizeof(*ip));
1693 m->m_data += sizeof(*ip);
1694 m->m_len = m->m_pkthdr.len = b->b_len - sizeof(*ip);
1696 m->m_data -= sizeof(*ip);