]>
Commit | Line | Data |
---|---|---|
4d7b695d SM |
1 | /* |
2 | * Copyright (C) 2020 NetDEF, Inc. | |
3 | * | |
4 | * This program is free software; you can redistribute it and/or modify it | |
5 | * under the terms of the GNU General Public License as published by the Free | |
6 | * Software Foundation; either version 2 of the License, or (at your option) | |
7 | * any later version. | |
8 | * | |
9 | * This program is distributed in the hope that it will be useful, but WITHOUT | |
10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
12 | * more details. | |
13 | * | |
14 | * You should have received a copy of the GNU General Public License along | |
15 | * with this program; see the file COPYING; if not, write to the Free Software | |
16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
17 | */ | |
18 | ||
19 | #ifndef _FRR_PATH_NB_H_ | |
20 | #define _FRR_PATH_NB_H_ | |
21 | ||
22 | #include "pathd/pathd.h" | |
23 | ||
24 | extern const struct frr_yang_module_info frr_pathd_info; | |
25 | ||
26 | /* Mandatory callbacks. */ | |
27 | int pathd_srte_segment_list_create(struct nb_cb_create_args *args); | |
28 | int pathd_srte_segment_list_destroy(struct nb_cb_destroy_args *args); | |
29 | ||
30 | const void *pathd_srte_segment_list_get_next(struct nb_cb_get_next_args *args); | |
31 | int pathd_srte_segment_list_get_keys(struct nb_cb_get_keys_args *args); | |
32 | const void * | |
33 | pathd_srte_segment_list_lookup_entry(struct nb_cb_lookup_entry_args *args); | |
34 | ||
35 | int pathd_srte_segment_list_segment_create(struct nb_cb_create_args *args); | |
36 | int pathd_srte_segment_list_segment_destroy(struct nb_cb_destroy_args *args); | |
37 | int pathd_srte_segment_list_protocol_origin_modify( | |
38 | struct nb_cb_modify_args *args); | |
39 | int pathd_srte_segment_list_originator_modify(struct nb_cb_modify_args *args); | |
40 | int pathd_srte_segment_list_segment_sid_value_modify( | |
41 | struct nb_cb_modify_args *args); | |
42 | int pathd_srte_segment_list_segment_nai_destroy( | |
43 | struct nb_cb_destroy_args *args); | |
44 | void pathd_srte_segment_list_segment_nai_apply_finish( | |
45 | struct nb_cb_apply_finish_args *args); | |
f2b9485d JG |
46 | int pathd_srte_segment_list_segment_sid_value_destroy( |
47 | struct nb_cb_destroy_args *args); | |
4d7b695d SM |
48 | int pathd_srte_policy_create(struct nb_cb_create_args *args); |
49 | int pathd_srte_policy_destroy(struct nb_cb_destroy_args *args); | |
50 | const void *pathd_srte_policy_get_next(struct nb_cb_get_next_args *args); | |
51 | int pathd_srte_policy_get_keys(struct nb_cb_get_keys_args *args); | |
52 | const void * | |
53 | pathd_srte_policy_lookup_entry(struct nb_cb_lookup_entry_args *args); | |
54 | int pathd_srte_policy_name_modify(struct nb_cb_modify_args *args); | |
55 | int pathd_srte_policy_name_destroy(struct nb_cb_destroy_args *args); | |
56 | int pathd_srte_policy_binding_sid_modify(struct nb_cb_modify_args *args); | |
57 | int pathd_srte_policy_binding_sid_destroy(struct nb_cb_destroy_args *args); | |
58 | struct yang_data * | |
59 | pathd_srte_policy_is_operational_get_elem(struct nb_cb_get_elem_args *args); | |
60 | int pathd_srte_policy_candidate_path_create(struct nb_cb_create_args *args); | |
61 | int pathd_srte_policy_candidate_path_destroy(struct nb_cb_destroy_args *args); | |
62 | int pathd_srte_policy_candidate_path_name_modify( | |
63 | struct nb_cb_modify_args *args); | |
64 | const void * | |
65 | pathd_srte_policy_candidate_path_get_next(struct nb_cb_get_next_args *args); | |
66 | int pathd_srte_policy_candidate_path_get_keys(struct nb_cb_get_keys_args *args); | |
67 | const void *pathd_srte_policy_candidate_path_lookup_entry( | |
68 | struct nb_cb_lookup_entry_args *args); | |
69 | void pathd_srte_policy_candidate_path_bandwidth_apply_finish( | |
70 | struct nb_cb_apply_finish_args *args); | |
71 | int pathd_srte_policy_candidate_path_bandwidth_destroy( | |
72 | struct nb_cb_destroy_args *args); | |
73 | int pathd_srte_policy_candidate_path_exclude_any_modify( | |
74 | struct nb_cb_modify_args *args); | |
75 | int pathd_srte_policy_candidate_path_exclude_any_destroy( | |
76 | struct nb_cb_destroy_args *args); | |
77 | int pathd_srte_policy_candidate_path_include_any_modify( | |
78 | struct nb_cb_modify_args *args); | |
79 | int pathd_srte_policy_candidate_path_include_any_destroy( | |
80 | struct nb_cb_destroy_args *args); | |
81 | int pathd_srte_policy_candidate_path_include_all_modify( | |
82 | struct nb_cb_modify_args *args); | |
83 | int pathd_srte_policy_candidate_path_include_all_destroy( | |
84 | struct nb_cb_destroy_args *args); | |
85 | int pathd_srte_policy_candidate_path_metrics_destroy( | |
86 | struct nb_cb_destroy_args *args); | |
87 | void pathd_srte_policy_candidate_path_metrics_apply_finish( | |
88 | struct nb_cb_apply_finish_args *args); | |
89 | int pathd_srte_policy_candidate_path_objfun_destroy( | |
90 | struct nb_cb_destroy_args *args); | |
91 | void pathd_srte_policy_candidate_path_objfun_apply_finish( | |
92 | struct nb_cb_apply_finish_args *args); | |
93 | struct yang_data * | |
94 | pathd_srte_policy_candidate_path_is_best_candidate_path_get_elem( | |
95 | struct nb_cb_get_elem_args *args); | |
96 | int pathd_srte_policy_candidate_path_protocol_origin_modify( | |
97 | struct nb_cb_modify_args *args); | |
98 | int pathd_srte_policy_candidate_path_originator_modify( | |
99 | struct nb_cb_modify_args *args); | |
100 | struct yang_data *pathd_srte_policy_candidate_path_discriminator_get_elem( | |
101 | struct nb_cb_get_elem_args *args); | |
102 | int pathd_srte_policy_candidate_path_type_modify( | |
103 | struct nb_cb_modify_args *args); | |
104 | int pathd_srte_policy_candidate_path_segment_list_name_modify( | |
105 | struct nb_cb_modify_args *args); | |
106 | int pathd_srte_policy_candidate_path_segment_list_name_destroy( | |
107 | struct nb_cb_destroy_args *args); | |
108 | ||
109 | /* Optional 'apply_finish' callbacks. */ | |
110 | void pathd_apply_finish(struct nb_cb_apply_finish_args *args); | |
111 | ||
112 | /* Optional 'cli_show' callbacks. */ | |
113 | void cli_show_srte_segment_list(struct vty *vty, struct lyd_node *dnode, | |
114 | bool show_defaults); | |
115 | void cli_show_srte_segment_list_segment(struct vty *vty, struct lyd_node *dnode, | |
116 | bool show_defaults); | |
117 | void cli_show_srte_policy(struct vty *vty, struct lyd_node *dnode, | |
118 | bool show_defaults); | |
119 | void cli_show_srte_policy_name(struct vty *vty, struct lyd_node *dnode, | |
120 | bool show_defaults); | |
121 | void cli_show_srte_policy_binding_sid(struct vty *vty, struct lyd_node *dnode, | |
122 | bool show_defaults); | |
123 | void cli_show_srte_policy_candidate_path(struct vty *vty, | |
124 | struct lyd_node *dnode, | |
125 | bool show_defaults); | |
126 | ||
127 | /* Utility functions */ | |
128 | typedef void (*of_pref_cp_t)(enum objfun_type type, void *arg); | |
129 | void iter_objfun_prefs(const struct lyd_node *dnode, const char *path, | |
130 | of_pref_cp_t fun, void *arg); | |
131 | ||
132 | #endif /* _FRR_PATH_NB_H_ */ |