Documentation ¶
Index ¶
- Variables
- func GetSocketClient(p *config.Point) libol.SocketClient
- func GetTapCfg(c *config.Point) network.TapConfig
- type KeepAlive
- type MixPoint
- func (p *MixPoint) Addr() string
- func (p *MixPoint) Alias() string
- func (p *MixPoint) Client() libol.SocketClient
- func (p *MixPoint) Config() *config.Point
- func (p *MixPoint) Device() network.Taper
- func (p *MixPoint) IfAddr() string
- func (p *MixPoint) IfName() string
- func (p *MixPoint) Initialize()
- func (p *MixPoint) Network() *models.Network
- func (p *MixPoint) Protocol() string
- func (p *MixPoint) Record() map[string]int64
- func (p *MixPoint) Start()
- func (p *MixPoint) Status() libol.SocketStatus
- func (p *MixPoint) Stop()
- func (p *MixPoint) Tenant() string
- func (p *MixPoint) UUID() string
- func (p *MixPoint) UpTime() int64
- func (p *MixPoint) User() string
- type Neighbor
- type NeighborListener
- type Neighbors
- type PingMsg
- type Point
- func (p *Point) AddAddr(ipStr string) error
- func (p *Point) AddBypass(routes []*models.Route)
- func (p *Point) AddRoutes(routes []*models.Route) error
- func (p *Point) DelAddr(ipStr string) error
- func (p *Point) DelBypass(routes []*models.Route)
- func (p *Point) DelRoutes(routes []*models.Route) error
- func (p *Point) GetRemote() string
- func (p *Point) Initialize()
- func (p *Point) OnTap(w *TapWorker) error
- func (p *Point) UpBr(name string) *netlink.Bridge
- type Pointer
- type PrefixRule
- type SocketWorker
- func (t *SocketWorker) Auth() (string, string)
- func (t *SocketWorker) DoWrite(frame *libol.FrameMessage) error
- func (t *SocketWorker) Initialize()
- func (t *SocketWorker) Loop()
- func (t *SocketWorker) Read(client libol.SocketClient)
- func (t *SocketWorker) SetAuth(auth string)
- func (t *SocketWorker) SetUUID(v string)
- func (t *SocketWorker) Start()
- func (t *SocketWorker) Stop()
- func (t *SocketWorker) Write(frame *libol.FrameMessage) error
- type SocketWorkerListener
- type TapWorker
- func (a *TapWorker) DoWrite(frame *libol.FrameMessage) error
- func (a *TapWorker) Initialize()
- func (a *TapWorker) IsTun() bool
- func (a *TapWorker) Loop()
- func (a *TapWorker) OnArpAlive(dest []byte)
- func (a *TapWorker) OnIpAddr(addr string)
- func (a *TapWorker) Read(device network.Taper)
- func (a *TapWorker) Start()
- func (a *TapWorker) Stop()
- func (a *TapWorker) Write(frame *libol.FrameMessage) error
- type TapWorkerListener
- type Terminal
- func (t *Terminal) CmdBye(args []string)
- func (t *Terminal) CmdCd(args []string)
- func (t *Terminal) CmdEdit(args []string)
- func (t *Terminal) CmdHelp(args []string)
- func (t *Terminal) CmdMode(args []string)
- func (t *Terminal) CmdPwd(args []string)
- func (t *Terminal) CmdShell(args []string)
- func (t *Terminal) CmdShow(args []string)
- func (t *Terminal) Prompt() string
- func (t *Terminal) Start()
- func (t *Terminal) Trim(v string) string
- type TunEther
- type Worker
- func (w *Worker) FindNext(dest []byte) []byte
- func (w *Worker) FlushStatus()
- func (w *Worker) FreeIpAddr()
- func (w *Worker) Initialize()
- func (w *Worker) OnClose(s *SocketWorker) error
- func (w *Worker) OnIpAddr(s *SocketWorker, n *models.Network) error
- func (w *Worker) OnSuccess(s *SocketWorker) error
- func (w *Worker) SetUUID(v string)
- func (w *Worker) Start()
- func (w *Worker) Stop()
- func (w *Worker) UUID() string
- func (w *Worker) UpTime() int64
- type WorkerEvent
- type WorkerListener
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EvSocConed = "conned" EvSocRecon = "reconn" EvSocClosed = "closed" EvSocSuccess = "success" EvSocSignIn = "signIn" EvSocLogin = "login" EvTapIpAddr = "ipAddr" EvTapReadErr = "readErr" EvTapReset = "reset" EvTapOpenErr = "openErr" )
Functions ¶
func GetSocketClient ¶
func GetSocketClient(p *config.Point) libol.SocketClient
Types ¶
type MixPoint ¶
type MixPoint struct {
// contains filtered or unexported fields
}
func NewMixPoint ¶
func (*MixPoint) Client ¶
func (p *MixPoint) Client() libol.SocketClient
func (*MixPoint) Initialize ¶
func (p *MixPoint) Initialize()
func (*MixPoint) Status ¶
func (p *MixPoint) Status() libol.SocketStatus
type NeighborListener ¶
type Neighbors ¶
type Neighbors struct {
// contains filtered or unexported fields
}
func (*Neighbors) GetByBytes ¶
type Point ¶
type Point struct { MixPoint // contains filtered or unexported fields }
func (*Point) Initialize ¶
func (p *Point) Initialize()
type Pointer ¶
type Pointer interface { Addr() string IfName() string IfAddr() string Client() libol.SocketClient Device() network.Taper Status() libol.SocketStatus UpTime() int64 UUID() string Protocol() string User() string Record() map[string]int64 Tenant() string Alias() string Config() *config.Point Network() *models.Network }
type SocketWorker ¶
type SocketWorker struct {
// contains filtered or unexported fields
}
func NewSocketWorker ¶
func NewSocketWorker(client libol.SocketClient, c *config.Point) *SocketWorker
func (*SocketWorker) Auth ¶
func (t *SocketWorker) Auth() (string, string)
func (*SocketWorker) DoWrite ¶
func (t *SocketWorker) DoWrite(frame *libol.FrameMessage) error
func (*SocketWorker) Initialize ¶
func (t *SocketWorker) Initialize()
func (*SocketWorker) Loop ¶
func (t *SocketWorker) Loop()
func (*SocketWorker) Read ¶
func (t *SocketWorker) Read(client libol.SocketClient)
func (*SocketWorker) SetAuth ¶
func (t *SocketWorker) SetAuth(auth string)
func (*SocketWorker) SetUUID ¶
func (t *SocketWorker) SetUUID(v string)
func (*SocketWorker) Start ¶
func (t *SocketWorker) Start()
func (*SocketWorker) Stop ¶
func (t *SocketWorker) Stop()
func (*SocketWorker) Write ¶
func (t *SocketWorker) Write(frame *libol.FrameMessage) error
type SocketWorkerListener ¶
type SocketWorkerListener struct { OnClose func(w *SocketWorker) error OnSuccess func(w *SocketWorker) error OnIpAddr func(w *SocketWorker, n *models.Network) error ReadAt func(frame *libol.FrameMessage) error }
type TapWorker ¶
type TapWorker struct {
// contains filtered or unexported fields
}
func NewTapWorker ¶
func (*TapWorker) Initialize ¶
func (a *TapWorker) Initialize()
func (*TapWorker) OnArpAlive ¶
type TapWorkerListener ¶
type Terminal ¶
func NewTerminal ¶
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
func (*Worker) FlushStatus ¶
func (w *Worker) FlushStatus()
func (*Worker) FreeIpAddr ¶
func (w *Worker) FreeIpAddr()
func (*Worker) Initialize ¶
func (w *Worker) Initialize()
func (*Worker) OnClose ¶
func (w *Worker) OnClose(s *SocketWorker) error
func (*Worker) OnSuccess ¶
func (w *Worker) OnSuccess(s *SocketWorker) error
type WorkerEvent ¶
func NewEvent ¶
func NewEvent(newType, reason string) *WorkerEvent
func (*WorkerEvent) String ¶
func (e *WorkerEvent) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.