]> git.proxmox.com Git - mirror_frr.git/blob - pathd/path_nb.h
Merge pull request #13649 from donaldsharp/unlock_the_node_or_else
[mirror_frr.git] / pathd / path_nb.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * Copyright (C) 2020 NetDEF, Inc.
4 */
5
6 #ifndef _FRR_PATH_NB_H_
7 #define _FRR_PATH_NB_H_
8
9 #include "pathd/pathd.h"
10
11 extern const struct frr_yang_module_info frr_pathd_info;
12
13 /* Mandatory callbacks. */
14 int pathd_srte_segment_list_create(struct nb_cb_create_args *args);
15 int pathd_srte_segment_list_destroy(struct nb_cb_destroy_args *args);
16
17 const void *pathd_srte_segment_list_get_next(struct nb_cb_get_next_args *args);
18 int pathd_srte_segment_list_get_keys(struct nb_cb_get_keys_args *args);
19 const void *
20 pathd_srte_segment_list_lookup_entry(struct nb_cb_lookup_entry_args *args);
21
22 int pathd_srte_segment_list_segment_create(struct nb_cb_create_args *args);
23 int pathd_srte_segment_list_segment_destroy(struct nb_cb_destroy_args *args);
24 int pathd_srte_segment_list_protocol_origin_modify(
25 struct nb_cb_modify_args *args);
26 int pathd_srte_segment_list_originator_modify(struct nb_cb_modify_args *args);
27 int pathd_srte_segment_list_segment_sid_value_modify(
28 struct nb_cb_modify_args *args);
29 int pathd_srte_segment_list_segment_nai_destroy(
30 struct nb_cb_destroy_args *args);
31 void pathd_srte_segment_list_segment_nai_apply_finish(
32 struct nb_cb_apply_finish_args *args);
33 int pathd_srte_segment_list_segment_sid_value_destroy(
34 struct nb_cb_destroy_args *args);
35 int pathd_srte_policy_create(struct nb_cb_create_args *args);
36 int pathd_srte_policy_destroy(struct nb_cb_destroy_args *args);
37 const void *pathd_srte_policy_get_next(struct nb_cb_get_next_args *args);
38 int pathd_srte_policy_get_keys(struct nb_cb_get_keys_args *args);
39 const void *
40 pathd_srte_policy_lookup_entry(struct nb_cb_lookup_entry_args *args);
41 int pathd_srte_policy_name_modify(struct nb_cb_modify_args *args);
42 int pathd_srte_policy_name_destroy(struct nb_cb_destroy_args *args);
43 int pathd_srte_policy_binding_sid_modify(struct nb_cb_modify_args *args);
44 int pathd_srte_policy_binding_sid_destroy(struct nb_cb_destroy_args *args);
45 struct yang_data *
46 pathd_srte_policy_is_operational_get_elem(struct nb_cb_get_elem_args *args);
47 int pathd_srte_policy_candidate_path_create(struct nb_cb_create_args *args);
48 int pathd_srte_policy_candidate_path_destroy(struct nb_cb_destroy_args *args);
49 int pathd_srte_policy_candidate_path_name_modify(
50 struct nb_cb_modify_args *args);
51 const void *
52 pathd_srte_policy_candidate_path_get_next(struct nb_cb_get_next_args *args);
53 int pathd_srte_policy_candidate_path_get_keys(struct nb_cb_get_keys_args *args);
54 const void *pathd_srte_policy_candidate_path_lookup_entry(
55 struct nb_cb_lookup_entry_args *args);
56 void pathd_srte_policy_candidate_path_bandwidth_apply_finish(
57 struct nb_cb_apply_finish_args *args);
58 int pathd_srte_policy_candidate_path_bandwidth_destroy(
59 struct nb_cb_destroy_args *args);
60 int pathd_srte_policy_candidate_path_exclude_any_modify(
61 struct nb_cb_modify_args *args);
62 int pathd_srte_policy_candidate_path_exclude_any_destroy(
63 struct nb_cb_destroy_args *args);
64 int pathd_srte_policy_candidate_path_include_any_modify(
65 struct nb_cb_modify_args *args);
66 int pathd_srte_policy_candidate_path_include_any_destroy(
67 struct nb_cb_destroy_args *args);
68 int pathd_srte_policy_candidate_path_include_all_modify(
69 struct nb_cb_modify_args *args);
70 int pathd_srte_policy_candidate_path_include_all_destroy(
71 struct nb_cb_destroy_args *args);
72 int pathd_srte_policy_candidate_path_metrics_destroy(
73 struct nb_cb_destroy_args *args);
74 void pathd_srte_policy_candidate_path_metrics_apply_finish(
75 struct nb_cb_apply_finish_args *args);
76 int pathd_srte_policy_candidate_path_objfun_destroy(
77 struct nb_cb_destroy_args *args);
78 void pathd_srte_policy_candidate_path_objfun_apply_finish(
79 struct nb_cb_apply_finish_args *args);
80 struct yang_data *
81 pathd_srte_policy_candidate_path_is_best_candidate_path_get_elem(
82 struct nb_cb_get_elem_args *args);
83 int pathd_srte_policy_candidate_path_protocol_origin_modify(
84 struct nb_cb_modify_args *args);
85 int pathd_srte_policy_candidate_path_originator_modify(
86 struct nb_cb_modify_args *args);
87 struct yang_data *pathd_srte_policy_candidate_path_discriminator_get_elem(
88 struct nb_cb_get_elem_args *args);
89 int pathd_srte_policy_candidate_path_type_modify(
90 struct nb_cb_modify_args *args);
91 int pathd_srte_policy_candidate_path_segment_list_name_modify(
92 struct nb_cb_modify_args *args);
93 int pathd_srte_policy_candidate_path_segment_list_name_destroy(
94 struct nb_cb_destroy_args *args);
95
96 /* Optional 'apply_finish' callbacks. */
97 void pathd_apply_finish(struct nb_cb_apply_finish_args *args);
98
99 /* Optional 'cli_show' callbacks. */
100 void cli_show_srte_segment_list(struct vty *vty, const struct lyd_node *dnode,
101 bool show_defaults);
102 void cli_show_srte_segment_list_end(struct vty *vty,
103 const struct lyd_node *dnode);
104 void cli_show_srte_segment_list_segment(struct vty *vty,
105 const struct lyd_node *dnode,
106 bool show_defaults);
107 void cli_show_srte_policy(struct vty *vty, const struct lyd_node *dnode,
108 bool show_defaults);
109 void cli_show_srte_policy_end(struct vty *vty, const struct lyd_node *dnode);
110 void cli_show_srte_policy_name(struct vty *vty, const struct lyd_node *dnode,
111 bool show_defaults);
112 void cli_show_srte_policy_binding_sid(struct vty *vty,
113 const struct lyd_node *dnode,
114 bool show_defaults);
115 void cli_show_srte_policy_candidate_path(struct vty *vty,
116 const struct lyd_node *dnode,
117 bool show_defaults);
118 void cli_show_srte_policy_candidate_path_end(struct vty *vty,
119 const struct lyd_node *dnode);
120
121 /* Utility functions */
122 typedef void (*of_pref_cp_t)(enum objfun_type type, void *arg);
123 void iter_objfun_prefs(const struct lyd_node *dnode, const char *path,
124 of_pref_cp_t fun, void *arg);
125
126 #endif /* _FRR_PATH_NB_H_ */