diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-05-31 10:36:35 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-06-15 20:24:21 +0800 |
commit | 078321aaae03fbe859f95c05f70bcf578cec539b (patch) | |
tree | a099894a33a107481ca070b0540dd8449e37dfde /openbsc/src/nat/bsc_nat_vty.c | |
parent | ca999a989d972ba79902251cbb74956732e91bf9 (diff) |
[nat] Add ip-tos option to the nat.
This is applied to all incoming BSC connections.
Diffstat (limited to 'openbsc/src/nat/bsc_nat_vty.c')
-rw-r--r-- | openbsc/src/nat/bsc_nat_vty.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/openbsc/src/nat/bsc_nat_vty.c b/openbsc/src/nat/bsc_nat_vty.c index 56cd3c40a..cef47d1b3 100644 --- a/openbsc/src/nat/bsc_nat_vty.c +++ b/openbsc/src/nat/bsc_nat_vty.c @@ -61,6 +61,7 @@ static int config_write_nat(struct vty *vty) vty_out(vty, " timeout pong %d%s", _nat->pong_timeout, VTY_NEWLINE); if (_nat->token) vty_out(vty, " token %s%s", _nat->token, VTY_NEWLINE); + vty_out(vty, " ip-tos %d%s", _nat->bsc_ip_tos, VTY_NEWLINE); return CMD_SUCCESS; } @@ -297,6 +298,14 @@ DEFUN(cfg_nat_token, cfg_nat_token_cmd, return CMD_SUCCESS; } +DEFUN(cfg_nat_bsc_ip_tos, cfg_nat_bsc_ip_tos_cmd, + "ip-tos <0-255>", + "Set the IP_TOS for the BSCs to use\n" "Set the IP_TOS attribute") +{ + _nat->bsc_ip_tos = atoi(argv[0]); + return CMD_SUCCESS; +} + /* per BSC configuration */ DEFUN(cfg_bsc, cfg_bsc_cmd, "bsc BSC_NR", "Select a BSC to configure") { @@ -458,6 +467,7 @@ int bsc_nat_vty_init(struct bsc_nat *nat) install_element(NAT_NODE, &cfg_nat_ping_time_cmd); install_element(NAT_NODE, &cfg_nat_pong_time_cmd); install_element(NAT_NODE, &cfg_nat_token_cmd); + install_element(NAT_NODE, &cfg_nat_bsc_ip_tos_cmd); /* BSC subgroups */ install_element(NAT_NODE, &cfg_bsc_cmd); |