blob: f4a2e301b887a60d7800eed700597b531bd83219 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package config
const (
DEFAULT_HOLDTIME = 90
DEFAULT_IDLE_HOLDTIME_AFTER_RESET = 30
)
func setTimersTypeDefault(timersT *TimersType) {
if timersT.HoldTime == 0 {
timersT.HoldTime = float64(DEFAULT_HOLDTIME)
}
if timersT.KeepaliveInterval == 0 {
timersT.KeepaliveInterval = timersT.HoldTime / 3
}
if timersT.IdleHoldTImeAfterReset == 0 {
timersT.IdleHoldTImeAfterReset = float64(DEFAULT_IDLE_HOLDTIME_AFTER_RESET)
}
}
func SetNeighborTypeDefault(neighborT *NeighborType) {
setTimersTypeDefault(&neighborT.Timers)
}
|