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

Function lradix4_lookup

freebsd/netinet/in_fib_algo.c:527–540  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

525};
526
527static struct nhop_object *
528lradix4_lookup(void *algo_data, const struct flm_lookup_key key, uint32_t scopeid)
529{
530 struct radix_node_head *rnh = (struct radix_node_head *)algo_data;
531 struct radix4_addr_entry *ent;
532 struct sockaddr_in addr4 = {
533 .sin_len = KEY_LEN_INET,
534 .sin_addr = key.addr4,
535 };
536 ent = (struct radix4_addr_entry *)(rn_match(&addr4, &rnh->rh));
537 if (ent != NULL)
538 return (ent->nhop);
539 return (NULL);
540}
541
542/*
543 * Preference function.

Callers

nothing calls this directly

Calls 1

rn_matchFunction · 0.85

Tested by

no test coverage detected