lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Length of the packet from low_level_input()


From: Paul Archer
Subject: [lwip-users] Length of the packet from low_level_input()
Date: Tue, 7 Dec 2010 14:59:57 +1100

Hi All,

I am implementing a Ethernet MAC driver for the Microchip ENC424J600
SPI Ethernet MAC.

I have had a look at this page:
http://lwip.wikia.com/wiki/Writing_a_device_driver

I am using the stm32x_ethernetif.c as a basis for my implementation.

I have initialised my hardware in low_level_init() and added my netif
with the netif_add() and
set the device status to 'up'. I have set the IP address statically.

I have two questions, both relating to the length of packets in
low_level_input() and low_level_output().

Is this length the length of the whole Ethernet frame, along with the
MAC src & dest and the Frame Check?
Does lwip check the Frame Check sequence? Does lwIP create the frame
check sequence?

I have the following wireshark pcap files that I have dumped from my
board (via hexdump, then text2pcap).

ethernet_gratuitous.pcap: This is the first packet sent via the arp
module, when the netif is brought up. This seems to be missing the
ethernet frame check sequence.
ethernet_rx.pcap: This is a packet as it is received from my ethernet
mac. It is a ARP request, broadcast. This includes the ethernet frame
check sequence (and it is correct)
ethernet_tx.pcap: This is the packet sent as a response to the ARP
request. This includes the ethernet frame check sequence, but it is
still the same as the previously received packet.

What this is telling me is that lwip does not do padding, and also
does not do the creation of the frame check sequence.
Am I correct? What is the correct fields that I should provide to lwIP
for the processing of an ethernet packet.

-- 
----
Regards
Paul Archer
address@hidden

Attachment: ethernet_gratuitous.pcap
Description: application/cap

Attachment: ethernet_tx.pcap
Description: application/cap

Attachment: ethernet_rx.pcap
Description: application/cap


reply via email to

[Prev in Thread] Current Thread [Next in Thread]