aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2017-12-13 17:59:33 +0100
committerNeale Ranns <nranns@cisco.com>2017-12-14 15:03:18 +0000
commit091871c6a3cbeded00d95c23d3665c65142edc6e (patch)
treed4f60631ef1cf189a848778c163b9b03175dcf98
parent810bea18065c2477ed561ed7d835aaf4221c5749 (diff)
vom: acl: Extend constructor for l3 rule
New constructor can construct the l3 rule using all or partial paratmeters. Change-Id: I828ec1c4713decb5824e4a73c3692cebc2324cc2 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
-rw-r--r--src/vpp-api/vom/acl_l3_rule.cpp23
-rw-r--r--src/vpp-api/vom/acl_l3_rule.hpp9
2 files changed, 23 insertions, 9 deletions
diff --git a/src/vpp-api/vom/acl_l3_rule.cpp b/src/vpp-api/vom/acl_l3_rule.cpp
index 6a9383aba0b..4b96cae6c50 100644
--- a/src/vpp-api/vom/acl_l3_rule.cpp
+++ b/src/vpp-api/vom/acl_l3_rule.cpp
@@ -22,18 +22,25 @@ namespace ACL {
l3_rule::l3_rule(uint32_t priority,
const action_t& action,
const route::prefix_t& src,
- const route::prefix_t& dst)
+ const route::prefix_t& dst,
+ uint8_t proto,
+ uint16_t srcport_or_icmptype_first,
+ uint16_t srcport_or_icmptype_last,
+ uint16_t dstport_or_icmpcode_first,
+ uint16_t dstport_or_icmpcode_last,
+ uint8_t tcp_flags_mask,
+ uint8_t tcp_flags_value)
: m_priority(priority)
, m_action(action)
, m_src(src)
, m_dst(dst)
- , m_proto(0)
- , m_srcport_or_icmptype_first(0)
- , m_srcport_or_icmptype_last(0)
- , m_dstport_or_icmpcode_first(0)
- , m_dstport_or_icmpcode_last(0)
- , m_tcp_flags_mask(0)
- , m_tcp_flags_value(0)
+ , m_proto(proto)
+ , m_srcport_or_icmptype_first(srcport_or_icmptype_first)
+ , m_srcport_or_icmptype_last(srcport_or_icmptype_last)
+ , m_dstport_or_icmpcode_first(dstport_or_icmpcode_first)
+ , m_dstport_or_icmpcode_last(dstport_or_icmpcode_last)
+ , m_tcp_flags_mask(tcp_flags_mask)
+ , m_tcp_flags_value(tcp_flags_value)
{
}
diff --git a/src/vpp-api/vom/acl_l3_rule.hpp b/src/vpp-api/vom/acl_l3_rule.hpp
index 16a8718a99e..25a2a471d24 100644
--- a/src/vpp-api/vom/acl_l3_rule.hpp
+++ b/src/vpp-api/vom/acl_l3_rule.hpp
@@ -37,7 +37,14 @@ public:
l3_rule(uint32_t priority,
const action_t& action,
const route::prefix_t& src,
- const route::prefix_t& dst);
+ const route::prefix_t& dst,
+ uint8_t proto = 0,
+ uint16_t srcport_or_icmptype_first = 0,
+ uint16_t srcport_or_icmptype_last = 0,
+ uint16_t dstport_or_icmpcode_first = 0,
+ uint16_t dstport_or_icmpcode_last = 0,
+ uint8_t tcp_flags_mask = 0,
+ uint8_t tcp_flags_value = 0);
/**
* Copy Constructor