Documentation ¶
Overview ¶
Package af implements AFI, SAFI, and combinations
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // generic errors ErrTODO = errors.New("not implemented") ErrUnsupported = errors.New("unsupported") ErrType = errors.New("invalid type") ErrValue = errors.New("invalid value") ErrLength = errors.New("invalid length") ErrShort = errors.New("too short") ErrLong = errors.New("too long") ErrDupe = errors.New("duplicate") ErrMarker = errors.New("marker not found") ErrVersion = errors.New("invalid version") ErrParams = errors.New("invalid parameters") ErrCaps = errors.New("invalid capabilities") ErrAttrCode = errors.New("invalid attribute code") ErrAttrFlags = errors.New("invalid attribute flags") ErrAttrs = errors.New("invalid attributes") ErrSegType = errors.New("invalid segment type") ErrSegLen = errors.New("invalid segment length") )
Functions ¶
func AFIStrings ¶
func AFIStrings() []string
AFIStrings returns a slice of all String values of the enum
func SAFIStrings ¶
func SAFIStrings() []string
SAFIStrings returns a slice of all String values of the enum
Types ¶
type AF ¶ added in v0.1.4
type AF uint32
AF represents AFI+SAFI af afi(16) + 0(8) + safi(8)
func NewASBytes ¶
NewASBytes reads AS from wire representation in buf
type AFI ¶
type AFI uint16
const ( AFI_INVALID AFI = 0 AFI_IPV4 AFI = 1 AFI_IPV6 AFI = 2 AFI_L2VPN AFI = 25 AFI_MPLS_SECTION AFI = 26 AFI_MPLS_LSP AFI = 27 AFI_MPLS_PSEUDOWIRE AFI = 28 AFI_MT_IPV4 AFI = 29 AFI_MT_IPV6 AFI = 30 AFI_SFC AFI = 31 AFI_LS AFI = 16388 AFI_ROUTING_POLICY AFI = 16398 AFI_MPLS_NAMESPACES AFI = 16399 )
func AFIString ¶
AFIString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func NewAFIBytes ¶
NewAFIBytes reads AFI from wire representation in buf
type AFV ¶ added in v0.1.4
type AFV uint64
AFV represents AFI+SAFI+VAL as afi(16) + 0(8) + safi(8) + val(32)
func (*AFV) FromJSONAfi ¶ added in v0.1.4
FromJSONAfi interprets Val as an AFI
type SAFI ¶
type SAFI uint8
const ( SAFI_INVALID SAFI = 0 SAFI_UNICAST SAFI = 1 SAFI_MULTICAST SAFI = 2 SAFI_MPLS SAFI = 4 SAFI_MCAST_VPN SAFI = 5 SAFI_PLACEMENT_MSPW SAFI = 6 SAFI_MCAST_VPLS SAFI = 8 SAFI_SFC SAFI = 9 SAFI_TUNNEL SAFI = 64 SAFI_VPLS SAFI = 65 SAFI_MDT SAFI = 66 SAFI_4OVER6 SAFI = 67 SAFI_6OVER4 SAFI = 68 SAFI_L1VPN_DISCOVERY SAFI = 69 SAFI_EVPNS SAFI = 70 SAFI_LS SAFI = 71 SAFI_LS_VPN SAFI = 72 SAFI_SR_TE_POLICY SAFI = 73 SAFI_SD_WAN_CAPABILITIES SAFI = 74 SAFI_ROUTING_POLICY SAFI = 75 SAFI_CLASSFUL_TRANSPORT SAFI = 76 SAFI_TUNNELED_FLOWSPEC SAFI = 77 SAFI_MCAST_TREE SAFI = 78 SAFI_DPS SAFI = 79 SAFI_LS_SPF SAFI = 80 SAFI_CAR SAFI = 83 SAFI_VPN_CAR SAFI = 84 SAFI_MUP SAFI = 85 SAFI_MPLS_VPN SAFI = 128 SAFI_MULTICAST_VPNS SAFI = 129 SAFI_ROUTE_TARGET SAFI = 132 SAFI_FLOWSPEC SAFI = 133 SAFI_L3VPN_FLOWSPEC SAFI = 134 SAFI_VPN_DISCOVERY SAFI = 140 )
func SAFIString ¶
SAFIString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.