summaryrefslogtreecommitdiffstats
path: root/src/libsystemd-network/dhcp-protocol.h
diff options
context:
space:
mode:
authorpelaufer <paul@laufernet.com>2023-09-02 22:46:47 +0200
committerpelaufer <paul@laufernet.com>2023-09-02 22:46:47 +0200
commit8412d4c878a3770d8852812e9088b0122ccdd1b3 (patch)
treedfc125318dcd1e577d892781090a18d3e24f65d9 /src/libsystemd-network/dhcp-protocol.h
parentAdding client_set_state to sd-dhcp-client.c to support a client state change ... (diff)
downloadsystemd-8412d4c878a3770d8852812e9088b0122ccdd1b3.tar.xz
systemd-8412d4c878a3770d8852812e9088b0122ccdd1b3.zip
Adding dhcp_state_to_string and dhcp client state change logging
Diffstat (limited to 'src/libsystemd-network/dhcp-protocol.h')
-rw-r--r--src/libsystemd-network/dhcp-protocol.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/libsystemd-network/dhcp-protocol.h b/src/libsystemd-network/dhcp-protocol.h
index 2dc0660cc7..dd330ae839 100644
--- a/src/libsystemd-network/dhcp-protocol.h
+++ b/src/libsystemd-network/dhcp-protocol.h
@@ -55,15 +55,17 @@ enum {
};
enum DHCPState {
- DHCP_STATE_STOPPED = 0,
- DHCP_STATE_INIT = 1,
- DHCP_STATE_SELECTING = 2,
- DHCP_STATE_INIT_REBOOT = 3,
- DHCP_STATE_REBOOTING = 4,
- DHCP_STATE_REQUESTING = 5,
- DHCP_STATE_BOUND = 6,
- DHCP_STATE_RENEWING = 7,
- DHCP_STATE_REBINDING = 8,
+ DHCP_STATE_STOPPED,
+ DHCP_STATE_INIT,
+ DHCP_STATE_SELECTING,
+ DHCP_STATE_INIT_REBOOT,
+ DHCP_STATE_REBOOTING,
+ DHCP_STATE_REQUESTING,
+ DHCP_STATE_BOUND,
+ DHCP_STATE_RENEWING,
+ DHCP_STATE_REBINDING,
+ _DHCP_STATE_MAX,
+ _DHCP_STATE_INVALID = -EINVAL,
};
typedef enum DHCPState DHCPState;
@@ -107,3 +109,5 @@ enum {
DHCP_FQDN_FLAG_E = (1 << 2),
DHCP_FQDN_FLAG_N = (1 << 3),
};
+
+const char *dhcp_state_to_string(DHCPState s) _const_;