diff options
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/net/uip/uip.h | 32 | ||||
-rw-r--r-- | nuttx/include/netinet/in.h | 2 |
2 files changed, 2 insertions, 32 deletions
diff --git a/nuttx/include/net/uip/uip.h b/nuttx/include/net/uip/uip.h index d0ed0dd3f..043d6d377 100644 --- a/nuttx/include/net/uip/uip.h +++ b/nuttx/include/net/uip/uip.h @@ -50,6 +50,7 @@ #include <sys/types.h> #include <nuttx/config.h> +#include <arpa/inet.h> #include <net/uip/uipopt.h> /**************************************************************************** @@ -1125,37 +1126,6 @@ struct uip_udp_conn *uip_udp_new(uip_ipaddr_t *ripaddr, uint16 rport); #define uip_ipaddr4(addr) (htons(((uint16 *)(addr))[1]) & 0xff) -/* Convert 16-bit quantity from host byte order to network byte order. - * - * This macro is primarily used for converting constants from host - * byte order to network byte order. For converting variables to - * network byte order, use the htons() function instead. - */ - -#ifndef HTONS -# if UIP_BYTE_ORDER == UIP_BIG_ENDIAN -# define HTONS(n) (n) -# else /* UIP_BYTE_ORDER == UIP_BIG_ENDIAN */ -# define HTONS(n) (uint16)((((uint16) (n)) << 8) | (((uint16) (n)) >> 8)) -# endif /* UIP_BYTE_ORDER == UIP_BIG_ENDIAN */ -#else -#error "HTONS already defined!" -#endif /* HTONS */ - -/* Convert 16-bit quantity from host byte order to network byte order. - * - * This function is primarily used for converting variables from host - * byte order to network byte order. For converting constants to - * network byte order, use the HTONS() macro instead. - */ - -#ifndef htons -uint16 htons(uint16 val); -#endif /* htons */ -#ifndef ntohs -#define ntohs htons -#endif - /* This function is called user code to set up the wait */ #define uip_event_wait(waitflags) uip_event_timedwait(waitflags,0) diff --git a/nuttx/include/netinet/in.h b/nuttx/include/netinet/in.h index ea6a6ab51..e2ed78363 100644 --- a/nuttx/include/netinet/in.h +++ b/nuttx/include/netinet/in.h @@ -40,7 +40,7 @@ * Included Files ****************************************************************************/ -#include <sys/type.h> +#include <sys/types.h> /**************************************************************************** * Public Type Definitions |