5 #include <netinet/in.h>
7 #include <syslinux/pxe.h>
9 static inline void usage(const char *s
)
11 fprintf(stderr
, "Usage: %s hostname [, hostname_1, hostname_2, ...]\n", s
);
14 int main(int argc
, char *argv
[])
19 openconsole(&dev_null_r
, &dev_stdcon_w
);
26 for (i
= 1; i
< argc
; i
++) {
27 ip
= pxe_dns(argv
[i
]);
29 printf("%s not found.\n", argv
[i
]);
31 printf("%-39s %08X %u.%u.%u.%u\n", argv
[i
], ntohl(ip
), ip
& 0xFF,
32 (ip
>> 8) & 0xFF, (ip
>> 16) & 0xFF, (ip
>> 24) & 0xFF);