Lines Matching refs:dnode

34 static void bfd_session_get_key(bool mhop, const struct lyd_node *dnode,  in bfd_session_get_key()  argument
41 strtosa(yang_dnode_get_string(dnode, "./dest-addr"), &psa); in bfd_session_get_key()
45 if (yang_dnode_exists(dnode, "./source-addr")) in bfd_session_get_key()
46 strtosa(yang_dnode_get_string(dnode, "./source-addr"), &lsa); in bfd_session_get_key()
49 if (yang_dnode_exists(dnode, "./interface")) in bfd_session_get_key()
50 ifname = yang_dnode_get_string(dnode, "./interface"); in bfd_session_get_key()
51 if (yang_dnode_exists(dnode, "./vrf")) in bfd_session_get_key()
52 vrfname = yang_dnode_get_string(dnode, "./vrf"); in bfd_session_get_key()
58 static int bfd_session_create(enum nb_event event, const struct lyd_node *dnode, in bfd_session_create() argument
73 yang_dnode_get_prefix(&p, dnode, "./dest-addr"); in bfd_session_create()
80 if (yang_dnode_exists(dnode, "./interface")) in bfd_session_create()
81 ifname = yang_dnode_get_string(dnode, "./interface"); in bfd_session_create()
95 bfd_session_get_key(mhop, dnode, &bk); in bfd_session_create()
111 bfd_session_get_key(mhop, dnode, &bs->key); in bfd_session_create()
131 nb_running_set_entry(dnode, bs); in bfd_session_create()
145 const struct lyd_node *dnode, bool mhop) in bfd_session_destroy() argument
152 bfd_session_get_key(mhop, dnode, &bk); in bfd_session_destroy()
162 bs = nb_running_unset_entry(dnode); in bfd_session_destroy()
227 name = yang_dnode_get_string(args->dnode, "./name"); in bfdd_bfd_profile_create()
229 nb_running_set_entry(args->dnode, bp); in bfdd_bfd_profile_create()
241 bp = nb_running_unset_entry(args->dnode); in bfdd_bfd_profile_destroy()
257 bp = nb_running_get_entry(args->dnode, NULL, true); in bfdd_bfd_profile_detection_multiplier_modify()
258 bp->detection_multiplier = yang_dnode_get_uint8(args->dnode, NULL); in bfdd_bfd_profile_detection_multiplier_modify()
275 min_tx = yang_dnode_get_uint32(args->dnode, NULL); in bfdd_bfd_profile_desired_transmission_interval_modify()
285 min_tx = yang_dnode_get_uint32(args->dnode, NULL); in bfdd_bfd_profile_desired_transmission_interval_modify()
286 bp = nb_running_get_entry(args->dnode, NULL, true); in bfdd_bfd_profile_desired_transmission_interval_modify()
313 min_rx = yang_dnode_get_uint32(args->dnode, NULL); in bfdd_bfd_profile_required_receive_interval_modify()
323 min_rx = yang_dnode_get_uint32(args->dnode, NULL); in bfdd_bfd_profile_required_receive_interval_modify()
324 bp = nb_running_get_entry(args->dnode, NULL, true); in bfdd_bfd_profile_required_receive_interval_modify()
351 shutdown = yang_dnode_get_bool(args->dnode, NULL); in bfdd_bfd_profile_administrative_down_modify()
352 bp = nb_running_get_entry(args->dnode, NULL, true); in bfdd_bfd_profile_administrative_down_modify()
373 passive = yang_dnode_get_bool(args->dnode, NULL); in bfdd_bfd_profile_passive_mode_modify()
374 bp = nb_running_get_entry(args->dnode, NULL, true); in bfdd_bfd_profile_passive_mode_modify()
395 minimum_ttl = yang_dnode_get_uint8(args->dnode, NULL); in bfdd_bfd_profile_minimum_ttl_modify()
396 bp = nb_running_get_entry(args->dnode, NULL, true); in bfdd_bfd_profile_minimum_ttl_modify()
413 bp = nb_running_get_entry(args->dnode, NULL, true); in bfdd_bfd_profile_minimum_ttl_destroy()
431 echo = yang_dnode_get_bool(args->dnode, NULL); in bfdd_bfd_profile_echo_mode_modify()
432 bp = nb_running_get_entry(args->dnode, NULL, true); in bfdd_bfd_profile_echo_mode_modify()
453 min_rx = yang_dnode_get_uint32(args->dnode, NULL); in bfdd_bfd_profile_desired_echo_transmission_interval_modify()
463 min_rx = yang_dnode_get_uint32(args->dnode, NULL); in bfdd_bfd_profile_desired_echo_transmission_interval_modify()
464 bp = nb_running_get_entry(args->dnode, NULL, true); in bfdd_bfd_profile_desired_echo_transmission_interval_modify()
485 return bfd_session_create(args->event, args->dnode, args->resource, in bfdd_bfd_sessions_single_hop_create()
491 return bfd_session_destroy(args->event, args->dnode, false); in bfdd_bfd_sessions_single_hop_destroy()
519 bs = nb_running_get_entry(args->dnode, NULL, true); in bfdd_bfd_sessions_single_hop_profile_modify()
520 bfd_profile_apply(yang_dnode_get_string(args->dnode, NULL), bs); in bfdd_bfd_sessions_single_hop_profile_modify()
533 bs = nb_running_get_entry(args->dnode, NULL, true); in bfdd_bfd_sessions_single_hop_profile_destroy()
545 uint8_t detection_multiplier = yang_dnode_get_uint8(args->dnode, NULL); in bfdd_bfd_sessions_single_hop_detection_multiplier_modify()
557 bs = nb_running_get_entry(args->dnode, NULL, true); in bfdd_bfd_sessions_single_hop_detection_multiplier_modify()
576 uint32_t tx_interval = yang_dnode_get_uint32(args->dnode, NULL); in bfdd_bfd_sessions_single_hop_desired_transmission_interval_modify()
590 bs = nb_running_get_entry(args->dnode, NULL, true); in bfdd_bfd_sessions_single_hop_desired_transmission_interval_modify()
612 uint32_t rx_interval = yang_dnode_get_uint32(args->dnode, NULL); in bfdd_bfd_sessions_single_hop_required_receive_interval_modify()
626 bs = nb_running_get_entry(args->dnode, NULL, true); in bfdd_bfd_sessions_single_hop_required_receive_interval_modify()
648 bool shutdown = yang_dnode_get_bool(args->dnode, NULL); in bfdd_bfd_sessions_single_hop_administrative_down_modify()
663 bs = nb_running_get_entry(args->dnode, NULL, true); in bfdd_bfd_sessions_single_hop_administrative_down_modify()
691 passive = yang_dnode_get_bool(args->dnode, NULL); in bfdd_bfd_sessions_single_hop_passive_mode_modify()
693 bs = nb_running_get_entry(args->dnode, NULL, true); in bfdd_bfd_sessions_single_hop_passive_mode_modify()
706 bool echo = yang_dnode_get_bool(args->dnode, NULL); in bfdd_bfd_sessions_single_hop_echo_mode_modify()
721 bs = nb_running_get_entry(args->dnode, NULL, true); in bfdd_bfd_sessions_single_hop_echo_mode_modify()
735 uint32_t echo_interval = yang_dnode_get_uint32(args->dnode, NULL); in bfdd_bfd_sessions_single_hop_desired_echo_transmission_interval_modify()
749 bs = nb_running_get_entry(args->dnode, NULL, true); in bfdd_bfd_sessions_single_hop_desired_echo_transmission_interval_modify()
770 return bfd_session_create(args->event, args->dnode, args->resource, in bfdd_bfd_sessions_multi_hop_create()
776 return bfd_session_destroy(args->event, args->dnode, true); in bfdd_bfd_sessions_multi_hop_destroy()
799 bs = nb_running_get_entry(args->dnode, NULL, true); in bfdd_bfd_sessions_multi_hop_minimum_ttl_modify()
800 bs->peer_profile.minimum_ttl = yang_dnode_get_uint8(args->dnode, NULL); in bfdd_bfd_sessions_multi_hop_minimum_ttl_modify()
823 bs = nb_running_get_entry(args->dnode, NULL, true); in bfdd_bfd_sessions_multi_hop_minimum_ttl_destroy()