MCPcopy Create free account
hub / github.com/F-Stack/f-stack / lradix6_lookup

Function lradix6_lookup

freebsd/netinet6/in6_fib_algo.c:98–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96};
97
98static struct nhop_object *
99lradix6_lookup(void *algo_data, const struct flm_lookup_key key, uint32_t scopeid)
100{
101 struct radix_node_head *rnh = (struct radix_node_head *)algo_data;
102 struct radix6_addr_entry *ent;
103 struct sa_in6 addr6 = {
104 .sin6_len = KEY_LEN_INET6,
105 .sin6_addr = *key.addr6,
106 };
107 if (IN6_IS_SCOPE_LINKLOCAL(key.addr6))
108 addr6.sin6_addr.s6_addr16[1] = htons(scopeid & 0xffff);
109 ent = (struct radix6_addr_entry *)(rn_match(&addr6, &rnh->rh));
110 if (ent != NULL)
111 return (ent->nhop);
112 return (NULL);
113}
114
115static uint8_t
116lradix6_get_pref(const struct rib_rtable_info *rinfo)

Callers

nothing calls this directly

Calls 1

rn_matchFunction · 0.85

Tested by

no test coverage detected