Documentation ¶
Index ¶
Constants ¶
View Source
const ( M_OPEN = 1 M_UPDATE = 2 M_NOTIFICATION = 3 M_KEEPALIVE = 4 IGP = 0 EGP = 1 ORIGIN = 1 AS_PATH = 2 NEXT_HOP = 3 MULTI_EXIT_DISC = 4 LOCAL_PREF = 5 COMMUNITIES = 8 AS_SET = 1 AS_SEQUENCE = 2 // NOTIFICATION ERROR CODES MESSAGE_HEADER_ERROR = 1 OPEN_ERROR = 2 HOLD_TIMER_EXPIRED = 4 FSM_ERROR = 5 CEASE = 6 // MESSAGE_HEADER_ERROR BAD_MESSAGE_TYPE = 3 // OPEN_ERROR UNSUPPORTED_VERSION_NUMBER = 1 BAD_BGP_ID = 3 UNNACEPTABLE_HOLD_TIME = 6 MAXIMUM_PREFIXES_REACHED = 1 ADMINISTRATIVE_SHUTDOWN = 2 PEER_DECONFIGURED = 3 ADMINISTRATIVE_RESET = 4 CONNECTION_REJECTED = 5 OTHER_CONFIGURATION_CHANGE = 6 CONNECTION_COLLISION_RESOLUTION = 7 OUT_OF_RESOURCES = 8 WTCR = 64 // (Well-known, Transitive, Complete, Regular length) WTCE = 80 // (Well-known, Transitive, Complete, Extended length) ONCR = 128 // (Optional, Non-transitive, Complete, Regular length) OTCR = 192 // (Optional, Transitive, Complete, Regular length) )
View Source
const ( IDLE = "IDLE" ACTIVE = "ACTIVE" CONNECT = "CONNECT" OPEN_SENT = "OPEN_SENT" OPEN_CONFIRM = "OPEN_CONFIRM" ESTABLISHED = "ESTABLISHED" )
View Source
const ( CONNECTION_FAILED = iota REMOTE_SHUTDOWN LOCAL_SHUTDOWN INVALID_LOCALIP )
Variables ¶
This section is empty.
Functions ¶
func RIBSDiffer ¶
Types ¶
type Community ¶
type Community uint32
func (*Community) MarshalJSON ¶
func (*Community) UnmarshalJSON ¶
type IPNet ¶
func (*IPNet) MarshalJSON ¶
func (*IPNet) UnmarshalJSON ¶
func (*IPNet) UnmarshalText ¶
type Parameters ¶
type Parameters struct { // only used at session start ASNumber uint16 `json:"as_number,omitempty"` HoldTime uint16 `json:"hold_time,omitempty"` SourceIP IP4 `json:"source_ip,omitempty"` // can change during session MED uint32 `json:"med,omitempty"` LocalPref uint32 `json:"local_pref,omitempty"` Communities []Community `json:"communities,omitempty"` Accept []IPNet `json:"accept,omitempty"` Reject []IPNet `json:"reject,omitempty"` }
func (*Parameters) Diff ¶
func (a *Parameters) Diff(b Parameters) (r bool)
func (*Parameters) Filter ¶
func (p *Parameters) Filter(dest []IP) []IP
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func (*Pool) Configure ¶
func (p *Pool) Configure(c map[string]Parameters)
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func NewSession ¶
func (*Session) Configure ¶
func (s *Session) Configure(p Parameters)
type Status ¶
type Status struct { State string `json:"state"` When time.Time `json:"when"` Duration time.Duration `json:"duration_s"` UpdateCalculation time.Duration `json:"update_calculation_ms"` Advertised uint64 `json:"advertised_routes"` Withdrawn uint64 `json:"withdrawn_routes"` Prefixes int `json:"current_routes"` Attempts uint64 `json:"connection_attempts"` Connections uint64 `json:"successful_connections"` Established uint64 `json:"established_sessions"` LastError string `json:"last_error"` HoldTime uint16 `json:"hold_time"` LocalASN uint16 `json:"local_asn"` RemoteASN uint16 `json:"remote_asn"` AdjRIBOut []string `json:"adj_rib_out"` LocalIP string `json:"local_ip"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.