Documentation
¶
Index ¶
Constants ¶
View Source
const ( HEADER_SIZE = 6 HEADER_MARKER = 255 VERSION = 2 INTERFACE_NAMSIZ = 20 )
View Source
const ( INTERFACE_ACTIVE = 0x01 INTERFACE_SUB = 0x02 INTERFACE_LINKDETECTION = 0x04 )
View Source
const ( MESSAGE_NEXTHOP = 0x01 MESSAGE_IFINDEX = 0x02 MESSAGE_DISTANCE = 0x04 MESSAGE_METRIC = 0x08 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API_TYPE ¶
type API_TYPE uint16
API Types.
const ( INTERFACE_ADD API_TYPE INTERFACE_DELETE INTERFACE_ADDRESS_ADD INTERFACE_ADDRESS_DELETE INTERFACE_UP INTERFACE_DOWN IPV4_ROUTE_ADD IPV4_ROUTE_DELETE IPV6_ROUTE_ADD IPV6_ROUTE_DELETE REDISTRIBUTE_ADD REDISTRIBUTE_DELETE REDISTRIBUTE_DEFAULT_ADD REDISTRIBUTE_DEFAULT_DELETE IPV4_NEXTHOP_LOOKUP IPV6_NEXTHOP_LOOKUP IPV4_IMPORT_LOOKUP IPV6_IMPORT_LOOKUP INTERFACE_RENAME ROUTER_ID_ADD ROUTER_ID_DELETE ROUTER_ID_UPDATE HELLO MESSAGE_MAX )
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) SendInterfaceAdd ¶
func (*Client) SendRouterIDAdd ¶
type Header ¶
func (*Header) DecodeFromBytes ¶
type INTERFACE_STATUS ¶
type INTERFACE_STATUS uint8
func (INTERFACE_STATUS) String ¶
func (t INTERFACE_STATUS) String() string
type IPRouteBody ¶
type IPRouteBody struct { Type ROUTE_TYPE Flags FLAG Message uint8 SAFI SAFI Prefix net.IP PrefixLength uint8 Nexthops []net.IP Ifindexs []uint32 Distance uint8 Metric uint32 }
func (*IPRouteBody) DecodeFromBytes ¶
func (b *IPRouteBody) DecodeFromBytes(data []byte) error
func (*IPRouteBody) Serialize ¶
func (b *IPRouteBody) Serialize() ([]byte, error)
type InterfaceAddressUpdateBody ¶
func (*InterfaceAddressUpdateBody) DecodeFromBytes ¶
func (b *InterfaceAddressUpdateBody) DecodeFromBytes(data []byte) error
func (*InterfaceAddressUpdateBody) Serialize ¶
func (b *InterfaceAddressUpdateBody) Serialize() ([]byte, error)
func (*InterfaceAddressUpdateBody) String ¶
func (b *InterfaceAddressUpdateBody) String() string
type InterfaceUpdateBody ¶
type InterfaceUpdateBody struct { Name string Index uint32 Status INTERFACE_STATUS Flags uint64 Metric uint32 MTU uint32 MTU6 uint32 Bandwidth uint32 HardwareAddr net.HardwareAddr }
func (*InterfaceUpdateBody) DecodeFromBytes ¶
func (b *InterfaceUpdateBody) DecodeFromBytes(data []byte) error
func (*InterfaceUpdateBody) Serialize ¶
func (b *InterfaceUpdateBody) Serialize() ([]byte, error)
func (*InterfaceUpdateBody) String ¶
func (b *InterfaceUpdateBody) String() string
type NEXTHOP_FLAG ¶
type NEXTHOP_FLAG uint8
Nexthop Flags.
const ( NEXTHOP_IFINDEX NEXTHOP_FLAG NEXTHOP_IFNAME NEXTHOP_IPV4 NEXTHOP_IPV4_IFINDEX NEXTHOP_IPV4_IFNAME NEXTHOP_IPV6 NEXTHOP_IPV6_IFINDEX NEXTHOP_IPV6_IFNAME NEXTHOP_BLACKHOLE )
func (NEXTHOP_FLAG) String ¶
func (i NEXTHOP_FLAG) String() string
type ROUTE_TYPE ¶
type ROUTE_TYPE uint8
Route Types.
const ( ROUTE_SYSTEM ROUTE_TYPE = iota ROUTE_KERNEL ROUTE_CONNECT ROUTE_STATIC ROUTE_RIP ROUTE_RIPNG ROUTE_OSPF ROUTE_OSPF6 ROUTE_ISIS ROUTE_BGP ROUTE_HSLS ROUTE_OLSR ROUTE_BABEL ROUTE_MAX )
func (ROUTE_TYPE) String ¶
func (i ROUTE_TYPE) String() string
type RouterIDUpdateBody ¶
func (*RouterIDUpdateBody) DecodeFromBytes ¶
func (b *RouterIDUpdateBody) DecodeFromBytes(data []byte) error
func (*RouterIDUpdateBody) Serialize ¶
func (b *RouterIDUpdateBody) Serialize() ([]byte, error)
func (*RouterIDUpdateBody) String ¶
func (b *RouterIDUpdateBody) String() string
Click to show internal directories.
Click to hide internal directories.