Changeset 03c971f in mainline for uspace/app/nettest3/nettest3.c
- Timestamp:
- 2013-08-15T14:20:16Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bb2a5b2
- Parents:
- f2c19b0 (diff), 2921602 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/nettest3/nettest3.c
rf2c19b0 r03c971f 78 78 if (rc != EOK) { 79 79 /* Try interpreting as a host name */ 80 rc = dnsr_name2host(argv[1], &hinfo );80 rc = dnsr_name2host(argv[1], &hinfo, AF_INET); 81 81 if (rc != EOK) { 82 82 printf("Error resolving host '%s'.\n", argv[1]); 83 83 return rc; 84 84 } 85 86 addr.sin_addr.s_addr = host2uint32_t_be(hinfo->addr.ipv4); 87 addr.sin_family = AF_INET; 85 86 uint16_t af = inet_addr_sockaddr_in(&hinfo->addr, &addr, NULL); 87 if (af != AF_INET) { 88 printf("Host '%s' not resolved as IPv4 address.\n", argv[1]); 89 return rc; 90 } 88 91 } 89 92 printf("result: rc=%d, family=%d, addr=%x\n", rc,
Note:
See TracChangeset
for help on using the changeset viewer.