[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] [lwip] struct packing
From: |
James Roth |
Subject: |
[lwip-users] [lwip] struct packing |
Date: |
Wed, 08 Jan 2003 23:03:27 -0000 |
Hi,
I'm porting lwIP to KROS rtos on Altera's Nios 32 processor using
gcc. Some issues I've run into:
1. struct packing
Using #define PACK_STRUCT_FIELD(x) x __attribute__((packed))
does not seem to pack the structs.
Doing this does work:
struct foo
{
struct x bar __attribute__ ((packed));
sturct x sss __attribute__((packed))
} __attribute__ ((packed));
It seems that it does not work without that last packed attribute.
2. more packing:
After I have added the extra attribute to the structs, the
ethernet frame is recognized as an IP packet with correct version number
etc. I suspect that there are other structs to be packed. lwIP sends
continuous arp requests for the ip address on its own default interface.
Should I try to repack the ethernet frame from within the 8900a
driver? Would I have to re-pack differently for each ip or arp packet
type, or can it be generalized to 2 cases?
--
James
[This message was sent through the lwip discussion list.]
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-users] [lwip] struct packing,
James Roth <=