Re: How to get IP address of an ethernet device

From: Dave Lowther (davel_at_snsys.com)
Date: 02/26/04


Date: Thu, 26 Feb 2004 07:03:05 -0000


> What I need is combination of IP and raw ethernet sniffer.
> Listening on the wire can tell if the device sends server advertisements
> or dhcp requests. in the latter case it may have no IP address at all.
>
> Lastly, none of these tools allow to select the interface to sniff on -
need
> to disconnect from the public network before using them.
>
> Can raw sockets be used to sniff everything on the wire? even non-IP
packets?

Have you considered using the WinPcap library. It's free and is used as the
capture layer for the Ethereal packet sniffer. The library is easy to use if
you are a C programmer with some experience of socket programming.

http://winpcap.polito.it/install/default.htm

Dave.