mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-14 08:50:53 +08:00
23 lines
400 B
C
23 lines
400 B
C
|
#pragma once
|
||
|
#include <sys/socket.h>
|
||
|
#include <sys/types.h>
|
||
|
#include <netdb.h>
|
||
|
#include <sys/un.h>
|
||
|
#include <vector>
|
||
|
|
||
|
typedef struct SOCK_ADDR {
|
||
|
union {
|
||
|
struct sockaddr_storage ss;
|
||
|
#ifdef AF_INET6
|
||
|
struct sockaddr_in6 in6;
|
||
|
#endif
|
||
|
struct sockaddr_in in;
|
||
|
#ifdef ACL_UNIX
|
||
|
struct sockaddr_un un;
|
||
|
#endif
|
||
|
struct sockaddr sa;
|
||
|
} sa;
|
||
|
} SOCK_ADDR;
|
||
|
|
||
|
struct addrinfo *host_addrinfo(const char *addr);
|