Changes in uspace/app/dnsres/dnsres.c [5a324d99:cd18cd1] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/dnsres/dnsres.c
r5a324d99 rcd18cd1 36 36 #include <inet/addr.h> 37 37 #include <inet/dnsr.h> 38 #include <net/socket_codes.h> 38 39 #include <stdio.h> 39 40 #include <stdlib.h> … … 53 54 } 54 55 55 uint16_t ver;56 uint16_t af; 56 57 char *hname; 57 58 … … 62 63 } 63 64 64 ver = ip_v4;65 af = AF_INET; 65 66 hname = argv[2]; 66 67 } else if (str_cmp(argv[1], "-6") == 0) { … … 70 71 } 71 72 72 ver = ip_v6;73 af = AF_INET6; 73 74 hname = argv[2]; 74 75 } else { 75 ver = ip_any;76 af = 0; 76 77 hname = argv[1]; 77 78 } 78 79 79 80 dnsr_hostinfo_t *hinfo; 80 int rc = dnsr_name2host(hname, &hinfo, ver);81 int rc = dnsr_name2host(hname, &hinfo, af); 81 82 if (rc != EOK) { 82 83 printf("%s: Error resolving '%s'.\n", NAME, hname);
Note:
See TracChangeset
for help on using the changeset viewer.