Documentation ¶
Index ¶
- type Age
- type BGPRoute
- func (bgpRoute *BGPRoute) ReadJSONFrom(r io.Reader) (n int64, err error)
- func (bgpRoute *BGPRoute) ReadXMLFrom(r io.Reader) (n int64, err error)
- func (bgpRoute *BGPRoute) WriteCLITo(w io.Writer) error
- func (bgpRoute *BGPRoute) WriteJSONTo(w io.Writer) (n int64, err error)
- func (bgpRoute *BGPRoute) WriteXMLTo(w io.Writer) (n int64, err error)
- type NH
- type RPCError
- type RT
- type RTEntry
- type RouteTable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BGPRoute ¶
type BGPRoute struct { XMLName xml.Name `xml:"route-information" json:"-"` RouteTable RouteTable `xml:"route-table,omitempty" json:"route-table,omitempty"` Errors []RPCError `xml:"rpc-error,omitempty" json:"rpc-error,omitempty"` OriginHost string `json:"originhost,omitempty"` OriginIP string `json:"originip,omitempty"` }
Represents the BGP route XML structure, and is used to convert it from XML to JSON.
func (*BGPRoute) ReadJSONFrom ¶
func (*BGPRoute) ReadXMLFrom ¶
func (*BGPRoute) WriteJSONTo ¶
type NH ¶
type NH struct { // <selected-next-hop> is either present as an empty tag, or not present // so we need a pointer to distinguish its presence (not nil), or lack thereof (nil) SelectedNextHop *string `xml:"selected-next-hop" json:"selected-next-hop"` To string `xml:"to,omitempty" json:"to,omitempty"` Via string `xml:"via,omitempty" json:"via,omitempty"` LSPName string `xml:"lsp-name,omitempty" json:"lsp-name,omitempty"` }
type RPCError ¶
type RPCError struct { Type string `xml:"error-type" json:"error-type"` Tag string `xml:"error-tag" json:"error-tag"` Severity string `xml:"error-severity" json:"error-severity"` Path string `xml:"error-path" json:"error-path"` Message string `xml:"error-message" json:"error-message"` Info string `xml:",innerxml" json:",string` }
type RTEntry ¶
type RTEntry struct { ActiveTag string `xml:"active-tag,omitempty" json:"active-date,omitempty"` CurrentActive string `xml:"current-active,omitempty" json:"current-active,omitempty"` LastActive string `xml:"last-active,omitempty" json:"last-active,omitempty"` ProtocolName string `xml:"protocol-name,omitempty" json:"protocol-name,omitempty"` Preference int `xml:"preference,omitempty" json:"preference,omitempty"` Age Age `xml:"age,omitempty" json:"age,omitempty"` Med int `xml:"med,omitempty" json:"med,omitempty"` LocalPreference int `xml:"local-preference,omitempty" json:"local-preference,omitempty"` LearnedFrom string `xml:"learned-from,omitempty" json:"learned-from,omitempty"` AsPath string `xml:"as-path,omitempty" json:"as-path,omitempty"` ValidationState string `xml:"validation-state,omitempty" json:"validation-state,omitempty"` NH []NH `xml:"nh,omitempty" json:"nh,omitempty"` }
type RouteTable ¶
type RouteTable struct { TableName string `xml:"table-name,omitempty" json:"table-name,omitempty"` DestinationCount int `xml:"destination-count,omitempty" json:"destination-count,omitempty"` TotalRouteCount int `xml:"total-route-count,omitempty" json:"total-route-count,omitempty"` ActiveRouteCount int `xml:"active-route-count,omitempty" json:"active-route-count,omitempty"` HoldDownRouteCount int `xml:"holddown-route-count" json:"holddown-route-count"` HiddenRouteCount int `xml:"hidden-route-count,omitempty" json:"hidden-route-count,omitempty"` RT []RT `xml:"rt,omitempty" json:"rt,omitempty"` }
Click to show internal directories.
Click to hide internal directories.