- {
- uint16_t net[8], addr[8];
- int subnet, metric;
- printf("IPv6\n");
- ioctl(fd, ioctl(fd, 3, "get_network"), net); // Get Network
- ioctl(fd, ioctl(fd, 3, "get_nexthop"), addr); // Get Gateway/NextHop
- subnet = ioctl(fd, ioctl(fd, 3, "getset_subnetbits"), NULL); // Get Subnet Bits
- metric = ioctl(fd, ioctl(fd, 3, "getset_metric"), NULL); // Get Subnet Bits
- printf("\tNetwork: %s/%i\n", Net_PrintAddress(6, net), subnet);
- printf("\tGateway: %s\n", Net_PrintAddress(6, addr));
- printf("\tMetric: %i\n", metric);
- }