mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-18 09:24:31 +00:00
MINOR: tools: Add net_addr structure describing a network addess
The net_addr structure describes a IPv4 or IPv6 address. Its ip and mask are represented. Among other things, this structure will be used to add support of IPv6 for "except" parameter of "forwardfor" and "originalto" options.
This commit is contained in:
parent
cccded98c7
commit
01f02a4d84
@ -142,4 +142,18 @@ struct name_desc {
|
||||
const char *desc;
|
||||
};
|
||||
|
||||
struct net_addr {
|
||||
int family; /* AF_INET or AF_INET6 if defined, AF_UNSET if undefined */
|
||||
union {
|
||||
struct {
|
||||
struct in_addr ip;
|
||||
struct in_addr mask;
|
||||
} v4;
|
||||
struct {
|
||||
struct in6_addr ip;
|
||||
struct in6_addr mask;
|
||||
} v6;
|
||||
} addr;
|
||||
};
|
||||
|
||||
#endif /* _HAPROXY_TOOLS_T_H */
|
||||
|
Loading…
Reference in New Issue
Block a user