Klement Sekera | 0e3c0de | 2016-09-29 14:43:44 +0200 | [diff] [blame] | 1 | /* * Copyright (c) 2011-2016 Cisco and/or its affiliates. |
| 2 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 3 | * you may not use this file except in compliance with the License. |
| 4 | * You may obtain a copy of the License at: |
| 5 | * |
| 6 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | * |
| 8 | * Unless required by applicable law or agreed to in writing, software |
| 9 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | * See the License for the specific language governing permissions and |
| 12 | * limitations under the License. |
| 13 | */ |
| 14 | /** |
| 15 | * @file |
| 16 | * @brief BFD global declarations |
| 17 | */ |
| 18 | |
| 19 | #ifndef __included_bfd_udp_h__ |
| 20 | #define __included_bfd_udp_h__ |
| 21 | |
| 22 | #include <vppinfra/clib.h> |
| 23 | #include <vnet/adj/adj_types.h> |
| 24 | #include <vnet/ip/ip6_packet.h> |
| 25 | |
Klement Sekera | 0e3c0de | 2016-09-29 14:43:44 +0200 | [diff] [blame] | 26 | /* *INDENT-OFF* */ |
| 27 | typedef CLIB_PACKED (struct { |
| 28 | |
| 29 | u32 sw_if_index; |
| 30 | ip46_address_t local_addr; |
| 31 | ip46_address_t peer_addr; |
| 32 | |
| 33 | }) bfd_udp_key_t; |
| 34 | /* *INDENT-ON* */ |
| 35 | |
| 36 | typedef struct |
| 37 | { |
| 38 | bfd_udp_key_t key; |
| 39 | |
| 40 | adj_index_t adj_index; |
| 41 | } bfd_udp_session_t; |
| 42 | |
Klement Sekera | aeeac3b | 2017-02-14 07:11:52 +0100 | [diff] [blame] | 43 | /* bfd udp echo packet trace capture */ |
| 44 | typedef struct |
| 45 | { |
| 46 | u32 len; |
| 47 | u8 data[400]; |
| 48 | } bfd_udp_echo_input_trace_t; |
| 49 | |
Klement Sekera | 2bce033 | 2017-02-09 06:03:46 +0100 | [diff] [blame] | 50 | struct bfd_session_s; |
| 51 | |
Klement Sekera | 46a87ad | 2017-01-02 08:22:23 +0100 | [diff] [blame] | 52 | void bfd_add_udp4_transport (vlib_main_t * vm, vlib_buffer_t * b, |
Klement Sekera | 2bce033 | 2017-02-09 06:03:46 +0100 | [diff] [blame] | 53 | const struct bfd_session_s *bs); |
Klement Sekera | 46a87ad | 2017-01-02 08:22:23 +0100 | [diff] [blame] | 54 | void bfd_add_udp6_transport (vlib_main_t * vm, vlib_buffer_t * b, |
Klement Sekera | 2bce033 | 2017-02-09 06:03:46 +0100 | [diff] [blame] | 55 | const struct bfd_session_s *bs); |
Klement Sekera | 0e3c0de | 2016-09-29 14:43:44 +0200 | [diff] [blame] | 56 | |
| 57 | #endif /* __included_bfd_udp_h__ */ |
| 58 | |
| 59 | /* |
| 60 | * fd.io coding-style-patch-verification: ON |
| 61 | * |
| 62 | * Local Variables: |
| 63 | * eval: (c-set-style "gnu") |
| 64 | * End: |
| 65 | */ |