{
uint8_t dest[16] = {0};
uint8_t nextHop[16] = {0};
int addrType, subnetBits = -1;
int nextHopType, nextHopBits=-1;
{
uint8_t dest[16] = {0};
uint8_t nextHop[16] = {0};
int addrType, subnetBits = -1;
int nextHopType, nextHopBits=-1;
while( readdir(dp, filename) )
{
if(filename[0] == '.') continue;
while( readdir(dp, filename) )
{
if(filename[0] == '.') continue;
- printf("%s:\t", Name);
- {
- int call_num = ioctl(fd, 3, "get_interface");
- int len = ioctl(fd, call_num, NULL);
- char *buf = malloc(len+1);
- ioctl(fd, call_num, buf);
- printf("'%s'\t", buf);
- free(buf);
- }
+ // Number
+ printf("%s\t", Name);
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
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(4, net), subnet);
- printf("\tGateway: %s\n", Net_PrintAddress(4, addr));
- printf("\tMetric: %i\n", metric);
+ printf("%s/%i\t", Net_PrintAddress(4, net), subnet);
+ printf("%s \t", Net_PrintAddress(4, addr));
+ printf("%i\t", metric);
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
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);
+ printf("%s/%i\t", Net_PrintAddress(6, net), subnet);
+ printf("%s\t", Net_PrintAddress(6, addr));
+ printf("%i\t", metric);
+
+ // Interface
+ {
+ int call_num = ioctl(fd, 3, "get_interface");
+ int len = ioctl(fd, call_num, NULL);
+ char *buf = malloc(len+1);
+ ioctl(fd, call_num, buf);
+ printf("'%s'\t", buf);
+ free(buf);
+ }
+