Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
dhcp ip: DSCP settings for transmitted DHCP packets
[vpp.git]
/
extras
/
vom
/
vom
/
dhcp_client_cmds.cpp
diff --git
a/extras/vom/vom/dhcp_client_cmds.cpp
b/extras/vom/vom/dhcp_client_cmds.cpp
index
9b632fe
..
c1d4d49
100644
(file)
--- a/
extras/vom/vom/dhcp_client_cmds.cpp
+++ b/
extras/vom/vom/dhcp_client_cmds.cpp
@@
-14,6
+14,7
@@
*/
#include "vom/dhcp_client_cmds.hpp"
*/
#include "vom/dhcp_client_cmds.hpp"
+#include "vom/route_api_types.hpp"
DEFINE_VAPI_MSG_IDS_DHCP_API_JSON;
DEFINE_VAPI_MSG_IDS_DHCP_API_JSON;
@@
-24,12
+25,14
@@
bind_cmd::bind_cmd(HW::item<bool>& item,
const handle_t& itf,
const std::string& hostname,
const l2_address_t& client_id,
const handle_t& itf,
const std::string& hostname,
const l2_address_t& client_id,
- bool set_broadcast_flag)
+ bool set_broadcast_flag,
+ const ip_dscp_t& dscp)
: rpc_cmd(item)
, m_itf(itf)
, m_hostname(hostname)
, m_client_id(client_id)
, m_set_broadcast_flag(set_broadcast_flag)
: rpc_cmd(item)
, m_itf(itf)
, m_hostname(hostname)
, m_client_id(client_id)
, m_set_broadcast_flag(set_broadcast_flag)
+ , m_dscp(dscp)
{
}
{
}
@@
-50,6
+53,7
@@
bind_cmd::issue(connection& con)
payload.client.pid = getpid();
payload.client.want_dhcp_event = 1;
payload.client.set_broadcast_flag = m_set_broadcast_flag;
payload.client.pid = getpid();
payload.client.want_dhcp_event = 1;
payload.client.set_broadcast_flag = m_set_broadcast_flag;
+ payload.client.dscp = to_api(m_dscp);
memset(payload.client.hostname, 0, sizeof(payload.client.hostname));
memcpy(payload.client.hostname, m_hostname.c_str(),
memset(payload.client.hostname, 0, sizeof(payload.client.hostname));
memcpy(payload.client.hostname, m_hostname.c_str(),
@@
-71,7
+75,9
@@
bind_cmd::to_string() const
{
std::ostringstream s;
s << "Dhcp-client-bind: " << m_hw_item.to_string()
{
std::ostringstream s;
s << "Dhcp-client-bind: " << m_hw_item.to_string()
- << " itf:" << m_itf.to_string() << " hostname:" << m_hostname;
+ << " itf:" << m_itf.to_string() << " hostname:" << m_hostname
+ << " client_id:[" << m_client_id << "] "
+ << "dscp:" << m_dscp.to_string();
return (s.str());
}
return (s.str());
}