summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/ctrl')
-rw-r--r--accel-pppd/ctrl/l2tp/dict.c3
-rw-r--r--accel-pppd/ctrl/l2tp/l2tp.c3
-rw-r--r--accel-pppd/ctrl/l2tp/netlink.c3
-rw-r--r--accel-pppd/ctrl/l2tp/packet.c3
-rw-r--r--accel-pppd/ctrl/pppoe/cli.c3
-rw-r--r--accel-pppd/ctrl/pppoe/mac_filter.c3
-rw-r--r--accel-pppd/ctrl/pppoe/pppoe.c3
-rw-r--r--accel-pppd/ctrl/pptp/pptp.c3
8 files changed, 16 insertions, 8 deletions
diff --git a/accel-pppd/ctrl/l2tp/dict.c b/accel-pppd/ctrl/l2tp/dict.c
index c93ccd4..aaa7da4 100644
--- a/accel-pppd/ctrl/l2tp/dict.c
+++ b/accel-pppd/ctrl/l2tp/dict.c
@@ -257,7 +257,7 @@ static int l2tp_dict_load(const char *fname)
return r;
}
-static void __init dict_init(void)
+static void dict_init(void)
{
char *opt;
@@ -269,3 +269,4 @@ static void __init dict_init(void)
_exit(EXIT_FAILURE);
}
+DEFINE_INIT(20, dict_init);
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c
index 8dcfb40..0f36a98 100644
--- a/accel-pppd/ctrl/l2tp/l2tp.c
+++ b/accel-pppd/ctrl/l2tp/l2tp.c
@@ -1128,7 +1128,7 @@ static void load_config(void)
conf_dir300_quirk = atoi(opt);
}
-static void __init l2tp_init(void)
+static void l2tp_init(void)
{
l2tp_conn = malloc(L2TP_MAX_TID * sizeof(void *));
memset(l2tp_conn, 0, L2TP_MAX_TID * sizeof(void *));
@@ -1144,3 +1144,4 @@ static void __init l2tp_init(void)
triton_event_register_handler(EV_CONFIG_RELOAD, (triton_event_func)load_config);
}
+DEFINE_INIT(22, l2tp_init);
diff --git a/accel-pppd/ctrl/l2tp/netlink.c b/accel-pppd/ctrl/l2tp/netlink.c
index 7c8c79a..c8dce89 100644
--- a/accel-pppd/ctrl/l2tp/netlink.c
+++ b/accel-pppd/ctrl/l2tp/netlink.c
@@ -80,7 +80,7 @@ void l2tp_nl_create_session(int tid, int sid, int peer_sid)
nl_socket_free(nl_sock);
}
-static void __init init(void)
+static void init(void)
{
struct nl_sock *nl_sock = nl_socket_alloc();
@@ -92,3 +92,4 @@ static void __init init(void)
nl_socket_free(nl_sock);
}
+DEFINE_INIT(21, init);
diff --git a/accel-pppd/ctrl/l2tp/packet.c b/accel-pppd/ctrl/l2tp/packet.c
index e3f6896..d312118 100644
--- a/accel-pppd/ctrl/l2tp/packet.c
+++ b/accel-pppd/ctrl/l2tp/packet.c
@@ -485,10 +485,11 @@ int l2tp_packet_add_octets(struct l2tp_packet_t *pack, int id, const uint8_t *va
return 0;
}
-static void __init init(void)
+static void init(void)
{
attr_pool = mempool_create(sizeof(struct l2tp_attr_t));
pack_pool = mempool_create(sizeof(struct l2tp_packet_t));
buf_pool = mempool_create(L2TP_MAX_PACKET_SIZE);
}
+DEFINE_INIT(21, init);
diff --git a/accel-pppd/ctrl/pppoe/cli.c b/accel-pppd/ctrl/pppoe/cli.c
index 9929f66..37aec3a 100644
--- a/accel-pppd/ctrl/pppoe/cli.c
+++ b/accel-pppd/ctrl/pppoe/cli.c
@@ -189,7 +189,7 @@ static int set_ac_name_exec(const char *cmd, char * const *f, int f_cnt, void *c
//===================================
-static void __init init(void)
+static void init(void)
{
cli_register_simple_cmd2(show_stat_exec, NULL, 2, "show", "stat");
cli_register_simple_cmd2(intf_exec, intf_help, 2, "pppoe", "interface");
@@ -203,3 +203,4 @@ static void __init init(void)
cli_register_simple_cmd2(show_ac_name_exec, NULL, 3, "pppoe", "show", "AC-Name");
}
+DEFINE_INIT(22, init);
diff --git a/accel-pppd/ctrl/pppoe/mac_filter.c b/accel-pppd/ctrl/pppoe/mac_filter.c
index 9b101c6..8d72c31 100644
--- a/accel-pppd/ctrl/pppoe/mac_filter.c
+++ b/accel-pppd/ctrl/pppoe/mac_filter.c
@@ -244,7 +244,7 @@ static void cmd_help(char * const *fields, int fields_cnt, void *client)
cli_send(client, "pppoe mac-filter show - show current mac-filter list\r\n");
}
-static void __init init(void)
+static void init(void)
{
const char *opt = conf_get_opt("pppoe", "mac-filter");
if (!opt || mac_filter_load(opt))
@@ -253,3 +253,4 @@ static void __init init(void)
cli_register_simple_cmd2(cmd_exec, cmd_help, 2, "pppoe", "mac-filter");
}
+DEFINE_INIT(20, init);
diff --git a/accel-pppd/ctrl/pppoe/pppoe.c b/accel-pppd/ctrl/pppoe/pppoe.c
index c7612e2..cd1d256 100644
--- a/accel-pppd/ctrl/pppoe/pppoe.c
+++ b/accel-pppd/ctrl/pppoe/pppoe.c
@@ -1241,7 +1241,7 @@ static int init_secret(struct pppoe_serv_t *serv)
return 0;
}
-static void __init pppoe_init(void)
+static void pppoe_init(void)
{
struct conf_sect_t *s = conf_get_section("pppoe");
struct conf_option_t *opt;
@@ -1288,3 +1288,4 @@ static void __init pppoe_init(void)
conf_ac_name = _strdup("accel-ppp");
}
+DEFINE_INIT(21, pppoe_init);
diff --git a/accel-pppd/ctrl/pptp/pptp.c b/accel-pppd/ctrl/pptp/pptp.c
index 17087fa..1626712 100644
--- a/accel-pppd/ctrl/pptp/pptp.c
+++ b/accel-pppd/ctrl/pptp/pptp.c
@@ -724,7 +724,7 @@ static void load_config(void)
conf_verbose = 1;
}
-static void __init pptp_init(void)
+static void pptp_init(void)
{
struct sockaddr_in addr;
char *opt;
@@ -776,3 +776,4 @@ static void __init pptp_init(void)
triton_event_register_handler(EV_CONFIG_RELOAD, (triton_event_func)load_config);
}
+DEFINE_INIT(20, pptp_init);