mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 23:10:18 +01:00
platform: add NM_PLATFORM_IP[46]_ADDRESS_INIT() helper macros
This commit is contained in:
parent
6efd4e2efa
commit
e232ce93d0
1 changed files with 7 additions and 1 deletions
|
|
@ -344,7 +344,7 @@ struct _NMPlatformIP4Address {
|
|||
* addresses that only differ by their peer's network-part.
|
||||
*
|
||||
* Beware that for most cases, NetworkManager doesn't want to set an explicit
|
||||
* peer-address. Hoever, that corresponds to setting the peer address to @address
|
||||
* peer-address. However, that corresponds to setting the peer address to @address
|
||||
* itself. Leaving peer-address unset/zero, means explicitly setting the peer
|
||||
* address to 0.0.0.0, which you probably don't want.
|
||||
* */
|
||||
|
|
@ -377,6 +377,12 @@ typedef union {
|
|||
|
||||
#undef __NMPlatformIPAddress_COMMON
|
||||
|
||||
#define NM_PLATFORM_IP4_ADDRESS_INIT(...) \
|
||||
(&((const NMPlatformIP4Address) { __VA_ARGS__ }))
|
||||
|
||||
#define NM_PLATFORM_IP6_ADDRESS_INIT(...) \
|
||||
(&((const NMPlatformIP6Address) { __VA_ARGS__ }))
|
||||
|
||||
/* Default value for adding an IPv4 route. This is also what iproute2 does.
|
||||
* Note that contrary to IPv6, you can add routes with metric 0 and it is even
|
||||
* the default.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue