mirror of
https://github.com/systemd/systemd.git
synced 2024-12-25 01:34:28 +03:00
sd-dhcp6: fix namespacing
Prefix all exported constants with SD_DHCP6_CLIENT_* to avoid any namespacing conflicts.
This commit is contained in:
parent
0374814250
commit
10c9ce615d
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user