mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-03 03:30:14 +01:00
shared: add "struct in_addr" union member to NMIPAddr struct
NMIPAddr is a union of IPv4 and IPv6 addresses.
A lot of our internal API handles IPv4 as in_addr_t / guint32 / be32_t
types, as such the union field "addr4" is just a plain number. Possibly
the internal API should be all refactored to prefer "struct in_addr"
instead, but that is yet to be done.
Anyway, at a few places we will need also access to the IPv4 address in form of
a `struct in_addr`. Add an alias for that.
I am not too happy about the resulting naming. It would be nicer to have
struct in_addr addr4;
struct in6_addr addr6;
in_addr_t s_addr4;
but for now, don't do such renaming.
This commit is contained in:
parent
035c4ad45d
commit
744e11dc0d
1 changed files with 1 additions and 0 deletions
|
|
@ -102,6 +102,7 @@ typedef struct {
|
|||
union {
|
||||
guint8 addr_ptr[1];
|
||||
in_addr_t addr4;
|
||||
struct in_addr addr4_struct;
|
||||
struct in6_addr addr6;
|
||||
|
||||
/* NMIPAddr is really a union for IP addresses.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue