1 /* Copyright (c) 2012 Nicira, Inc.
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:
7 * http://www.apache.org/licenses/LICENSE-2.0
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. */
18 #define BFD_PACKET_LEN 24
19 #define BFD_DEST_PORT 3784
25 struct dpif_flow_stats;
27 struct flow_wildcards;
32 void bfd_wait(const struct bfd *);
33 void bfd_run(struct bfd *);
35 bool bfd_should_send_packet(const struct bfd *);
36 void bfd_put_packet(struct bfd *bfd, struct ofpbuf *packet,
39 bool bfd_should_process_flow(const struct bfd *, const struct flow *,
40 struct flow_wildcards *);
41 void bfd_process_packet(struct bfd *, const struct flow *,
42 const struct ofpbuf *);
44 struct bfd *bfd_configure(struct bfd *, const char *name,
45 const struct smap *smap,
46 struct netdev *netdev);
47 struct bfd *bfd_ref(const struct bfd *);
48 void bfd_unref(struct bfd *);
50 void bfd_account_rx(struct bfd *, const struct dpif_flow_stats *);
51 bool bfd_forwarding(struct bfd *);
52 void bfd_get_status(const struct bfd *, struct smap *);
53 void bfd_set_netdev(struct bfd *, const struct netdev *);
54 long long int bfd_wake_time(const struct bfd *);