diff options
author | Filip Varga <fivarga@cisco.com> | 2021-08-30 16:23:38 +0200 |
---|---|---|
committer | Ole Tr�an <otroan@employees.org> | 2021-10-05 07:36:14 +0000 |
commit | 4189108e1dbac0a7961d31d59a21b7fe8354ce61 (patch) | |
tree | 1751e65cad5252fec305acb44758218d67e4ca8a /src/plugins/nat/nat44-ed/nat44_ed.api | |
parent | 7318c420d1bddd51ea69b433113ac843af2aee3b (diff) |
nat: NAT44 ED api fix and improvement
Backward compatibility fix returns erroneous behavior that lets user
add internally unused inside interface for the purpose
of complying with the old add/dump/details API behavior.
Change introduced in https://gerrit.fd.io/r/c/vpp/+/32951 removed
extra inside interface that wasn't required or any how used by the
output feature. This patch also changed outside interface flags to
inside & outside. This fix returns the old behavior by imitating
the old behavior through dummy registratoin data.
Added new API calls nat44_ed_add_del_output_interface
and nat44_ed_output_interface_get/details as a
replacement of old API's. New API introduces
simplified and cleaner way of configuring outside
feature without requirement of config flags.
Type: improvement
Signed-off-by: Filip Varga <fivarga@cisco.com>
Change-Id: I7a170f7325727c04da5e2e3ffbe3f02179531284
Diffstat (limited to 'src/plugins/nat/nat44-ed/nat44_ed.api')
-rw-r--r-- | src/plugins/nat/nat44-ed/nat44_ed.api | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/plugins/nat/nat44-ed/nat44_ed.api b/src/plugins/nat/nat44-ed/nat44_ed.api index bff00b809e0..36637b26246 100644 --- a/src/plugins/nat/nat44-ed/nat44_ed.api +++ b/src/plugins/nat/nat44-ed/nat44_ed.api @@ -729,6 +729,7 @@ define nat44_interface_details { @param sw_if_index - software index of the interface */ autoreply define nat44_interface_add_del_output_feature { + option deprecated; u32 client_index; u32 context; bool is_add; @@ -741,6 +742,7 @@ autoreply define nat44_interface_add_del_output_feature { @param context - sender context, to match reply w/ request */ define nat44_interface_output_feature_dump { + option deprecated; u32 client_index; u32 context; }; @@ -752,11 +754,51 @@ define nat44_interface_output_feature_dump { @param sw_if_index - software index of the interface */ define nat44_interface_output_feature_details { + option deprecated; u32 context; vl_api_nat_config_flags_t flags; vl_api_interface_index_t sw_if_index; }; +/** \brief add/del NAT output interface (postrouting + in2out translation) + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param is_add - true if add, false if delete + @param sw_if_index - software index of the interface +*/ +autoendian autoreply define nat44_ed_add_del_output_interface { + u32 client_index; + u32 context; + bool is_add; + vl_api_interface_index_t sw_if_index; +}; + +service { + rpc nat44_ed_output_interface_get returns nat44_ed_output_interface_get_reply + stream nat44_ed_output_interface_details; +}; + +define nat44_ed_output_interface_get +{ + u32 client_index; + u32 context; + u32 cursor; +}; + +define nat44_ed_output_interface_get_reply +{ + u32 context; + i32 retval; + u32 cursor; +}; + +define nat44_ed_output_interface_details +{ + u32 context; + vl_api_interface_index_t sw_if_index; +}; + /** \brief Add/delete NAT44 static mapping @param client_index - opaque cookie to identify the sender @param context - sender context, to match reply w/ request |