Neale Ranns | cbe25aa | 2019-09-30 10:53:31 +0000 | [diff] [blame] | 1 | /* Hey Emacs use -*- mode: C -*- */ |
| 2 | /* |
| 3 | * Copyright (c) 2018 Cisco and/or its affiliates. |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at: |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | /** \file |
| 18 | |
| 19 | This file defines vpp IP control-plane API messages which are generally |
| 20 | called through a shared memory interface. |
| 21 | */ |
| 22 | |
| 23 | option version = "1.0.0"; |
| 24 | |
| 25 | import "vnet/ip/ip_types.api"; |
| 26 | import "vnet/interface_types.api"; |
| 27 | |
| 28 | /** \brief IPv6 router advertisement config request |
| 29 | @param client_index - opaque cookie to identify the sender |
| 30 | @param context - sender context, to match reply w/ request |
| 31 | @param suppress - |
| 32 | @param managed - |
| 33 | @param other - |
| 34 | @param ll_option - |
| 35 | @param send_unicast - |
| 36 | @param cease - |
| 37 | @param is_no - |
| 38 | @param default_router - |
| 39 | @param max_interval - |
| 40 | @param min_interval - |
| 41 | @param lifetime - |
| 42 | @param initial_count - |
| 43 | @param initial_interval - |
| 44 | */ |
| 45 | autoreply define sw_interface_ip6nd_ra_config |
| 46 | { |
| 47 | u32 client_index; |
| 48 | u32 context; |
| 49 | vl_api_interface_index_t sw_if_index; |
| 50 | u8 suppress; |
| 51 | u8 managed; |
| 52 | u8 other; |
| 53 | u8 ll_option; |
| 54 | u8 send_unicast; |
| 55 | u8 cease; |
| 56 | bool is_no; |
| 57 | u8 default_router; |
| 58 | u32 max_interval; |
| 59 | u32 min_interval; |
| 60 | u32 lifetime; |
| 61 | u32 initial_count; |
| 62 | u32 initial_interval; |
| 63 | }; |
| 64 | |
| 65 | /** \brief IPv6 router advertisement prefix config request |
| 66 | @param client_index - opaque cookie to identify the sender |
| 67 | @param context - sender context, to match reply w/ request |
| 68 | @param sw_if_index - The interface the RA prefix information is for |
| 69 | @param prefix - The prefix to advertise |
| 70 | @param use_default - Revert to default settings |
| 71 | @param no_advertise - Do not advertise this prefix |
| 72 | @param off_link - The prefix is off link (it is not configured on the interface) |
| 73 | Configures the L-flag, When set, indicates that this |
| 74 | prefix can be used for on-link determination. |
| 75 | @param no_autoconfig - Setting for the A-flag. When |
| 76 | set indicates that this prefix can be used for |
| 77 | stateless address configuration. |
| 78 | @param no_onlink - The prefix is not on link. Make sure this is consistent |
| 79 | with the off_link parameter else YMMV |
| 80 | @param is_no - add/delete |
| 81 | @param val_lifetime - The length of time in |
| 82 | seconds (relative to the time the packet is sent) |
| 83 | that the prefix is valid for the purpose of on-link |
| 84 | determination. A value of all one bits |
| 85 | (0xffffffff) represents infinity |
| 86 | @param pref_lifetime - The length of time in |
| 87 | seconds (relative to the time the packet is sent) |
| 88 | that addresses generated from the prefix via |
| 89 | stateless address autoconfiguration remain |
| 90 | preferred [ADDRCONF]. A value of all one bits |
| 91 | (0xffffffff) represents infinity. |
| 92 | */ |
| 93 | autoreply define sw_interface_ip6nd_ra_prefix |
| 94 | { |
| 95 | u32 client_index; |
| 96 | u32 context; |
| 97 | vl_api_interface_index_t sw_if_index; |
| 98 | vl_api_prefix_t prefix; |
| 99 | bool use_default; |
| 100 | bool no_advertise; |
| 101 | bool off_link; |
| 102 | bool no_autoconfig; |
| 103 | bool no_onlink; |
| 104 | bool is_no; |
| 105 | u32 val_lifetime; |
| 106 | u32 pref_lifetime; |
| 107 | }; |
| 108 | |
| 109 | /** \brief IPv6 ND proxy config |
| 110 | @param client_index - opaque cookie to identify the sender |
| 111 | @param context - sender context, to match reply w/ request |
| 112 | @param sw_if_index - The interface the host is on |
| 113 | @param ip - The address of the host for which to proxy for |
| 114 | @param is_add - Adding or deleting |
| 115 | */ |
| 116 | autoreply define ip6nd_proxy_add_del |
| 117 | { |
| 118 | u32 client_index; |
| 119 | u32 context; |
| 120 | vl_api_interface_index_t sw_if_index; |
| 121 | bool is_add; |
| 122 | vl_api_ip6_address_t ip; |
| 123 | }; |
| 124 | |
| 125 | /** \brief IPv6 ND proxy details returned after request |
| 126 | @param context - sender context, to match reply w/ request |
| 127 | @param sw_if_index - The interface the host is on |
| 128 | @param ip - The address of the host for which to proxy for |
| 129 | */ |
| 130 | define ip6nd_proxy_details |
| 131 | { |
| 132 | u32 context; |
| 133 | vl_api_interface_index_t sw_if_index; |
| 134 | vl_api_ip6_address_t ip; |
| 135 | }; |
| 136 | |
| 137 | /** \brief IPv6 ND proxy dump request |
| 138 | @param context - sender context, to match reply w/ request |
| 139 | */ |
| 140 | define ip6nd_proxy_dump |
| 141 | { |
| 142 | u32 client_index; |
| 143 | u32 context; |
| 144 | }; |
| 145 | |
| 146 | /** \brief Start / stop sending router solicitation |
| 147 | @param client_index - opaque cookie to identify the sender |
| 148 | @param context - sender context, to match reply w/ request |
| 149 | @param irt - initial retransmission time |
| 150 | @param mrt - maximum retransmission time |
| 151 | @param mrc - maximum retransmission count |
| 152 | @param mrd - maximum retransmission duration |
| 153 | @param sw_if_index - software interface index of interface |
| 154 | for sending router solicitation |
| 155 | @param stop - if non-zero then stop sending router solicitation, |
| 156 | otherwise start sending router solicitation |
| 157 | */ |
| 158 | autoreply define ip6nd_send_router_solicitation |
| 159 | { |
| 160 | u32 client_index; |
| 161 | u32 context; |
| 162 | u32 irt; |
| 163 | u32 mrt; |
| 164 | u32 mrc; |
| 165 | u32 mrd; |
| 166 | vl_api_interface_index_t sw_if_index; |
| 167 | bool stop; |
| 168 | }; |
| 169 | |
| 170 | service { |
| 171 | rpc want_ip6_ra_events returns want_ip6_ra_events_reply |
| 172 | events ip6_ra_event; |
| 173 | }; |
| 174 | |
| 175 | /** \brief Register for ip6 router advertisement events |
| 176 | @param client_index - opaque cookie to identify the sender |
| 177 | @param context - sender context, to match reply w/ request |
| 178 | @param enable - 1 => register for events, 0 => cancel registration |
| 179 | @param pid - sender's pid |
| 180 | */ |
| 181 | autoreply define want_ip6_ra_events |
| 182 | { |
| 183 | u32 client_index; |
| 184 | u32 context; |
| 185 | bool enable; |
| 186 | u32 pid; |
| 187 | }; |
| 188 | |
| 189 | /** \brief Struct representing RA prefix info |
| 190 | @param prefix - RA prefix info destination address |
| 191 | @param flags - RA prefix info flags |
| 192 | @param valid_time - RA prefix info valid time |
| 193 | @param preferred_time - RA prefix info preferred time |
| 194 | */ |
| 195 | typedef ip6_ra_prefix_info |
| 196 | { |
| 197 | vl_api_prefix_t prefix; |
| 198 | u8 flags; |
| 199 | u32 valid_time; |
| 200 | u32 preferred_time; |
| 201 | }; |
| 202 | |
| 203 | /** \brief Tell client about a router advertisement event |
| 204 | @param client_index - opaque cookie to identify the sender |
| 205 | @param pid - client pid registered to receive notification |
| 206 | @param current_hop_limit - RA current hop limit |
| 207 | @param flags - RA flags |
| 208 | @param router_lifetime_in_sec - RA lifetime in seconds |
| 209 | @param router_addr - The router's address |
| 210 | @param neighbor_reachable_time_in_msec - RA neighbor reachable time in msec |
| 211 | @param time_in_msec_between_retransmitted_neighbor_solicitations - |
| 212 | time in msec between retransmitted neighbor solicitations |
| 213 | @param n_prefixes - |
| 214 | @param prefixes - |
| 215 | */ |
| 216 | define ip6_ra_event |
| 217 | { |
| 218 | u32 client_index; |
| 219 | u32 pid; |
| 220 | vl_api_interface_index_t sw_if_index; |
| 221 | vl_api_ip6_address_t router_addr; |
| 222 | u8 current_hop_limit; |
| 223 | u8 flags; |
| 224 | u16 router_lifetime_in_sec; |
| 225 | u32 neighbor_reachable_time_in_msec; |
| 226 | u32 time_in_msec_between_retransmitted_neighbor_solicitations; |
| 227 | u32 n_prefixes; |
| 228 | vl_api_ip6_ra_prefix_info_t prefixes[n_prefixes]; |
| 229 | }; |
| 230 | |
| 231 | |
| 232 | /* |
| 233 | * Local Variables: |
| 234 | * eval: (c-set-style "gnu") |
| 235 | * End: |
| 236 | */ |