mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 09:18:00 +08:00
libc/netdb: Support save the mix of IPv4/IPv6 address into hostent
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com> Change-Id: I704d38afde14b6d90a7726096fd1f483f96ba237
This commit is contained in:
+5
-2
@@ -184,14 +184,17 @@ struct hostent
|
||||
FAR char **h_aliases; /* A pointer to an array of pointers to the
|
||||
* alternative host names, terminated by a
|
||||
* null pointer. */
|
||||
int h_addrtype; /* Address type. */
|
||||
int h_length; /* The length, in bytes, of the address. */
|
||||
FAR int *h_addrtypes; /* A pointer to an array of address type. */
|
||||
FAR int *h_lengths; /* A pointer to an array of the length, in bytes,
|
||||
* of the address. */
|
||||
FAR 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. */
|
||||
};
|
||||
|
||||
#define h_addr h_addr_list[0] /* For backward compatibility */
|
||||
#define h_length h_lengths[0]
|
||||
#define h_addrtype h_addrtypes[0]
|
||||
|
||||
struct netent
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user