How to send and receive ARP packets using c or c++.

That depends on a lot of things like the OS ,your compiler etc.

There are a lot of libraries available which you can use on multiple OSs which provide raw packet access for TCP/IP,UDP,ethernet cards etc.

Look to http://www.google.com/ for info,downloads

Best of luck,you got a lot of reading to do.

(Btw,if you use windows look for WinPcap )
http://winpcap.polito.it/

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.