router

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpenWrt  = "openwrt"
	DDWrt    = "ddwrt"
	Merlin   = "merlin"
	Ubios    = "ubios"
	Synology = "synology"
	Tomato   = "tomato"
	EdgeOS   = "edgeos"
	Pfsense  = "pfsense"
)

Variables

View Source
var ErrNotSupported = errors.New("unsupported platform")

ErrNotSupported reports the current router is not supported error.

Functions

func Cleanup

func Cleanup(svc *service.Config) error

Cleanup cleans ctrld setup on the router.

func Configure

func Configure(c *ctrld.Config) error

Configure configures things for running ctrld on the router.

func ConfigureService

func ConfigureService(sc *service.Config) error

ConfigureService performs necessary setup for running ctrld as a service on router.

func GetClientInfoByMac

func GetClientInfoByMac(mac string) *ctrld.ClientInfo

GetClientInfoByMac returns ClientInfo for the client associated with the given mac.

func IsGLiNet

func IsGLiNet() bool

IsGLiNet reports whether the router is an GL.iNet router.

func IsOldOpenwrt added in v1.2.1

func IsOldOpenwrt() bool

IsOldOpenwrt reports whether the router is an "old" version of Openwrt, aka versions which don't have "service" command.

func IsSupported added in v1.2.1

func IsSupported(platform string) bool

IsSupported reports whether the given platform is supported by ctrld.

func ListenAddress

func ListenAddress() string

ListenAddress returns the listener address of ctrld on router.

func Name

func Name() string

Name returns name of the router platform.

func PostInstall

func PostInstall(svc *service.Config) error

PostInstall performs task after installing ctrld on router.

func PreRun added in v1.2.1

func PreRun() (err error)

PreRun blocks until the router is ready for running ctrld.

func Stop

func Stop() error

Stop performs tasks need to be done before the router stopped.

func SupportedPlatforms

func SupportedPlatforms() []string

SupportedPlatforms return all platforms that can be configured to run with ctrld.

Types

This section is empty.

Jump to

Keyboard shortcuts

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