Lines Matching refs:nh

113 ip_redir_alloc(struct mbuf *m, struct nhop_object *nh, u_short ip_len,  in ip_redir_alloc()  argument
119 KASSERT(nh != NULL, ("%s: m %p nh is NULL\n", __func__, m)); in ip_redir_alloc()
140 if ((nh->nh_flags & (NHF_DEFAULT | NHF_REDIRECT | in ip_redir_alloc()
145 if ((nh->nh_flags & NHF_GATEWAY) == 0 || nh->gw_sa.sa_family != AF_INET) in ip_redir_alloc()
147 newgw->s_addr = nh->gw4_sa.sin_addr.s_addr; in ip_redir_alloc()
164 nh_ia = (struct in_ifaddr *)nh->nh_ifa; in ip_redir_alloc()
199 struct nhop_object *nh; in ip_findroute() local
201 nh = fib4_lookup(M_GETFIB(m), dest, 0, NHR_NONE, in ip_findroute()
203 if (nh == NULL) { in ip_findroute()
212 if ((nh->nh_flags & (NHF_BLACKHOLE | NHF_BROADCAST)) != 0) { in ip_findroute()
218 if (nh->nh_flags & NHF_REJECT) { in ip_findroute()
224 *pnh = nh; in ip_findroute()
241 struct nhop_object *nh = NULL; in ip_tryforward() local
393 if (ip_findroute(&nh, dest, m) != 0) in ip_tryforward()
407 if (pfil_mbuf_fwd(V_inet_pfil_head, &m, nh->nh_ifp, in ip_tryforward()
446 ip_findroute(&nh, dest, m) != 0) in ip_tryforward()
462 if (nh->nh_flags & NHF_GATEWAY) { in ip_tryforward()
463 gw = &nh->gw_sa; in ip_tryforward()
473 ~nh->nh_ifp->if_hwassist)) { in ip_tryforward()
479 ~nh->nh_ifp->if_hwassist)) { in ip_tryforward()
488 nh->nh_ifp == m->m_pkthdr.rcvif) in ip_tryforward()
489 mcopy = ip_redir_alloc(m, nh, ip_len, &osrc, &redest); in ip_tryforward()
494 if (ip_len <= nh->nh_mtu) { in ip_tryforward()
502 IP_PROBE(send, NULL, NULL, ip, nh->nh_ifp, ip, NULL); in ip_tryforward()
503 error = (*nh->nh_ifp->if_output)(nh->nh_ifp, m, gw, &ro); in ip_tryforward()
511 0, nh->nh_mtu); in ip_tryforward()
518 if (ip_fragment(ip, &m, nh->nh_mtu, in ip_tryforward()
519 nh->nh_ifp->if_hwassist) != 0) in ip_tryforward()
535 mtod(m, struct ip *), nh->nh_ifp, in ip_tryforward()
537 error = (*nh->nh_ifp->if_output)(nh->nh_ifp, m, in ip_tryforward()