version 1.3.48.1, 2016/05/14 12:45:03
|
version 1.3.48.3, 2016/05/14 13:19:18
|
Line 12 main(int argc, char **argv)
|
Line 12 main(int argc, char **argv)
|
struct in_addr a; |
struct in_addr a; |
netaddr_t n, *n0; |
netaddr_t n, *n0; |
inaddr_t t; |
inaddr_t t; |
|
ether_addr_t *ea; |
|
char str[BUFSIZ]; |
|
int res; |
|
|
a.s_addr = E_CIDRMASK(8); |
a.s_addr = E_CIDRMASK(8); |
printf("/8 = %08X %08x\n", a.s_addr, htonl(a.s_addr)); |
printf("/8 = %08X %08x\n", a.s_addr, htonl(a.s_addr)); |
Line 74 main(int argc, char **argv)
|
Line 77 main(int argc, char **argv)
|
} |
} |
|
|
printf("Address is %s port is %u\n", AIT_GET_STR(&v), e_n2port(&addr)); |
printf("Address is %s port is %u\n", AIT_GET_STR(&v), e_n2port(&addr)); |
|
|
AIT_FREE_VAL(&v); |
AIT_FREE_VAL(&v); |
|
|
|
if (argc < 3) |
|
return 0; |
|
|
|
val = ait_allocVar(); |
|
AIT_SET_STR(val, argv[2]); |
|
if ((ea = e_ether_addr(AIT_GET_STR(val), NULL))) { |
|
printf("MAC address of iface=%s is %s\n", AIT_GET_STR(val), e_ether_ntoa(ea, str, sizeof str)); |
|
e_free(ea); |
|
} |
|
ait_freeVar(&val); |
|
|
return 0; |
return 0; |
} |
} |