Dobby 3.0
Dobby “Docker based Thingy” is a tool for managing and running OCI containers using crun
Loading...
Searching...
No Matches
InterContainerRouting.h
1/*
2 * If not stated otherwise in this file or this component's LICENSE file the
3 * following copyright and licenses apply:
4 *
5 * Copyright 2025 Sky UK
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19#ifndef INTERCONTAINERROUTING_H
20#define INTERCONTAINERROUTING_H
21
22#include "Netfilter.h"
23#include "NetworkingHelper.h"
24#include "DobbyRdkPluginUtils.h"
25#include <rt_defs_plugins.h>
26
27#include <memory>
28
29
30// -----------------------------------------------------------------------------
46{
47 bool addRules(const std::shared_ptr<Netfilter> &netfilter,
48 const std::shared_ptr<NetworkingHelper> &helper,
49 const std::shared_ptr<DobbyRdkPluginUtils> &utils,
50 rt_defs_plugins_networking_data_inter_container_element * const *portConfigs,
51 size_t numPortConfigs);
52
53 bool removeRules(const std::shared_ptr<Netfilter> &netfilter,
54 const std::shared_ptr<NetworkingHelper> &helper,
55 const std::shared_ptr<DobbyRdkPluginUtils> &utils,
56 rt_defs_plugins_networking_data_inter_container_element * const *portConfigs,
57 size_t numPortConfigs);
58};
59
60
61#endif // !defined(INTERCONTAINERROUTING_H)
Used to add iptables firewall rules to allow a container to either expose a port to another container...
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.
Definition InterContainerRouting.cpp:543
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 an...
Definition InterContainerRouting.cpp:444