blob: 2cd89ca28cee6d7fb365f51a42fb4828bfcc0795 [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
26#define BFD_UDP_KEY_BODY
27
28/* *INDENT-OFF* */
29typedef CLIB_PACKED (struct {
30
31 u32 sw_if_index;
32 ip46_address_t local_addr;
33 ip46_address_t peer_addr;
34
35}) bfd_udp_key_t;
36/* *INDENT-ON* */
37
38typedef struct
39{
40 bfd_udp_key_t key;
41
42 adj_index_t adj_index;
43} bfd_udp_session_t;
44
Klement Sekera46a87ad2017-01-02 08:22:23 +010045void bfd_add_udp4_transport (vlib_main_t * vm, vlib_buffer_t * b,
46 bfd_udp_session_t * bs);
47void bfd_add_udp6_transport (vlib_main_t * vm, vlib_buffer_t * b,
48 bfd_udp_session_t * bs);
Klement Sekera0e3c0de2016-09-29 14:43:44 +020049
50#endif /* __included_bfd_udp_h__ */
51
52/*
53 * fd.io coding-style-patch-verification: ON
54 *
55 * Local Variables:
56 * eval: (c-set-style "gnu")
57 * End:
58 */