Hi

I'm using lwip 1.4.1 on big endian targets and it works. Now I
want to use the same software on little endian targets (ARM)
and have problems. Should that work from the lwip part? The
Ethernet frame of course is always big endian why it works
without problems on big endian targets. However I'm not sure
that all places do the correct conversion between host and
network order.

E.g. the IP address for the interface:

IP4_ADDR(ipaddr, 192, 168, 1, 197)
netif_add(&m_Netif, &ipaddr...

gives a debug trace

... set to 197.1.168.192

Is the trace wrong or did I give a wrong address?


Sending (e.g. ARP reply):
ip_output_if_opt

The ip address is copied directly into the frame:
    ip_addr_copy(iphdr->src, *src);

Shouldn't that be
    ip_addr_set_hton(&iphdr->src, src);

if the runnig hardware is little endian?

And yes, I do have
#define BYTE_ORDER LITTLE_ENDIAN

Thanks

bye  Fabi


_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to