PARAM_TXHOLDCNT,
PARAM_MAXHOPS,
PARAM_BRHELLO,
+ PARAM_BRAGEING,
PARAM_FORCEPROTVERS,
PARAM_TOPCHNGTIME,
PARAM_TOPCHNGCNT,
{ PARAM_TXHOLDCNT, "tx-hold-count" },
{ PARAM_MAXHOPS, "max-hops" },
{ PARAM_BRHELLO, "hello-time" },
+ { PARAM_BRAGEING, "ageing-time" },
{ PARAM_FORCEPROTVERS,"force-protocol-version" },
{ PARAM_TOPCHNGTIME, "time-since-topology-change" },
{ PARAM_TOPCHNGCNT, "topology-change-count" },
else
printf("none\n");
printf(" path cost %-10u ", s.root_path_cost);
- printf("internal path cost %u\n", s.internal_path_cost);
+ printf("internal path cost %u\n", s.internal_path_cost);
printf(" max age %-10hhu ", s.root_max_age);
- printf("bridge max age %hhu\n", s.bridge_max_age);
+ printf("bridge max age %hhu\n", s.bridge_max_age);
printf(" forward delay %-10hhu ", s.root_forward_delay);
- printf("bridge forward delay %hhu\n", s.bridge_forward_delay);
+ printf("bridge forward delay %hhu\n", s.bridge_forward_delay);
printf(" tx hold count %-10u ", s.tx_hold_count);
- printf("max hops %hhu\n", s.max_hops);
+ printf("max hops %hhu\n", s.max_hops);
printf(" hello time %-10u ", s.bridge_hello_time);
- printf("force protocol version %s\n",
+ printf("ageing time %u\n", s.Ageing_Time);
+ printf(" force protocol version %s\n",
PROTO_VERS_STR(s.protocol_version));
printf(" time since topology change %u\n",
s.time_since_topology_change);
case PARAM_BRHELLO:
printf("%hhu\n", s.bridge_hello_time);
break;
+ case PARAM_BRAGEING:
+ printf("%u\n", s.Ageing_Time);
+ break;
case PARAM_FORCEPROTVERS:
printf("%s\n", PROTO_VERS_STR(s.protocol_version));
break;
return set_bridge_cfg(tx_hold_count, getuint(argv[2]));
}
+static int cmd_setbridgeageing(int argc, char *const *argv)
+{
+ int br_index = get_index(argv[1], "bridge");
+ if(0 > br_index)
+ return br_index;
+ return set_bridge_cfg(bridge_ageing_time, getuint(argv[2]));
+}
+
static int cmd_settreeprio(int argc, char *const *argv)
{
int br_index = get_index(argv[1], "bridge");
"<bridge> <max_hops>", "Set bridge max hops (6-40)"},
{2, 0, "sethello", cmd_setbridgehello,
"<bridge> <hello_time>", "Set bridge hello time (1-10)"},
+ {2, 0, "setageing", cmd_setbridgeageing,
+ "<bridge> <ageing_time>", "Set bridge ageing time (10-1000000)"},
{2, 0, "setforcevers", cmd_setbridgeforcevers,
"<bridge> {mstp|rstp|stp}", "Force Spanning Tree protocol version"},
{2, 0, "settxholdcount", cmd_setbridgetxholdcount,
status->protocol_version = br->ForceProtocolVersion;
status->enabled = br->bridgeEnabled;
assign(status->bridge_hello_time, br->Hello_Time);
+ assign(status->Ageing_Time, br->Ageing_Time);
}
/* 12.8.1.2 Read MSTI Bridge Protocol Parameters */
}
}
+ if(cfg->set_bridge_ageing_time)
+ {
+ if((10 > cfg->bridge_ageing_time)||(1000000 < cfg->bridge_ageing_time))
+ {
+ ERROR_BRNAME(br,
+ "Bridge Ageing Time must be between 10 and 1000000 seconds");
+ r = -1;
+ }
+ }
+
if(r)
return r;
}
}
+ if(cfg->set_bridge_ageing_time)
+ {
+ if(cfg->bridge_ageing_time != br->Ageing_Time)
+ {
+ INFO_BRNAME(br, "bridge ageing_time new=%u, old=%u",
+ cfg->bridge_ageing_time, br->Ageing_Time);
+ assign(br->Ageing_Time, cfg->bridge_ageing_time);
+ }
+ }
+
/* Thirdly, finalize changes */
if(changedBridgeTimes)
{