summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-10-16 17:34:58 +0200
committerTom Gundersen <teg@jklm.no>2015-10-22 17:19:54 +0200
commitde1e9928f137f4d17f463956a7612d9676c393aa (patch)
tree1bd8ee1c5170081e622024e86dc03712e0c23d3d /src
parent4d7b83da7b78647f4ba3f1d6fa2dc8d7b9833d93 (diff)
networkd: rename icmp6 to ndisc
Diffstat (limited to 'src')
-rw-r--r--src/network/networkd-dhcp6.c20
-rw-r--r--src/network/networkd-link.c12
-rw-r--r--src/network/networkd-link.h4
3 files changed, 18 insertions, 18 deletions
diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c
index 0023c51b86..6092fb8dc6 100644
--- a/src/network/networkd-dhcp6.c
+++ b/src/network/networkd-dhcp6.c
@@ -111,7 +111,7 @@ static int dhcp6_lease_address_acquired(sd_dhcp6_client *client, Link *link) {
&lifetime_preferred,
&lifetime_valid) >= 0) {
- r = sd_ndisc_get_prefixlen(link->icmp6_router_discovery,
+ r = sd_ndisc_get_prefixlen(link->ndisc_router_discovery,
&ip6_addr, &prefixlen);
if (r < 0 && r != -EADDRNOTAVAIL) {
log_link_warning_errno(link, r, "Could not get prefix information: %m");
@@ -274,7 +274,7 @@ static int dhcp6_prefix_expired(Link *link) {
uint8_t expired_prefixlen;
uint32_t lifetime_preferred, lifetime_valid;
- r = sd_ndisc_get_expired_prefix(link->icmp6_router_discovery,
+ r = sd_ndisc_get_expired_prefix(link->ndisc_router_discovery,
&expired_prefix, &expired_prefixlen);
if (r < 0)
return r;
@@ -306,7 +306,7 @@ static int dhcp6_prefix_expired(Link *link) {
return 0;
}
-static void icmp6_router_handler(sd_ndisc *nd, int event, void *userdata) {
+static void ndisc_router_handler(sd_ndisc *nd, int event, void *userdata) {
Link *link = userdata;
assert(link);
@@ -344,29 +344,29 @@ static void icmp6_router_handler(sd_ndisc *nd, int event, void *userdata) {
}
-int icmp6_configure(Link *link) {
+int ndisc_configure(Link *link) {
int r;
assert_return(link, -EINVAL);
- r = sd_ndisc_new(&link->icmp6_router_discovery);
+ r = sd_ndisc_new(&link->ndisc_router_discovery);
if (r < 0)
return r;
- r = sd_ndisc_attach_event(link->icmp6_router_discovery, NULL, 0);
+ r = sd_ndisc_attach_event(link->ndisc_router_discovery, NULL, 0);
if (r < 0)
return r;
- r = sd_ndisc_set_mac(link->icmp6_router_discovery, &link->mac);
+ r = sd_ndisc_set_mac(link->ndisc_router_discovery, &link->mac);
if (r < 0)
return r;
- r = sd_ndisc_set_index(link->icmp6_router_discovery, link->ifindex);
+ r = sd_ndisc_set_index(link->ndisc_router_discovery, link->ifindex);
if (r < 0)
return r;
- r = sd_ndisc_set_callback(link->icmp6_router_discovery,
- icmp6_router_handler, link);
+ r = sd_ndisc_set_callback(link->ndisc_router_discovery,
+ ndisc_router_handler, link);
return r;
}
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index c46ab9b798..732a0c438d 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -370,7 +370,7 @@ static void link_free(Link *link) {
sd_ipv4ll_unref(link->ipv4ll);
sd_dhcp6_client_unref(link->dhcp6_client);
- sd_ndisc_unref(link->icmp6_router_discovery);
+ sd_ndisc_unref(link->ndisc_router_discovery);
if (link->manager)
hashmap_remove(link->manager->links, INT_TO_PTR(link->ifindex));
@@ -481,14 +481,14 @@ static int link_stop_clients(Link *link) {
r = log_link_warning_errno(link, r, "Could not stop IPv4 link-local: %m");
}
- if(link->icmp6_router_discovery) {
+ if(link->ndisc_router_discovery) {
if (link->dhcp6_client) {
k = sd_dhcp6_client_stop(link->dhcp6_client);
if (k < 0)
r = log_link_warning_errno(link, r, "Could not stop DHCPv6 client: %m");
}
- k = sd_ndisc_stop(link->icmp6_router_discovery);
+ k = sd_ndisc_stop(link->ndisc_router_discovery);
if (k < 0)
r = log_link_warning_errno(link, r, "Could not stop ICMPv6 router discovery: %m");
}
@@ -1238,11 +1238,11 @@ static int link_acquire_conf(Link *link) {
}
if (link_dhcp6_enabled(link)) {
- assert(link->icmp6_router_discovery);
+ assert(link->ndisc_router_discovery);
log_link_debug(link, "Discovering IPv6 routers");
- r = sd_ndisc_router_discovery_start(link->icmp6_router_discovery);
+ r = sd_ndisc_router_discovery_start(link->ndisc_router_discovery);
if (r < 0)
return log_link_warning_errno(link, r, "Could not start IPv6 router discovery: %m");
}
@@ -2002,7 +2002,7 @@ static int link_configure(Link *link) {
}
if (link_dhcp6_enabled(link)) {
- r = icmp6_configure(link);
+ r = ndisc_configure(link);
if (r < 0)
return r;
}
diff --git a/src/network/networkd-link.h b/src/network/networkd-link.h
index 668b636620..f13d904c8e 100644
--- a/src/network/networkd-link.h
+++ b/src/network/networkd-link.h
@@ -104,7 +104,7 @@ struct Link {
sd_dhcp_server *dhcp_server;
- sd_ndisc *icmp6_router_discovery;
+ sd_ndisc *ndisc_router_discovery;
sd_dhcp6_client *dhcp6_client;
bool rtnl_extended_attrs;
@@ -145,7 +145,7 @@ int link_set_timezone(Link *link, const char *timezone);
int ipv4ll_configure(Link *link);
int dhcp4_configure(Link *link);
-int icmp6_configure(Link *link);
+int ndisc_configure(Link *link);
bool link_lldp_enabled(Link *link);
bool link_ipv4ll_enabled(Link *link);