aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api
diff options
context:
space:
mode:
Diffstat (limited to 'src/vpp-api')
-rw-r--r--src/vpp-api/vom/dhcp_config.cpp10
-rw-r--r--src/vpp-api/vom/dhcp_config.hpp12
-rw-r--r--src/vpp-api/vom/dhcp_config_cmds.cpp4
-rw-r--r--src/vpp-api/vom/dhcp_config_cmds.hpp8
4 files changed, 28 insertions, 6 deletions
diff --git a/src/vpp-api/vom/dhcp_config.cpp b/src/vpp-api/vom/dhcp_config.cpp
index 0b6e2eff0de..8071fb15c57 100644
--- a/src/vpp-api/vom/dhcp_config.cpp
+++ b/src/vpp-api/vom/dhcp_config.cpp
@@ -24,20 +24,25 @@ singular_db<interface::key_t, dhcp_config> dhcp_config::m_db;
dhcp_config::event_handler dhcp_config::m_evh;
-dhcp_config::dhcp_config(const interface& itf, const std::string& hostname)
+dhcp_config::dhcp_config(const interface& itf,
+ const std::string& hostname,
+ bool set_broadcast_flag)
: m_itf(itf.singular())
, m_hostname(hostname)
, m_client_id(l2_address_t::ZERO)
+ , m_set_broadcast_flag(set_broadcast_flag)
, m_binding(0)
{
}
dhcp_config::dhcp_config(const interface& itf,
const std::string& hostname,
- const l2_address_t& client_id)
+ const l2_address_t& client_id,
+ bool set_broadcast_flag)
: m_itf(itf.singular())
, m_hostname(hostname)
, m_client_id(client_id)
+ , m_set_broadcast_flag(set_broadcast_flag)
, m_binding(0)
{
}
@@ -46,6 +51,7 @@ dhcp_config::dhcp_config(const dhcp_config& o)
: m_itf(o.m_itf)
, m_hostname(o.m_hostname)
, m_client_id(o.m_client_id)
+ , m_set_broadcast_flag(o.m_set_broadcast_flag)
, m_binding(0)
{
}
diff --git a/src/vpp-api/vom/dhcp_config.hpp b/src/vpp-api/vom/dhcp_config.hpp
index db97af98c19..8ea608d809d 100644
--- a/src/vpp-api/vom/dhcp_config.hpp
+++ b/src/vpp-api/vom/dhcp_config.hpp
@@ -41,14 +41,17 @@ public:
/**
* Construct a new object matching the desried state
*/
- dhcp_config(const interface& itf, const std::string& hostname);
+ dhcp_config(const interface& itf,
+ const std::string& hostname,
+ bool set_broadcast_flag = true);
/**
* Construct a new object matching the desried state
*/
dhcp_config(const interface& itf,
const std::string& hostname,
- const l2_address_t& client_id);
+ const l2_address_t& client_id,
+ bool set_broadcast_flag = true);
/**
* Copy Constructor
@@ -203,6 +206,11 @@ private:
const l2_address_t m_client_id;
/**
+ * Flag to control the setting the of DHCP discover's broadcast flag
+ */
+ const bool m_set_broadcast_flag;
+
+ /**
* HW configuration for the binding. The bool representing the
* do/don't bind.
*/
diff --git a/src/vpp-api/vom/dhcp_config_cmds.cpp b/src/vpp-api/vom/dhcp_config_cmds.cpp
index ff24fe2f463..9e803be7b8d 100644
--- a/src/vpp-api/vom/dhcp_config_cmds.cpp
+++ b/src/vpp-api/vom/dhcp_config_cmds.cpp
@@ -23,11 +23,13 @@ namespace dhcp_config_cmds {
bind_cmd::bind_cmd(HW::item<bool>& item,
const handle_t& itf,
const std::string& hostname,
- const l2_address_t& client_id)
+ const l2_address_t& client_id,
+ bool set_broadcast_flag)
: rpc_cmd(item)
, m_itf(itf)
, m_hostname(hostname)
, m_client_id(client_id)
+ , m_set_broadcast_flag(set_broadcast_flag)
{
}
diff --git a/src/vpp-api/vom/dhcp_config_cmds.hpp b/src/vpp-api/vom/dhcp_config_cmds.hpp
index 863cf599b74..726ff992577 100644
--- a/src/vpp-api/vom/dhcp_config_cmds.hpp
+++ b/src/vpp-api/vom/dhcp_config_cmds.hpp
@@ -37,7 +37,8 @@ public:
bind_cmd(HW::item<bool>& item,
const handle_t& itf,
const std::string& hostname,
- const l2_address_t& client_id);
+ const l2_address_t& client_id,
+ bool set_braodcast_flag = false);
/**
* Issue the command to VPP/HW
@@ -68,6 +69,11 @@ private:
* The DHCP client's ID
*/
const l2_address_t m_client_id;
+
+ /**
+ * Flag to control the setting the of DHCP discover's broadcast flag
+ */
+ const bool m_set_broadcast_flag;
};
/**