]> git.proxmox.com Git - mirror_frr.git/blame - pathd/path_nb.h
Merge pull request #8182 from mjstapp/topotest_start_tgen
[mirror_frr.git] / pathd / path_nb.h
CommitLineData
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
24extern const struct frr_yang_module_info frr_pathd_info;
25
26/* Mandatory callbacks. */
27int pathd_srte_segment_list_create(struct nb_cb_create_args *args);
28int pathd_srte_segment_list_destroy(struct nb_cb_destroy_args *args);
29
30const void *pathd_srte_segment_list_get_next(struct nb_cb_get_next_args *args);
31int pathd_srte_segment_list_get_keys(struct nb_cb_get_keys_args *args);
32const void *
33pathd_srte_segment_list_lookup_entry(struct nb_cb_lookup_entry_args *args);
34
35int pathd_srte_segment_list_segment_create(struct nb_cb_create_args *args);
36int pathd_srte_segment_list_segment_destroy(struct nb_cb_destroy_args *args);
37int pathd_srte_segment_list_protocol_origin_modify(
38 struct nb_cb_modify_args *args);
39int pathd_srte_segment_list_originator_modify(struct nb_cb_modify_args *args);
40int pathd_srte_segment_list_segment_sid_value_modify(
41 struct nb_cb_modify_args *args);
42int pathd_srte_segment_list_segment_nai_destroy(
43 struct nb_cb_destroy_args *args);
44void pathd_srte_segment_list_segment_nai_apply_finish(
45 struct nb_cb_apply_finish_args *args);
f2b9485d
JG
46int pathd_srte_segment_list_segment_sid_value_destroy(
47 struct nb_cb_destroy_args *args);
4d7b695d
SM
48int pathd_srte_policy_create(struct nb_cb_create_args *args);
49int pathd_srte_policy_destroy(struct nb_cb_destroy_args *args);
50const void *pathd_srte_policy_get_next(struct nb_cb_get_next_args *args);
51int pathd_srte_policy_get_keys(struct nb_cb_get_keys_args *args);
52const void *
53pathd_srte_policy_lookup_entry(struct nb_cb_lookup_entry_args *args);
54int pathd_srte_policy_name_modify(struct nb_cb_modify_args *args);
55int pathd_srte_policy_name_destroy(struct nb_cb_destroy_args *args);
56int pathd_srte_policy_binding_sid_modify(struct nb_cb_modify_args *args);
57int pathd_srte_policy_binding_sid_destroy(struct nb_cb_destroy_args *args);
58struct yang_data *
59pathd_srte_policy_is_operational_get_elem(struct nb_cb_get_elem_args *args);
60int pathd_srte_policy_candidate_path_create(struct nb_cb_create_args *args);
61int pathd_srte_policy_candidate_path_destroy(struct nb_cb_destroy_args *args);
62int pathd_srte_policy_candidate_path_name_modify(
63 struct nb_cb_modify_args *args);
64const void *
65pathd_srte_policy_candidate_path_get_next(struct nb_cb_get_next_args *args);
66int pathd_srte_policy_candidate_path_get_keys(struct nb_cb_get_keys_args *args);
67const void *pathd_srte_policy_candidate_path_lookup_entry(
68 struct nb_cb_lookup_entry_args *args);
69void pathd_srte_policy_candidate_path_bandwidth_apply_finish(
70 struct nb_cb_apply_finish_args *args);
71int pathd_srte_policy_candidate_path_bandwidth_destroy(
72 struct nb_cb_destroy_args *args);
73int pathd_srte_policy_candidate_path_exclude_any_modify(
74 struct nb_cb_modify_args *args);
75int pathd_srte_policy_candidate_path_exclude_any_destroy(
76 struct nb_cb_destroy_args *args);
77int pathd_srte_policy_candidate_path_include_any_modify(
78 struct nb_cb_modify_args *args);
79int pathd_srte_policy_candidate_path_include_any_destroy(
80 struct nb_cb_destroy_args *args);
81int pathd_srte_policy_candidate_path_include_all_modify(
82 struct nb_cb_modify_args *args);
83int pathd_srte_policy_candidate_path_include_all_destroy(
84 struct nb_cb_destroy_args *args);
85int pathd_srte_policy_candidate_path_metrics_destroy(
86 struct nb_cb_destroy_args *args);
87void pathd_srte_policy_candidate_path_metrics_apply_finish(
88 struct nb_cb_apply_finish_args *args);
89int pathd_srte_policy_candidate_path_objfun_destroy(
90 struct nb_cb_destroy_args *args);
91void pathd_srte_policy_candidate_path_objfun_apply_finish(
92 struct nb_cb_apply_finish_args *args);
93struct yang_data *
94pathd_srte_policy_candidate_path_is_best_candidate_path_get_elem(
95 struct nb_cb_get_elem_args *args);
96int pathd_srte_policy_candidate_path_protocol_origin_modify(
97 struct nb_cb_modify_args *args);
98int pathd_srte_policy_candidate_path_originator_modify(
99 struct nb_cb_modify_args *args);
100struct yang_data *pathd_srte_policy_candidate_path_discriminator_get_elem(
101 struct nb_cb_get_elem_args *args);
102int pathd_srte_policy_candidate_path_type_modify(
103 struct nb_cb_modify_args *args);
104int pathd_srte_policy_candidate_path_segment_list_name_modify(
105 struct nb_cb_modify_args *args);
106int pathd_srte_policy_candidate_path_segment_list_name_destroy(
107 struct nb_cb_destroy_args *args);
108
109/* Optional 'apply_finish' callbacks. */
110void pathd_apply_finish(struct nb_cb_apply_finish_args *args);
111
112/* Optional 'cli_show' callbacks. */
113void cli_show_srte_segment_list(struct vty *vty, struct lyd_node *dnode,
114 bool show_defaults);
115void cli_show_srte_segment_list_segment(struct vty *vty, struct lyd_node *dnode,
116 bool show_defaults);
117void cli_show_srte_policy(struct vty *vty, struct lyd_node *dnode,
118 bool show_defaults);
119void cli_show_srte_policy_name(struct vty *vty, struct lyd_node *dnode,
120 bool show_defaults);
121void cli_show_srte_policy_binding_sid(struct vty *vty, struct lyd_node *dnode,
122 bool show_defaults);
123void cli_show_srte_policy_candidate_path(struct vty *vty,
124 struct lyd_node *dnode,
125 bool show_defaults);
126
127/* Utility functions */
128typedef void (*of_pref_cp_t)(enum objfun_type type, void *arg);
129void 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_ */