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

     1  #include <stdint.h>
     2  
     3  struct hostent {
     4  	char  *h_name;      // Official name of the host. 
     5  	char **h_aliases;   // A pointer to an array of pointers to alternative host names, terminated by a null pointer. 
     6  	int32_t h_addrtype;  // Address type. 
     7  	int32_t h_length;    // The length, in bytes, of the address. 
     8  	char **h_addr_list; // A pointer to an array of pointers to network addresses (in network byte order) for the host, terminated by a null pointer.
     9  };
    10  
    11  struct netent {
    12  	char     *n_name;     // Official, fully-qualified (including the domain) name of the host. 
    13  	char    **n_aliases;  // A pointer to an array of pointers to alternative network names, terminated by a null pointer. 
    14  	int       n_addrtype; // The address type of the network. 
    15  	uint32_t  n_net;      // The network number, in host byte order.
    16  };
    17  
    18  struct protoent {
    19  	char   *p_name;     // Official name of the protocol. 
    20  	char  **p_aliases;  // A pointer to an array of pointers to alternative protocol names, terminated by a null pointer. 
    21  	int     p_proto;    // The protocol number.
    22  };
    23  
    24  struct servent {
    25  	char   *s_name;     // Official name of the service. 
    26  	char  **s_aliases;  // A pointer to an array of pointers to alternative service names, terminated by a null pointer. 
    27  	int     s_port;     // The port number at which the service resides, in network byte order. 
    28  	char   *s_proto;    // The name of the protocol to use when contacting the service.
    29  };
    30  
    31  void              endhostent(void);
    32  void              endnetent(void);
    33  void              endprotoent(void);
    34  void              endservent(void);
    35  void              freeaddrinfo(struct addrinfo *);
    36  const char       *gai_strerror(int);
    37  int               getaddrinfo(const char *restrict, const char *restrict,
    38                        const struct addrinfo *restrict,
    39                        struct addrinfo **restrict);
    40  struct hostent   *gethostbyaddr(const void *, socklen_t, int);
    41  struct hostent   *gethostbyname(const char *);
    42  struct hostent   *gethostent(void);
    43  int               getnameinfo(const struct sockaddr *restrict, socklen_t,
    44                        char *restrict, socklen_t, char *restrict,
    45                        socklen_t, int);
    46  struct netent    *getnetbyaddr(uint32_t, int);
    47  struct netent    *getnetbyname(const char *);
    48  struct netent    *getnetent(void);
    49  struct protoent  *getprotobyname(const char *);
    50  struct protoent  *getprotobynumber(int);
    51  struct protoent  *getprotoent(void);
    52  struct servent   *getservbyname(const char *, const char *);
    53  struct servent   *getservbyport(int, const char *);
    54  struct servent   *getservent(void);
    55  void              sethostent(int);
    56  void              setnetent(int);
    57  void              setprotoent(int);
    58  void              setservent(int);