sd-ipv4acd: fix namespacing
Prefix all exported constants with SD_IPV4ACD to prevent namespacing conflicts.
This commit is contained in:
@@ -179,7 +179,7 @@ int sd_ipv4acd_stop(sd_ipv4acd *ll) {
|
||||
|
||||
ipv4acd_stop(ll);
|
||||
|
||||
ipv4acd_client_notify(ll, IPV4ACD_EVENT_STOP);
|
||||
ipv4acd_client_notify(ll, SD_IPV4ACD_EVENT_STOP);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -315,7 +315,7 @@ static int ipv4acd_on_timeout(sd_event_source *s, uint64_t usec, void *userdata)
|
||||
|
||||
if (ll->iteration == 0) {
|
||||
ll->conflict = 0;
|
||||
ipv4acd_client_notify(ll, IPV4ACD_EVENT_BIND);
|
||||
ipv4acd_client_notify(ll, SD_IPV4ACD_EVENT_BIND);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -345,7 +345,7 @@ static void ipv4acd_on_conflict(sd_ipv4acd *ll) {
|
||||
|
||||
ipv4acd_stop(ll);
|
||||
|
||||
ipv4acd_client_notify(ll, IPV4ACD_EVENT_CONFLICT);
|
||||
ipv4acd_client_notify(ll, SD_IPV4ACD_EVENT_CONFLICT);
|
||||
}
|
||||
|
||||
static int ipv4acd_on_packet(sd_event_source *s, int fd,
|
||||
|
||||
@@ -297,18 +297,18 @@ void ipv4ll_on_acd(sd_ipv4acd *acd, int event, void *userdata) {
|
||||
assert(ll);
|
||||
|
||||
switch (event) {
|
||||
case IPV4ACD_EVENT_STOP:
|
||||
case SD_IPV4ACD_EVENT_STOP:
|
||||
ipv4ll_client_notify(ll, IPV4LL_EVENT_STOP);
|
||||
|
||||
ll->claimed_address = 0;
|
||||
|
||||
break;
|
||||
case IPV4ACD_EVENT_BIND:
|
||||
case SD_IPV4ACD_EVENT_BIND:
|
||||
ll->claimed_address = ll->address;
|
||||
ipv4ll_client_notify(ll, IPV4LL_EVENT_BIND);
|
||||
|
||||
break;
|
||||
case IPV4ACD_EVENT_CONFLICT:
|
||||
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) {
|
||||
|
||||
@@ -39,13 +39,13 @@ static void acd_handler(sd_ipv4acd *acd, int event, void *userdata) {
|
||||
assert_se(acd);
|
||||
|
||||
switch (event) {
|
||||
case IPV4ACD_EVENT_BIND:
|
||||
case SD_IPV4ACD_EVENT_BIND:
|
||||
log_info("bound");
|
||||
break;
|
||||
case IPV4ACD_EVENT_CONFLICT:
|
||||
case SD_IPV4ACD_EVENT_CONFLICT:
|
||||
log_info("conflict");
|
||||
break;
|
||||
case IPV4ACD_EVENT_STOP:
|
||||
case SD_IPV4ACD_EVENT_STOP:
|
||||
log_error("the client was stopped");
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
#include "sd-event.h"
|
||||
|
||||
enum {
|
||||
IPV4ACD_EVENT_STOP = 0,
|
||||
IPV4ACD_EVENT_BIND = 1,
|
||||
IPV4ACD_EVENT_CONFLICT = 2,
|
||||
SD_IPV4ACD_EVENT_STOP = 0,
|
||||
SD_IPV4ACD_EVENT_BIND = 1,
|
||||
SD_IPV4ACD_EVENT_CONFLICT = 2,
|
||||
};
|
||||
|
||||
typedef struct sd_ipv4acd sd_ipv4acd;
|
||||
|
||||
Reference in New Issue
Block a user