Hi Ikhwan,
Sorry I didn't answer for so long but I was out of town for quite a
while.
I'm glad to hear you solved the problem. Still I cannot understand
why your compiler (or rather its vendor) doesn't support structure
packing which is a rather common element of C (even if it is not
included in the C-standard, or is it?)
I have solved this problem by copying the ip tcp and all the
necessary headers into a separate variable which will be processed
during packet reception. This has removed all my alignment problems.
While this works for you, it is really a workaround:
a) While structure packing is, of course, slower than accessing
aligned data, copying is even slower!
b) You will have to work around this for every new part of the
stack as well as every existing part (I don't know if receiving TCP/
IP packets is the only problem: I imagine sending them wouldn't
work as well?)
c) And this is the most critical to me: You will have the same
problem with many third-party ethernet/network/socket software such
as server/client implementations (ftp/http/tftp...) or event
industrial ethernet stacks running on your target (if any).
I have the source which can be compiled if the option
LWIP_MISALIGNMENT is set to 1. If anyone interested and have the
same problem, I am more than willing to share and help. If you
guys want to incorporate it to lwip as alternative solution to
structure packing I am glad I can help. This lowers the stack
performance a bit though.
Not to offend you, but personally, I see this as a bug in the
compiler you are using and we don't support broken compilers:
structure packing _is_ a must for lwIP!
Hope you are still having fun with lwIP!
Simon
_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users