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

Function convert_netmask_to_depth

dpdk/app/graph/ip4_route.c:48–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48static uint8_t
49convert_netmask_to_depth(uint32_t netmask)
50{
51 uint8_t zerobits = 0;
52
53 while ((netmask & 0x1) == 0) {
54 netmask = netmask >> 1;
55 zerobits++;
56 }
57
58 return (32 - zerobits);
59}
60
61static int
62route4_rewirte_table_update(struct route_ipv4_config *ipv4route)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected