summaryrefslogtreecommitdiff
path: root/src/systemd
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-09-28 22:04:52 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-09-29 03:37:09 +0900
commit5977b71f28075c34eb9e45aaa2d7cdc791f7eaf8 (patch)
tree44f0e8caf628eae20a9be91e63b7f6b47d871551 /src/systemd
parent01afd0f7f53f7807294ce7c008ecf8a043a920fe (diff)
downloadsystemd-5977b71f28075c34eb9e45aaa2d7cdc791f7eaf8.tar.gz
libsystemd-network: make sd_dhcp_client_get_ifname() or friends return negative errno on error
Diffstat (limited to 'src/systemd')
-rw-r--r--src/systemd/sd-dhcp-client.h2
-rw-r--r--src/systemd/sd-dhcp-server.h2
-rw-r--r--src/systemd/sd-dhcp6-client.h2
-rw-r--r--src/systemd/sd-ipv4acd.h2
-rw-r--r--src/systemd/sd-ipv4ll.h2
-rw-r--r--src/systemd/sd-lldp-rx.h2
-rw-r--r--src/systemd/sd-lldp-tx.h2
-rw-r--r--src/systemd/sd-ndisc.h2
-rw-r--r--src/systemd/sd-radv.h2
9 files changed, 9 insertions, 9 deletions
diff --git a/src/systemd/sd-dhcp-client.h b/src/systemd/sd-dhcp-client.h
index 5300234098..23979b1232 100644
--- a/src/systemd/sd-dhcp-client.h
+++ b/src/systemd/sd-dhcp-client.h
@@ -135,7 +135,7 @@ int sd_dhcp_client_set_ifindex(
int sd_dhcp_client_set_ifname(
sd_dhcp_client *client,
const char *interface_name);
-const char *sd_dhcp_client_get_ifname(sd_dhcp_client *client);
+int sd_dhcp_client_get_ifname(sd_dhcp_client *client, const char **ret);
int sd_dhcp_client_set_mac(
sd_dhcp_client *client,
const uint8_t *addr,
diff --git a/src/systemd/sd-dhcp-server.h b/src/systemd/sd-dhcp-server.h
index 7d42bc1dab..149a14fdc6 100644
--- a/src/systemd/sd-dhcp-server.h
+++ b/src/systemd/sd-dhcp-server.h
@@ -38,7 +38,7 @@ enum {
int sd_dhcp_server_new(sd_dhcp_server **ret, int ifindex);
int sd_dhcp_server_set_ifname(sd_dhcp_server *server, const char *ifname);
-const char *sd_dhcp_server_get_ifname(sd_dhcp_server *server);
+int sd_dhcp_server_get_ifname(sd_dhcp_server *server, const char **ret);
sd_dhcp_server *sd_dhcp_server_ref(sd_dhcp_server *server);
sd_dhcp_server *sd_dhcp_server_unref(sd_dhcp_server *server);
diff --git a/src/systemd/sd-dhcp6-client.h b/src/systemd/sd-dhcp6-client.h
index e02d67632a..f3889782bc 100644
--- a/src/systemd/sd-dhcp6-client.h
+++ b/src/systemd/sd-dhcp6-client.h
@@ -94,7 +94,7 @@ int sd_dhcp6_client_set_ifindex(
int sd_dhcp6_client_set_ifname(
sd_dhcp6_client *client,
const char *interface_name);
-const char * sd_dhcp6_client_get_ifname(sd_dhcp6_client *client);
+int sd_dhcp6_client_get_ifname(sd_dhcp6_client *client, const char **ret);
int sd_dhcp6_client_set_local_address(
sd_dhcp6_client *client,
const struct in6_addr *local_address);
diff --git a/src/systemd/sd-ipv4acd.h b/src/systemd/sd-ipv4acd.h
index 3213db553c..90d3f0a0d1 100644
--- a/src/systemd/sd-ipv4acd.h
+++ b/src/systemd/sd-ipv4acd.h
@@ -47,7 +47,7 @@ int sd_ipv4acd_set_mac(sd_ipv4acd *acd, const struct ether_addr *addr);
int sd_ipv4acd_set_ifindex(sd_ipv4acd *acd, int interface_index);
int sd_ipv4acd_get_ifindex(sd_ipv4acd *acd);
int sd_ipv4acd_set_ifname(sd_ipv4acd *acd, const char *interface_name);
-const char *sd_ipv4acd_get_ifname(sd_ipv4acd *acd);
+int sd_ipv4acd_get_ifname(sd_ipv4acd *acd, const char **ret);
int sd_ipv4acd_set_address(sd_ipv4acd *acd, const struct in_addr *address);
int sd_ipv4acd_is_running(sd_ipv4acd *acd);
int sd_ipv4acd_start(sd_ipv4acd *acd, bool reset_conflicts);
diff --git a/src/systemd/sd-ipv4ll.h b/src/systemd/sd-ipv4ll.h
index 27263bc837..ed014b53f2 100644
--- a/src/systemd/sd-ipv4ll.h
+++ b/src/systemd/sd-ipv4ll.h
@@ -47,7 +47,7 @@ int sd_ipv4ll_set_mac(sd_ipv4ll *ll, const struct ether_addr *addr);
int sd_ipv4ll_set_ifindex(sd_ipv4ll *ll, int interface_index);
int sd_ipv4ll_get_ifindex(sd_ipv4ll *ll);
int sd_ipv4ll_set_ifname(sd_ipv4ll *ll, const char *interface_name);
-const char *sd_ipv4ll_get_ifname(sd_ipv4ll *ll);
+int sd_ipv4ll_get_ifname(sd_ipv4ll *ll, const char **ret);
int sd_ipv4ll_set_address(sd_ipv4ll *ll, const struct in_addr *address);
int sd_ipv4ll_set_address_seed(sd_ipv4ll *ll, uint64_t seed);
int sd_ipv4ll_is_running(sd_ipv4ll *ll);
diff --git a/src/systemd/sd-lldp-rx.h b/src/systemd/sd-lldp-rx.h
index 4653626eee..bfeac14ce3 100644
--- a/src/systemd/sd-lldp-rx.h
+++ b/src/systemd/sd-lldp-rx.h
@@ -59,7 +59,7 @@ sd_event *sd_lldp_rx_get_event(sd_lldp_rx *lldp_rx);
int sd_lldp_rx_set_callback(sd_lldp_rx *lldp_rx, sd_lldp_rx_callback_t cb, void *userdata);
int sd_lldp_rx_set_ifindex(sd_lldp_rx *lldp_rx, int ifindex);
int sd_lldp_rx_set_ifname(sd_lldp_rx *lldp_rx, const char *ifname);
-const char *sd_lldp_rx_get_ifname(sd_lldp_rx *lldp_rx);
+int sd_lldp_rx_get_ifname(sd_lldp_rx *lldp_rx, const char **ret);
/* Controls how much and what to store in the neighbors database */
int sd_lldp_rx_set_neighbors_max(sd_lldp_rx *lldp_rx, uint64_t n);
diff --git a/src/systemd/sd-lldp-tx.h b/src/systemd/sd-lldp-tx.h
index aef06ed7eb..512d455c71 100644
--- a/src/systemd/sd-lldp-tx.h
+++ b/src/systemd/sd-lldp-tx.h
@@ -54,7 +54,7 @@ sd_event *sd_lldp_tx_get_event(sd_lldp_tx *lldp_tx);
int sd_lldp_tx_set_ifindex(sd_lldp_tx *lldp_tx, int ifindex);
int sd_lldp_tx_set_ifname(sd_lldp_tx *lldp_tx, const char *ifname);
-const char *sd_lldp_tx_get_ifname(sd_lldp_tx *lldp_tx);
+int sd_lldp_tx_get_ifname(sd_lldp_tx *lldp_tx, const char **ret);
int sd_lldp_tx_set_multicast_mode(sd_lldp_tx *lldp_tx, sd_lldp_multicast_mode_t mode);
int sd_lldp_tx_set_hwaddr(sd_lldp_tx *lldp_tx, const struct ether_addr *hwaddr);
diff --git a/src/systemd/sd-ndisc.h b/src/systemd/sd-ndisc.h
index 6088def1b6..f45b2ad65e 100644
--- a/src/systemd/sd-ndisc.h
+++ b/src/systemd/sd-ndisc.h
@@ -79,7 +79,7 @@ sd_event *sd_ndisc_get_event(sd_ndisc *nd);
int sd_ndisc_set_callback(sd_ndisc *nd, sd_ndisc_callback_t cb, void *userdata);
int sd_ndisc_set_ifindex(sd_ndisc *nd, int interface_index);
int sd_ndisc_set_ifname(sd_ndisc *nd, const char *interface_name);
-const char *sd_ndisc_get_ifname(sd_ndisc *nd);
+int sd_ndisc_get_ifname(sd_ndisc *nd, const char **ret);
int sd_ndisc_set_mac(sd_ndisc *nd, const struct ether_addr *mac_addr);
int sd_ndisc_get_mtu(sd_ndisc *nd, uint32_t *ret);
diff --git a/src/systemd/sd-radv.h b/src/systemd/sd-radv.h
index be5cf1b94e..6bf56def40 100644
--- a/src/systemd/sd-radv.h
+++ b/src/systemd/sd-radv.h
@@ -54,7 +54,7 @@ int sd_radv_is_running(sd_radv *ra);
int sd_radv_set_ifindex(sd_radv *ra, int interface_index);
int sd_radv_set_ifname(sd_radv *ra, const char *interface_name);
-const char *sd_radv_get_ifname(sd_radv *ra);
+int sd_radv_get_ifname(sd_radv *ra, const char **ret);
int sd_radv_set_mac(sd_radv *ra, const struct ether_addr *mac_addr);
int sd_radv_set_mtu(sd_radv *ra, uint32_t mtu);
int sd_radv_set_hop_limit(sd_radv *ra, uint8_t hop_limit);