"os"
"os/exec"
"runtime"
- "time"
)
const (
TimeoutDefault = 60
+ EtherSize = 14
+ MTUMax = 9000 + EtherSize
+ MTUDefault = 1500 + EtherSize
)
var (
- MTU int
Version string
)
}
// Zero each byte.
-func sliceZero(data []byte) {
+func SliceZero(data []byte) {
for i := 0; i < len(data); i++ {
data[i] = 0
}
func VersionGet() string {
return "GoVPN version " + Version + " built with " + runtime.Version()
}
-
-func cprCycleCalculate(rate int) time.Duration {
- if rate == 0 {
- return time.Duration(0)
- }
- return time.Second / time.Duration(rate*(1<<10)/MTU)
-}