Add initial nftables client implementation

This commit is contained in:
2025-10-19 14:53:51 +05:00
parent dd963a343a
commit f5b1888420
3 changed files with 147 additions and 0 deletions

30
family_type.go Normal file
View 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)
}
}