Ole Troan | 298c695 | 2018-03-08 12:30:43 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 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 | |
| 16 | option version = "1.0.0"; |
| 17 | |
| 18 | /** \brief Create or delete an IPIP tunnel |
| 19 | @param client_index - opaque cookie to identify the sender |
| 20 | @param context - sender context, to match reply w/ request |
| 21 | @param is_ipv6 - Use 0 for IPv4, 1 for IPv6 |
| 22 | @param instance - optional unique custom device instance, else ~0. |
| 23 | @param src_address - Source IP address |
| 24 | @param dst_address - Destination IP address, can be multicast |
| 25 | @param fib_index - Encap FIB table ID |
| 26 | */ |
| 27 | define ipip_add_tunnel |
| 28 | { |
| 29 | u32 client_index; |
| 30 | u32 context; |
| 31 | u8 is_ipv6; |
| 32 | u32 instance; /* If non-~0, specifies a custom dev instance */ |
| 33 | u8 src_address[16]; |
| 34 | u8 dst_address[16]; |
| 35 | u32 fib_index; |
| 36 | }; |
| 37 | |
| 38 | define ipip_add_tunnel_reply |
| 39 | { |
| 40 | u32 context; |
| 41 | i32 retval; |
| 42 | u32 sw_if_index; |
| 43 | }; |
| 44 | |
| 45 | autoreply define ipip_del_tunnel |
| 46 | { |
| 47 | u32 client_index; |
| 48 | u32 context; |
| 49 | u32 sw_if_index; |
| 50 | }; |
| 51 | |
| 52 | define ipip_6rd_add_tunnel |
| 53 | { |
| 54 | u32 client_index; |
| 55 | u32 context; |
| 56 | u32 fib_index; |
| 57 | u8 ip6_prefix[16]; |
| 58 | u8 ip4_prefix[4]; |
| 59 | u8 ip4_src[4]; |
| 60 | u8 ip6_prefix_len; |
| 61 | u8 ip4_prefix_len; |
| 62 | u8 security_check; |
| 63 | }; |
| 64 | |
| 65 | define ipip_6rd_add_tunnel_reply |
| 66 | { |
| 67 | u32 context; |
| 68 | i32 retval; |
| 69 | u32 sw_if_index; |
| 70 | }; |
| 71 | |
| 72 | autoreply define ipip_6rd_del_tunnel |
| 73 | { |
| 74 | u32 client_index; |
| 75 | u32 context; |
| 76 | u32 sw_if_index; |
| 77 | }; |
| 78 | |
| 79 | define ipip_tunnel_dump |
| 80 | { |
| 81 | u32 client_index; |
| 82 | u32 context; |
| 83 | u32 sw_if_index; |
| 84 | }; |
| 85 | |
| 86 | define ipip_tunnel_details |
| 87 | { |
| 88 | u32 context; |
| 89 | u32 sw_if_index; |
| 90 | u32 instance; |
| 91 | u8 is_ipv6; |
| 92 | u8 src_address[16]; |
| 93 | u8 dst_address[16]; |
| 94 | u32 fib_index; |
| 95 | }; |
| 96 | |
| 97 | /* |
| 98 | * Local Variables: |
| 99 | * eval: (c-set-style "gnu") |
| 100 | * End: |
| 101 | */ |