libnetwork ipvs godeps
This commit is contained in:
25
vendor/github.com/vishvananda/netlink/protinfo.go
generated
vendored
25
vendor/github.com/vishvananda/netlink/protinfo.go
generated
vendored
@@ -6,12 +6,14 @@ import (
|
||||
|
||||
// Protinfo represents bridge flags from netlink.
|
||||
type Protinfo struct {
|
||||
Hairpin bool
|
||||
Guard bool
|
||||
FastLeave bool
|
||||
RootBlock bool
|
||||
Learning bool
|
||||
Flood bool
|
||||
Hairpin bool
|
||||
Guard bool
|
||||
FastLeave bool
|
||||
RootBlock bool
|
||||
Learning bool
|
||||
Flood bool
|
||||
ProxyArp bool
|
||||
ProxyArpWiFi bool
|
||||
}
|
||||
|
||||
// String returns a list of enabled flags
|
||||
@@ -35,6 +37,12 @@ func (prot *Protinfo) String() string {
|
||||
if prot.Flood {
|
||||
boolStrings = append(boolStrings, "Flood")
|
||||
}
|
||||
if prot.ProxyArp {
|
||||
boolStrings = append(boolStrings, "ProxyArp")
|
||||
}
|
||||
if prot.ProxyArpWiFi {
|
||||
boolStrings = append(boolStrings, "ProxyArpWiFi")
|
||||
}
|
||||
return strings.Join(boolStrings, " ")
|
||||
}
|
||||
|
||||
@@ -46,8 +54,5 @@ func boolToByte(x bool) []byte {
|
||||
}
|
||||
|
||||
func byteToBool(x byte) bool {
|
||||
if uint8(x) != 0 {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
return uint8(x) != 0
|
||||
}
|
||||
|
Reference in New Issue
Block a user