yumapro  24.10-3
YumaPro SDK
Loading...
Searching...
No Matches
agt_audit.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_audit
13#define _H_agt_audit
14/* FILE: agt_audit.h
15*********************************************************************
16* *
17* P U R P O S E *
18* *
19*********************************************************************/
20
27/*********************************************************************
28* *
29* C H A N G E H I S T O R Y *
30* *
31*********************************************************************
32
33date init comment
34----------------------------------------------------------------------
3501-sep-18 abb Begun.
3612aug24 rz YPW-2255: Set local time for all audit logs if
37 the 'audit-log-localtime' CLI param is true.
38*/
39
40
41#ifndef _H_rpc
42#include "rpc.h"
43#endif
44
45#ifndef _H_ses
46#include "ses.h"
47#endif
48
49#ifndef _H_status_enum
50#include "status_enum.h"
51#endif
52
53#ifndef _H_val
54#include "val.h"
55#endif
56
57#ifdef __cplusplus
58extern "C" {
59#endif
60
61
62/********************************************************************
63* *
64* C O N S T A N T S *
65* *
66*********************************************************************/
67
68
69/********************************************************************
70* *
71* T Y P E S *
72* *
73*********************************************************************/
74
75
76/********************************************************************
77* *
78* F U N C T I O N S *
79* *
80*********************************************************************/
81
82
112extern void
114 ses_cb_t *scb,
115 rpc_msg_t *msg,
116 val_value_t *curnode_clone,
117 val_value_t *newnode,
118 val_value_t *curnode);
119
120
129extern void
131 rpc_msg_t *msg,
132 const xmlChar *sourcetype,
133 const xmlChar *sourcename);
134
135
141extern void
143
144
152extern void
154 ses_term_reason_t termreason,
155 ses_id_t killedby);
156
157
165extern void
166 agt_audit_handle_acm_write_error (const xmlChar *user,
167 val_value_t *val,
168 op_editop_t editop);
169
170
178extern void
179 agt_audit_handle_acm_exec_error (const xmlChar *user,
180 const xmlChar *modname,
181 const xmlChar *rpcname);
182
183
190extern void
192 rpc_msg_t *msg);
193
194
202extern uint32
204 status_t *res);
205
206
212extern boolean
214
215
221extern boolean
223
224
230extern boolean
232
233
239extern boolean
241
242
248extern boolean
250
251
257extern boolean
259
260
266extern boolean
268
269
275extern boolean
277
278
284extern boolean
286
287
293extern boolean
295
299#ifdef __cplusplus
300} /* end extern 'C' */
301#endif
302
303#endif /* _H_agt_audit */
void agt_audit_handle_end_session(ses_cb_t *scb, ses_term_reason_t termreason, ses_id_t killedby)
Generate an end (client or control) session event if enabled.
Definition: agt_audit.c:597
void agt_audit_handle_update_startup(ses_cb_t *scb, rpc_msg_t *msg, const xmlChar *sourcetype, const xmlChar *sourcename)
Create and store an update-startup audit record, if needed.
Definition: agt_audit.c:390
boolean agt_audit_log_edit_candidate(void)
Check if <candidate> edit events are being collected.
Definition: agt_audit.c:1078
boolean agt_audit_log_nacm_write_error(void)
Check if NACM write-access errors are being collected.
Definition: agt_audit.c:1158
void agt_audit_handle_acm_exec_error(const xmlChar *user, const xmlChar *modname, const xmlChar *rpcname)
Generate an acm-exec-error event if enabled.
Definition: agt_audit.c:767
void agt_audit_handle_rpc_summary(ses_cb_t *scb, rpc_msg_t *msg)
Create and store an rpc-summary event audit record, if needed.
Definition: agt_audit.c:828
boolean agt_audit_log_client_session(void)
Check if client session events are being collected.
Definition: agt_audit.c:1126
boolean agt_audit_log_edit_data(void)
Check if edit-data events are being collected.
Definition: agt_audit.c:1206
void agt_audit_handle_edit_record(op_editop_t editop, ses_cb_t *scb, rpc_msg_t *msg, val_value_t *curnode_clone, val_value_t *newnode, val_value_t *curnode)
Create and store a change-audit record, if needed.
Definition: agt_audit.c:84
void agt_audit_handle_start_session(ses_cb_t *scb)
Generate a start (client or control) session event if enabled.
Definition: agt_audit.c:511
boolean agt_audit_log_control_session(void)
Check if control session events are being collected.
Definition: agt_audit.c:1142
boolean agt_audit_log_rpc_summary(void)
Check if RPC summary events are being collected.
Definition: agt_audit.c:1190
void agt_audit_handle_acm_write_error(const xmlChar *user, val_value_t *val, op_editop_t editop)
Generate an acm-write-error event if enabled.
Definition: agt_audit.c:687
boolean agt_audit_log_rpc_error(void)
Check if rpc-error events are being collected.
Definition: agt_audit.c:1223
boolean agt_audit_log_nacm_exec_error(void)
Check if NACM exec-access errors are being collected.
Definition: agt_audit.c:1174
boolean agt_audit_log_edit_running(void)
Check if <running> edit events are being collected.
Definition: agt_audit.c:1094
boolean agt_audit_log_update_startup(void)
Check if <startup> update events are being collected.
Definition: agt_audit.c:1110
uint32 agt_audit_cvt_log_events(val_value_t *val, status_t *res)
Get the binary bits from the YANG bits value.
Definition: agt_audit.c:1014
op_editop_t
NETCONF edit-config operation types.
Definition: op.h:122
status_t
global error return code
Definition: status_enum.h:210
ses_term_reason_t
Session Termination reason.
Definition: ses.h:417
uint32 ses_id_t
Session ID.
Definition: ses.h:335
NETCONF protocol remote procedure call common definitions.
NETCONF Session Common definitions module.
global error status code enumerations
NETCONF Server and Client RPC Request/Reply Message Header.
Definition: rpc.h:185
Session Control Block.
Definition: ses.h:573
one value to match one type
Definition: val.h:912
Value Node Basic Support.