Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I have some devices connected to my local network and I have all the mac addresses.
I want to send rarp packet to each device to assign ip address.

I do not have the permission to use winpcap so I should do it manually.

I have made the ethernet packet for rarp (42 byte)manually, but when I send it with raw_sock I monitor the network by Wireshark and can see ip packet and not rarp.

please give me your advice.
Posted
Updated 10-Mar-11 14:04pm
v2
Comments
Dalek Dave 10-Mar-11 20:04pm    
Edited for Spelling and Grammar.

The RARP (revrse ARP) is not an "over IP" protocol, but a MAC layer protocol (so the socket library may be not helpful) and is very outdated.

The proper way to dynamically assign an IP address is through BOOTP / DHCP (check the corresponding description at http://www.rfc-editor.org/rfcxx00.html[^])
 
Share this answer
 
I don't believe this the right way to do this, raw sockets tend to work on some OSs and not work on others, in order accomplish this you need to develop an NDSI Protocol driver (or something similar example: TDI) this will allow you to send packets at the data link layer of the OSI model.


Regards,

K.D
 
Share this answer
 
Thanks for your answers, i guess that the NDSI Protocol driver will respond exactely to what i need to develop. I will go this way, if you have some tutorials or code exemples please provide it to me.

thanks all.
 
Share this answer
 
Comments
Kurt Degiorgio 11-Mar-11 2:49am    
http://ndis.com/ also you need to get a hold of the Windows Driver Development Kit.. (DDK)
Kurt Degiorgio 11-Mar-11 8:03am    
further to the above you can also use winpcap (open source) or a similar library if you don't want to go through the hassle of creating a driver your self. (winpcap uses an NDIS protocol driver)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900