summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libsystemd/sd-network/sd-network.c10
-rw-r--r--src/network/networkctl.c12
-rw-r--r--src/network/networkd-wait-online-link.c4
-rw-r--r--src/resolve/resolved-link.c6
-rw-r--r--src/systemd/sd-network.h10
5 files changed, 21 insertions, 21 deletions
diff --git a/src/libsystemd/sd-network/sd-network.c b/src/libsystemd/sd-network/sd-network.c
index 1039a2c48c..f8f48b0ddf 100644
--- a/src/libsystemd/sd-network/sd-network.c
+++ b/src/libsystemd/sd-network/sd-network.c
@@ -92,7 +92,7 @@ _public_ int sd_network_get_ntp(char ***ret) {
return network_get_strv("NTP", ret);
}
-_public_ int sd_network_get_link_state(int ifindex, char **state) {
+_public_ int sd_network_link_get_state(int ifindex, char **state) {
_cleanup_free_ char *s = NULL, *p = NULL;
int r;
@@ -116,7 +116,7 @@ _public_ int sd_network_get_link_state(int ifindex, char **state) {
return 0;
}
-_public_ int sd_network_get_link_operational_state(int ifindex, char **state) {
+_public_ int sd_network_link_get_operational_state(int ifindex, char **state) {
_cleanup_free_ char *s = NULL, *p = NULL;
int r;
@@ -140,7 +140,7 @@ _public_ int sd_network_get_link_operational_state(int ifindex, char **state) {
return 0;
}
-_public_ int sd_network_get_link_llmnr(int ifindex, char **llmnr) {
+_public_ int sd_network_link_get_llmnr(int ifindex, char **llmnr) {
_cleanup_free_ char *s = NULL, *p = NULL;
int r;
@@ -198,11 +198,11 @@ static int network_get_link_strv(const char *key, int ifindex, char ***ret) {
return r;
}
-_public_ int sd_network_get_link_dns(int ifindex, char ***ret) {
+_public_ int sd_network_link_get_dns(int ifindex, char ***ret) {
return network_get_link_strv("DNS", ifindex, ret);
}
-_public_ int sd_network_get_link_ntp(int ifindex, char ***ret) {
+_public_ int sd_network_link_get_ntp(int ifindex, char ***ret) {
return network_get_link_strv("NTP", ifindex, ret);
}
diff --git a/src/network/networkctl.c b/src/network/networkctl.c
index 9c4c1b7e77..6fb9e62775 100644
--- a/src/network/networkctl.c
+++ b/src/network/networkctl.c
@@ -198,8 +198,8 @@ static int list_links(char **args, unsigned n) {
char devid[2 + DECIMAL_STR_MAX(int)];
_cleanup_free_ char *t = NULL;
- sd_network_get_link_state(links[i].ifindex, &state);
- sd_network_get_link_operational_state(links[i].ifindex, &operational_state);
+ sd_network_link_get_state(links[i].ifindex, &state);
+ sd_network_link_get_operational_state(links[i].ifindex, &operational_state);
sprintf(devid, "n%i", links[i].ifindex);
d = udev_device_new_from_device_id(udev, devid);
@@ -340,11 +340,11 @@ static int link_status_one(sd_rtnl *rtnl, struct udev *udev, const char *name) {
sd_rtnl_message_read_u32(reply, IFLA_MTU, &mtu);
- sd_network_get_link_state(ifindex, &state);
- sd_network_get_link_operational_state(ifindex, &operational_state);
+ sd_network_link_get_state(ifindex, &state);
+ sd_network_link_get_operational_state(ifindex, &operational_state);
- sd_network_get_link_dns(ifindex, &dns);
- sd_network_get_link_ntp(ifindex, &ntp);
+ sd_network_link_get_dns(ifindex, &dns);
+ sd_network_link_get_ntp(ifindex, &ntp);
sprintf(devid, "n%i", ifindex);
d = udev_device_new_from_device_id(udev, devid);
diff --git a/src/network/networkd-wait-online-link.c b/src/network/networkd-wait-online-link.c
index 47fb0c05df..1670beefab 100644
--- a/src/network/networkd-wait-online-link.c
+++ b/src/network/networkd-wait-online-link.c
@@ -126,12 +126,12 @@ int link_update_monitor(Link *l) {
free(l->operational_state);
l->operational_state = NULL;
- sd_network_get_link_operational_state(l->ifindex, &l->operational_state);
+ sd_network_link_get_operational_state(l->ifindex, &l->operational_state);
free(l->state);
l->state = NULL;
- sd_network_get_link_state(l->ifindex, &l->state);
+ sd_network_link_get_state(l->ifindex, &l->state);
return 0;
}
diff --git a/src/resolve/resolved-link.c b/src/resolve/resolved-link.c
index 7dcaf18630..fea52d94b6 100644
--- a/src/resolve/resolved-link.c
+++ b/src/resolve/resolved-link.c
@@ -157,7 +157,7 @@ static int link_update_dns_servers(Link *l) {
assert(l);
- r = sd_network_get_link_dns(l->ifindex, &nameservers);
+ r = sd_network_link_get_dns(l->ifindex, &nameservers);
if (r < 0)
goto clear;
@@ -201,7 +201,7 @@ static int link_update_llmnr_support(Link *l) {
assert(l);
- r = sd_network_get_link_llmnr(l->ifindex, &b);
+ r = sd_network_link_get_llmnr(l->ifindex, &b);
if (r < 0)
goto clear;
@@ -251,7 +251,7 @@ bool link_relevant(Link *l, int family) {
if ((l->flags & (IFF_UP|IFF_LOWER_UP|IFF_MULTICAST)) != (IFF_UP|IFF_LOWER_UP|IFF_MULTICAST))
return false;
- sd_network_get_link_operational_state(l->ifindex, &state);
+ sd_network_link_get_operational_state(l->ifindex, &state);
if (state && !STR_IN_SET(state, "unknown", "degraded", "routable"))
return false;
diff --git a/src/systemd/sd-network.h b/src/systemd/sd-network.h
index 6bba5cfa37..49034e84d0 100644
--- a/src/systemd/sd-network.h
+++ b/src/systemd/sd-network.h
@@ -75,28 +75,28 @@ int sd_network_get_ntp(char ***addr);
* Possible return codes:
* -ENODATA: networkd is not aware of the link
*/
-int sd_network_get_link_state(int ifindex, char **state);
+int sd_network_link_get_state(int ifindex, char **state);
/* Get operatinal state from ifindex.
* Possible states: down, up, dormant, carrier, degraded, routable
* Possible return codes:
* -ENODATA: networkd is not aware of the link
*/
-int sd_network_get_link_operational_state(int ifindex, char **state);
+int sd_network_link_get_operational_state(int ifindex, char **state);
/* Get DNS entries for a given link. These are string representations of
* IP addresses */
-int sd_network_get_link_dns(int ifindex, char ***addr);
+int sd_network_link_get_dns(int ifindex, char ***addr);
/* Get NTP entries for a given link. These are domain names or string
* reperesentations of IP addresses */
-int sd_network_get_link_ntp(int ifindex, char ***addr);
+int sd_network_link_get_ntp(int ifindex, char ***addr);
/* Indicates whether or not LLMNR should be enabled for the link
* Possible levels of support: yes, no, resolve
* Possible return codes:
* -ENODATA: networkd is not aware of the link*/
-int sd_network_get_link_llmnr(int ifindex, char **llmnr);
+int sd_network_link_get_llmnr(int ifindex, char **llmnr);
/* Monitor object */
typedef struct sd_network_monitor sd_network_monitor;