Hakki,
Are you referring to the DNS name of a machine, or are you referring to
the windows domain name on a local intranet?
If the case is the latter, then you can call the static GetHostByAddress
method on the Dns class in the System.Net namespace.
If it is the former, then you might have to call the gethostbyaddr
function in the WinSock 2 library in order to get this (as it can return an
NETBIOS name). From there, you should have no problem getting the domain
name.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Hakki" <hy*****@stx.cs.deu.edu.tr> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
We need to resolve with which computer my computer is communicating. We
write a sniffer that gets pakets and so we resolve ip addresses and now we
need to get their domain names.
I think we need to use netbios protocol but I dont know how. How can we do
this ...