Windows network using Ethernet frames only

I am doing a project where I have to write a network library for a device connected to a Windows machine. The complication is that I can only communicate with the device using Ethernet frames. Thus, TCP / UDP / IP is generally absent. I do not think the bind / listen / accept method can be applied here, but maybe I'm wrong. In addition, there is no routing or switching.

I have a few questions. How to use a socket to communicate with this device? Does winsock only support frames? I could not find many resources on this. Does anyone have any ideas on how I should act?

Is using sockets even a good idea or can I just send the information with the appropriate headers?

+5
source share
3 answers

Use WinPCap , it has an API to send and listen to raw data.
You can create your own layer of communication with it.

+2
source

Give the WinAoE code - see that it allows Windows to talk to ATA through Ethernet devices, which means that it must communicate without any of the upper layers of the network stack.

Edited by:

As far as I can tell, if you want to send raw ethernet frames, you want NdisSend and friends.

+1
source

All Articles