502e23147070ef1193d2fdc5cccecda9ed7f3cc4
[vpp.git] / src / vnet / bfd / bfd_udp.h
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
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
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
50 struct bfd_session_s;
51
52 void bfd_add_udp4_transport (vlib_main_t * vm, vlib_buffer_t * b,
53                              const struct bfd_session_s *bs);
54 void bfd_add_udp6_transport (vlib_main_t * vm, vlib_buffer_t * b,
55                              const struct bfd_session_s *bs);
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  */