Ethernet packets and ip_en

Hi All,

We are building network driver for a custom device which works with packet
format similar to Ethernet one with the difference that the header doesn’t
contain the source MAC address.
Currently we want to use the ip_en converter in order to take advantage of
the ARP done there.
So when a packet comes to our driver through the ip_en converter (say from
the tcp/ip stack) we get the destination MAC address from the Ethernet
header and replace the Ethernet header with our custom one. So, when the
package goes done everything works fine.
The problem is with the going up packges.
When package comes from the hardware we replace our header with 14 byte
ethernet header - we assign zeroes to the source MAC address and fill the 2
length bytes with the length of data in our package. Is this correct???
The ion tx_up_start function returns successfully but it seems that the
packets are rejected from the ip_en converter and not passed to the tcp/ip
stack.
And something more - the 4 byte checksum field in the end of an Ethernet
packet - does the ip_en converter expect this field to be in the UP packet
or it is supposed to be removed by the hardware (if a standard NIC is used)?

Thanks a lot for your help in advance!

Dilian

We expext the DIX ethernet header format: ether type rather than
length field. Also, make sure it’s in network order (big endian).

-seanb

Dilian Stoikov <dstoikov@uvic.ca> wrote:

Hi All,

We are building network driver for a custom device which works with packet
format similar to Ethernet one with the difference that the header doesn’t
contain the source MAC address.
Currently we want to use the ip_en converter in order to take advantage of
the ARP done there.
So when a packet comes to our driver through the ip_en converter (say from
the tcp/ip stack) we get the destination MAC address from the Ethernet
header and replace the Ethernet header with our custom one. So, when the
package goes done everything works fine.
The problem is with the going up packges.
When package comes from the hardware we replace our header with 14 byte
ethernet header - we assign zeroes to the source MAC address and fill the 2
length bytes with the length of data in our package. Is this correct???
The ion tx_up_start function returns successfully but it seems that the
packets are rejected from the ip_en converter and not passed to the tcp/ip
stack.
And something more - the 4 byte checksum field in the end of an Ethernet
packet - does the ip_en converter expect this field to be in the UP packet
or it is supposed to be removed by the hardware (if a standard NIC is used)?

Thanks a lot for your help in advance!

Dilian