diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2015-09-22 14:52:23 +0200 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2015-09-22 14:52:23 +0200 |
commit | 10c9ce615d98e125bc520efa94aebaef250a4061 (patch) | |
tree | 8a332c1d2a2d1411ee4e70f685b4a154b64f21b2 | |
parent | 0374814250e0ccc4699214422999cb5b35a1afae (diff) |
sd-dhcp6: fix namespacing
Prefix all exported constants with SD_DHCP6_CLIENT_* to avoid any
namespacing conflicts.
-rw-r--r-- | src/libsystemd-network/sd-dhcp6-client.c | 10 | ||||
-rw-r--r-- | src/libsystemd-network/test-dhcp6-client.c | 4 | ||||
-rw-r--r-- | src/network/networkd-dhcp6.c | 10 | ||||
-rw-r--r-- | src/systemd/sd-dhcp6-client.h | 10 |
4 files changed, 17 insertions, 17 deletions
diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c index 5489c77864..2367509693 100644 --- a/src/libsystemd-network/sd-dhcp6-client.c +++ b/src/libsystemd-network/sd-dhcp6-client.c @@ -464,7 +464,7 @@ static int client_timeout_resend_expire(sd_event_source *s, uint64_t usec, state = client->state; - client_stop(client, DHCP6_EVENT_RESEND_EXPIRE); + client_stop(client, SD_DHCP6_CLIENT_EVENT_RESEND_EXPIRE); /* RFC 3315, section 18.1.4., says that "...the client may choose to use a Solicit message to locate a new DHCP server..." */ @@ -554,7 +554,7 @@ static int client_timeout_resend(sd_event_source *s, uint64_t usec, if (max_retransmit_count && client->retransmit_count >= max_retransmit_count) { - client_stop(client, DHCP6_EVENT_RETRANS_MAX); + client_stop(client, SD_DHCP6_CLIENT_EVENT_RETRANS_MAX); return 0; } @@ -930,7 +930,7 @@ static int client_receive_message(sd_event_source *s, int fd, uint32_t revents, if (r < 0) return 0; - client_notify(client, DHCP6_EVENT_INFORMATION_REQUEST); + client_notify(client, SD_DHCP6_CLIENT_EVENT_INFORMATION_REQUEST); client_start(client, DHCP6_STATE_STOPPED); @@ -962,7 +962,7 @@ static int client_receive_message(sd_event_source *s, int fd, uint32_t revents, return 0; } - client_notify(client, DHCP6_EVENT_IP_ACQUIRE); + client_notify(client, SD_DHCP6_CLIENT_EVENT_IP_ACQUIRE); } break; @@ -1113,7 +1113,7 @@ static int client_start(sd_dhcp6_client *client, enum DHCP6State state) { } int sd_dhcp6_client_stop(sd_dhcp6_client *client) { - client_stop(client, DHCP6_EVENT_STOP); + client_stop(client, SD_DHCP6_CLIENT_EVENT_STOP); return 0; } diff --git a/src/libsystemd-network/test-dhcp6-client.c b/src/libsystemd-network/test-dhcp6-client.c index 9c7f9ffb1b..178f536337 100644 --- a/src/libsystemd-network/test-dhcp6-client.c +++ b/src/libsystemd-network/test-dhcp6-client.c @@ -365,7 +365,7 @@ static void test_client_solicit_cb(sd_dhcp6_client *client, int event, char **domains; assert_se(e); - assert_se(event == DHCP6_EVENT_IP_ACQUIRE); + assert_se(event == SD_DHCP6_CLIENT_EVENT_IP_ACQUIRE); assert_se(sd_dhcp6_client_get_lease(client, &lease) >= 0); @@ -564,7 +564,7 @@ static void test_client_information_cb(sd_dhcp6_client *client, int event, char **domains; assert_se(e); - assert_se(event == DHCP6_EVENT_INFORMATION_REQUEST); + assert_se(event == SD_DHCP6_CLIENT_EVENT_INFORMATION_REQUEST); assert_se(sd_dhcp6_client_get_lease(client, &lease) >= 0); diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c index 3a5ac1c39b..6d5ca4f5e8 100644 --- a/src/network/networkd-dhcp6.c +++ b/src/network/networkd-dhcp6.c @@ -144,13 +144,13 @@ static void dhcp6_handler(sd_dhcp6_client *client, int event, void *userdata) { return; switch(event) { - case DHCP6_EVENT_STOP: - case DHCP6_EVENT_RESEND_EXPIRE: - case DHCP6_EVENT_RETRANS_MAX: + case SD_DHCP6_CLIENT_EVENT_STOP: + case SD_DHCP6_CLIENT_EVENT_RESEND_EXPIRE: + case SD_DHCP6_CLIENT_EVENT_RETRANS_MAX: log_link_debug(link, "DHCPv6 event %d", event); break; - case DHCP6_EVENT_IP_ACQUIRE: + case SD_DHCP6_CLIENT_EVENT_IP_ACQUIRE: r = dhcp6_lease_address_acquired(client, link); if (r < 0) { link_enter_failed(link); @@ -158,7 +158,7 @@ static void dhcp6_handler(sd_dhcp6_client *client, int event, void *userdata) { } /* fall through */ - case DHCP6_EVENT_INFORMATION_REQUEST: + case SD_DHCP6_CLIENT_EVENT_INFORMATION_REQUEST: r = dhcp6_lease_information_acquired(client, link); if (r < 0) { link_enter_failed(link); diff --git a/src/systemd/sd-dhcp6-client.h b/src/systemd/sd-dhcp6-client.h index e9663c0c71..90c35ef3f6 100644 --- a/src/systemd/sd-dhcp6-client.h +++ b/src/systemd/sd-dhcp6-client.h @@ -29,11 +29,11 @@ #include "sd-dhcp6-lease.h" enum { - DHCP6_EVENT_STOP = 0, - DHCP6_EVENT_RESEND_EXPIRE = 10, - DHCP6_EVENT_RETRANS_MAX = 11, - DHCP6_EVENT_IP_ACQUIRE = 12, - DHCP6_EVENT_INFORMATION_REQUEST = 13, + SD_DHCP6_CLIENT_EVENT_STOP = 0, + SD_DHCP6_CLIENT_EVENT_RESEND_EXPIRE = 10, + SD_DHCP6_CLIENT_EVENT_RETRANS_MAX = 11, + SD_DHCP6_CLIENT_EVENT_IP_ACQUIRE = 12, + SD_DHCP6_CLIENT_EVENT_INFORMATION_REQUEST = 13, }; typedef struct sd_dhcp6_client sd_dhcp6_client; |