summaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vom/acl_l3_rule.cpp
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2017-11-03 04:39:05 -0700
committerNeale Ranns <nranns@cisco.com>2017-11-06 17:44:21 +0000
commit9ef1c0adbf9399c55deeede3cf629dd4e8c20304 (patch)
tree0eeed8f869eee35a48797b6b837c16222a627e46 /src/vpp-api/vom/acl_l3_rule.cpp
parentaddb55b9e0533c5f720b1cc1bdeeb4bbd0e6bf2a (diff)
VOM reshuffle
split the VOM into two halves; a top/front-end and a bottom/backend. Only the backend includes the auto-generated VAPI. This serves two purposes: 1 - improves ompile times for VOM, since the VAPI is included only in the backend. 2 - does not expose VAPI to users of VOM Change-Id: I17b93aeaef10c0eba8612016d9034aca5628d9f7 Signed-off-by: Neale Ranns <neale.ranns@cisco.com> Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vpp-api/vom/acl_l3_rule.cpp')
-rw-r--r--src/vpp-api/vom/acl_l3_rule.cpp84
1 files changed, 67 insertions, 17 deletions
diff --git a/src/vpp-api/vom/acl_l3_rule.cpp b/src/vpp-api/vom/acl_l3_rule.cpp
index e4b40920dca..2b850af3660 100644
--- a/src/vpp-api/vom/acl_l3_rule.cpp
+++ b/src/vpp-api/vom/acl_l3_rule.cpp
@@ -43,23 +43,6 @@ l3_rule::operator<(const l3_rule& other) const
return (other.m_priority < m_priority);
}
-void
-l3_rule::to_vpp(vapi_type_acl_rule& rule) const
-{
- rule.is_permit = m_action.value();
- m_src.to_vpp(&rule.is_ipv6, rule.src_ip_addr, &rule.src_ip_prefix_len);
- m_dst.to_vpp(&rule.is_ipv6, rule.dst_ip_addr, &rule.dst_ip_prefix_len);
-
- rule.proto = m_proto;
- rule.srcport_or_icmptype_first = m_srcport_or_icmptype_first;
- rule.srcport_or_icmptype_last = m_srcport_or_icmptype_last;
- rule.dstport_or_icmpcode_first = m_dstport_or_icmpcode_first;
- rule.dstport_or_icmpcode_last = m_dstport_or_icmpcode_last;
-
- rule.tcp_flags_mask = m_tcp_flags_mask;
- rule.tcp_flags_value = m_tcp_flags_value;
-}
-
bool
l3_rule::operator==(const l3_rule& rule) const
{
@@ -144,9 +127,76 @@ l3_rule::set_tcp_flags_value(uint8_t tcp_flags_value)
{
m_tcp_flags_value = tcp_flags_value;
}
+
+const route::prefix_t&
+l3_rule::src() const
+{
+ return m_src;
+}
+
+uint32_t
+l3_rule::priority() const
+{
+ return m_priority;
+}
+
+action_t
+l3_rule::action() const
+{
+ return m_action;
+}
+
+const route::prefix_t&
+l3_rule::dst() const
+{
+ return m_dst;
+}
+
+uint8_t
+l3_rule::proto() const
+{
+ return m_proto;
+}
+
+uint16_t
+l3_rule::srcport_or_icmptype_first() const
+{
+ return m_srcport_or_icmptype_first;
+}
+
+uint16_t
+l3_rule::srcport_or_icmptype_last() const
+{
+ return m_srcport_or_icmptype_last;
}
+
+uint16_t
+l3_rule::dstport_or_icmpcode_first() const
+{
+ return m_dstport_or_icmpcode_first;
}
+uint16_t
+l3_rule::dstport_or_icmpcode_last() const
+{
+ return m_dstport_or_icmpcode_last;
+}
+
+uint8_t
+l3_rule::tcp_flags_mask() const
+{
+ return m_tcp_flags_mask;
+}
+
+uint8_t
+l3_rule::tcp_flags_value() const
+{
+ return m_tcp_flags_value;
+}
+
+}; // namespace ACL
+}; // namespace VOM
+
/*
* fd.io coding-style-patch-verification: ON
*