mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 10:00:07 +01:00
glib-aux/logging: add LOGD_DHCP_af() helper macro
This commit is contained in:
parent
65992349d0
commit
d81a9aec31
1 changed files with 10 additions and 1 deletions
|
|
@ -59,7 +59,16 @@ typedef enum {
|
|||
LOGD_IP = LOGD_IP4 | LOGD_IP6,
|
||||
|
||||
#define LOGD_DHCPX(is_ipv4) ((is_ipv4) ? LOGD_DHCP4 : LOGD_DHCP6)
|
||||
#define LOGD_IPX(is_ipv4) ((is_ipv4) ? LOGD_IP4 : LOGD_IP6)
|
||||
|
||||
#define LOGD_DHCP_af(addr_family) \
|
||||
({ \
|
||||
const int _addr_family_1 = (addr_family); \
|
||||
\
|
||||
(_addr_family_1 == AF_UNSPEC ? LOGD_DHCP \
|
||||
: (NM_IS_IPv4(_addr_family_1) ? LOGD_DHCP4 : LOGD_DHCP6)); \
|
||||
})
|
||||
|
||||
#define LOGD_IPX(is_ipv4) ((is_ipv4) ? LOGD_IP4 : LOGD_IP6)
|
||||
|
||||
} NMLogDomain;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue