Documentation
¶
Overview ¶
Package quagga provides a library for interfacing with Quagga daemons.
Index ¶
Constants ¶
const BGPSocketPath = "/var/run/quagga/bgpd.vty"
Variables ¶
This section is empty.
Functions ¶
func ParseUptime ¶
ParseUptime parses an uptime string and returns the corresponding duration. Time can come in five formats:
07:05:56 2d23h12m 03w5d13h never <error>
See the peer_uptime function in quagga/linc/bgpd/bgpd.c.
Types ¶
type BGP ¶
type BGP struct {
// contains filtered or unexported fields
}
BGP contains the data needed to interface with the Quagga BGP daemon.
func (*BGP) Configuration ¶
Configuration returns the current running configuration from the BGP daemon, as a slice of strings.
type BGPState ¶
type BGPState uint
BGPState represents a BGP peering state.
func BGPStateByName ¶
BGPStateByName returns the BGP state that corresponds to the given name.
type MessageStat ¶
MessageStat encapsulates the statistics for a given message type.
type MessageStats ¶
type MessageStats struct { Opens MessageStat Notifications MessageStat Updates MessageStat Keepalives MessageStat RouteRefresh MessageStat Capability MessageStat Total MessageStat }
MessageStats encapsulates messages statistics for a BGP neighbor.
type Neighbor ¶
type Neighbor struct { IP net.IP RouterID net.IP ASN uint32 Description string BGPState BGPState Uptime time.Duration MessageStats }
Neighbor represents a BGP neighbor.
type Neighbors ¶
type Neighbors struct {
Neighbors []*Neighbor
}
Neighbors represents a list of BGP neighbors.
type VTY ¶
type VTY struct {
// contains filtered or unexported fields
}
VTY represents a connection to a Quagga VTY.