Add initial nftables client implementation
This commit is contained in:
30
family_type.go
Normal file
30
family_type.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package nft
|
||||
|
||||
import "fmt"
|
||||
|
||||
type FamilyType int8
|
||||
|
||||
const (
|
||||
IP FamilyType = iota + 1
|
||||
IP6
|
||||
INET
|
||||
ARP
|
||||
BRIDGE
|
||||
)
|
||||
|
||||
func (f FamilyType) String() string {
|
||||
switch f {
|
||||
case IP:
|
||||
return "ip"
|
||||
case IP6:
|
||||
return "ip6"
|
||||
case INET:
|
||||
return "inet"
|
||||
case ARP:
|
||||
return "arp"
|
||||
case BRIDGE:
|
||||
return "bridge"
|
||||
default:
|
||||
return fmt.Sprintf("Encoding(%d)", f)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user