Changes in uspace/app/nettest3/nettest3.c [fff7ef4:af076b4] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/nettest3/nettest3.c
rfff7ef4 raf076b4 39 39 #include <str.h> 40 40 41 #include <inet/dnsr.h>42 41 #include <net/in.h> 43 42 #include <net/in6.h> … … 61 60 int fd; 62 61 char *endptr; 63 dnsr_hostinfo_t *hinfo;64 62 65 63 port = 7; … … 77 75 rc = inet_pton(AF_INET, argv[1], (uint8_t *)&addr.sin_addr.s_addr); 78 76 if (rc != EOK) { 79 /* Try interpreting as a host name */ 80 rc = dnsr_name2host(argv[1], &hinfo); 81 if (rc != EOK) { 82 printf("Error resolving host '%s'.\n", argv[1]); 83 return rc; 84 } 85 86 addr.sin_addr.s_addr = host2uint32_t_be(hinfo->addr.ipv4); 87 addr.sin_family = AF_INET; 77 fprintf(stderr, "Error parsing address\n"); 78 return 1; 88 79 } 89 80 printf("result: rc=%d, family=%d, addr=%x\n", rc,
Note:
See TracChangeset
for help on using the changeset viewer.