router

package
v0.0.0-...-3e14c7f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DlinkRouter

type DlinkRouter struct {
	ConnectionType string
	Command        string
}

func (*DlinkRouter) Connect

func (r *DlinkRouter) Connect(username, password, host string, delay time.Duration) (net.Conn, error)

func (*DlinkRouter) GetArpOutput

func (r *DlinkRouter) GetArpOutput(conn net.Conn) (output string, err error)

type Router

type Router interface {
	Connect(username string, password string, delay time.Duration) (*net.Conn, error)
	GetArpOutput(conn net.Conn) (output string, err error)
}

Router interface must be implemented for all Router implementations This is because some routers connect over Telnet while others over SSH The commands for ARP Output may also vary from Router to Router. A default implementation for a DLink router is given below

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL