Dobby 3.0
Dobby “Docker based Thingy” is a tool for managing and running OCI containers using crun
|
Used to add iptables firewall rules to allow a container to either expose a port to another container or to access a port on another container. More...
Functions | |
bool | addRules (const std::shared_ptr< Netfilter > &netfilter, const std::shared_ptr< NetworkingHelper > &helper, const std::shared_ptr< DobbyRdkPluginUtils > &utils, rt_defs_plugins_networking_data_inter_container_element *const *portConfigs, size_t numPortConfigs) |
Adds the necessary iptables firewall rules to enable routing of packets to / from one container to another. | |
bool | removeRules (const std::shared_ptr< Netfilter > &netfilter, const std::shared_ptr< NetworkingHelper > &helper, const std::shared_ptr< DobbyRdkPluginUtils > &utils, rt_defs_plugins_networking_data_inter_container_element *const *portConfigs, size_t numPortConfigs) |
Removes the inter container port forwarding rules from iptables. | |
Used to add iptables firewall rules to allow a container to either expose a port to another container or to access a port on another container.
This adds the necessary rules to iptables when the container is started and deletes them again when the container is stopped. All the rules are tagged (via an iptables comment) with the name of the container, this should ensure rules are correctly added and removed.
bool InterContainerRouting::addRules | ( | const std::shared_ptr< Netfilter > & | netfilter, |
const std::shared_ptr< NetworkingHelper > & | helper, | ||
const std::shared_ptr< DobbyRdkPluginUtils > & | utils, | ||
rt_defs_plugins_networking_data_inter_container_element *const * | portConfigs, | ||
size_t | numPortConfigs | ||
) |
Adds the necessary iptables firewall rules to enable routing of packets to / from one container to another.
[in] | netfilter | Instance of Netfilter class. |
[in] | helper | Instance of NetworkingHelper. |
[in] | utils | Instance of DobbyRdkPluginUtils. |
[in] | portConfigs | libocispec structs containing ports to setup, both incoming and outgoing. |
[in] | numPortConfigs | The number of portConfigs. |
bool InterContainerRouting::removeRules | ( | const std::shared_ptr< Netfilter > & | netfilter, |
const std::shared_ptr< NetworkingHelper > & | helper, | ||
const std::shared_ptr< DobbyRdkPluginUtils > & | utils, | ||
rt_defs_plugins_networking_data_inter_container_element *const * | portConfigs, | ||
size_t | numPortConfigs | ||
) |
Removes the inter container port forwarding rules from iptables.
[in] | netfilter | Instance of Netfilter class. |
[in] | helper | Instance of NetworkingHelper. |
[in] | utils | Instance of DobbyRdkPluginUtils. |
[in] | portConfigs | libocispec structs containing ports to setup, both incoming and outgoing. |
[in] | numPortConfigs | The number of portConfigs. |