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
|
@ -235,7 +235,7 @@ void mac_ethernetToLowpan(uint8_t * ethHeader)
|
|||
#endif
|
||||
|
||||
//If not IPv6 we don't do anything
|
||||
if (((struct uip_eth_hdr *) ethHeader)->type != HTONS(UIP_ETHTYPE_IPV6)) {
|
||||
if (((struct uip_eth_hdr *) ethHeader)->type != UIP_HTONS(UIP_ETHTYPE_IPV6)) {
|
||||
PRINTF("eth2low: Packet is not IPv6, dropping\n");
|
||||
/* rndis_stat.txbad++; */
|
||||
uip_len = 0;
|
||||
|
@ -309,7 +309,7 @@ void mac_LowpanToEthernet(void)
|
|||
/* parsed_frame = sicslowmac_get_frame(); */
|
||||
|
||||
//Setup generic ethernet stuff
|
||||
ETHBUF(uip_buf)->type = htons(UIP_ETHTYPE_IPV6);
|
||||
ETHBUF(uip_buf)->type = uip_htons(UIP_ETHTYPE_IPV6);
|
||||
|
||||
//Check for broadcast message
|
||||
if(rimeaddr_cmp(packetbuf_addr(PACKETBUF_ADDR_RECEIVER), &rimeaddr_null)) {
|
||||
|
@ -782,7 +782,7 @@ void mac_logTXtoEthernet(frame_create_params_t *p,frame_result_t *frame_result)
|
|||
sendlen = frame_result->length;
|
||||
|
||||
//Setup generic ethernet stuff
|
||||
ETHBUF(raw_buf)->type = htons(UIP_ETHTYPE_802154);
|
||||
ETHBUF(raw_buf)->type = uip_htons(UIP_ETHTYPE_802154);
|
||||
|
||||
uint64_t tempaddr;
|
||||
|
||||
|
@ -845,7 +845,7 @@ void mac_802154raw(const struct mac_driver *r)
|
|||
sendlen = radio_frame_length();
|
||||
|
||||
//Setup generic ethernet stuff
|
||||
ETHBUF(raw_buf)->type = htons(UIP_ETHTYPE_802154);
|
||||
ETHBUF(raw_buf)->type = uip_htons(UIP_ETHTYPE_802154);
|
||||
|
||||
|
||||
//Check for broadcast message
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue