00001 #ifndef WLP_INET_H
00002 #define WLP_INET_H
00003 #include <stdint.h>
00004
00005 #include "wlp_proto.h"
00006
00007 #ifndef LITTLE_ENDIAN
00008 # define LITTLE_ENDIAN 0x0a0b0c0d
00009 #endif
00010
00011 #ifndef BIG_ENDIAN
00012 # define BIG_ENDIAN 0x0d0c0b0a
00013 #endif
00014
00015
00016 #if BYTE_ORDER == LITTLE_ENDIAN
00017 uint16_t htons(uint16_t x);
00018 uint16_t ntohs(uint16_t x);
00019 uint32_t htonl(uint32_t x);
00020 uint32_t ntohl(uint32_t x);
00021 #else
00022 # define htons(x) (x)
00023 # define ntohs(x) (x)
00024 # define htonl(x) (x)
00025 # define ntohl(x) (x)
00026 #endif
00027
00028
00029 int inet_aton(const char *cp, struct ip_addr *addr);
00030 char *inet_ntoa(const struct ip_addr *addr);
00031
00032 #endif