best way to send/receive raw ethernet packets?

I am trying to figure out the simplest way to read/write raw packets
over the QNX ethernet driver.

The BPF driver provides a good example on how to write a resource
manager that can read the packets but it has no support for writting
raw packets. While the DDK docs are alpha and appear to be incomplete.

Is the source for the TCP/IP stack available?
Does anybody have some code that sends raw ethernet packets?

Take a look at http://www.earth.li/projectpurple/progs/sendip.html


“Chris Goebel” <cgoebel@tridium.com> wrote in message
news:3BC4B01A.8F4DF139@tridium.com

I am trying to figure out the simplest way to read/write raw packets
over the QNX ethernet driver.

The BPF driver provides a good example on how to write a resource
manager that can read the packets but it has no support for writting
raw packets. While the DDK docs are alpha and appear to be incomplete.

Is the source for the TCP/IP stack available?
Does anybody have some code that sends raw ethernet packets?

Hmmm, the problem is that I am not sending/receiving IP packets. I need
to send ethernet packets to support BACnet (instead of IP)

-chris


Issam Haddad wrote:

Take a look at > http://www.earth.li/projectpurple/progs/sendip.html

“Chris Goebel” <> cgoebel@tridium.com> > wrote in message
news:> 3BC4B01A.8F4DF139@tridium.com> …
I am trying to figure out the simplest way to read/write raw packets
over the QNX ethernet driver.

The BPF driver provides a good example on how to write a resource
manager that can read the packets but it has no support for writting
raw packets. While the DDK docs are alpha and appear to be incomplete.

Is the source for the TCP/IP stack available?
Does anybody have some code that sends raw ethernet packets?

There isn’t an easy way to do this currently. You can get the
network DDK and might be able to glean enough information to
write a protocol layer; but it’s currently geared towards drivers.

This has come up periodically so I intend to look at it when I
get a few cycles.

-seanb

Chris Goebel <cgoebel@tridium.com> wrote:
: Hmmm, the problem is that I am not sending/receiving IP packets. I need
: to send ethernet packets to support BACnet (instead of IP)

: -chris


: Issam Haddad wrote:

:> Take a look at http://www.earth.li/projectpurple/progs/sendip.html
:>
:> “Chris Goebel” <cgoebel@tridium.com> wrote in message
:> news:3BC4B01A.8F4DF139@tridium.com
:> > I am trying to figure out the simplest way to read/write raw packets
:> > over the QNX ethernet driver.
:> >
:> > The BPF driver provides a good example on how to write a resource
:> > manager that can read the packets but it has no support for writting
:> > raw packets. While the DDK docs are alpha and appear to be incomplete.
:> >
:> > Is the source for the TCP/IP stack available?
:> > Does anybody have some code that sends raw ethernet packets?
:> >

When the cycles become available my life would be
complete if support for “socket(PF_PACKET,SOCK_RAW)”
were to exist on qnx.

In the meantime looks like I will be slogging through the io-net ddk
using the nfm-bpf.so source as an example on how to handle the
reads.

-chris


Sean Boudreau wrote:

There isn’t an easy way to do this currently. You can get the
network DDK and might be able to glean enough information to
write a protocol layer; but it’s currently geared towards drivers.

This has come up periodically so I intend to look at it when I
get a few cycles.

-seanb

Chris Goebel <> cgoebel@tridium.com> > wrote:
: Hmmm, the problem is that I am not sending/receiving IP packets. I need
: to send ethernet packets to support BACnet (instead of IP)

: -chris

: Issam Haddad wrote:

:> Take a look at > http://www.earth.li/projectpurple/progs/sendip.html
:
:> “Chris Goebel” <> cgoebel@tridium.com> > wrote in message
:> news:> 3BC4B01A.8F4DF139@tridium.com> …
:> > I am trying to figure out the simplest way to read/write raw packets
:> > over the QNX ethernet driver.
:
:> > The BPF driver provides a good example on how to write a resource
:> > manager that can read the packets but it has no support for writting
:> > raw packets. While the DDK docs are alpha and appear to be incomplete.
:
:> > Is the source for the TCP/IP stack available?
:> > Does anybody have some code that sends raw ethernet packets?
: