Neale Ranns | cbe25aa | 2019-09-30 10:53:31 +0000 | [diff] [blame] | 1 | /* Hey Emacs use -*- mode: C -*- */ |
| 2 | /* |
| 3 | * Copyright (c) 2019 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 | This file defines the vpp control-plane API messages |
| 19 | used to control the ABF plugin |
| 20 | */ |
| 21 | |
| 22 | option version = "1.0.0"; |
| 23 | |
| 24 | import "vnet/ip/ip_types.api"; |
| 25 | import "vnet/ethernet/ethernet_types.api"; |
| 26 | import "vnet/interface_types.api"; |
| 27 | |
| 28 | /** \brief Proxy ARP configuration type |
| 29 | @param table_id - VRF / Fib table ID |
| 30 | @param low - Low address of the Proxy ARP range |
| 31 | @param hi - High address of the Proxy ARP range |
| 32 | */ |
| 33 | typedef proxy_arp |
| 34 | { |
| 35 | u32 table_id; |
| 36 | vl_api_ip4_address_t low; |
| 37 | vl_api_ip4_address_t hi; |
| 38 | }; |
| 39 | |
| 40 | /** \brief Proxy ARP add / del request |
| 41 | @param client_index - opaque cookie to identify the sender |
| 42 | @param context - sender context, to match reply w/ request |
| 43 | @param is_add - 1 if adding the Proxy ARP range, 0 if deleting |
| 44 | @param proxy - Proxy configuration |
| 45 | */ |
| 46 | autoreply define proxy_arp_add_del |
| 47 | { |
| 48 | u32 client_index; |
| 49 | u32 context; |
| 50 | bool is_add; |
| 51 | vl_api_proxy_arp_t proxy; |
| 52 | }; |
| 53 | |
| 54 | /** \brief Proxy ARP dump request |
| 55 | */ |
| 56 | define proxy_arp_dump |
| 57 | { |
| 58 | u32 client_index; |
| 59 | u32 context; |
| 60 | }; |
| 61 | |
| 62 | /** \brief Proxy ARP dump details reply |
| 63 | * @param proxy - Same data as used to configure |
| 64 | */ |
| 65 | define proxy_arp_details |
| 66 | { |
| 67 | u32 context; |
| 68 | vl_api_proxy_arp_t proxy; |
| 69 | }; |
| 70 | |
| 71 | /** \brief Proxy ARP add / del interface request |
| 72 | @param client_index - opaque cookie to identify the sender |
| 73 | @param context - sender context, to match reply w/ request |
| 74 | @param sw_if_index - Which interface to enable / disable Proxy Arp on |
| 75 | @param enable - 1 to enable Proxy ARP on interface, 0 to disable |
| 76 | */ |
| 77 | autoreply define proxy_arp_intfc_enable_disable |
| 78 | { |
| 79 | u32 client_index; |
| 80 | u32 context; |
| 81 | vl_api_interface_index_t sw_if_index; |
| 82 | bool enable; |
| 83 | }; |
| 84 | |
| 85 | /** \brief Proxy ARP interface dump request |
| 86 | */ |
| 87 | define proxy_arp_intfc_dump |
| 88 | { |
| 89 | u32 client_index; |
| 90 | u32 context; |
| 91 | }; |
| 92 | |
| 93 | /** \brief Proxy ARP interface dump details reply |
| 94 | * @param sw_if_index The interface on which ARP proxy is enabled. |
| 95 | */ |
| 96 | define proxy_arp_intfc_details |
| 97 | { |
| 98 | u32 context; |
| 99 | u32 sw_if_index; |
| 100 | }; |
Neale Ranns | 13a74ae | 2022-08-09 00:59:37 +0000 | [diff] [blame^] | 101 | |
| 102 | counters arp { |
| 103 | replies_sent { |
| 104 | severity info; |
| 105 | type counter64; |
| 106 | units "packets"; |
| 107 | description "ARP replies sent"; |
| 108 | }; |
| 109 | disabled { |
| 110 | severity error; |
| 111 | type counter64; |
| 112 | units "packets"; |
| 113 | description "ARP Disabled"; |
| 114 | }; |
| 115 | l2_type_not_ethernet { |
| 116 | severity error; |
| 117 | type counter64; |
| 118 | units "packets"; |
| 119 | description "L2 type not ethernet"; |
| 120 | }; |
| 121 | l3_type_not_ip4 { |
| 122 | severity error; |
| 123 | type counter64; |
| 124 | units "packets"; |
| 125 | description "L3 type not IP4"; |
| 126 | }; |
| 127 | l3_src_address_not_local { |
| 128 | severity error; |
| 129 | type counter64; |
| 130 | units "packets"; |
| 131 | description "IP4 source address not local to subnet"; |
| 132 | }; |
| 133 | l3_dst_address_not_local { |
| 134 | severity error; |
| 135 | type counter64; |
| 136 | units "packets"; |
| 137 | description "IP4 destination address not local to subnet"; |
| 138 | }; |
| 139 | l3_dst_address_unset { |
| 140 | severity error; |
| 141 | type counter64; |
| 142 | units "packets"; |
| 143 | description "IP4 destination address is unset"; |
| 144 | }; |
| 145 | l3_src_address_is_local { |
| 146 | severity error; |
| 147 | type counter64; |
| 148 | units "packets"; |
| 149 | description "IP4 source address matches local interface"; |
| 150 | }; |
| 151 | l3_src_address_learned { |
| 152 | severity info; |
| 153 | type counter64; |
| 154 | units "packets"; |
| 155 | description "ARP request IP4 source address learned"; |
| 156 | }; |
| 157 | replies_received { |
| 158 | severity info; |
| 159 | type counter64; |
| 160 | units "packets"; |
| 161 | description "ARP replies received"; |
| 162 | }; |
| 163 | opcode_not_request { |
| 164 | severity error; |
| 165 | type counter64; |
| 166 | units "packets"; |
| 167 | description "ARP opcode not request"; |
| 168 | }; |
| 169 | proxy_arp_replies_sent { |
| 170 | severity info; |
| 171 | type counter64; |
| 172 | units "packets"; |
| 173 | description "Proxy ARP replies sent"; |
| 174 | }; |
| 175 | l2_address_mismatch { |
| 176 | severity error; |
| 177 | type counter64; |
| 178 | units "packets"; |
| 179 | description "ARP hw addr does not match L2 frame src addr"; |
| 180 | }; |
| 181 | gratuitous_arp { |
| 182 | severity error; |
| 183 | type counter64; |
| 184 | units "packets"; |
| 185 | description "ARP probe or announcement dropped"; |
| 186 | }; |
| 187 | interface_no_table { |
| 188 | severity error; |
| 189 | type counter64; |
| 190 | units "packets"; |
| 191 | description "Interface is not mapped to an IP table"; |
| 192 | }; |
| 193 | interface_not_ip_enabled { |
| 194 | severity error; |
| 195 | type counter64; |
| 196 | units "packets"; |
| 197 | description "Interface is not IP enabled"; |
| 198 | }; |
| 199 | unnumbered_mismatch { |
| 200 | severity error; |
| 201 | type counter64; |
| 202 | units "packets"; |
| 203 | description "RX interface is unnumbered to different subnet"; |
| 204 | }; |
| 205 | }; |
| 206 | |
| 207 | paths { |
| 208 | "/err/arp-reply" "arp"; |
| 209 | "/err/arp-disabled" "arp"; |
| 210 | "/err/arp-input" "arp"; |
| 211 | "/err/arp-proxy" "arp"; |
| 212 | }; |
| 213 | |
| 214 | /* |
| 215 | * Local Variables: |
| 216 | * eval: (c-set-style "gnu") |
| 217 | * End: |
| 218 | */ |