| 433 | } |
| 434 | |
| 435 | static void |
| 436 | get_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 | |
| 456 | static int |
| 457 | v6_addr_is_zero(const uint8_t ip[RTE_FIB6_IPV6_ADDR_SIZE]) |