2 * Copyright 2009, Sine Nomine Associates and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
13 #define OSI_AUDIT_MAXMSG 2048 /* Max amount of text in auditmsg */
15 struct osi_audit_ops {
17 * send_msg - send a formatted message to interface output
18 * Called from osi_audit
20 void (*send_msg)(void *rock, const char *message, int msglen, int truncated);
23 * open_file - process file specification parameter
24 * Called from osi_audit_file during commandline processing
26 int (*open_file)(void *rock, const char *fileName);
29 * print_interface_stats - print stats
30 * Called from audit_Printstats
32 void (*print_interface_stats)(void *rock, FILE *out);
35 * create_interface - create a new instance of the interface
36 * Called from osi_audit_file during command line processing
38 void *(*create_interface)(void);
41 * close_interface - stop the interface and free resources
42 * Called from osi_audit_close during daemon shutdown
44 void (*close_interface)(void **rock);
46 /* Following are optional functions. Set to NULL if not implemented */
49 * set_option - process optional parameter
50 * Called from osi_audit_file during command line processing
52 int (*set_option)(void *rock, char *opt, char *val);
55 * open_interface - complete interface initialization
56 * Called from osi_audit_open during daemon initialization
57 * after command line processing
59 void (*open_interface)(void *rock);
62 #endif /* _AUDIT_API_H */