/freebsd-current/sys/net/route/ |
H A D | nhop_ctl.c | 86 static int dump_nhop_entry(struct rib_head *rh, struct nhop_object *nh, struct sysctl_req *w); 88 static int finalize_nhop(struct nh_control *ctl, struct nhop_object *nh, bool link); 89 static struct ifnet *get_aifp(const struct nhop_object *nh); 93 static void destroy_nhop(struct nhop_object *nh); 126 get_aifp(const struct nhop_object *nh) argument 137 if ((nh->nh_ifp->if_flags & IFF_LOOPBACK) && 138 nh->gw_sa.sa_family == AF_LINK) { 139 aifp = ifnet_byindex(nh->gwl_sa.sdl_index); 141 FIB_NH_LOG(LOG_WARNING, nh, "unable to get aifp for %s index %d", 142 if_name(nh 169 set_nhop_mtu_from_info(struct nhop_object *nh, const struct rt_addrinfo *info) argument 191 set_nhop_gw_from_info(struct nhop_object *nh, struct rt_addrinfo *info) argument 238 set_nhop_expire_from_info(struct nhop_object *nh, const struct rt_addrinfo *info) argument 271 struct nhop_object *nh = nhop_alloc(rnh->rib_fibnum, rnh->rib_family); local 313 nhop_get_nhop(struct nhop_object *nh, int *perror) argument 327 nhop_get_nhop_internal(struct rib_head *rnh, struct nhop_object *nh, int *perror) argument 369 nhop_get_unlinked(struct nhop_object *nh) argument 397 alter_nhop_from_info(struct nhop_object *nh, struct rt_addrinfo *info) argument 439 struct nhop_object *nh; local 462 reference_nhop_deps(struct nhop_object *nh) argument 489 finalize_nhop(struct nh_control *ctl, struct nhop_object *nh, bool link) argument 547 destroy_nhop(struct nhop_object *nh) argument 571 nhop_ref_object(struct nhop_object *nh) argument 580 nhop_try_ref_object(struct nhop_object *nh) argument 587 nhop_free(struct nhop_object *nh) argument 645 nhop_ref_any(struct nhop_object *nh) argument 658 nhop_free_any(struct nhop_object *nh) argument 680 struct nhop_object *nh; local 701 nhop_copy(struct nhop_object *nh, const struct nhop_object *nh_orig) argument 721 nhop_set_direct_gw(struct nhop_object *nh, struct ifnet *ifp) argument 754 nhop_set_gw(struct nhop_object *nh, const struct sockaddr *gw, bool is_gw) argument 786 nhop_set_upper_family(struct nhop_object *nh, int family) argument 800 nhop_set_broadcast(struct nhop_object *nh, bool is_broadcast) argument 812 nhop_set_blackhole(struct nhop_object *nh, int blackhole_rt_flag) argument 856 nhop_set_redirect(struct nhop_object *nh, bool is_redirect) argument 868 nhop_set_pinned(struct nhop_object *nh, bool is_pinned) argument 877 nhop_get_idx(const struct nhop_object *nh) argument 884 nhop_get_uidx(const struct nhop_object *nh) argument 890 nhop_set_uidx(struct nhop_object *nh, uint32_t uidx) argument 896 nhop_get_type(const struct nhop_object *nh) argument 903 nhop_set_type(struct nhop_object *nh, enum nhop_type nh_type) argument 910 nhop_get_rtflags(const struct nhop_object *nh) argument 920 nhop_set_rtflags(struct nhop_object *nh, int rt_flags) argument 930 nhop_set_pxtype_flag(struct nhop_object *nh, int nh_flag) argument 951 nhop_set_mtu(struct nhop_object *nh, uint32_t mtu, bool from_user) argument 963 nhop_set_src(struct nhop_object *nh, struct ifaddr *ifa) argument 969 nhop_set_transmit_ifp(struct nhop_object *nh, struct ifnet *ifp) argument 976 nhop_get_vnet(const struct nhop_object *nh) argument 983 nhop_select_func(struct nhop_object *nh, uint32_t flowid) argument 993 nhop_get_upper_family(const struct nhop_object *nh) argument 1003 nhop_get_neigh_family(const struct nhop_object *nh) argument 1009 nhop_get_fibnum(const struct nhop_object *nh) argument 1015 nhop_set_fibnum(struct nhop_object *nh, uint32_t fibnum) argument 1021 nhop_get_expire(const struct nhop_object *nh) argument 1027 nhop_set_expire(struct nhop_object *nh, uint32_t expire) argument 1034 nhop_get_rh(const struct nhop_object *nh) argument 1043 nhop_get_origin(const struct nhop_object *nh) argument 1049 nhop_set_origin(struct nhop_object *nh, uint8_t origin) argument 1059 struct nhop_object *nh; local 1133 nhop_print_buf(const struct nhop_object *nh, char *buf, size_t bufsize) argument 1170 nhop_print_buf_any(const struct nhop_object *nh, char *buf, size_t bufsize) argument 1189 dump_nhop_entry(struct rib_head *rh, struct nhop_object *nh, struct sysctl_req *w) argument [all...] |
H A D | nhop.h | 165 struct nhop_object *nh; member in struct:weightened_nhop 170 void nhop_free(struct nhop_object *nh); 181 void nhop_copy(struct nhop_object *nh, const struct nhop_object *nh_orig); 182 struct nhop_object *nhop_get_nhop(struct nhop_object *nh, int *perror); 183 int nhop_get_unlinked(struct nhop_object *nh); 185 void nhop_set_direct_gw(struct nhop_object *nh, struct ifnet *ifp); 186 bool nhop_set_gw(struct nhop_object *nh, const struct sockaddr *sa, bool is_gw); 189 void nhop_set_mtu(struct nhop_object *nh, uint32_t mtu, bool from_user); 190 void nhop_set_rtflags(struct nhop_object *nh, int rt_flags); 191 void nhop_set_pxtype_flag(struct nhop_object *nh, in [all...] |
H A D | route_var.h | 45 const struct sockaddr *mask, struct nhop_object *nh); 47 typedef int rnh_augment_nh_f_t(u_int fibnum, struct nhop_object *nh); 207 void tmproutes_update(struct rib_head *rnh, struct rtentry *rt, struct nhop_object *nh); 225 bool nhop_can_multipath(const struct nhop_object *nh); 226 bool match_nhop_gw(const struct nhop_object *nh, const struct sockaddr *gw); 228 const struct rtentry *rt, 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); 278 nhop_select(struct nhop_object *nh, uint32_t flowid) argument [all...] |
H A D | route_temporal.c | 53 expire_route(const struct rtentry *rt, const struct nhop_object *nh, void *arg) argument 55 uint32_t nh_expire = nhop_get_expire(nh); 124 tmproutes_update(struct rib_head *rnh, struct rtentry *rt, struct nhop_object *nh) argument 127 uint32_t nh_expire = nhop_get_expire(nh);
|
H A D | route_ifaddrs.c | 76 struct nhop_object *nh; local 82 nh = nhop_select(rc.rc_nh_new, 0); 84 nh = nhop_select(rc.rc_nh_old, 0); 85 rt_routemsg(cmd, rc.rc_rt, nh, fibnum); 197 match_kernel_route(const struct rtentry *rt, struct nhop_object *nh) argument 199 if (!NH_IS_NHGRP(nh) && (nhop_get_rtflags(nh) & RTF_PINNED) && 200 nh->nh_aifp->if_fib == nhop_get_fibnum(nh)) 208 struct nhop_object *nh local [all...] |
H A D | route_ctl.c | 101 static int nhop_get_prio(const struct nhop_object *nh); 190 nhop_can_multipath(const struct nhop_object *nh) argument 193 if ((nh->nh_flags & NHF_MULTIPATH) != 0) 195 if ((nh->nh_flags & NHF_GATEWAY) == 0) 197 if ((nh->nh_flags & NHF_REDIRECT) != 0) 237 nhop_get_prio(const struct nhop_object *nh) argument 239 if (NH_IS_PINNED(nh)) 245 * Check if specified @gw matches gw data in the nexthop @nh. 250 match_nhop_gw(const struct nhop_object *nh, const struct sockaddr *gw) argument 253 if (nh 294 rib_match_gw(const struct rtentry *rt, const struct nhop_object *nh, void *gw_sa) argument 310 match_gw_one(const struct rtentry *rt, const struct nhop_object *nh, void *_data) argument 328 check_info_match_nhop(const struct rt_addrinfo *info, const struct rtentry *rt, const struct nhop_object *nh) argument 643 struct nhop_object *nh = nhop_alloc(rh_dst->rib_fibnum, rh_dst->rib_family); local 730 struct nhop_object *nh; local 788 struct nhop_object *nh; local 1006 struct nhop_object *nh = rt->rt_nhop; local 1476 struct nhop_object *nh; local [all...] |
H A D | route_helpers.c | 233 struct nhop_object *nh; local 235 nh = NULL; 242 nh = fib4_lookup(fibnum, a->sin_addr, 0, flags, flowid); 250 nh = fib6_lookup(fibnum, &a->sin6_addr, a->sin6_scope_id, 257 return (nh); 265 rc->rc_nh_new = wn_src->nh; 270 FIB_NH_LOG(LOG_DEBUG2, wn_src->nh, "RTM_ADD for %s @ w=%u", 271 nhop_print_buf(wn_src->nh, nhbuf, sizeof(nhbuf)), 281 rc->rc_nh_old = wn_src->nh; 286 FIB_NH_LOG(LOG_DEBUG2, wn_src->nh, "RTM_DE 456 struct nhop_object *nh = nhop_alloc(fibnum, family); local [all...] |
/freebsd-current/sys/netinet/ |
H A D | in_rmx.c | 54 struct nhop_object *nh) 61 nhop_set_pxtype_flag(nh, NHF_HOST); 74 if (in_broadcast(addr4->sin_addr, nh->nh_ifp)) 77 nhop_set_pxtype_flag(nh, NHF_DEFAULT); 79 nhop_set_pxtype_flag(nh, 0); 81 nhop_set_broadcast(nh, is_broadcast); 87 rib4_augment_nh(u_int fibnum, struct nhop_object *nh) argument 94 if (nh->nh_mtu == 0) { 95 nh->nh_mtu = nh 53 rib4_set_nh_pfxflags(u_int fibnum, const struct sockaddr *addr, const struct sockaddr *mask, struct nhop_object *nh) argument 155 in_ifadownkill(const struct rtentry *rt, const struct nhop_object *nh, void *xap) argument [all...] |
H A D | in_fib.c | 115 struct nhop_object *nh; local 119 nh = dp->f(dp->arg, key, scopeid); 120 if (nh != NULL) { 121 nh = nhop_select(nh, flowid); 123 if (RT_LINK_IS_UP(nh->nh_ifp)) { 125 nhop_ref_object(nh); 126 return (nh); 140 struct nhop_object *nh; local 154 nh 175 check_urpf_nhop(const struct nhop_object *nh, uint32_t flags, const struct ifnet *src_if) argument 193 check_urpf(struct nhop_object *nh, uint32_t flags, const struct ifnet *src_if) argument 218 struct nhop_object *nh; local 255 struct nhop_object *nh; local 324 struct nhop_object *nh = nhop_select(rnd.rnd_nhop, 0); local [all...] |
H A D | ip_fastfwd.c | 108 ip_redir_alloc(struct mbuf *m, struct nhop_object *nh, u_short ip_len, argument 114 KASSERT(nh != NULL, ("%s: m %p nh is NULL\n", __func__, m)); 135 if ((nh->nh_flags & (NHF_DEFAULT | NHF_REDIRECT | 140 if ((nh->nh_flags & NHF_GATEWAY) == 0 || nh->gw_sa.sa_family != AF_INET) 142 newgw->s_addr = nh->gw4_sa.sin_addr.s_addr; 159 nh_ia = (struct in_ifaddr *)nh->nh_ifa; 194 struct nhop_object *nh; local 196 nh 236 struct nhop_object *nh = NULL; local [all...] |
/freebsd-current/sys/netinet6/ |
H A D | in6_rmx.c | 95 struct nhop_object *nh) 100 nhop_set_pxtype_flag(nh, NHF_HOST); 102 nhop_set_pxtype_flag(nh, NHF_DEFAULT); 104 nhop_set_pxtype_flag(nh, 0); 110 rib6_augment_nh(u_int fibnum, struct nhop_object *nh) argument 117 if (nh->nh_mtu == 0) { 118 nh->nh_mtu = IN6_LINKMTU(nh->nh_ifp); 119 } else if (nh->nh_mtu > IN6_LINKMTU(nh 94 rib6_set_nh_pfxflags(u_int fibnum, const struct sockaddr *addr, const struct sockaddr *mask, struct nhop_object *nh) argument [all...] |
H A D | in6_fib.c | 123 struct nhop_object *nh; local 127 nh = dp->f(dp->arg, key, scopeid); 128 if (nh != NULL) { 129 nh = nhop_select(nh, flowid); 131 if (RT_LINK_IS_UP(nh->nh_ifp)) { 133 nhop_ref_object(nh); 134 return (nh); 148 struct nhop_object *nh; local 167 nh 184 check_urpf_nhop(const struct nhop_object *nh, uint32_t flags, const struct ifnet *src_if) argument 202 check_urpf(struct nhop_object *nh, uint32_t flags, const struct ifnet *src_if) argument 228 struct nhop_object *nh; local 269 struct nhop_object *nh; local 339 struct nhop_object *nh = nhop_select(rnd.rnd_nhop, 0); local [all...] |
H A D | ip6_fastfwd.c | 61 struct nhop_object *nh; local 63 nh = fib6_lookup(M_GETFIB(m), &dst->sin6_addr, 65 if (nh == NULL) { 72 if (nh->nh_flags & NHF_BLACKHOLE) { 78 if (nh->nh_flags & NHF_REJECT) { 85 *pnh = nh; 94 struct nhop_object *nh; local 198 if (ip6_findroute(&nh, &dst, m) != 0) { 204 if (m->m_pkthdr.len > nh->nh_mtu) { 205 in6_ifstat_inc(nh [all...] |
H A D | ip6_forward.c | 95 struct nhop_object *nh = NULL; local 185 nh = fib6_lookup(M_GETFIB(m), &dst.sin6_addr, dst.sin6_scope_id, 187 if (nh == NULL) { 197 if (nh->nh_flags & (NHF_BLACKHOLE | NHF_REJECT)) { 200 if (nh->nh_flags & NHF_REJECT) { 217 outzone = in6_get_unicast_scopeid(&ip6->ip6_src, nh->nh_ifp); 222 in6_ifstat_inc(nh->nh_ifp, ifs6_in_discard); 231 if_name(m->m_pkthdr.rcvif), if_name(nh->nh_ifp)); 247 outzone = in6_get_unicast_scopeid(&ip6->ip6_dst, nh->nh_ifp); 255 if (nh [all...] |
/freebsd-current/contrib/tcpdump/ |
H A D | print-ip6.c | 52 u_int nh; local 62 nh = GET_U_1(ip6->ip6_nxt); 68 switch (nh) { 81 nh = GET_U_1(cp); 91 nh = GET_U_1(cp); 185 u_int nh; local 190 nh = GET_U_1(ip6->ip6_nxt); 191 switch (nh) { 234 uint8_t ph, nh; local 290 nh [all...] |
H A D | print-cnfp.c | 159 const struct nfhdr_v1 *nh; local 168 nh = (const struct nfhdr_v1 *)cp; 169 ND_TCHECK_SIZE(nh); 171 ver = GET_BE_U_2(nh->version); 172 nrecs = GET_BE_U_4(nh->count); 179 t = GET_BE_U_4(nh->utc_sec); 183 GET_BE_U_4(nh->msys_uptime)/1000, 184 GET_BE_U_4(nh->msys_uptime)%1000, 185 GET_BE_U_4(nh->utc_sec), GET_BE_U_4(nh 254 const struct nfhdr_v5 *nh; local 356 const struct nfhdr_v6 *nh; local [all...] |
H A D | print-ip-demux.c | 41 uint8_t nh, const u_char *iph) 49 switch (nh) { 57 nh = GET_U_1(bp); 110 tok2str(ipproto_values,"unknown",nh)); 120 tok2str(ipproto_values,"unknown",nh)); 166 tok2str(ipproto_values,"unknown",nh)); 214 tok2str(ipproto_values,"unknown",nh)); 230 if (ndo->ndo_nflag==0 && (p_name = netdb_protoname(nh)) != NULL) 233 ND_PRINT(" ip-proto-%u", nh); 38 ip_demux_print(netdissect_options *ndo, const u_char *bp, u_int length, u_int ver, int fragmented, u_int ttl_hl, uint8_t nh, const u_char *iph) argument
|
/freebsd-current/sys/netlink/route/ |
H A D | rt.c | 55 get_rtm_type(const struct nhop_object *nh) argument 57 int nh_flags = nh->nh_flags; 68 nl_get_rtm_protocol(const struct nhop_object *nh) argument 71 if (NH_IS_NHGRP(nh)) { 72 const struct nhgrp_object *nhg = (const struct nhgrp_object *)nh; 76 nh = nhg->nhops[0]; 79 uint8_t origin = nhop_get_origin(nh); 83 int rt_flags = nhop_get_rtflags(nh); 124 dump_rc_nhop_gw(struct nl_writer *nw, const struct nhop_object *nh) argument 130 switch (nhop_get_neigh_family(nh)) { 162 dump_rc_nhop_mtu(struct nl_writer *nw, const struct nhop_object *nh) argument 229 const struct nhop_object *nh = rnd->rnd_nhop; local 697 finalize_nhop(struct nhop_object *nh, const struct sockaddr *dst, int *perror) argument 811 struct nhop_object *nh = nhop_alloc(attrs->rta_table, attrs->rtm_family); local 837 struct nhop_object *nh = NULL; local 926 struct nhop_object *nh = NULL; local 973 path_match_func(const struct rtentry *rt, const struct nhop_object *nh, void *_data) argument [all...] |
H A D | nexthop.c | 176 struct nhop_object *nh = unhop->un_nhop; local 179 nhop_ref_any(nh); 180 return (nh); 229 struct nhop_object *nh; local 232 nh = un_tmp->un_nhop; 235 nh = un_new->un_nhop; 240 NL_LOG(LOG_DEBUG2, "linked cloned nexthop %p", nh); 249 nhop_ref_any(nh); 250 return (nh); 276 struct nhop_object *nh local 287 struct nhop_object *nh; local 436 dump_nhop(const struct nhop_object *nh, uint32_t uidx, struct nlmsghdr *hdr, struct nl_writer *nw) argument 746 eligible_nhg(const struct nhop_object *nh) argument 799 nl_set_nexthop_gw(struct nhop_object *nh, struct sockaddr *gw, if_t ifp, struct nl_pstate *npt) argument 822 struct nhop_object *nh; local [all...] |
/freebsd-current/contrib/ofed/libibverbs/ |
H A D | nl1_compat.h | 33 static inline struct nl_addr *rtnl_route_nh_get_gateway(struct rtnl_nexthop *nh) argument 35 return rtnl_route_get_gateway((struct rtnl_route *)nh); 38 static inline int rtnl_route_nh_get_ifindex(struct rtnl_nexthop *nh) argument 40 return rtnl_route_get_oif((struct rtnl_route *)nh);
|
/freebsd-current/tests/sys/netpfil/pf/ |
H A D | CVE-2019-5597.py | 47 frag_0 = sp.IPv6ExtHdrFragment(id=fid, nh=UDP_PROTO, m=1, offset=0) 49 frag_1 = sp.IPv6ExtHdrFragment(id=fid, nh=UDP_PROTO, m=0, offset=foff_1) 51 pkt1_opts = sp.AH(nh=AH_PROTO, payloadlen=200) \ 53 / sp.AH(nh=FRAG_PROTO, payloadlen=1) \
|
/freebsd-current/usr.bin/netstat/ |
H A D | nhops.c | 238 print_nhop_entry_sysctl(const char *name, struct rt_msghdr *rtm, struct nhop_external *nh) argument 250 //xo_emit("{t:index/%-lu} ", wid_nhidx, nh->nh_idx); 251 xo_emit(buffer, nh->nh_idx); 254 char *cp = nh_types[nh->nh_type]; 258 if (nh->ifindex < (uint32_t)ifmap_size) { 259 strlcpy(iface_name, ifmap[nh->ifindex].ifname, 265 na = (struct nhop_addrs *)((char *)nh + nh->nh_len); 266 //inet_ntop(nh->nh_family, &nh 343 struct nhop_external *nh; local 397 struct nhop_external *nh; local [all...] |
/freebsd-current/contrib/libpcap/ |
H A D | pcap-nit.c | 107 register struct nit_hdr *nh; local 155 nh = (struct nit_hdr *)bp; 156 cp = bp + sizeof(*nh); 158 switch (nh->nh_state) { 166 pn->stat.ps_drop = nh->nh_dropped; 174 "bad nit state %d", nh->nh_state); 178 bp += ((sizeof(struct nit_hdr) + nh->nh_datalen + 181 caplen = nh->nh_wirelen; 184 if (pcap_filter(p->fcode.bf_insns, cp, nh->nh_wirelen, caplen)) { 186 h.ts = nh [all...] |
/freebsd-current/contrib/llvm-project/libcxx/src/ |
H A D | new.cpp | 36 std::new_handler nh = std::get_new_handler(); local 37 if (nh) 38 nh(); 129 std::new_handler nh = std::get_new_handler(); local 130 if (nh) 131 nh();
|
/freebsd-current/tests/sys/net/routing/ |
H A D | test_routing_l3.py | 86 nh = [nh for nh in nhops if nh["index"] == nhop_kidx][0] 87 assert nh["ifa"] == str(second_addr.ip)
|