Refactor table management to use a dedicated API and improve command handling.

This commit is contained in:
2025-10-19 22:50:14 +05:00
parent d056f5dbf8
commit 5b19993343
5 changed files with 107 additions and 52 deletions

30
family/type.go Normal file
View File

@@ -0,0 +1,30 @@
package family
import "fmt"
type Type int8
const (
IP Type = iota + 1
IP6
INET
ARP
BRIDGE
)
func (f Type) 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)
}
}