summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-02-20 23:27:57 +0100
committerLennart Poettering <lennart@poettering.net>2016-02-21 20:40:57 +0100
commitb9d74c40c6f595e74a140efc2204aa987c3249f9 (patch)
treedcc3b18f2f3eebb7a3893ff53085f28c6d0c7fc0 /src
parent273eec24f5ce230a185c75c89d47c562a4bf64fb (diff)
networkd: make a couple of functions static
These functions are nowadays used only within networkd-link.c, hence ther's no point in littering our public namespace with them.
Diffstat (limited to 'src')
-rw-r--r--src/network/networkd-link.c29
-rw-r--r--src/network/networkd-link.h8
2 files changed, 22 insertions, 15 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index aa8adf1eae..5c3e45fb3c 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -39,7 +39,9 @@
#include "util.h"
#include "virt.h"
-bool link_dhcp6_enabled(Link *link) {
+static bool link_dhcp6_enabled(Link *link) {
+ assert(link);
+
if (link->flags & IFF_LOOPBACK)
return false;
@@ -49,7 +51,9 @@ bool link_dhcp6_enabled(Link *link) {
return link->network->dhcp & ADDRESS_FAMILY_IPV6;
}
-bool link_dhcp4_enabled(Link *link) {
+static bool link_dhcp4_enabled(Link *link) {
+ assert(link);
+
if (link->flags & IFF_LOOPBACK)
return false;
@@ -59,7 +63,9 @@ bool link_dhcp4_enabled(Link *link) {
return link->network->dhcp & ADDRESS_FAMILY_IPV4;
}
-bool link_dhcp4_server_enabled(Link *link) {
+static bool link_dhcp4_server_enabled(Link *link) {
+ assert(link);
+
if (link->flags & IFF_LOOPBACK)
return false;
@@ -69,7 +75,9 @@ bool link_dhcp4_server_enabled(Link *link) {
return link->network->dhcp_server;
}
-bool link_ipv4ll_enabled(Link *link) {
+static bool link_ipv4ll_enabled(Link *link) {
+ assert(link);
+
if (link->flags & IFF_LOOPBACK)
return false;
@@ -79,7 +87,9 @@ bool link_ipv4ll_enabled(Link *link) {
return link->network->link_local & ADDRESS_FAMILY_IPV4;
}
-bool link_ipv6ll_enabled(Link *link) {
+static bool link_ipv6ll_enabled(Link *link) {
+ assert(link);
+
if (link->flags & IFF_LOOPBACK)
return false;
@@ -89,7 +99,7 @@ bool link_ipv6ll_enabled(Link *link) {
return link->network->link_local & ADDRESS_FAMILY_IPV6;
}
-bool link_lldp_enabled(Link *link) {
+static bool link_lldp_enabled(Link *link) {
assert(link);
if (link->flags & IFF_LOOPBACK)
@@ -108,6 +118,8 @@ bool link_lldp_enabled(Link *link) {
}
static bool link_ipv4_forward_enabled(Link *link) {
+ assert(link);
+
if (link->flags & IFF_LOOPBACK)
return false;
@@ -121,6 +133,7 @@ static bool link_ipv4_forward_enabled(Link *link) {
}
static bool link_ipv6_forward_enabled(Link *link) {
+ assert(link);
if (!socket_ipv6_is_supported())
return false;
@@ -137,7 +150,9 @@ static bool link_ipv6_forward_enabled(Link *link) {
return link->network->ip_forward & ADDRESS_FAMILY_IPV6;
}
-bool link_ipv6_accept_ra_enabled(Link *link) {
+static bool link_ipv6_accept_ra_enabled(Link *link) {
+ assert(link);
+
if (link->flags & IFF_LOOPBACK)
return false;
diff --git a/src/network/networkd-link.h b/src/network/networkd-link.h
index 4b4ae712b6..d9f637cb6e 100644
--- a/src/network/networkd-link.h
+++ b/src/network/networkd-link.h
@@ -155,14 +155,6 @@ int dhcp6_configure(Link *link);
int dhcp6_request_address(Link *link);
int ndisc_configure(Link *link);
-bool link_lldp_enabled(Link *link);
-bool link_ipv4ll_enabled(Link *link);
-bool link_ipv6ll_enabled(Link *link);
-bool link_dhcp4_server_enabled(Link *link);
-bool link_dhcp4_enabled(Link *link);
-bool link_dhcp6_enabled(Link *link);
-bool link_ipv6_accept_ra_enabled(Link *link);
-
const char* link_state_to_string(LinkState s) _const_;
LinkState link_state_from_string(const char *s) _pure_;