summaryrefslogtreecommitdiffstats
path: root/mmss/network.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'mmss/network.hpp')
-rw-r--r--mmss/network.hpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/mmss/network.hpp b/mmss/network.hpp
index 0beb6ae..323879c 100644
--- a/mmss/network.hpp
+++ b/mmss/network.hpp
@@ -28,8 +28,8 @@
#include "types.hpp"
-#include <list>
#include <memory>
+#include <unordered_set>
namespace MMSS {
@@ -37,16 +37,19 @@ namespace MMSS {
class network_t : public nocopy_t {
private:
std::string name;
-
size_t mtu;
+ std::unordered_set<std::shared_ptr<iface_t>> interfaces;
+
void enqueue(const void *data, size_t len, const iface_t *src_iface, const std::shared_ptr<iface_t> &dest_iface);
public:
- std::list<std::shared_ptr<iface_t>> interfaces;
-
network_t(const std::string &name0) : name(name0), mtu(1500) {}
+ void add_iface(const std::shared_ptr<iface_t> &iface) {
+ interfaces.insert(iface);
+ }
+
const std::string& get_name() const {
return name;
}
@@ -57,7 +60,6 @@ public:
void send(const void *data, size_t len, const iface_t *src_iface, const gmrf_addr_t *dest);
void send_bc(const void *data, size_t len, const iface_t *src_iface);
-
};
}