Documentation ¶
Index ¶
- Constants
- func IsClassA(ip net.IP) bool
- func IsClassABroadcast(ip net.IP) bool
- func IsClassB(ip net.IP) bool
- func IsClassBBroadcast(ip net.IP) bool
- func IsClassC(ip net.IP) bool
- func IsClassCBroadcast(ip net.IP) bool
- func MakeSocket() int
- type Client
- type Fn
- type InterfaceInfo
- type Packet
- type RpcComponent
- type Rte
- type Server
- func (s *Server) Dispatch(res interface{})
- func (s *Server) EnableInterfaceSet(ifName string) error
- func (s *Server) EnableInterfaceUnset(ifName string) error
- func (s *Server) EnableNetworkSet() error
- func (s *Server) EnableNetworkUnset() error
- func (s *Server) InterfaceInfoGet(ifp *fea.Interface) *InterfaceInfo
- func (s *Server) NeighborSet() error
- func (s *Server) NeighborUnset() error
- func (s *Server) PacketParse() error
- func (s *Server) PacketRecv()
- func (s *Server) Read()
- func (s *Server) RouterSet() error
- func (s *Server) RouterUnset() error
- func (s *Server) Start()
- func (s *Server) Stop()
- func (s *Server) VersionSet(version int) error
- func (s *Server) VersionUnset(version int) error
- type ServerComponent
Constants ¶
View Source
const ( RIPv1 uint8 = 1 RIPv2 uint8 = 2 RIP_PORT_DEFAULT = 520 RIP_PACKET_MINSIZE = 4 INADDR_RIP_GROUP = "224.0.0.9" RIP_METRIC_INFINITY = 16 )
View Source
const ( RIP_REQUEST = 1 RIP_RESPONSE = 2 RIP_TRACEON = 3 // Obsolete RIP_TRACEOFF = 4 // Obsolete RIP_POLL = 5 RIP_POLL_ENTRY = 6 RIP_COMMAND_MAX = 7 )
View Source
const (
VRF_DEFAULT = 0
)
Variables ¶
This section is empty.
Functions ¶
func IsClassABroadcast ¶
func IsClassBBroadcast ¶
func IsClassCBroadcast ¶
func MakeSocket ¶
func MakeSocket() int
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) InterfaceSubscribe ¶
func (*Client) RouterIdSubscribe ¶
type InterfaceInfo ¶
type InterfaceInfo struct {
// contains filtered or unexported fields
}
type Packet ¶
func (*Packet) DecodeFromBytes ¶
type RpcComponent ¶
type RpcComponent struct {
Server *Server
}
func (*RpcComponent) Start ¶
func (c *RpcComponent) Start() component.Component
func (*RpcComponent) Stop ¶
func (c *RpcComponent) Stop() component.Component
type Server ¶
type Server struct { Version uint8 // RIPv1 and RIPv2 Sock int SyncCh chan *Fn DispatCh chan interface{} Done chan interface{} Client *Client Running bool IfMap map[string]*fea.Interface EnableIfMap map[string]bool PassiveIfMap map[string]bool Buffer []byte }
func (*Server) EnableInterfaceSet ¶
func (*Server) EnableInterfaceUnset ¶
func (*Server) EnableNetworkSet ¶
func (*Server) EnableNetworkUnset ¶
func (*Server) InterfaceInfoGet ¶
func (s *Server) InterfaceInfoGet(ifp *fea.Interface) *InterfaceInfo
func (*Server) NeighborSet ¶
func (*Server) NeighborUnset ¶
func (*Server) PacketParse ¶
func (*Server) PacketRecv ¶
func (s *Server) PacketRecv()
func (*Server) RouterUnset ¶
func (*Server) VersionSet ¶
func (*Server) VersionUnset ¶
type ServerComponent ¶
type ServerComponent struct {
Server *Server
}
func (*ServerComponent) Start ¶
func (c *ServerComponent) Start() component.Component
func (*ServerComponent) Stop ¶
func (c *ServerComponent) Stop() component.Component
Source Files ¶
Click to show internal directories.
Click to hide internal directories.