Home
last modified time | relevance | path

Searched refs:nh (Results 1 – 25 of 137) sorted by relevance

123456

/freebsd/sys/net/route/
H A Dnhop_ctl.c142 if_name(nh->nh_ifp), nh->gwl_sa.sdl_index); in get_aifp()
156 if (memcmp(_one->nh, _two->nh, NHOP_END_CMP) != 0) in cmp_priv()
332 nh->nh_aifp = get_aifp(nh); in nhop_get_nhop_internal()
378 nh->nh_aifp = get_aifp(nh); in nhop_get_unlinked()
466 nh->nh_aifp = get_aifp(nh); in reference_nhop_deps()
472 if_name(nh->nh_aifp), if_name(nh->nh_ifp)); in reference_nhop_deps()
689 nh_priv->nh = nh; in nhop_alloc()
697 return (nh); in nhop_alloc()
728 memset(&nh->gw_buf[nh->gw_sa.sa_len], 0, sizeof(nh->gw_buf) - nh->gw_sa.sa_len); in nhop_set_direct_gw()
835 bzero(&nh->gw_sa, sizeof(nh->gw_sa)); in nhop_set_blackhole()
[all …]
H A Dnhop.h165 struct nhop_object *nh; member
170 void nhop_free(struct nhop_object *nh);
183 int nhop_get_unlinked(struct nhop_object *nh);
206 uint8_t nhop_get_origin(const struct nhop_object *nh);
208 uint32_t nhop_get_idx(const struct nhop_object *nh);
209 uint32_t nhop_get_uidx(const struct nhop_object *nh);
212 int nhop_get_rtflags(const struct nhop_object *nh);
215 int nhop_get_upper_family(const struct nhop_object *nh);
217 int nhop_get_neigh_family(const struct nhop_object *nh);
218 uint32_t nhop_get_fibnum(const struct nhop_object *nh);
[all …]
H A Droute_ifaddrs.c76 struct nhop_object *nh; in rib_handle_ifaddr_one() local
82 nh = nhop_select(rc.rc_nh_new, 0); in rib_handle_ifaddr_one()
84 nh = nhop_select(rc.rc_nh_old, 0); in rib_handle_ifaddr_one()
85 rt_routemsg(cmd, rc.rc_rt, nh, fibnum); in rib_handle_ifaddr_one()
197 match_kernel_route(const struct rtentry *rt, struct nhop_object *nh) in match_kernel_route() argument
199 if (!NH_IS_NHGRP(nh) && (nhop_get_rtflags(nh) & RTF_PINNED) && in match_kernel_route()
200 nh->nh_aifp->if_fib == nhop_get_fibnum(nh)) in match_kernel_route()
208 struct nhop_object *nh = rt->rt_nhop; in pick_kernel_route() local
211 if (match_kernel_route(rt, nh)) { in pick_kernel_route()
214 .rnd_nhop = nh, in pick_kernel_route()
H A Droute_ctl.c239 if (NH_IS_PINNED(nh)) in nhop_get_prio()
282 return (memcmp(&nh->gw_sa, gw, nh->gw_sa.sa_len) == 0); in match_nhop_gw()
644 if (nh == NULL) { in rib_copy_route()
651 nh = nhop_get_nhop_internal(rh_dst, nh, &error); in rib_copy_route()
661 nhop_free(nh); in rib_copy_route()
666 .rnd_nhop = nh, in rib_copy_route()
679 nhop_free(nh); in rib_copy_route()
828 nh = rc->rc_nh_old; in add_route_flags()
863 nhop_free_any(nh); in add_route_flags()
1145 nh_orig = wn[i].nh; in change_mpath_route()
[all …]
H A Droute_var.h45 const struct sockaddr *mask, struct nhop_object *nh);
225 bool nhop_can_multipath(const struct nhop_object *nh);
250 void nhop_ref_object(struct nhop_object *nh);
251 int nhop_try_ref_object(struct nhop_object *nh);
252 void nhop_ref_any(struct nhop_object *nh);
253 void nhop_free_any(struct nhop_object *nh);
255 struct nhop_object *nh, int *perror);
278 nhop_select(struct nhop_object *nh, uint32_t flowid) in nhop_select() argument
282 if (NH_IS_NHGRP(nh)) { in nhop_select()
284 nh = nhg->nhops[flowid % nhg->nhg_size]; in nhop_select()
[all …]
H A Droute_helpers.c233 struct nhop_object *nh; in rib_lookup() local
235 nh = NULL; in rib_lookup()
257 return (nh); in rib_lookup()
265 rc->rc_nh_new = wn_src->nh; in notify_add()
281 rc->rc_nh_old = wn_src->nh; in notify_del()
308 tmp.nh = rc->rc_nh_old; in decompose_change_notification()
316 tmp.nh = rc->rc_nh_new; in decompose_change_notification()
457 if (nh == NULL) in rib_add_default_route()
460 nhop_set_gw(nh, gw, true); in rib_add_default_route()
461 nhop_set_transmit_ifp(nh, ifp); in rib_add_default_route()
[all …]
/freebsd/contrib/llvm-project/clang/include/clang/Basic/
H A DBuiltinsAArch64.def254 TARGET_HEADER_BUILTIN(_ReadWriteBarrier, "v", "nh", INTRIN_H, ALL_MS_LANGUAGES, "")
255 TARGET_HEADER_BUILTIN(__getReg, "ULLii", "nh", INTRIN_H, ALL_MS_LANGUAGES, "")
256 TARGET_HEADER_BUILTIN(_ReadStatusReg, "LLii", "nh", INTRIN_H, ALL_MS_LANGUAGES, "")
257 TARGET_HEADER_BUILTIN(_WriteStatusReg, "viLLi", "nh", INTRIN_H, ALL_MS_LANGUAGES, "")
260 TARGET_HEADER_BUILTIN(__mulh, "SLLiSLLiSLLi", "nh", INTRIN_H, ALL_MS_LANGUAGES, "")
261 TARGET_HEADER_BUILTIN(__umulh, "ULLiULLiULLi", "nh", INTRIN_H, ALL_MS_LANGUAGES, "")
263 TARGET_HEADER_BUILTIN(__break, "vi", "nh", INTRIN_H, ALL_MS_LANGUAGES, "")
270 TARGET_HEADER_BUILTIN(__readx18byte, "UcUNi", "nh", INTRIN_H, ALL_MS_LANGUAGES, "")
271 TARGET_HEADER_BUILTIN(__readx18word, "UsUNi", "nh", INTRIN_H, ALL_MS_LANGUAGES, "")
286 TARGET_HEADER_BUILTIN(_CountOneBits, "UiUNi", "nh", INTRIN_H, ALL_MS_LANGUAGES, "")
[all …]
H A DBuiltinsARM.def234 TARGET_HEADER_BUILTIN(_BitScanForward, "UcUNi*UNi", "nh", INTRIN_H, ALL_MS_LANGUAGES, "")
235 TARGET_HEADER_BUILTIN(_BitScanReverse, "UcUNi*UNi", "nh", INTRIN_H, ALL_MS_LANGUAGES, "")
236 TARGET_HEADER_BUILTIN(_BitScanForward64, "UcUNi*ULLi", "nh", INTRIN_H, ALL_MS_LANGUAGES, "")
237 TARGET_HEADER_BUILTIN(_BitScanReverse64, "UcUNi*ULLi", "nh", INTRIN_H, ALL_MS_LANGUAGES, "")
287 TARGET_HEADER_BUILTIN(_InterlockedOr8_acq, "ccD*c", "nh", INTRIN_H, ALL_MS_LANGUAGES, "")
288 TARGET_HEADER_BUILTIN(_InterlockedOr8_nf, "ccD*c", "nh", INTRIN_H, ALL_MS_LANGUAGES, "")
289 TARGET_HEADER_BUILTIN(_InterlockedOr8_rel, "ccD*c", "nh", INTRIN_H, ALL_MS_LANGUAGES, "")
290 TARGET_HEADER_BUILTIN(_InterlockedOr16_acq, "ssD*s", "nh", INTRIN_H, ALL_MS_LANGUAGES, "")
291 TARGET_HEADER_BUILTIN(_InterlockedOr16_nf, "ssD*s", "nh", INTRIN_H, ALL_MS_LANGUAGES, "")
292 TARGET_HEADER_BUILTIN(_InterlockedOr16_rel, "ssD*s", "nh", INTRIN_H, ALL_MS_LANGUAGES, "")
[all …]
/freebsd/sys/netinet/
H A Din_fib.c115 struct nhop_object *nh; in fib4_lookup() local
120 if (nh != NULL) { in fib4_lookup()
121 nh = nhop_select(nh, flowid); in fib4_lookup()
126 return (nh); in fib4_lookup()
154 nh = NULL; in fib4_lookup()
164 return (nh); in fib4_lookup()
197 if (NH_IS_NHGRP(nh)) { in check_urpf()
231 nh = NULL; in lookup_nhop()
238 return (nh); in lookup_nhop()
264 if (nh != NULL) in fib4_check_urpf()
[all …]
H A Din_rmx.c54 struct nhop_object *nh) in rib4_set_nh_pfxflags() argument
61 nhop_set_pxtype_flag(nh, NHF_HOST); in rib4_set_nh_pfxflags()
79 nhop_set_pxtype_flag(nh, 0); in rib4_set_nh_pfxflags()
94 if (nh->nh_mtu == 0) { in rib4_augment_nh()
95 nh->nh_mtu = nh->nh_ifp->if_mtu; in rib4_augment_nh()
96 } else if (nh->nh_mtu > nh->nh_ifp->if_mtu) in rib4_augment_nh()
97 nh->nh_mtu = nh->nh_ifp->if_mtu; in rib4_augment_nh()
100 if (nhop_get_type(nh) == 0) { in rib4_augment_nh()
102 if (nh->nh_flags & NHF_GATEWAY) in rib4_augment_nh()
107 nhop_set_type(nh, nh_type); in rib4_augment_nh()
[all …]
H A Dip_fastfwd.c140 if ((nh->nh_flags & NHF_GATEWAY) == 0 || nh->gw_sa.sa_family != AF_INET) in ip_redir_alloc()
194 struct nhop_object *nh; in ip_findroute() local
198 if (nh == NULL) { in ip_findroute()
213 if (nh->nh_flags & NHF_REJECT) { in ip_findroute()
219 *pnh = nh; in ip_findroute()
236 struct nhop_object *nh = NULL; in ip_tryforward() local
460 gw = &nh->gw_sa; in ip_tryforward()
474 if (ip_len <= nh->nh_mtu) { in ip_tryforward()
483 error = (*nh->nh_ifp->if_output)(nh->nh_ifp, m, gw, &ro); in ip_tryforward()
491 0, nh->nh_mtu); in ip_tryforward()
[all …]
/freebsd/sys/netinet6/
H A Din6_fib.c123 struct nhop_object *nh; in fib6_lookup() local
128 if (nh != NULL) { in fib6_lookup()
129 nh = nhop_select(nh, flowid); in fib6_lookup()
133 nhop_ref_object(nh); in fib6_lookup()
134 return (nh); in fib6_lookup()
173 return (nh); in fib6_lookup()
206 if (NH_IS_NHGRP(nh)) { in check_urpf()
245 nh = NULL; in lookup_nhop()
252 return (nh); in lookup_nhop()
278 if (nh != NULL) in fib6_check_urpf()
[all …]
H A Din6_rmx.c96 struct nhop_object *nh) in rib6_set_nh_pfxflags() argument
101 nhop_set_pxtype_flag(nh, NHF_HOST); in rib6_set_nh_pfxflags()
103 nhop_set_pxtype_flag(nh, NHF_DEFAULT); in rib6_set_nh_pfxflags()
105 nhop_set_pxtype_flag(nh, 0); in rib6_set_nh_pfxflags()
118 if (nh->nh_mtu == 0) { in rib6_augment_nh()
119 nh->nh_mtu = IN6_LINKMTU(nh->nh_ifp); in rib6_augment_nh()
120 } else if (nh->nh_mtu > IN6_LINKMTU(nh->nh_ifp)) in rib6_augment_nh()
121 nh->nh_mtu = IN6_LINKMTU(nh->nh_ifp); in rib6_augment_nh()
124 if (nhop_get_type(nh) == 0) { in rib6_augment_nh()
126 if (nh->nh_flags & NHF_GATEWAY) in rib6_augment_nh()
[all …]
H A Dip6_fastfwd.c61 struct nhop_object *nh; in ip6_findroute() local
65 if (nh == NULL) { in ip6_findroute()
72 if (nh->nh_flags & NHF_BLACKHOLE) { in ip6_findroute()
78 if (nh->nh_flags & NHF_REJECT) { in ip6_findroute()
85 *pnh = nh; in ip6_findroute()
94 struct nhop_object *nh; in ip6_tryforward() local
204 if (m->m_pkthdr.len > nh->nh_mtu) { in ip6_tryforward()
224 if (m->m_pkthdr.len > nh->nh_mtu) { in ip6_tryforward()
282 if (nh->nh_flags & NHF_GATEWAY) in ip6_tryforward()
283 dst.sin6_addr = nh->gw6_sa.sin6_addr; in ip6_tryforward()
[all …]
H A Dip6_forward.c95 struct nhop_object *nh = NULL; in ip6_forward() local
187 if (nh == NULL) { in ip6_forward()
200 if (nh->nh_flags & NHF_REJECT) { in ip6_forward()
255 if (nh->nh_flags & NHF_GATEWAY) { in ip6_forward()
304 if_name(nh->nh_ifp)); in ip6_forward()
311 origifp = nh->nh_ifp; in ip6_forward()
337 NH_FREE(nh); in ip6_forward()
376 NH_FREE(nh); in ip6_forward()
387 IN6_LINKMTU(nh->nh_ifp)); in ip6_forward()
447 if (nh != NULL) in ip6_forward()
[all …]
/freebsd/sys/netlink/route/
H A Drt.c71 if (NH_IS_NHGRP(nh)) { in nl_get_rtm_protocol()
76 nh = nhg->nhops[0]; in nl_get_rtm_protocol()
708 nhop_set_direct_gw(nh, nh->nh_ifp); in finalize_nhop()
752 gw_sa = &nh->gw_sa; in finalize_nhop()
760 nhop_set_src(nh, ifa); in finalize_nhop()
812 if (nh == NULL) in create_nexthop_one()
817 nhop_free(nh); in create_nexthop_one()
880 if (nh == NULL) { in create_nexthop_from_attrs()
887 nhop_free(nh); in create_nexthop_from_attrs()
915 nh = finalize_nhop(nh, attrs->rta_dst, perror); in create_nexthop_from_attrs()
[all …]
H A Dnexthop.c179 nhop_ref_any(nh); in nl_find_nhop()
180 return (nh); in nl_find_nhop()
249 nhop_ref_any(nh); in nl_find_nhop()
250 return (nh); in nl_find_nhop()
289 if (nh == NULL) in clone_unhop()
294 nhop_free(nh); in clone_unhop()
332 return (nh); in clone_unhop()
845 if (nh == NULL) { in newnhop()
857 nhop_free(nh); in newnhop()
1048 for (struct nhop_object *nh = nhops_iter_start(&iter); nh; in rtnl_handle_getnhop() local
[all …]
/freebsd/contrib/tcpdump/
H A Dprint-cnfp.c159 const struct nfhdr_v1 *nh; in cnfp_v1_print() local
169 ND_TCHECK_SIZE(nh); in cnfp_v1_print()
179 t = GET_BE_U_4(nh->utc_sec); in cnfp_v1_print()
185 GET_BE_U_4(nh->utc_sec), GET_BE_U_4(nh->utc_nsec)); in cnfp_v1_print()
254 const struct nfhdr_v5 *nh; in cnfp_v5_print() local
264 ND_TCHECK_SIZE(nh); in cnfp_v5_print()
274 t = GET_BE_U_4(nh->utc_sec); in cnfp_v5_print()
280 GET_BE_U_4(nh->utc_sec), GET_BE_U_4(nh->utc_nsec)); in cnfp_v5_print()
356 const struct nfhdr_v6 *nh; in cnfp_v6_print() local
366 ND_TCHECK_SIZE(nh); in cnfp_v6_print()
[all …]
H A Dprint-ip6.c52 u_int nh; in ip6_finddst() local
68 switch (nh) { in ip6_finddst()
81 nh = GET_U_1(cp); in ip6_finddst()
91 nh = GET_U_1(cp); in ip6_finddst()
185 u_int nh; in nextproto6_cksum() local
191 switch (nh) { in nextproto6_cksum()
234 uint8_t ph, nh; in ip6_print() local
330 nh != IPPROTO_TCP && nh != IPPROTO_UDP && in ip6_print()
331 nh != IPPROTO_DCCP && nh != IPPROTO_SCTP) { in ip6_print()
336 switch (nh) { in ip6_print()
[all …]
H A Dprint-ip-demux.c41 uint8_t nh, const u_char *iph) in ip_demux_print() argument
49 switch (nh) { in ip_demux_print()
57 nh = GET_U_1(bp); in ip_demux_print()
110 tok2str(ipproto_values,"unknown",nh)); in ip_demux_print()
120 tok2str(ipproto_values,"unknown",nh)); in ip_demux_print()
166 tok2str(ipproto_values,"unknown",nh)); in ip_demux_print()
214 tok2str(ipproto_values,"unknown",nh)); in ip_demux_print()
230 if (ndo->ndo_nflag==0 && (p_name = netdb_protoname(nh)) != NULL) in ip_demux_print()
233 ND_PRINT(" ip-proto-%u", nh); in ip_demux_print()
/freebsd/usr.bin/netstat/
H A Dnhops.c252 xo_emit(buffer, nh->nh_idx); in print_nhop_entry_sysctl()
255 char *cp = nh_types[nh->nh_type]; in print_nhop_entry_sysctl()
259 if (nh->ifindex < (uint32_t)ifmap_size) { in print_nhop_entry_sysctl()
266 na = (struct nhop_addrs *)((char *)nh + nh->nh_len); in print_nhop_entry_sysctl()
273 if (nh->nh_flags & NHF_GATEWAY) { in print_nhop_entry_sysctl()
301 if (nh->aifindex < (uint32_t)ifmap_size && nh->ifindex != nh->aifindex) { in print_nhop_entry_sysctl()
311 if (Wflag && nh->prepend_len) { in print_nhop_entry_sysctl()
344 struct nhop_external *nh; in dump_nhops_sysctl() local
382 nh_map[nh_count].idx = nh->nh_idx; in dump_nhops_sysctl()
398 struct nhop_external *nh; in print_nhops_sysctl() local
[all …]
/freebsd/sys/ofed/drivers/infiniband/core/
H A Dib_addr.c277 struct nhop_object *nh; in addr4_resolve() local
307 if (nh == NULL) { in addr4_resolve()
350 ifp = nh->nh_ifp; in addr4_resolve()
352 } else if (ifp != nh->nh_ifp) { in addr4_resolve()
366 saddr = nh->nh_ifa->ifa_addr; in addr4_resolve()
369 ifp = nh->nh_ifp; in addr4_resolve()
460 struct nhop_object *nh; in addr6_resolve() local
505 if (nh == NULL) { in addr6_resolve()
548 ifp = nh->nh_ifp; in addr6_resolve()
564 saddr = nh->nh_ifa->ifa_addr; in addr6_resolve()
[all …]
/freebsd/sys/net/
H A Drtsock.c705 if (nh != NULL && nh->gw_sa.sa_family == AF_LINK && in fill_addrinfo()
719 return (nh); in select_nhop()
725 return (wn[0].nh); in select_nhop()
784 if (nh == NULL) { in handle_rtm_get()
822 if (nh == NULL) { in handle_rtm_get()
827 rc->rc_nh_new = nh; in handle_rtm_get()
961 ifp = nh->nh_ifp; in update_rtm_from_rc()
1077 nh = NULL; in rts_send()
1148 if (nh != NULL) { in rts_send()
1176 nh = rc.rc_nh_new; in rts_send()
[all …]
H A Droute.c209 if (nh == NULL) in rib_add_redirect()
213 nhop_set_transmit_ifp(nh, ifp); in rib_add_redirect()
214 nhop_set_src(nh, ifa); in rib_add_redirect()
215 nhop_set_pxtype_flag(nh, NHF_HOST); in rib_add_redirect()
217 nhop_set_redirect(nh, true); in rib_add_redirect()
218 nhop_set_origin(nh, NH_ORIGIN_REDIRECT); in rib_add_redirect()
219 rnd.rnd_nhop = nhop_get_nhop(nh, &error); in rib_add_redirect()
295 struct nhop_object *nh; in ifa_ifwithroute() local
303 if ((nh == NULL) || (nh->nh_flags & NHF_DEFAULT)) in ifa_ifwithroute()
305 ifa = nh->nh_ifa; in ifa_ifwithroute()
[all …]
/freebsd/contrib/libpcap/
H A Dpcap-nit.c107 register struct nit_hdr *nh; in pcap_read_nit() local
155 nh = (struct nit_hdr *)bp; in pcap_read_nit()
156 cp = bp + sizeof(*nh); in pcap_read_nit()
158 switch (nh->nh_state) { in pcap_read_nit()
166 pn->stat.ps_drop = nh->nh_dropped; in pcap_read_nit()
174 "bad nit state %d", nh->nh_state); in pcap_read_nit()
178 bp += ((sizeof(struct nit_hdr) + nh->nh_datalen + in pcap_read_nit()
181 caplen = nh->nh_wirelen; in pcap_read_nit()
184 if (pcap_filter(p->fcode.bf_insns, cp, nh->nh_wirelen, caplen)) { in pcap_read_nit()
186 h.ts = nh->nh_timestamp; in pcap_read_nit()
[all …]

123456