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

@@ -52,6 +52,8 @@ static struct cfg_options available_options[] = {
{ .name = "ipv4-netmask", .type = OPTION_STRING },
{ .name = "ipv6-prefix", .type = OPTION_NUMERIC },
{ .name = "ipv6-netmask", .type = OPTION_STRING },
{ .name = "rx-per-sec", .type = OPTION_NUMERIC, },
{ .name = "tx-per-sec", .type = OPTION_NUMERIC, },
};
#define READ_RAW_MULTI_LINE(name, s_name, num) \
@@ -143,6 +145,9 @@ unsigned prefix = 0;
if (prefix > 0)
config->ipv6_netmask = ipv6_prefix_to_mask(prefix);
READ_RAW_NUMERIC("rx-per-sec", config->rx_per_sec);
READ_RAW_NUMERIC("tx-per-sec", config->tx_per_sec);
optionUnloadNested(pov);
return 0;