Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) CheckWaitApConnect() bool
- func (c *Client) GetManualFlagPath() string
- func (c *Client) GetPreviousState() int
- func (c *Client) GetState() int
- func (c *Client) GetWaitFlagPath() string
- func (c *Client) IsApUpWithoutSSIDs(cw *wifiap.Client) bool
- func (c *Client) Manage(nc *netman.Client)
- func (c *Client) ManagementServerDown()
- func (c *Client) ManagementServerUp()
- func (c *Client) ManualMode() bool
- func (c *Client) OperationalServerDown()
- func (c *Client) OperationalServerUp()
- func (c *Client) ScanSsids(path string, nc *netman.Client) bool
- func (c *Client) SetDefaults()
- func (c *Client) SetManualFlagPath(s string)
- func (c *Client) SetPreviousState(i int)
- func (c *Client) SetState(i int)
- func (c *Client) SetWaitFlagPath(s string)
- func (c *Client) Unmanage(nc *netman.Client)
Constants ¶
const ( STARTING = 0 + iota MANAGING OPERATING MANUAL )
enum to track current system state
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
}
Client is the base type for both testing and runtime
func (*Client) CheckWaitApConnect ¶
CheckWaitApConnect returns true if the flag wait file exists and false if it does not
func (*Client) GetManualFlagPath ¶
GetManualFlagPath returns the current path
func (*Client) GetPreviousState ¶
GetPreviousState returns the daemon previous state
func (*Client) GetWaitFlagPath ¶
GetWaitFlagPath returns the current path
func (*Client) IsApUpWithoutSSIDs ¶
IsApUpWithoutSSIDs corrects an possible but unlikely case. if wifiap is UP and there are no known SSIDs, bring it down so on next loop iter we start again and can get SSIDs. returns true when ip is UP and has no ssids
func (*Client) ManagementServerDown ¶
func (c *Client) ManagementServerDown()
ManagementServerDown stops the management server if it is running also remove the wait flag file, thus resetting proper State
func (*Client) ManagementServerUp ¶
func (c *Client) ManagementServerUp()
ManagementServerUp starts the management server if it is not running
func (*Client) ManualMode ¶
ManualMode enables the daemon to loop without action if in manual mode It returns true if the manual mode flag wait file exists and false if it does not. If it does not exist and the mode is MANUAL, the state is set to STARTING. If it does exist and the mode is not MANUAL, state is set to MANUAL
func (*Client) OperationalServerDown ¶
func (c *Client) OperationalServerDown()
OperationalServerDown stops the operational server if it is running
func (*Client) OperationalServerUp ¶
func (c *Client) OperationalServerUp()
OperationalServerUp starts the operational server if it is not running
func (*Client) ScanSsids ¶
ScanSsids sets wlan0 to be managed and then scans for ssids. If found, write the ssids (comma separated) to path and return true, else return false.
func (*Client) SetDefaults ¶
func (c *Client) SetDefaults()
SetDefaults sets defaults if not yet set. Currently the hash for the portals password is set. TODO: set default password based on MAC addr or Serial number
func (*Client) SetManualFlagPath ¶
SetManualFlagPath sets the current path
func (*Client) SetPreviousState ¶
SetPreviousState sets daemon previous state
func (*Client) SetWaitFlagPath ¶
SetWaitFlagPath sets the current path