[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AW: [lwip-users] TCPH_OFFSET
From: |
Kieran Mansley |
Subject: |
Re: AW: [lwip-users] TCPH_OFFSET |
Date: |
Wed, 5 Mar 2003 14:04:23 +0000 (GMT) |
On Wed, 5 Mar 2003, Zschocke, Florian wrote:
> Kieran Mansley wrote on Mittwoch, 5. März 2003 14:47:
>
> > I think that would work fine. I guess it was designed to
> > provide access to both the offset and the other bits (I think
> > they're reserved, not sure what if anything they're used for)
>
> The problem is that that wouldn't work since the partitioning of these 16
> bits in the header is different from what is used in lwIP. The TCP header
> has these fields (at offset 96):
>
> 4-bit header length | 6-bit reserved | 6-bit flags
>
> The lwIP TCP header and macros partition these 16 bits in two octets which
> results in the boundary lying in the middle of the reserved bits. Both the
> "offset" (actually header length) and the flags fields aren't extracted
> correctly by the macros. I wasn't sure if this is due to some limitations in
> some processor architectures though I would doubt that.
Much more likely that it was just not done perfectly to start with. Feel
free to change it - if it breaks anything it should be pretty obvious and
it'll be easy to change back.
Kieran