Documentation
¶
Index ¶
- Constants
- Variables
- func Cleanup(svc *service.Config) error
- func Configure(c *ctrld.Config) error
- func ConfigureService(sc *service.Config) error
- func GetClientInfoByMac(mac string) *ctrld.ClientInfo
- func IsGLiNet() bool
- func IsOldOpenwrt() bool
- func IsSupported(platform string) bool
- func ListenAddress() string
- func Name() string
- func PostInstall(svc *service.Config) error
- func PreRun() (err error)
- func Stop() error
- func SupportedPlatforms() []string
Constants ¶
const ( OpenWrt = "openwrt" DDWrt = "ddwrt" Merlin = "merlin" Ubios = "ubios" Synology = "synology" Tomato = "tomato" EdgeOS = "edgeos" Pfsense = "pfsense" )
Variables ¶
var ErrNotSupported = errors.New("unsupported platform")
ErrNotSupported reports the current router is not supported error.
Functions ¶
func ConfigureService ¶
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 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
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 PostInstall ¶
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 SupportedPlatforms ¶
func SupportedPlatforms() []string
SupportedPlatforms return all platforms that can be configured to run with ctrld.
Types ¶
This section is empty.