A simple raw socket server in C / C ++ on Linux

I am trying to build an Ethernet network with raw sockets. I can not use TCP / IP, UDP or any other protocol.

This is due to the fact that he will communicate with very simple equipment that will not have the resources to handle all different levels of the protocol. My network will consist of 1 host computer sharing several hardware via an Ethernet switch. At the moment, I basically just want to send simple packages to each piece of equipment and install a simple server on which I can expand. Linux is running on my system, and the server must be written in C or C ++.

I am trying to find information on how to use raw sockets, but everyone always says that he does not use them and does not provide any information. I have a pretty strong programming background, but no network experience. Can someone provide any information on how to get started or where can I find the appropriate tutorial?

+4
source share
1 answer

There are various tutorials online that are relatively easy to find. A good place for you would be one such tutorial: Sockets Tutorial . It includes a simple client / server example in C (although the example uses the TCP protocol).

Other results:

Programming Raw Sockets on Linux with C

LINUX SOCKET PART 17 Advanced TCP / IP - RAW SOCKET EXAMPLES

Below is a complete list of google search results when programming sockets in C

+4
source

All Articles