Neale Ranns | 0053de6 | 2018-05-22 08:40:52 -0700 | [diff] [blame] | 1 | /* |
| 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/ethernet/arp_packet.h> |
| 21 | #include <vnet/ip/ip.h> |
| 22 | |
| 23 | extern int vnet_proxy_arp_add_del (ip4_address_t * lo_addr, |
| 24 | ip4_address_t * hi_addr, |
| 25 | u32 fib_index, int is_del); |
| 26 | |
| 27 | extern int vnet_arp_set_ip4_over_ethernet (vnet_main_t * vnm, |
| 28 | u32 sw_if_index, |
Neale Ranns | cf7efe0 | 2018-09-24 08:34:11 +0000 | [diff] [blame] | 29 | const |
| 30 | ethernet_arp_ip4_over_ethernet_address_t |
| 31 | * a, int is_static, |
Neale Ranns | 0053de6 | 2018-05-22 08:40:52 -0700 | [diff] [blame] | 32 | int is_no_fib_entry); |
| 33 | |
| 34 | extern int vnet_arp_unset_ip4_over_ethernet (vnet_main_t * vnm, |
Neale Ranns | cf7efe0 | 2018-09-24 08:34:11 +0000 | [diff] [blame] | 35 | u32 sw_if_index, |
| 36 | const |
| 37 | ethernet_arp_ip4_over_ethernet_address_t |
| 38 | * a); |
Neale Ranns | 0053de6 | 2018-05-22 08:40:52 -0700 | [diff] [blame] | 39 | |
| 40 | extern int vnet_proxy_arp_fib_reset (u32 fib_id); |
| 41 | |
| 42 | /** |
| 43 | * call back function when walking the DB of proxy ARPs |
| 44 | * @return 0 to stop the walk !0 to continue |
| 45 | */ |
| 46 | typedef walk_rc_t (proxy_arp_walk_t) (const ip4_address_t * lo_addr, |
| 47 | const ip4_address_t * hi_addr, |
| 48 | u32 fib_index, void *dat); |
| 49 | |
| 50 | extern void proxy_arp_walk (proxy_arp_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 | */ |