summaryrefslogtreecommitdiffstats
path: root/src/libsystemd/sd-network/sd-network.c
diff options
context:
space:
mode:
authorSusant Sahani <ssahani@vmware.com>2020-06-08 06:39:50 +0200
committerSusant Sahani <ssahani@vmware.com>2020-06-08 07:09:24 +0200
commitdaec96821def5d20de992a00912c8bcdf39927b5 (patch)
tree1d8e03cfc39b20577b51410a5e2a54832e605814 /src/libsystemd/sd-network/sd-network.c
parentnetwork: DHCP4 client ID save in state file (diff)
downloadsystemd-daec96821def5d20de992a00912c8bcdf39927b5.tar.xz
systemd-daec96821def5d20de992a00912c8bcdf39927b5.zip
sd-network: Introduce API to access DHCP4 client ID
Diffstat (limited to 'src/libsystemd/sd-network/sd-network.c')
-rw-r--r--src/libsystemd/sd-network/sd-network.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsystemd/sd-network/sd-network.c b/src/libsystemd/sd-network/sd-network.c
index 7e03817f82..5195a5850f 100644
--- a/src/libsystemd/sd-network/sd-network.c
+++ b/src/libsystemd/sd-network/sd-network.c
@@ -168,6 +168,10 @@ _public_ int sd_network_link_get_address_state(int ifindex, char **state) {
return network_link_get_string(ifindex, "ADDRESS_STATE", state);
}
+_public_ int sd_network_link_get_dhcp4_client_id_string(int ifindex, char **client_id) {
+ return network_link_get_string(ifindex, "DHCP4_CLIENT_ID", client_id);
+}
+
_public_ int sd_network_link_get_required_for_online(int ifindex) {
_cleanup_free_ char *s = NULL;
int r;