Adds a missing file.
I forgot to add that to the previous commit.
This commit is contained in:
parent
1ec522538f
commit
7c9930f9c8
1 changed files with 51 additions and 0 deletions
51
nest/bfd.h
Normal file
51
nest/bfd.h
Normal file
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* BIRD -- Bidirectional Forwarding Detection (BFD)
|
||||
*
|
||||
* Can be freely distributed and used under the terms of the GNU GPL.
|
||||
*/
|
||||
|
||||
#ifndef _BIRD_NBFD_H_
|
||||
#define _BIRD_NBFD_H_
|
||||
|
||||
#include "lib/lists.h"
|
||||
#include "lib/resource.h"
|
||||
|
||||
struct bfd_session;
|
||||
|
||||
struct bfd_request {
|
||||
resource r;
|
||||
node n;
|
||||
|
||||
ip_addr addr;
|
||||
ip_addr local;
|
||||
struct iface *iface;
|
||||
|
||||
void (*hook)(struct bfd_request *);
|
||||
void *data;
|
||||
|
||||
struct bfd_session *session;
|
||||
|
||||
u8 state;
|
||||
u8 diag;
|
||||
u8 old_state;
|
||||
u8 down;
|
||||
};
|
||||
|
||||
|
||||
#ifdef CONFIG_BFD
|
||||
|
||||
struct bfd_request * bfd_request_session(pool *p, ip_addr addr, ip_addr local, struct iface *iface, void (*hook)(struct bfd_request *), void *data);
|
||||
|
||||
static inline void cf_check_bfd(int use) { }
|
||||
|
||||
#else
|
||||
|
||||
static inline struct bfd_request * bfd_request_session(pool *p, ip_addr addr, ip_addr local, struct iface *iface, void (*hook)(struct bfd_request *), void *data) { return NULL; }
|
||||
|
||||
static inline void cf_check_bfd(int use) { if (use) cf_error("BFD not available"); }
|
||||
|
||||
#endif /* CONFIG_BFD */
|
||||
|
||||
|
||||
|
||||
#endif /* _BIRD_NBFD_H_ */
|
Loading…
Reference in a new issue