Re: Code working with LIBNET_RAW4, not with LIBNET_LINK
Aaron Turner <[email protected]> Tue, 18 Jan 2005 04:26:40 -0800
| Newsgroups | gmane.comp.security.libnet |
|---|---|
| Message-ID | <[email protected]> |
--Q68bSM7Ycu6FN28Q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 18, 2005 at 02:31:06AM -0600, Karen Pease wrote: > Thank you for your help. First off, there are no samples that I could fi= nd -=20 > there were none included with the libnet on my system (installed from a F= C3=20 > rpm), nor could I find any via google. Where are they located? I relied= on=20 > reading other people's code that was written with libnet, but it was ofte= n=20 > not applicable and I had to experiment around. Sample code is shipped with the libnet source code. http://www.packetfactory.net/libnet > Using the tcpdump arguments that you recommended, I was able to see that = you=20 > were right - the dest hw address was in fact incorrect, and this is=20 > undoubtedly the problem. I was passing it the hw address reported on the= =20 > destination machine by ifconfig for my tests using LIBNET_LINK; however, = some=20 > other, unknown hw address was being sent when they were built with=20 > LIBNET_RAW4, which was making it to the destination. Is there a simple= =20 > function to look up the MAC address, or will I need to build and send the= ARP=20 > packets myself? I suppose it's in the samples. How are you building the ethernet header? But yeah, there are LINK examples shipped with the source. -Aaron --Q68bSM7Ycu6FN28Q Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Public key at: http://www.synfin.net/aturner/pgpkey.asc iD8DBQFB7QB/hweYF/hu2uYRAi5CAJ4oisyfXCPjDyWZroDE+gla6uvqCACfXEtE y29o20qWTLAwiirbWOLdc3Y= =IZF/ -----END PGP SIGNATURE----- --Q68bSM7Ycu6FN28Q--