diff options
author | Neale Ranns <neale.ranns@cisco.com> | 2017-11-03 04:39:05 -0700 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2017-11-06 17:44:21 +0000 |
commit | 9ef1c0adbf9399c55deeede3cf629dd4e8c20304 (patch) | |
tree | 0eeed8f869eee35a48797b6b837c16222a627e46 /src/vpp-api/vom/acl_l2_rule.cpp | |
parent | addb55b9e0533c5f720b1cc1bdeeb4bbd0e6bf2a (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_l2_rule.cpp')
-rw-r--r-- | src/vpp-api/vom/acl_l2_rule.cpp | 39 |
1 files changed, 30 insertions, 9 deletions
diff --git a/src/vpp-api/vom/acl_l2_rule.cpp b/src/vpp-api/vom/acl_l2_rule.cpp index 1f7f9fdabc8..1fb06e29b81 100644 --- a/src/vpp-api/vom/acl_l2_rule.cpp +++ b/src/vpp-api/vom/acl_l2_rule.cpp @@ -39,15 +39,6 @@ l2_rule::operator<(const l2_rule& other) const return (other.m_priority < m_priority); } -void -l2_rule::to_vpp(vapi_type_macip_acl_rule& rule) const -{ - rule.is_permit = m_action.value(); - m_src_ip.to_vpp(&rule.is_ipv6, rule.src_ip_addr, &rule.src_ip_prefix_len); - m_mac.to_bytes(rule.src_mac, 6); - m_mac_mask.to_bytes(rule.src_mac_mask, 6); -} - bool l2_rule::operator==(const l2_rule& rule) const { @@ -67,6 +58,36 @@ l2_rule::to_string() const return (s.str()); } + +uint32_t +l2_rule::priority() const +{ + return m_priority; +} + +action_t +l2_rule::action() const +{ + return m_action; +} + +const route::prefix_t& +l2_rule::src_ip() const +{ + return m_src_ip; +} + +const mac_address_t& +l2_rule::mac() const +{ + return m_mac; +} + +const mac_address_t& +l2_rule::mac_mask() const +{ + return m_mac_mask; +} } } /* |