Plumbing for network setting control, and GitHub issue #330
This commit is contained in:
parent
e2ca239be0
commit
674b84d908
3 changed files with 66 additions and 9 deletions
|
@ -67,6 +67,27 @@ public:
|
|||
ONE_IDENTITY_COLLISION = 3
|
||||
};
|
||||
|
||||
/**
|
||||
* Local settings for each network
|
||||
*/
|
||||
struct NetworkSettings
|
||||
{
|
||||
/**
|
||||
* Allow this network to configure IP addresses and routes?
|
||||
*/
|
||||
bool allowManaged;
|
||||
|
||||
/**
|
||||
* Allow configuration of IPs and routes within global (Internet) IP space?
|
||||
*/
|
||||
bool allowGlobal;
|
||||
|
||||
/**
|
||||
* Allow overriding of system default routes for "full tunnel" operation?
|
||||
*/
|
||||
bool allowDefault;
|
||||
};
|
||||
|
||||
/**
|
||||
* @return Platform default home path or empty string if this platform doesn't have one
|
||||
*/
|
||||
|
@ -130,6 +151,15 @@ public:
|
|||
*/
|
||||
virtual void terminate() = 0;
|
||||
|
||||
/**
|
||||
* Get local settings for a network
|
||||
*
|
||||
* @param nwid Network ID
|
||||
* @param settings Buffer to fill with local network settings
|
||||
* @return True if network was found and settings is filled
|
||||
*/
|
||||
virtual bool getNetworkSettings(const uint64_t nwid,NetworkSettings &settings) const = 0;
|
||||
|
||||
/**
|
||||
* @return True if service is still running
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue