Dobby  3.0
Dobby “Docker based Thingy” is a tool for managing and running OCI containers using crun
Public Member Functions | Private Member Functions | Private Attributes | List of all members
NetworkingPlugin Class Reference
Inheritance diagram for NetworkingPlugin:
Inheritance graph
[legend]
Collaboration diagram for NetworkingPlugin:
Collaboration graph
[legend]

Public Member Functions

 NetworkingPlugin (std::shared_ptr< rt_dobby_schema > &cfg, const std::shared_ptr< DobbyRdkPluginUtils > &utils, const std::string &rootfsPath)
 
std::string name () const override
 Should return the name of the plugin. More...
 
unsigned hookHints () const override
 Set the bit flags for which hooks we're going to use. More...
 
bool postInstallation () override
 Dobby Hook - run in host namespace once when container bundle is downloaded.
 
bool createRuntime () override
 OCI Hook - Run in host namespace.
 
bool postHalt () override
 Dobby Hook - Run in host namespace when container terminates.
 
bool postStop () override
 OCI Hook - Run in host namespace.
 
std::vector< std::string > getDependencies () const override
 Should return the names of the plugins this plugin depends on. More...
 
- Public Member Functions inherited from RdkPluginBase
virtual bool preCreation ()
 
virtual bool createContainer ()
 
virtual bool postStart ()
 

Private Member Functions

std::vector< std::string > GetExternalInterfacesFromSettings () const
 Gets the external interfaces defined in the dobby settings file, regardless of whether they actually exist on the platform or not. More...
 
std::vector< std::string > GetAvailableExternalInterfaces () const
 Gets the external interfaces that are actually available. Looks in the settings for the interfaces Dobby should use, then checks if the device actually has those interfaces available. Will return empty vector if none of the ifaces in the settings file are available. More...
 

Private Attributes

bool mValid
 
const std::string mName
 
NetworkType mNetworkType
 
std::shared_ptr< rt_dobby_schema > mContainerConfig
 
const std::shared_ptr< DobbyRdkPluginUtilsmUtils
 
const std::string mRootfsPath
 
const rt_defs_plugins_networking_data * mPluginData
 
std::shared_ptr< NetworkingHelpermHelper
 
std::shared_ptr< NetfiltermNetfilter
 

Additional Inherited Members

- Public Types inherited from IDobbyRdkPlugin
enum  HintFlags : unsigned {
  PostInstallationFlag = (1 << 0) , PreCreationFlag = (1 << 1) , CreateRuntimeFlag = (1 << 2) , CreateContainerFlag = (1 << 3) ,
  PostStartFlag = (1 << 5) , PostHaltFlag = (1 << 6) , PostStopFlag = (1 << 7) , Unknown = 0
}
 Bit flags that should be returned by hookHints. More...
 

Member Function Documentation

◆ GetAvailableExternalInterfaces()

std::vector< std::string > NetworkingPlugin::GetAvailableExternalInterfaces ( ) const
private

Gets the external interfaces that are actually available. Looks in the settings for the interfaces Dobby should use, then checks if the device actually has those interfaces available. Will return empty vector if none of the ifaces in the settings file are available.

Returns
Available external interfaces from the ones defined in dobby settings

◆ getDependencies()

std::vector< std::string > NetworkingPlugin::getDependencies ( ) const
overridevirtual

Should return the names of the plugins this plugin depends on.

This can be used to determine the order in which the plugins should be processed when running hooks.

Returns
Names of the plugins this plugin depends on.

Reimplemented from RdkPluginBase.

◆ GetExternalInterfacesFromSettings()

std::vector< std::string > NetworkingPlugin::GetExternalInterfacesFromSettings ( ) const
private

Gets the external interfaces defined in the dobby settings file, regardless of whether they actually exist on the platform or not.

Returns
All external interfaces from dobby settings file

◆ hookHints()

unsigned NetworkingPlugin::hookHints ( ) const
overridevirtual

Set the bit flags for which hooks we're going to use.

This plugin uses all the hooks so set all the flags

Implements IDobbyRdkPlugin.

◆ name()

std::string NetworkingPlugin::name ( ) const
inlineoverridevirtual

Should return the name of the plugin.

Returns
string with the name of the hook.

Implements IDobbyRdkPlugin.


The documentation for this class was generated from the following files: