blob: f8cab8ae78d4257dbb02f8353101272d0185bbdf [file] [log] [blame]
Neale Rannscbe25aa2019-09-30 10:53:31 +00001/*
2 * Copyright (c) 2015 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#ifndef __ARP_H__
17#define __ARP_H__
18
19#include <vnet/ethernet/ethernet.h>
20#include <vnet/ip/ip.h>
21#include <vnet/ethernet/arp_packet.h>
Neale Ranns13a74ae2022-08-09 00:59:37 +000022#include <vnet/arp/arp.api_enum.h>
Neale Rannscbe25aa2019-09-30 10:53:31 +000023
24extern int arp_proxy_add (u32 fib_index,
25 const ip4_address_t * lo_addr,
26 const ip4_address_t * hi_addr);
27extern int arp_proxy_del (u32 fib_index,
28 const ip4_address_t * lo_addr,
29 const ip4_address_t * hi_addr);
30
31extern int arp_proxy_enable (u32 sw_if_index);
32extern int arp_proxy_disable (u32 sw_if_index);
33
34/**
35 * call back function when walking the DB of proxy ARPs
36 * @return 0 to stop the walk !0 to continue
37 */
38typedef walk_rc_t (proxy_arp_walk_t) (const ip4_address_t * lo_addr,
39 const ip4_address_t * hi_addr,
40 u32 fib_index, void *dat);
41
42extern void proxy_arp_walk (proxy_arp_walk_t cb, void *data);
43
44/**
45 * call back function when walking the DB of proxy ARP interface
46 * @return 0 to stop the walk !0 to continue
47 */
48typedef walk_rc_t (proxy_arp_intf_walk_t) (u32 sw_if_index, void *data);
49
50extern void proxy_arp_intfc_walk (proxy_arp_intf_walk_t cb, void *data);
51
52#endif
53
54/*
55 * fd.io coding-style-patch-verification: ON
56 *
57 * Local Variables:
58 * eval: (c-set-style "gnu")
59 * End:
60 */