Aiee :) Hello! On Sat, Mar 03, 2001 at 10:57:37PM +0800, Michael Habermann wrote: > I can send ARP requests using IPPROTO_RAW, but I want to send it using > ETH_P_ARP and sockaddr_ll as described in packet(7). > > --- > 16:34:30.796225 arp who-has 192.168.0.61 tell 192.168.0.74 (0:90:4b:0:ae:e2) > 0001 0800 0604 0001 0090 4b00 aee2 c0a8 > 004a 0000 0000 0000 c0a8 003d Using the tcpdump's switch -e could be usefull since you'll be able to see the source and destination MAC address. Using your proggy, they are set respectivly to 0:0:0:0:0:0 and to 0:90:4b:0:ae:e2 which is AFAIK wrong. The source MAC address should be the one of your outgoing interface (ok, for our purpose I mean; forget about arp attacks), i.e. 00:90:4b:0:ae:e2 while the destination MAC address of the outgoing frame should be broadcast (all 1), i.e. ff:ff:ff:ff:ff:ff So try to replace memcpy(req.targ_hw_addr,ll_r_hw,6); memcpy(req.src_hw_addr,ll_s_hw,6); with something like memcpy(req.targ_hw_addr,"\xff\xff\xff\xff\xff\xff",6); memcpy(req.src_hw_addr,ll_r_hw,6); This should work. I didn't look too deep into sockaddr_ll{} since with that little modification I was able to get ARP reply back. -- Lorenzo Cavallaro `Gigi Sullivan' <sullivan@sikurezza.org> Until I loved, life had no beauty; I did not know I lived until I had loved. (Theodor Korner) - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org