mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-03 12:50:17 +01:00
logging: add LOGD_IP_from_af() util
This commit is contained in:
parent
fa09e7eb53
commit
781ba0ff05
1 changed files with 10 additions and 0 deletions
|
|
@ -83,6 +83,16 @@ typedef enum { /*< skip >*/
|
|||
LOGD_IP = LOGD_IP4 | LOGD_IP6,
|
||||
} NMLogDomain;
|
||||
|
||||
static inline NMLogDomain
|
||||
LOGD_IP_from_af (int addr_family)
|
||||
{
|
||||
switch (addr_family) {
|
||||
case AF_INET: return LOGD_IP4;
|
||||
case AF_INET6: return LOGD_IP6;
|
||||
}
|
||||
g_return_val_if_reached (LOGD_NONE);
|
||||
}
|
||||
|
||||
/* Log levels */
|
||||
typedef enum { /*< skip >*/
|
||||
LOGL_TRACE,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue