yumapro  24.10-11
YumaPro SDK
Loading...
Searching...
No Matches
agt_acm_ietf.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3 * Copyright (c) 2012 - 2021, YumaWorks, Inc., All Rights Reserved.
4 *
5 * Unless required by applicable law or agreed to in writing,
6 * software distributed under the License is distributed on an
7 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8 * KIND, either express or implied. See the License for the
9 * specific language governing permissions and limitations
10 * under the License.
11 */
12#ifndef _H_agt_acm_ietf
13#define _H_agt_acm_ietf
14
15/* FILE: agt_acm_ietf.h
16*********************************************************************
17* *
18* P U R P O S E *
19* *
20*********************************************************************/
21
31/*********************************************************************
32* *
33* C H A N G E H I S T O R Y *
34* *
35*********************************************************************
36
37date init comment
38----------------------------------------------------------------------
3918-jun-12 abb Begun; split from agt_acm.h
40*/
41
42#include <xmlstring.h>
43
44#ifndef _H_agt
45#include "agt.h"
46#endif
47
48#ifndef _H_dlq
49#include "dlq.h"
50#endif
51
52#ifndef _H_obj
53#include "obj.h"
54#endif
55
56#ifndef _H_ses
57#include "ses.h"
58#endif
59
60#ifndef _H_status
61#include "status.h"
62#endif
63
64#ifndef _H_val
65#include "val.h"
66#endif
67
68#ifndef _H_xml_msg
69#include "xmlmsg.h"
70#endif
71
72#ifndef _H_xmlns
73#include "xmlns.h"
74#endif
75
76#ifndef _H_xpath
77#include "xpath.h"
78#endif
79
80#ifdef __cplusplus
81extern "C" {
82#endif
83
84/********************************************************************
85* *
86* C O N S T A N T S *
87* *
88*********************************************************************/
89
90#define y_ietf_netconf_acm_M_ietf_netconf_acm \
91 (const xmlChar *)"ietf-netconf-acm"
92
93// accept either 2012 or 2018 version
94//#define y_ietf_netconf_acm_R_ietf_netconf_acm (const xmlChar *)"2012-02-22"
95//#define y_ietf_netconf_acm_R_ietf_netconf_acm (const xmlChar *)"2018-02-14"
96#define y_ietf_netconf_acm_R_ietf_netconf_acm NULL
97
98#define y_ietf_netconf_acm_N_access_operations \
99 (const xmlChar *)"access-operations"
100#define y_ietf_netconf_acm_N_action (const xmlChar *)"action"
101#define y_ietf_netconf_acm_N_comment (const xmlChar *)"comment"
102#define y_ietf_netconf_acm_N_data_node (const xmlChar *)"data-node"
103#define y_ietf_netconf_acm_N_denied_data_writes \
104 (const xmlChar *)"denied-data-writes"
105#define y_ietf_netconf_acm_N_denied_notifications \
106 (const xmlChar *)"denied-notifications"
107#define y_ietf_netconf_acm_N_denied_operations \
108 (const xmlChar *)"denied-operations"
109#define y_ietf_netconf_acm_N_enable_external_groups \
110 (const xmlChar *)"enable-external-groups"
111#define y_ietf_netconf_acm_N_enable_nacm (const xmlChar *)"enable-nacm"
112#define y_ietf_netconf_acm_N_exec_default (const xmlChar *)"exec-default"
113#define y_ietf_netconf_acm_N_group (const xmlChar *)"group"
114#define y_ietf_netconf_acm_N_groups (const xmlChar *)"groups"
115#define y_ietf_netconf_acm_N_module_name (const xmlChar *)"module-name"
116#define y_ietf_netconf_acm_N_nacm (const xmlChar *)"nacm"
117#define y_ietf_netconf_acm_N_name (const xmlChar *)"name"
118#define y_ietf_netconf_acm_N_notification (const xmlChar *)"notification"
119#define y_ietf_netconf_acm_N_notification_name \
120 (const xmlChar *)"notification-name"
121#define y_ietf_netconf_acm_N_path (const xmlChar *)"path"
122#define y_ietf_netconf_acm_N_protocol_operation \
123 (const xmlChar *)"protocol-operation"
124#define y_ietf_netconf_acm_N_read_default (const xmlChar *)"read-default"
125#define y_ietf_netconf_acm_N_rpc_name (const xmlChar *)"rpc-name"
126#define y_ietf_netconf_acm_N_rule (const xmlChar *)"rule"
127#define y_ietf_netconf_acm_N_rule_list (const xmlChar *)"rule-list"
128#define y_ietf_netconf_acm_N_rule_type (const xmlChar *)"rule-type"
129#define y_ietf_netconf_acm_N_user_name (const xmlChar *)"user-name"
130#define y_ietf_netconf_acm_N_write_default (const xmlChar *)"write-default"
131
132
133/********************************************************************
134* *
135* T Y P E S *
136* *
137*********************************************************************/
138
139
169typedef status_t
170 (*agt_acm_group_cbfn_t) (const xmlChar *username,
171 xmlChar **retgroups);
172
173
174/********************************************************************
175* *
176* F U N C T I O N S *
177* *
178*********************************************************************/
179
180
188extern status_t
189 agt_acm_ietf_init2 (void);
190
191
198extern status_t
199 agt_acm_ietf_init1 (void);
200
201
208extern void
209 agt_acm_ietf_cleanup (void);
210
211
221extern boolean
222 agt_acm_ietf_rpc_allowed (xml_msg_hdr_t *msg,
223 const xmlChar *user,
224 const obj_template_t *rpcobj);
225
226
227
228
238extern boolean
239 agt_acm_ietf_action_allowed (xml_msg_hdr_t *msg,
240 const xmlChar *user,
241 val_value_t *action_val);
242
243
255extern boolean
256 agt_acm_ietf_notif_allowed (const xmlChar *user,
257 const obj_template_t *notifobj);
258
259
276extern boolean
277 agt_acm_ietf_val_write_allowed (xml_msg_hdr_t *msg,
278 const xmlChar *user,
279 val_value_t *newval,
280 val_value_t *curval,
281 op_editop_t editop);
282
283
293extern boolean
294 agt_acm_ietf_val_read_allowed (xml_msg_hdr_t *msg,
295 const xmlChar *user,
296 val_value_t *val);
297
298
310extern status_t
311 agt_acm_ietf_init_msg_cache (ses_cb_t *scb,
312 xml_msg_hdr_t *msg);
313
314
322extern void agt_acm_ietf_clear_session_cache (ses_cb_t *scb);
323
324
332extern void agt_acm_ietf_invalidate_session_cache (ses_cb_t *scb);
333
334
344extern boolean agt_acm_ietf_session_cache_valid (const ses_cb_t *scb);
345
346
354extern void
355 agt_acm_ietf_clean_xpath_cache (void);
356
357
368extern void
370
371
372
381extern void
382 agt_acm_ietf_set_datarules (val_value_t *val,
383 uint32 msgid);
384
385
393extern void
394 agt_acm_ietf_clean_obj_datarule (ncx_module_t *mod);
395
396
397
398#ifdef WITH_YP_HA
399
406extern void
407 agt_acm_ietf_go_active (void);
408
409
416extern void
417 agt_acm_ietf_go_standby (void);
418
419#endif // WITH_YP_HA
420
424#ifdef __cplusplus
425} /* end extern 'C' */
426#endif
427
428#endif /* _H_agt_acm_ietf */
Multi-Protocol Network Management Server.
dlq provides general double-linked list and queue support:
void agt_acm_ietf_register_group_cbfn(agt_acm_group_cbfn_t cbfn)
Register a get-external-groups callback function.
Definition: agt_acm_ietf.c:6044
status_t(* agt_acm_group_cbfn_t)(const xmlChar *username, xmlChar **retgroups)
typedef for NACM External Groups callback function
Definition: agt_acm_ietf.h:170
op_editop_t
NETCONF edit-config operation types.
Definition: op.h:122
status_t
global error return code
Definition: status_enum.h:219
Data Object Support.
NETCONF Session Common definitions module.
Global error messages for status code enumerations.
representation of one module or submodule during and after parsing
Definition: ncxtypes.h:1138
One YANG data-def-stmt.
Definition: obj.h:1232
Session Control Block.
Definition: ses.h:573
one value to match one type
Definition: val.h:912
Common Encoding Message Header No longer XML specific!! Used by JSON and CBOR parsing as well!...
Definition: xml_msg.h:404
Value Node Basic Support.
XML namespace support.
Schema and data model Xpath search support.