]> git.proxmox.com Git - mirror_ovs.git/blob - lib/bfd.h
netdev-offload-tc: Use single 'once' variable for probing tc features
[mirror_ovs.git] / lib / bfd.h
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
24 #include "packets.h"
25
26 struct bfd;
27 struct dpif_flow_stats;
28 struct flow;
29 struct flow_wildcards;
30 struct netdev;
31 struct dp_packet;
32 struct smap;
33
34 long long int bfd_wait(const struct bfd *);
35 void bfd_run(struct bfd *);
36
37 bool bfd_should_send_packet(const struct bfd *);
38 void bfd_put_packet(struct bfd *bfd, struct dp_packet *packet,
39 const struct eth_addr eth_src, bool *oam);
40
41 bool bfd_should_process_flow(const struct bfd *, const struct flow *,
42 struct flow_wildcards *);
43 void bfd_process_packet(struct bfd *, const struct flow *,
44 const struct dp_packet *);
45
46 void bfd_init(void);
47 struct bfd *bfd_configure(struct bfd *, const char *name,
48 const struct smap *smap,
49 struct netdev *netdev);
50 struct bfd *bfd_ref(const struct bfd *);
51 void bfd_unref(struct bfd *);
52
53 void bfd_account_rx(struct bfd *, const struct dpif_flow_stats *);
54 bool bfd_forwarding(struct bfd *);
55 bool bfd_check_status_change(struct bfd *);
56 void bfd_get_status(const struct bfd *, struct smap *);
57 void bfd_set_netdev(struct bfd *, const struct netdev *);
58 long long int bfd_wake_time(const struct bfd *);
59 #endif /* bfd.h */