15 #ifndef __included_bfd_protocol_h__ 16 #define __included_bfd_protocol_h__ 26 #define foreach_bfd_auth_type(F) \ 27 F (0, 0, reserved, "Reserved") \ 28 F (1, 16, simple_password, "Simple Password") \ 29 F (2, 16, keyed_md5, "Keyed MD5") \ 30 F (3, 16, meticulous_keyed_md5, "Meticulous Keyed MD5") \ 31 F (4, 20, keyed_sha1, "Keyed SHA1") \ 32 F (5, 20, meticulous_keyed_sha1, "Meticulous Keyed SHA1") 34 #define BFD_AUTH_TYPE_NAME(t) BFD_AUTH_TYPE_##t 38 #define F(n, l, t, s) BFD_AUTH_TYPE_NAME (t) = n, 77 bfd_auth_common_t type_len;
133 bfd_auth_common_t common_auth;
134 }) bfd_pkt_with_common_auth_t;
140 bfd_auth_sha1_t sha1_auth;
141 }) bfd_pkt_with_sha1_auth_t;
164 #define foreach_bfd_diag_code(F) \ 165 F (0, no_diag, "No Diagnostic") \ 166 F (1, det_time_exp, "Control Detection Time Expired") \ 167 F (2, echo_failed, "Echo Function Failed") \ 168 F (3, neighbor_sig_down, "Neighbor Signaled Session Down") \ 169 F (4, fwd_plain_reset, "Forwarding Plane Reset") \ 170 F (5, path_down, "Path Down") \ 171 F (6, concat_path_down, "Concatenated Path Down") \ 172 F (7, admin_down, "Administratively Down") \ 173 F (8, reverse_concat_path_down, "Reverse Concatenated Path Down") 175 #define BFD_DIAG_CODE_NAME(t) BFD_DIAG_CODE_##t 179 #define F(n, t, s) BFD_DIAG_CODE_NAME (t) = n, 187 #define foreach_bfd_state(F) \ 188 F (0, admin_down, "AdminDown") \ 189 F (1, down, "Down") \ 190 F (2, init, "Init") \ 193 #define BFD_STATE_NAME(t) BFD_STATE_##t 197 #define F(n, t, s) BFD_STATE_NAME (t) = n, u8 bfd_pkt_get_auth_present(const bfd_pkt_t *pkt)
u8 bfd_pkt_get_version(const bfd_pkt_t *pkt)
u8 bfd_pkt_get_final(const bfd_pkt_t *pkt)
void bfd_pkt_set_demand(bfd_pkt_t *pkt)
const char * bfd_diag_code_string(bfd_diag_code_e diag)
void bfd_pkt_set_poll(bfd_pkt_t *pkt)
void bfd_pkt_set_auth_present(bfd_pkt_t *pkt)
void bfd_pkt_set_diag_code(bfd_pkt_t *pkt, int value)
void bfd_pkt_set_final(bfd_pkt_t *pkt)
vl_api_fib_path_type_t type
u32 bfd_max_key_len_for_auth_type(bfd_auth_type_e auth_type)
get the maximum length of key data for given auth type
u8 bfd_pkt_get_demand(const bfd_pkt_t *pkt)
const char * bfd_state_string(bfd_state_e state)
u8 bfd_pkt_get_diag_code(const bfd_pkt_t *pkt)
typedef CLIB_PACKED(struct { u8 type;u8 len;}) bfd_auth_common_t
#define foreach_bfd_state(F)
u8 bfd_pkt_get_control_plane_independent(const bfd_pkt_t *pkt)
#define foreach_bfd_auth_type(F)
u8 bfd_pkt_get_multipoint(const bfd_pkt_t *pkt)
u8 bfd_pkt_get_poll(const bfd_pkt_t *pkt)
void bfd_pkt_set_version(bfd_pkt_t *pkt, int version)
void bfd_pkt_set_multipoint(bfd_pkt_t *pkt)
void bfd_pkt_set_control_plane_independent(bfd_pkt_t *pkt)
u8 bfd_pkt_get_state(const bfd_pkt_t *pkt)
vl_api_dhcp_client_state_t state
void bfd_pkt_set_state(bfd_pkt_t *pkt, int value)
const char * bfd_auth_type_str(bfd_auth_type_e auth_type)
#define foreach_bfd_diag_code(F)