github.com/gotranspile/cxgo@v0.3.8-0.20240118201721-29871598a6a2/libs/includes/arpa/inet.h (about)

     1  // TODO: split the file as per the spec
     2  #include <stdint.h>
     3  
     4  uint32_t htonl(uint32_t);
     5  uint16_t htons(uint16_t);
     6  uint32_t ntohl(uint32_t);
     7  uint16_t ntohs(uint16_t);
     8  
     9  struct in_addr {
    10      uint32_t s_addr;
    11  };
    12  
    13  typedef uint64_t in_addr_t;
    14  typedef uint32_t in_port_t;
    15  #define socklen_t uint32_t
    16  
    17  in_addr_t    inet_addr(const char *);
    18  char        *inet_ntoa(struct in_addr);
    19  const char  *inet_ntop(int32_t, const void *restrict, char *restrict, socklen_t);
    20  int32_t      inet_pton(int32_t, const char *restrict, void *restrict);