Hello

We need to establish a communication between two devices. They use the
ethernet protocol, but no other protocol above (neither IP, nor TCP, UDP...),
we want to make the frames by ourselves and send our own data with our own
protocol.

Is it possible? In this post
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.development.device.drivers&tid=2046a88b-e302-4bb1-ba95-b472995d7c4f&cat=en-us-msdn&lang=en&cr=US&sloc=en-us&m=1&p=1
I have understood that it is possible using raw sockets, but how can I do
that I want under Windows XP?

Thank you in advance

Re: ethernet raw sockets by Stephan

Stephan
Tue Aug 09 03:03:27 CDT 2005

The "raw sockets" feature of the WinSock library is definitely not an
option for you. AFAIK, raw sockets are still IP based. That is, they
use an Ethernet type code of 0x0800.

Since you apparently want to implement your own protocol, what you need
to do is write an NDIS protocol driver. Your application then either
talks to your protocol driver directly via some proprietary I/O control
(IOCTL) mechanism.

Or you simply make your NDIS protocol driver a TDI transport driver
such that applications can use the standard TDI client interface to
communicate over the network using your protocol.

For details on TDI, see


http://msdn.microsoft.com/library/en-us/network/hh/network/nettdidriv_27c4b7c0-7e21-441d-bb08-335d48204a06.xml.asp

MVP Thomas Divine offers information on TDI:

http://www.pcausa.com/tdisamp/

Thomas also can help you more wrt TDI than I can.

Also please note that from your questions I seem to understand you are
new to protocols and network drivers. So please don't try to reinvent
the wheel. Network protocols is a complex field. What exactly do you
want to achieve?

Stephan
---
galaz wrote:
> Hello
>
> We need to establish a communication between two devices. They use the
> ethernet protocol, but no other protocol above (neither IP, nor TCP, UDP...),
> we want to make the frames by ourselves and send our own data with our own
> protocol.
>
> Is it possible? In this post
> http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.development.device.drivers&tid=2046a88b-e302-4bb1-ba95-b472995d7c4f&cat=en-us-msdn&lang=en&cr=US&sloc=en-us&m=1&p=1
> I have understood that it is possible using raw sockets, but how can I do
> that I want under Windows XP?
>
> Thank you in advance


Re: ethernet raw sockets by galaz

galaz
Tue Aug 09 03:31:06 CDT 2005

Hello, Stephan

Thanks. I'm going to try the NDIS option that you have suggested me, it's
the first time I have heard about it. I will read the documentation links
you posted.

About our project. We don't want to reinvent the wheel. The devices are
not connected to the Internet and they are not PCs. They exchange data and
interaction with final user is minimum. We use Ethernet because we thought
it was a good solution to build a LAN where data could be addressed. There
is no software application that is run in the machines, all is done by
hardware.

Re: ethernet raw sockets by Arkady

Arkady
Tue Aug 09 04:52:40 CDT 2005

But you'll have to invent a lot of wheels , because of that all embedded
Oses have TCP/IP stack inside
Arkady

"galaz" <galaz@discussions.microsoft.com> wrote in message
news:7E907C7E-E067-4F5F-A3DB-9F846687DCF1@microsoft.com...
> Hello, Stephan
>
> Thanks. I'm going to try the NDIS option that you have suggested me, it's
> the first time I have heard about it. I will read the documentation links
> you posted.
>
> About our project. We don't want to reinvent the wheel. The devices are
> not connected to the Internet and they are not PCs. They exchange data
> and
> interaction with final user is minimum. We use Ethernet because we
> thought
> it was a good solution to build a LAN where data could be addressed.
> There
> is no software application that is run in the machines, all is done by
> hardware.



Re: ethernet raw sockets by pavel_a

pavel_a
Tue Aug 09 08:28:02 CDT 2005

Well it seems that what you're doing is pretty clear and simple.
The only real issue is how to send and receive raw packets from XP app;
Stephan gave a perfect answer to this.

You need a "packet driver" which on XP is a NDIS transport (a.k.a. protocol)
miniport.

Hopefully you have a dedicated netcard on the XP machine,
to avoid your custom "protocol" interfering with TCPIP.
Also it will be easier to debug.

Make your own "packet" driver based on the DDK samples, or
for quick start and support, look for pcausa.com product.
Leave only this driver bound to the dedicated netcard.

Redards,
--PA

"galaz" wrote:
> Hello, Stephan
>
> Thanks. I'm going to try the NDIS option that you have suggested me, it's
> the first time I have heard about it. I will read the documentation links
> you posted.
>
> About our project. We don't want to reinvent the wheel. The devices are
> not connected to the Internet and they are not PCs. They exchange data and
> interaction with final user is minimum. We use Ethernet because we thought
> it was a good solution to build a LAN where data could be addressed. There
> is no software application that is run in the machines, all is done by
> hardware.