Pavel Kotucek | c4d1cf7 | 2016-12-20 10:01:20 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2015-2016 Cisco and/or its affiliates. |
| 3 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | * you may not use this file except in compliance with the License. |
| 5 | * You may obtain a copy of the License at: |
| 6 | * |
| 7 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | * |
| 9 | * Unless required by applicable law or agreed to in writing, software |
| 10 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | * See the License for the specific language governing permissions and |
| 13 | * limitations under the License. |
| 14 | */ |
| 15 | |
Jakub Grajciar | 3ae5262 | 2019-10-28 10:22:01 +0100 | [diff] [blame] | 16 | option version = "2.0.0"; |
| 17 | |
| 18 | import "vnet/interface_types.api"; |
| 19 | import "vnet/ethernet/ethernet_types.api"; |
| 20 | import "vnet/ip/ip_types.api"; |
Dave Barach | 0d056e5 | 2017-09-28 15:11:16 -0400 | [diff] [blame] | 21 | |
Pavel Kotucek | c4d1cf7 | 2016-12-20 10:01:20 +0100 | [diff] [blame] | 22 | /** \brief l2tpv3 tunnel interface create request |
| 23 | @param client_index - opaque cookie to identify the sender |
| 24 | @param context - sender context, to match reply w/ request |
| 25 | @param client_address - remote client tunnel ip address |
| 26 | @param client_address - local tunnel ip address |
| 27 | @param is_ipv6 - ipv6 if non-zero, else ipv4 |
| 28 | @param local_session_id - local tunnel session id |
| 29 | @param remote_session_id - remote tunnel session id |
| 30 | @param local_cookie - local tunnel cookie |
| 31 | @param l2_sublayer_present - l2 sublayer is present in packets if non-zero |
| 32 | @param encap_vrf_id - fib identifier used for outgoing encapsulated packets |
| 33 | */ |
| 34 | define l2tpv3_create_tunnel |
| 35 | { |
| 36 | u32 client_index; |
| 37 | u32 context; |
Jakub Grajciar | 3ae5262 | 2019-10-28 10:22:01 +0100 | [diff] [blame] | 38 | vl_api_address_t client_address; |
| 39 | vl_api_address_t our_address; |
Pavel Kotucek | c4d1cf7 | 2016-12-20 10:01:20 +0100 | [diff] [blame] | 40 | u32 local_session_id; |
| 41 | u32 remote_session_id; |
| 42 | u64 local_cookie; |
| 43 | u64 remote_cookie; |
Jakub Grajciar | 3ae5262 | 2019-10-28 10:22:01 +0100 | [diff] [blame] | 44 | bool l2_sublayer_present; |
Pavel Kotucek | c4d1cf7 | 2016-12-20 10:01:20 +0100 | [diff] [blame] | 45 | u32 encap_vrf_id; |
| 46 | }; |
| 47 | |
| 48 | /** \brief l2tpv3 tunnel interface create response |
| 49 | @param context - sender context, to match reply w/ request |
| 50 | @param retval - return code for the request |
| 51 | @param sw_if_index - index of the new tunnel interface |
| 52 | */ |
| 53 | define l2tpv3_create_tunnel_reply |
| 54 | { |
| 55 | u32 context; |
| 56 | i32 retval; |
Jakub Grajciar | 3ae5262 | 2019-10-28 10:22:01 +0100 | [diff] [blame] | 57 | vl_api_interface_index_t sw_if_index; |
Pavel Kotucek | c4d1cf7 | 2016-12-20 10:01:20 +0100 | [diff] [blame] | 58 | }; |
| 59 | |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 60 | autoreply define l2tpv3_set_tunnel_cookies |
Pavel Kotucek | c4d1cf7 | 2016-12-20 10:01:20 +0100 | [diff] [blame] | 61 | { |
| 62 | u32 client_index; |
| 63 | u32 context; |
Jakub Grajciar | 3ae5262 | 2019-10-28 10:22:01 +0100 | [diff] [blame] | 64 | vl_api_interface_index_t sw_if_index; |
Pavel Kotucek | c4d1cf7 | 2016-12-20 10:01:20 +0100 | [diff] [blame] | 65 | u64 new_local_cookie; |
| 66 | u64 new_remote_cookie; |
| 67 | }; |
| 68 | |
Pavel Kotucek | c4d1cf7 | 2016-12-20 10:01:20 +0100 | [diff] [blame] | 69 | define sw_if_l2tpv3_tunnel_details |
| 70 | { |
| 71 | u32 context; |
Jakub Grajciar | 3ae5262 | 2019-10-28 10:22:01 +0100 | [diff] [blame] | 72 | vl_api_interface_index_t sw_if_index; |
| 73 | string interface_name[64]; |
| 74 | vl_api_address_t client_address; |
| 75 | vl_api_address_t our_address; |
Pavel Kotucek | c4d1cf7 | 2016-12-20 10:01:20 +0100 | [diff] [blame] | 76 | u32 local_session_id; |
| 77 | u32 remote_session_id; |
| 78 | u64 local_cookie[2]; |
| 79 | u64 remote_cookie; |
Jakub Grajciar | 3ae5262 | 2019-10-28 10:22:01 +0100 | [diff] [blame] | 80 | bool l2_sublayer_present; |
Pavel Kotucek | c4d1cf7 | 2016-12-20 10:01:20 +0100 | [diff] [blame] | 81 | }; |
| 82 | |
| 83 | define sw_if_l2tpv3_tunnel_dump |
| 84 | { |
| 85 | u32 client_index; |
| 86 | u32 context; |
| 87 | }; |
| 88 | |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 89 | autoreply define l2tpv3_interface_enable_disable |
Pavel Kotucek | c4d1cf7 | 2016-12-20 10:01:20 +0100 | [diff] [blame] | 90 | { |
| 91 | u32 client_index; |
| 92 | u32 context; |
Jakub Grajciar | 3ae5262 | 2019-10-28 10:22:01 +0100 | [diff] [blame] | 93 | bool enable_disable; |
| 94 | vl_api_interface_index_t sw_if_index; |
| 95 | }; |
| 96 | |
| 97 | enum l2t_lookup_key : u8 |
| 98 | { |
| 99 | L2T_LOOKUP_KEY_API_SRC_ADDR = 0, |
| 100 | L2T_LOOKUP_KEY_API_DST_ADDR = 1, |
| 101 | L2T_LOOKUP_KEY_API_SESSION_ID = 2, |
Pavel Kotucek | c4d1cf7 | 2016-12-20 10:01:20 +0100 | [diff] [blame] | 102 | }; |
| 103 | |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 104 | autoreply define l2tpv3_set_lookup_key |
Pavel Kotucek | c4d1cf7 | 2016-12-20 10:01:20 +0100 | [diff] [blame] | 105 | { |
| 106 | u32 client_index; |
| 107 | u32 context; |
Jakub Grajciar | 3ae5262 | 2019-10-28 10:22:01 +0100 | [diff] [blame] | 108 | vl_api_l2t_lookup_key_t key; |
Pavel Kotucek | c4d1cf7 | 2016-12-20 10:01:20 +0100 | [diff] [blame] | 109 | }; |
| 110 | |
Pavel Kotucek | c4d1cf7 | 2016-12-20 10:01:20 +0100 | [diff] [blame] | 111 | /* |
| 112 | * Local Variables: |
| 113 | * eval: (c-set-style "gnu") |
| 114 | * End: |
| 115 | */ |