Lines Matching refs:ip

92 #include <netinet/ip.h>
577 struct ip *ip = NULL;
606 * The size of tcp_saveipgen must be the size of the max ip header,
615 isipv6 = (mtod(m, struct ip *)->ip_v == 6) ? 1 : 0;
668 if (off0 > sizeof (struct ip)) {
670 off0 = sizeof(struct ip);
679 ip = mtod(m, struct ip *);
680 th = (struct tcphdr *)((caddr_t)ip + off0);
681 tlen = ntohs(ip->ip_len) - off0;
683 iptos = ip->ip_tos;
688 th->th_sum = in_pseudo(ip->ip_src.s_addr,
689 ip->ip_dst.s_addr,
694 struct ipovly *ipov = (struct ipovly *)ip;
700 ipttl = ip->ip_ttl;
705 ip->ip_len = htons(len);
707 ip->ip_tos = iptos;
709 ip->ip_ttl = ipttl;
710 ip->ip_v = IPVERSION;
711 ip->ip_hl = off0 >> 2;
750 if (m->m_len < sizeof(struct ip) + off) {
751 if ((m = m_pullup(m, sizeof (struct ip) + off))
756 ip = mtod(m, struct ip *);
757 th = (struct tcphdr *)((caddr_t)ip + off0);
856 inp = in_pcblookup_mbuf(&V_tcbinfo, ip->ip_src, th->th_sport,
857 ip->ip_dst, th->th_dport, INPLOOKUP_WLOCKPCB,
865 inp = in_pcblookup(&V_tcbinfo, ip->ip_src,
872 inp = in_pcblookup_mbuf(&V_tcbinfo, ip->ip_src,
873 th->th_sport, ip->ip_dst, th->th_dport,
890 if ((s = tcp_log_vain(NULL, th, (void *)ip, ip6)))
951 if (inp->inp_ip_minttl > ip->ip_ttl)
1043 bcopy((char *)ip, (char *)tcp_saveipgen, sizeof(*ip));
1068 inc.inc_faddr = ip->ip_src;
1069 inc.inc_laddr = ip->ip_dst;
1326 ip->ip_dst.s_addr == ip->ip_src.s_addr) {
1333 if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) ||
1334 IN_MULTICAST(ntohl(ip->ip_src.s_addr)) ||
1335 ip->ip_src.s_addr == htonl(INADDR_BROADCAST) ||
1336 in_broadcast(ip->ip_dst, m->m_pkthdr.rcvif)) {
1532 * The size of tcp_saveipgen must be the size of the max ip header,
3304 struct ip *ip;
3318 if (mtod(m, struct ip *)->ip_v == 6) {
3331 ip = mtod(m, struct ip *);
3332 if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) ||
3333 IN_MULTICAST(ntohl(ip->ip_src.s_addr)) ||
3334 ip->ip_src.s_addr == htonl(INADDR_BROADCAST) ||
3335 in_broadcast(ip->ip_dst, m->m_pkthdr.rcvif))