l3cfg/ipv6ll: add NM_L3_IPV6LL_STATE_DEFUNCT enum

This is not used by NML3IPv6LL, but is useful for the callers to have
an additional pseudo value at their disposal.
This commit is contained in:
Thomas Haller 2021-09-15 15:44:04 +02:00
parent 05c05b7a80
commit 2ab0eba106
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
2 changed files with 12 additions and 5 deletions

View file

@ -19,6 +19,7 @@ NM_UTILS_LOOKUP_STR_DEFINE(nm_l3_ipv6ll_state_to_string,
NML3IPv6LLState,
NM_UTILS_LOOKUP_DEFAULT_NM_ASSERT("???"),
NM_UTILS_LOOKUP_STR_ITEM(NM_L3_IPV6LL_STATE_NONE, "none"),
NM_UTILS_LOOKUP_STR_ITEM(NM_L3_IPV6LL_STATE_DEFUNCT, "defunct"),
NM_UTILS_LOOKUP_STR_ITEM(NM_L3_IPV6LL_STATE_STARTING, "starting"),
NM_UTILS_LOOKUP_STR_ITEM(NM_L3_IPV6LL_STATE_DAD_IN_PROGRESS,
"dad-in-progress"),

View file

@ -11,15 +11,21 @@
typedef struct _NML3IPv6LL NML3IPv6LL;
typedef enum _nm_packed {
/* NONE is not actually used by NML3IPv6LL. This is a bogus placeholder
* state for external users. */
NM_L3_IPV6LL_STATE_NONE,
NM_L3_IPV6LL_STATE_STARTING,
NM_L3_IPV6LL_STATE_DAD_IN_PROGRESS,
NM_L3_IPV6LL_STATE_READY,
NM_L3_IPV6LL_STATE_DAD_FAILED,
/* The following flags are not actually use by NML3IPv6LL. They exist for
* convenience of the users, to encode additional states. */
/* IPv6LL is disabled */
NM_L3_IPV6LL_STATE_NONE,
/* We want to do IPv6LL, but something is missing so we cannot even create
* a NML3IPv6LL instance. For example, no NML3Cfg instance or no interface name. */
NM_L3_IPV6LL_STATE_DEFUNCT,
} NML3IPv6LLState;
const char *nm_l3_ipv6ll_state_to_string(NML3IPv6LLState state);