#define __VOM_GBP_ENDPOINT_H__
#include <ostream>
+#include <vector>
#include "vom/gbp_endpoint_group.hpp"
#include "vom/interface.hpp"
class gbp_endpoint : public object_base
{
public:
+ /**
+ * Endpoint flags
+ */
+ struct flags_t : enum_base<flags_t>
+ {
+ const static flags_t NONE;
+ const static flags_t BOUNCE;
+ const static flags_t REMOTE;
+ const static flags_t LEARNT;
+ const static flags_t EXTERNAL;
+
+ private:
+ /**
+ * Private constructor taking the value and the string name
+ */
+ flags_t(int v, const std::string& s);
+ };
+
/**
* The key for a GBP endpoint; interface and IP
*/
- typedef std::pair<interface::key_t, boost::asio::ip::address> key_t;
+ typedef std::pair<interface::key_t, mac_address_t> key_t;
/**
* Construct a GBP endpoint
*/
gbp_endpoint(const interface& itf,
- const boost::asio::ip::address& ip_addr,
+ const std::vector<boost::asio::ip::address>& ip_addr,
const mac_address_t& mac,
- const gbp_endpoint_group& epg);
+ const gbp_endpoint_group& epg,
+ const flags_t& flags = flags_t::NONE);
/**
* Copy Construct
/**
* HW configuration for the result of creating the endpoint
*/
- HW::item<bool> m_hw;
+ HW::item<handle_t> m_hdl;
/**
* The interface the endpoint is attached to.
/**
* The IP address of the endpoint
*/
- boost::asio::ip::address m_ip;
+ std::vector<boost::asio::ip::address> m_ips;
/**
* The MAC address of the endpoint
*/
std::shared_ptr<gbp_endpoint_group> m_epg;
+ /**
+ * Endpoint flags
+ */
+ flags_t m_flags;
+
/**
* A map of all bridge_domains
*/