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