A simple but substantial change: uIP used the htons()/HTONS() macro
functions for converting between host and network byte order. These names are the de facto standard names for this functionality because of the original BSD TCP/IP implementation. But they cause problems for uIP/Contiki: some platforms define these names themselves (Mac OS, most notably), causing compilation problems for Contiki on those platforms. This commit changes all htons to uip_htons instead. Same goes for htonl, ntohs, and ntohl. All-caps versions as well.
This commit is contained in:
parent
5a46c629de
commit
5585d72c86
115 changed files with 675 additions and 675 deletions
|
@ -31,7 +31,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: servreg-hack.c,v 1.2 2010/06/15 19:32:29 adamdunkels Exp $
|
||||
* $Id: servreg-hack.c,v 1.3 2010/10/19 18:29:03 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -355,12 +355,12 @@ PROCESS_THREAD(servreg_hack_process, ev, data)
|
|||
PROCESS_BEGIN();
|
||||
|
||||
/* Create outbound UDP connection. */
|
||||
outconn = udp_broadcast_new(HTONS(UDP_PORT), NULL);
|
||||
udp_bind(outconn, HTONS(UDP_PORT));
|
||||
outconn = udp_broadcast_new(UIP_HTONS(UDP_PORT), NULL);
|
||||
udp_bind(outconn, UIP_HTONS(UDP_PORT));
|
||||
|
||||
/* Create inbound UDP connection. */
|
||||
inconn = udp_new(NULL, HTONS(UDP_PORT), NULL);
|
||||
udp_bind(inconn, HTONS(UDP_PORT));
|
||||
inconn = udp_new(NULL, UIP_HTONS(UDP_PORT), NULL);
|
||||
udp_bind(inconn, UIP_HTONS(UDP_PORT));
|
||||
|
||||
etimer_set(&periodic, PERIOD_TIME);
|
||||
etimer_set(&sendtimer, random_rand() % (PERIOD_TIME));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue