Annotation of embedaddon/bird2/nest/bfd.h, revision 1.1

1.1     ! misho       1: /*
        !             2:  *     BIRD -- Bidirectional Forwarding Detection (BFD)
        !             3:  *
        !             4:  *     Can be freely distributed and used under the terms of the GNU GPL.
        !             5:  */
        !             6: 
        !             7: #ifndef _BIRD_NBFD_H_
        !             8: #define _BIRD_NBFD_H_
        !             9: 
        !            10: #include "lib/lists.h"
        !            11: #include "lib/resource.h"
        !            12: 
        !            13: struct bfd_session;
        !            14: 
        !            15: struct bfd_request {
        !            16:   resource r;
        !            17:   node n;
        !            18: 
        !            19:   ip_addr addr;
        !            20:   ip_addr local;
        !            21:   struct iface *iface;
        !            22:   struct iface *vrf;
        !            23: 
        !            24:   void (*hook)(struct bfd_request *);
        !            25:   void *data;
        !            26: 
        !            27:   struct bfd_session *session;
        !            28: 
        !            29:   u8 state;
        !            30:   u8 diag;
        !            31:   u8 old_state;
        !            32:   u8 down;
        !            33: };
        !            34: 
        !            35: 
        !            36: #define BFD_STATE_ADMIN_DOWN   0
        !            37: #define BFD_STATE_DOWN         1
        !            38: #define BFD_STATE_INIT         2
        !            39: #define BFD_STATE_UP           3
        !            40: 
        !            41: 
        !            42: #ifdef CONFIG_BFD
        !            43: 
        !            44: struct bfd_request * bfd_request_session(pool *p, ip_addr addr, ip_addr local, struct iface *iface, struct iface *vrf, void (*hook)(struct bfd_request *), void *data);
        !            45: 
        !            46: static inline void cf_check_bfd(int use UNUSED) { }
        !            47: 
        !            48: #else
        !            49: 
        !            50: static inline struct bfd_request * bfd_request_session(pool *p UNUSED, ip_addr addr UNUSED, ip_addr local UNUSED, struct iface *iface UNUSED, struct iface *vrf UNUSED, void (*hook)(struct bfd_request *) UNUSED, void *data UNUSED) { return NULL; }
        !            51: 
        !            52: static inline void cf_check_bfd(int use) { if (use) cf_error("BFD not available"); }
        !            53: 
        !            54: #endif /* CONFIG_BFD */
        !            55: 
        !            56: 
        !            57: 
        !            58: #endif /* _BIRD_NBFD_H_ */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>