[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Re: [lwip] Recent change in pbuf.c
From: |
Kieran Mansley |
Subject: |
[lwip-users] Re: [lwip] Recent change in pbuf.c |
Date: |
Thu, 09 Jan 2003 00:03:25 -0000 |
On Wed, 4 Dec 2002, David Haas wrote:
> I still have to question the need for the offset at the link layer. In
> fact the only thing I can think of is if you are running a remote-access
> server where the ethernet header is removed and a PPP header is
> inserted. I would claim that this is a somewhat specialized use and lwip
> should not be optimized for this. (or at least it should be documented).
I think the reason for your problem is not the code, but the way you are
thinking about it! ;)
You are trying to put a physical layer packet (ie. one with an ethernet
header) into a "link layer" pbuf, and finding that they aren't really
suited to each other. Instead you should put your physical layer packet
into a raw pbuf, and then everything will be happy.
The reason (I think) it is this way is because it is more suited to when
you are allocating pbufs for transmit, rather than receive. When
transmitting a packet at the link layer you need to leave room for a
physical layer header to be added later, and so that is the reason for the
offset.
So, I guess I'm with Jani on this one I'm afraid!
Kieran
[This message was sent through the lwip discussion list.]
- [lwip-users] Re: [lwip] Recent change in pbuf.c,
Kieran Mansley <=