Files

34 lines
381 B
Go

package family
import "fmt"
type Type int8
const (
IP Type = iota + 1
IP6
INET
ARP
BRIDGE
NETDEV
)
func (t Type) String() string {
switch t {
case IP:
return "ip"
case IP6:
return "ip6"
case INET:
return "inet"
case ARP:
return "arp"
case BRIDGE:
return "bridge"
case NETDEV:
return "netdev"
default:
return fmt.Sprintf("unknown family %d", t)
}
}