Hi,
the lwIP-port that comes with Starterware contains following statement in lwiplib.c / lwIPInit() - a piece of code TI is responsible for:
if(lwipIf->ipMode == IPADDR_USE_STATIC) { ip_addr.addr = htonl(lwipIf->ipAddr); net_mask.addr = htonl(lwipIf->netMask); gw_addr.addr = htonl(lwipIf->gwAddr); }
This leads to the strange situation that all IP's that are parsed with
ipaddr_aton(c, &myIP);
need an additional conversion with
myIP.addr=ntohl(myIP.addr)
This is done only to change back the byteorder later on initialisation.
So...what is the diea behind this? Why is it done this way?