Added directives to allow bandwidth limitation.

This commit is contained in:
Nikos Mavrogiannopoulos
2013-11-03 16:48:24 +01:00
parent 801eded2cf
commit 2f5141b00f
18 changed files with 250 additions and 52 deletions

View File

@@ -87,6 +87,9 @@ static struct cfg_options available_options[] = {
{ .name = "min-reauth-time", .type = OPTION_NUMERIC, .mandatory = 0 },
{ .name = "max-same-clients", .type = OPTION_NUMERIC, .mandatory = 0 },
{ .name = "rx-per-sec", .type = OPTION_NUMERIC, .mandatory = 0 },
{ .name = "tx-per-sec", .type = OPTION_NUMERIC, .mandatory = 0 },
{ .name = "run-as-user", .type = OPTION_STRING, .mandatory = 0 },
{ .name = "run-as-group", .type = OPTION_STRING, .mandatory = 0 },
{ .name = "device", .type = OPTION_STRING, .mandatory = 1 },
@@ -317,6 +320,9 @@ unsigned prefix = 0;
READ_NUMERIC("mtu", config->default_mtu);
READ_NUMERIC("output-buffer", config->output_buffer);
READ_NUMERIC("rx-per-sec", config->rx_per_sec);
READ_NUMERIC("tx-per-sec", config->tx_per_sec);
READ_NUMERIC("cookie-validity", config->cookie_validity);
READ_NUMERIC("auth-timeout", config->auth_timeout);
READ_NUMERIC("max-clients", config->max_clients);