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

Function rn_lexobetter

freebsd/net/radix.c:558–570  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

556}
557
558static int /* XXX: arbitrary ordering for non-contiguous masks */
559rn_lexobetter(void *m_arg, void *n_arg)
560{
561 u_char *mp = m_arg, *np = n_arg, *lim;
562
563 if (LEN(mp) > LEN(np))
564 return (1); /* not really, but need to check longer one first */
565 if (LEN(mp) == LEN(np))
566 for (lim = mp + LEN(mp); mp < lim;)
567 if (*mp++ > *np++)
568 return (1);
569 return (0);
570}
571
572static struct radix_mask *
573rn_new_radix_mask(struct radix_node *tt, struct radix_mask *next)

Callers 1

rn_addrouteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected