summaryrefslogtreecommitdiffstats
path: root/src/vnet/arp/arp.api
blob: 7de06f7f7e160da7cbf6a697f6ae435bdce10eed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
/* Hey Emacs use -*- mode: C -*- */
/*
 * Copyright (c) 2019 Cisco and/or its affiliates.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at:
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/** \file
    This file defines the vpp control-plane API messages
    used to control the ABF plugin
*/

option version = "1.0.0";

import "vnet/ip/ip_types.api";
import "vnet/ethernet/ethernet_types.api";
import "vnet/interface_types.api";

/** \brief Proxy ARP configuration type
    @param table_id - VRF / Fib table ID
    @param low - Low address of the Proxy ARP range
    @param hi - High address of the Proxy ARP range
*/
typedef proxy_arp
{
  u32 table_id;
  vl_api_ip4_address_t low;
  vl_api_ip4_address_t hi;
};

/** \brief Proxy ARP add / del request
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param is_add - 1 if adding the Proxy ARP range, 0 if deleting
    @param proxy - Proxy configuration
*/
autoreply define proxy_arp_add_del
{
  u32 client_index;
  u32 context;
  bool is_add;
  vl_api_proxy_arp_t proxy;
};

/** \brief Proxy ARP dump request
 */
define proxy_arp_dump
{
  u32 client_index;
  u32 context;
};

/** \brief Proxy ARP dump details reply
 * @param proxy - Same data as used to configure
 */
define proxy_arp_details
{
  u32 context;
  vl_api_proxy_arp_t proxy;
};

/** \brief Proxy ARP add / del interface request
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param sw_if_index - Which interface to enable / disable Proxy Arp on
    @param enable - 1 to enable Proxy ARP on interface, 0 to disable
*/
autoreply define proxy_arp_intfc_enable_disable
{
  u32 client_index;
  u32 context;
  vl_api_interface_index_t sw_if_index;
  bool enable;
};

/** \brief Proxy ARP interface dump request
 */
define proxy_arp_intfc_dump
{
  u32 client_index;
  u32 context;
};

/** \brief Proxy ARP interface dump details reply
 * @param sw_if_index The interface on which ARP proxy is enabled.
 */
define proxy_arp_intfc_details
{
  u32 context;
  u32 sw_if_index;
};

counters arp {
  replies_sent {
    severity info;
    type counter64;
    units "packets";
    description "ARP replies sent";
  };
  disabled {
    severity error;
    type counter64;
    units "packets";
    description "ARP Disabled";
  };
  l2_type_not_ethernet {
    severity error;
    type counter64;
    units "packets";
    description "L2 type not ethernet";
  };
  l3_type_not_ip4 {
    severity error;
    type counter64;
    units "packets";
    description "L3 type not IP4";
  };
  l3_src_address_not_local {
    severity error;
    type counter64;
    units "packets";
    description "IP4 source address not local to subnet";
  };
  l3_dst_address_not_local {
    severity error;
    type counter64;
    units "packets";
    description "IP4 destination address not local to subnet";
  };
  l3_dst_address_unset {
    severity error;
    type counter64;
    units "packets";
    description "IP4 destination address is unset";
  };
  l3_src_address_is_local {
    severity error;
    type counter64;
    units "packets";
    description "IP4 source address matches local interface";
  };
  l3_src_address_learned {
    severity info;
    type counter64;
    units "packets";
    description "ARP request IP4 source address learned";
  };
  replies_received {
    severity info;
    type counter64;
    units "packets";
    description "ARP replies received";
  };
  opcode_not_request {
    severity error;
    type counter64;
    units "packets";
    description "ARP opcode not request";
  };
  proxy_arp_replies_sent {
    severity info;
    type counter64;
    units "packets";
    description "Proxy ARP replies sent";
  };
  l2_address_mismatch {
    severity error;
    type counter64;
    units "packets";
    description "ARP hw addr does not match L2 frame src addr";
  };
  gratuitous_arp {
    severity error;
    type counter64;
    units "packets";
    description "ARP probe or announcement dropped";
  };
  interface_no_table {
    severity error;
    type counter64;
    units "packets";
    description "Interface is not mapped to an IP table";
  };
  interface_not_ip_enabled {
    severity error;
    type counter64;
    units "packets";
    description "Interface is not IP enabled";
  };
  unnumbered_mismatch {
    severity error;
    type counter64;
    units "packets";
    description "RX interface is unnumbered to different subnet";
  };
};

paths {
  "/err/arp-reply" "arp";
  "/err/arp-disabled" "arp";
  "/err/arp-input" "arp";
  "/err/arp-proxy" "arp";
};

/*
 * Local Variables:
 * eval: (c-set-style "gnu")
 * End:
 */