netutil.h 477 B

123456789101112131415161718192021222324252627
  1. #ifndef __NETUTIL_H__
  2. #define __NETUTIL_H__
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <stdint.h>
  7. #define SYSTEM_LITTLE_ENDIAN
  8. int8_t* inet_ntoa(uint32_t addr);
  9. int8_t* inet_ntoa_pad(uint32_t addr);
  10. uint32_t inet_addr(uint8_t* addr);
  11. uint16_t swaps(uint16_t i);
  12. uint32_t swapl(uint32_t l);
  13. uint16_t htons(uint16_t hostshort);
  14. uint32_t htonl(uint32_t hostlong);
  15. uint32_t ntohs(uint16_t netshort);
  16. uint32_t ntohl(uint32_t netlong);
  17. #ifdef __cplusplus
  18. }
  19. #endif
  20. #endif