24#include "NetworkingHelper.h"
25#include "rt_dobby_schema.h"
26#include <DobbyRdkPluginUtils.h>
47 const std::shared_ptr<Netfilter> &netfilter,
48 const std::vector<std::string> &extIfaces);
50 bool createNetns(
const std::string &containerId);
52 bool setupVeth(
const std::shared_ptr<DobbyRdkPluginUtils> &utils,
53 const std::shared_ptr<Netfilter> &netfilter,
54 const std::shared_ptr<NetworkingHelper> &helper,
55 const std::string &rootfsPath,
56 const std::string &containerId,
57 const NetworkType networkType);
60 const std::shared_ptr<NetworkingHelper> &helper,
61 const std::string &vethName,
62 const NetworkType networkType,
63 const std::string &containerId);
66 const std::vector<std::string> &extIfaces);
68 void addResolvMount(
const std::shared_ptr<DobbyRdkPluginUtils> &utils,
69 const std::shared_ptr<rt_dobby_schema> &cfg);
74bool setupContainerNet(
const std::shared_ptr<NetworkingHelper> &helper);
76pid_t spawnNetnsOwner(
const std::string &containerId);
78void deleteNetns(
const std::string &containerId);
Functions to set up networking for containers.
bool setupVeth(const std::shared_ptr< DobbyRdkPluginUtils > &utils, const std::shared_ptr< Netfilter > &netfilter, const std::shared_ptr< NetworkingHelper > &helper, const std::string &rootfsPath, const std::string &containerId, const NetworkType networkType)
Called from host namespace.
Definition NetworkSetup.cpp:716
bool removeBridgeDevice(const std::shared_ptr< Netfilter > &netfilter, const std::vector< std::string > &extIfaces)
Clear out the iptables rules set for the bridge device and brings the interface down.
Definition NetworkSetup.cpp:1002
void addResolvMount(const std::shared_ptr< DobbyRdkPluginUtils > &utils, const std::shared_ptr< rt_dobby_schema > &cfg)
Adds a mount to /etc/resolv.conf.
Definition NetworkSetup.cpp:1077
bool setupBridgeDevice(const std::shared_ptr< DobbyRdkPluginUtils > &utils, const std::shared_ptr< Netfilter > &netfilter, const std::vector< std::string > &extIfaces)
Called from host namespace.
Definition NetworkSetup.cpp:355
void addNetworkNamespace(const std::shared_ptr< rt_dobby_schema > &cfg)
Adds the 'network' namespace to the OCI config.
Definition NetworkSetup.cpp:1106
bool removeVethPair(const std::shared_ptr< Netfilter > &netfilter, const std::shared_ptr< NetworkingHelper > &helper, const std::string &vethName, const NetworkType networkType, const std::string &containerId)
Remove iptables entries for the container's veth and bring the veth pair down.
Definition NetworkSetup.cpp:916