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

Function get_nxt_net

dpdk/lib/fib/trie.c:435–454  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

433}
434
435static void
436get_nxt_net(uint8_t *ip, uint8_t depth)
437{
438 int i;
439 uint8_t part_depth;
440 uint8_t prev_byte;
441
442 for (i = 0, part_depth = depth; part_depth > 8; part_depth -= 8, i++)
443 ;
444
445 prev_byte = ip[i];
446 ip[i] += 1 << (8 - part_depth);
447 if (ip[i] < prev_byte) {
448 while (i > 0) {
449 ip[--i] += 1;
450 if (ip[i] != 0)
451 break;
452 }
453 }
454}
455
456static int
457v6_addr_is_zero(const uint8_t ip[RTE_FIB6_IPV6_ADDR_SIZE])

Callers 1

modify_dpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected