12-17-04 12:45 AM
Hi All
I've been trying to figure out how to send an ARP-Request request
since long, but im stumped. Somebody told me that you have to use
RAW-Sockets for that, but how, and this "How" is beyond my
comprehension. Moreover, i have also seen RAW FAQ's and that is not
very helpful either. I mean i know how to create an ARP-Request Header
and Ethernet Header using structs , and how to avoid byte padding by
assigning these structs to U_char arrays, but this Raw-socket usage in
terms of sending ARP-Request is beyond my comprehension. Would you
please tell me how to send an ARP-Request-broadcast over a LAN( so
that every node attached to my LAN must receive this arp-request) by
using RAW-Sockets?????..please answer this question, any
pointers/comments/guidelines will be highly
appreciated..........................
I was just going through TCP/IP illustrated vol 2. Section 21.5 Page
683, and i found a "arpwhohas()" function that takes two parameters
namely:
struct arpcom *ac;//&
struct in_addr *addr;
furthermore, i found that arpwhohas() function , in turn, calls
arprequest() function. So my question is can we send an ARP-Request on
Ethernet by directly calling this arpwhohas() function , by just
providing the required arguments? if so, then how????
and if we can't send ARP-Request by calling above , why can't??
i will be more than glad if you take some time off and give me some
invaluable suggestions out of your valuable time.
Thanking in anticipation.
Regards
Waqas
[ Post a follow-up to this message ]
|