]> git.proxmox.com Git - mirror_ovs.git/blame - lib/bfd.h
ovsdb-idl: Fix iteration over tracked rows with no actual data.
[mirror_ovs.git] / lib / bfd.h
CommitLineData
ccc09689
EJ
1/* Copyright (c) 2012 Nicira, Inc.
2 *
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#ifndef BFD_H
16#define BFD_H 1
17
18#define BFD_PACKET_LEN 24
19#define BFD_DEST_PORT 3784
20
21#include <stdbool.h>
22#include <inttypes.h>
23
3bd0fd39
WSH
24#include "packets.h"
25
ccc09689 26struct bfd;
a1aeea86 27struct dpif_flow_stats;
ccc09689 28struct flow;
642dc74d 29struct flow_wildcards;
c1c4e8c7 30struct netdev;
cf62fa4c 31struct dp_packet;
ccc09689
EJ
32struct smap;
33
0477baa9 34long long int bfd_wait(const struct bfd *);
ccc09689
EJ
35void bfd_run(struct bfd *);
36
37bool bfd_should_send_packet(const struct bfd *);
cf62fa4c 38void bfd_put_packet(struct bfd *bfd, struct dp_packet *packet,
2eb79142 39 const struct eth_addr eth_src, bool *oam);
ccc09689 40
fab52e16
PR
41bool bfd_should_process_flow(const struct bfd *, const struct flow *,
42 struct flow_wildcards *);
ccc09689 43void bfd_process_packet(struct bfd *, const struct flow *,
cf62fa4c 44 const struct dp_packet *);
ccc09689 45
0fc1f5c0 46void bfd_init(void);
ccc09689 47struct bfd *bfd_configure(struct bfd *, const char *name,
c1c4e8c7
AW
48 const struct smap *smap,
49 struct netdev *netdev);
92cfab82
EJ
50struct bfd *bfd_ref(const struct bfd *);
51void bfd_unref(struct bfd *);
ccc09689 52
a1aeea86 53void bfd_account_rx(struct bfd *, const struct dpif_flow_stats *);
9cdc68a1 54bool bfd_forwarding(struct bfd *);
88bf179a 55bool bfd_check_status_change(struct bfd *);
ccc09689 56void bfd_get_status(const struct bfd *, struct smap *);
c1c4e8c7 57void bfd_set_netdev(struct bfd *, const struct netdev *);
88e4462e 58long long int bfd_wake_time(const struct bfd *);
ccc09689 59#endif /* bfd.h */