summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2015-09-22 15:08:28 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2015-09-22 15:08:28 +0200
commitbe19c5b5e0c0f78b8429b126936fa15856550a23 (patch)
tree28d490d21ceacb02c28724d254a998ad5b31063f /src
parent2237aa02f3e2739a1ebe9c0bc224b5125f5eb292 (diff)
sd-ipv4ll: fix namespacing
Prefix all exported constants with SD_IPV4LL_* to avoid namespacing conflicts.
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd-network/sd-ipv4ll.c8
-rw-r--r--src/libsystemd-network/test-ipv4ll-manual.c6
-rw-r--r--src/libsystemd-network/test-ipv4ll.c4
-rw-r--r--src/network/networkd-ipv4ll.c6
-rw-r--r--src/systemd/sd-ipv4ll.h6
5 files changed, 15 insertions, 15 deletions
diff --git a/src/libsystemd-network/sd-ipv4ll.c b/src/libsystemd-network/sd-ipv4ll.c
index c773e4d29f..dd427ddd78 100644
--- a/src/libsystemd-network/sd-ipv4ll.c
+++ b/src/libsystemd-network/sd-ipv4ll.c
@@ -298,21 +298,21 @@ void ipv4ll_on_acd(sd_ipv4acd *acd, int event, void *userdata) {
switch (event) {
case SD_IPV4ACD_EVENT_STOP:
- ipv4ll_client_notify(ll, IPV4LL_EVENT_STOP);
+ ipv4ll_client_notify(ll, SD_IPV4LL_EVENT_STOP);
ll->claimed_address = 0;
break;
case SD_IPV4ACD_EVENT_BIND:
ll->claimed_address = ll->address;
- ipv4ll_client_notify(ll, IPV4LL_EVENT_BIND);
+ ipv4ll_client_notify(ll, SD_IPV4LL_EVENT_BIND);
break;
case SD_IPV4ACD_EVENT_CONFLICT:
/* if an address was already bound we must call up to the
user to handle this, otherwise we just try again */
if (ll->claimed_address != 0) {
- ipv4ll_client_notify(ll, IPV4LL_EVENT_CONFLICT);
+ ipv4ll_client_notify(ll, SD_IPV4LL_EVENT_CONFLICT);
ll->claimed_address = 0;
} else {
@@ -333,5 +333,5 @@ void ipv4ll_on_acd(sd_ipv4acd *acd, int event, void *userdata) {
return;
error:
- ipv4ll_client_notify(ll, IPV4LL_EVENT_STOP);
+ ipv4ll_client_notify(ll, SD_IPV4LL_EVENT_STOP);
}
diff --git a/src/libsystemd-network/test-ipv4ll-manual.c b/src/libsystemd-network/test-ipv4ll-manual.c
index ad664cba51..dd2e44e7a3 100644
--- a/src/libsystemd-network/test-ipv4ll-manual.c
+++ b/src/libsystemd-network/test-ipv4ll-manual.c
@@ -45,13 +45,13 @@ static void ll_handler(sd_ipv4ll *ll, int event, void *userdata) {
assert_se(in_addr_to_string(AF_INET, (const union in_addr_union*) &addr, &address) >= 0);
switch (event) {
- case IPV4LL_EVENT_BIND:
+ case SD_IPV4LL_EVENT_BIND:
log_info("bound %s", strna(address));
break;
- case IPV4LL_EVENT_CONFLICT:
+ case SD_IPV4LL_EVENT_CONFLICT:
log_info("conflict on %s", strna(address));
break;
- case IPV4LL_EVENT_STOP:
+ case SD_IPV4LL_EVENT_STOP:
log_error("the client was stopped with address %s", strna(address));
break;
default:
diff --git a/src/libsystemd-network/test-ipv4ll.c b/src/libsystemd-network/test-ipv4ll.c
index 44551e8f82..e72204d992 100644
--- a/src/libsystemd-network/test-ipv4ll.c
+++ b/src/libsystemd-network/test-ipv4ll.c
@@ -44,10 +44,10 @@ static void basic_request_handler(sd_ipv4ll *ll, int event, void *userdata) {
assert_se(userdata == basic_request_handler_userdata);
switch(event) {
- case IPV4LL_EVENT_STOP:
+ case SD_IPV4LL_EVENT_STOP:
basic_request_handler_stop = 1;
break;
- case IPV4LL_EVENT_BIND:
+ case SD_IPV4LL_EVENT_BIND:
basic_request_handler_bind = 1;
break;
default:
diff --git a/src/network/networkd-ipv4ll.c b/src/network/networkd-ipv4ll.c
index 1c34f55b4b..af3e3884e6 100644
--- a/src/network/networkd-ipv4ll.c
+++ b/src/network/networkd-ipv4ll.c
@@ -179,15 +179,15 @@ static void ipv4ll_handler(sd_ipv4ll *ll, int event, void *userdata){
return;
switch(event) {
- case IPV4LL_EVENT_STOP:
- case IPV4LL_EVENT_CONFLICT:
+ case SD_IPV4LL_EVENT_STOP:
+ case SD_IPV4LL_EVENT_CONFLICT:
r = ipv4ll_address_lost(link);
if (r < 0) {
link_enter_failed(link);
return;
}
break;
- case IPV4LL_EVENT_BIND:
+ case SD_IPV4LL_EVENT_BIND:
r = ipv4ll_address_claimed(ll, link);
if (r < 0) {
link_enter_failed(link);
diff --git a/src/systemd/sd-ipv4ll.h b/src/systemd/sd-ipv4ll.h
index 9581e99d31..677505f0c6 100644
--- a/src/systemd/sd-ipv4ll.h
+++ b/src/systemd/sd-ipv4ll.h
@@ -29,9 +29,9 @@
#include "sd-event.h"
enum {
- IPV4LL_EVENT_STOP = 0,
- IPV4LL_EVENT_BIND = 1,
- IPV4LL_EVENT_CONFLICT = 2,
+ SD_IPV4LL_EVENT_STOP = 0,
+ SD_IPV4LL_EVENT_BIND = 1,
+ SD_IPV4LL_EVENT_CONFLICT = 2,
};
typedef struct sd_ipv4ll sd_ipv4ll;