Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | libnetng : name resolution |
|---|---|
| Date: | Sat, 14 Aug 2004 19:47:26 +0200 |
Hi,
Attached is a file containing the new API for name resolution. As we
talked earlier with Mike nd Kirby, it is now based on getaddrinfo()
and getnameinfo() because they are supposed to be protocol
independant. So, the functions provided here work with both IPv4 and
IPv6 ... in theory ;-)
Moreover, I have included the structure of addresses defined by Dug
Song in libdnet (once again, thanks to you for that nice libray) That
way, compatibility between the libraries will help in futur
developments.
Important
=========
Performing some tests on Linux (2.6) and Mac OS X (10.3), I noticed
different behavior ... which is quite annoying. I cant say right now
if it comes from a stupid bug I made, or if is a "normal bug".
Hence, I _really_ need you to make tests on your system
Linux Mac OS X
2.6 10.3
./gai -i 1.2.3.4 ok ok
./gai -i 1.2.3.4 -n ok ok
./gai -i 1.2.3.4 -c ok 0:1 ok 0:1
./gai -i 217.12.3.11 -c ok 0:1 ok 0:1
./gai -i google.fr -n [1] ok 1:0
./gai -i google.fr ok 1:0 ok 1:0
./gai -i google.fr -c ok 1:X ok 1:0
./gai -i yahoo.fr -c [2] 1:1 [3] 1:0
./gai -4 1.2.3.4 ok 0:1 [4]
./gai -4 1.2.3.4 -c [6] 0:1 [4]
./gai -4 1.2.3.4 -n ok [4]
[1] unable to resolve (err=-2: Name or service not known)
[2] ascii -> addr: name=yahoo.fr addr=217 12 3 11 (FQDN ok)
[3] ascii -> addr: name=yahoo.fr addr=217 12 3 11
[4] libnet_resolve_addr2ascii(): getnameinfo() failed (Unknown error: 0)
X:Y means X DNS request of type A, and Y of type PTR. When nothing is
speicied, it means there is no DNS request.
On Mac OS X, take care there is a DNS cache so there can be no DNS
request if the request is already cached.
Questions
=========
- these functions need to be tested everywhere they can (Solaris, Win,
and so on).
- why getnameinfo() fails on my iBook ?
- can someone test that with IPv6
- these functions are probably not available on all systems. OpenSSH
made their own portable one (in openbsd/fake-rfc2553.c)
Is there a volunteer to do that ? I promise to offer him a beer.
Thanks for your help
Fred
PS: I'll release an alpha version (ie not all builders and features
from 1.1 API will be available) probably tomorow or monday.
gai.c
Description: Text Data
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Next by Date: | RE: libnetng : name resolution, Kirby Kuehl |
|---|---|
| Next by Thread: | RE: libnetng : name resolution, Kirby Kuehl |
| Indexes: | [Date] [Thread] [Top] [All Lists] |