blob: 502e23147070ef1193d2fdc5cccecda9ed7f3cc4 [file] [log] [blame]
Klement Sekera0e3c0de2016-09-29 14:43:44 +02001/* * 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 Sekera0e3c0de2016-09-29 14:43:44 +020026/* *INDENT-OFF* */
27typedef 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
36typedef struct
37{
38 bfd_udp_key_t key;
39
40 adj_index_t adj_index;
41} bfd_udp_session_t;
42
Klement Sekeraaeeac3b2017-02-14 07:11:52 +010043/* bfd udp echo packet trace capture */
44typedef struct
45{
46 u32 len;
47 u8 data[400];
48} bfd_udp_echo_input_trace_t;
49
Klement Sekera2bce0332017-02-09 06:03:46 +010050struct bfd_session_s;
51
Klement Sekera46a87ad2017-01-02 08:22:23 +010052void bfd_add_udp4_transport (vlib_main_t * vm, vlib_buffer_t * b,
Klement Sekera2bce0332017-02-09 06:03:46 +010053 const struct bfd_session_s *bs);
Klement Sekera46a87ad2017-01-02 08:22:23 +010054void bfd_add_udp6_transport (vlib_main_t * vm, vlib_buffer_t * b,
Klement Sekera2bce0332017-02-09 06:03:46 +010055 const struct bfd_session_s *bs);
Klement Sekera0e3c0de2016-09-29 14:43:44 +020056
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 */