/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*
*
*/
#ifndef _BSM_XLATE_H
#define _BSM_XLATE_H
#include <priv.h>
#include "adt_event.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifndef TEXT_DOMAIN
#endif
/*
* values for adt_session_model
* In the session model, the session and process are unrelated, so
* such things as the supplementary group token make no sense. In
* the process model, the process and session are the same.
*/
#define ADT_PROCESS_MODEL 0
/*
* dummy token types for privilege
*/
union union_of_events {
};
/*
* The order of the lists MUST match the order in
* struct msg_text adt_msg_text that is generated by
* auditxml in adt_xlate.c.
*/
enum adt_msg_list {
};
union convert {
int tint;
long tlong;
char tchar;
char *tcharstar;
char **tchar2star;
};
struct adt_event_state {
/* above is user's area; below is internal. Order matters */
int ae_event_handle;
};
struct datadefs {
};
struct adt_event_state *, char *);
struct adt_internal_state {
/* == zero when freed */
/*
* ai_auid audit id
* ai_mask.am_success pre-selection mask
* ai_mask.am_failure
* ai_termid .at_port terminal id
* .at_type
* .ai_termid.at_addr[0]
* .ai_termid.at_addr[1]
* .ai_termid.at_addr[2]
* .ai_termid.at_addr[3]
* ai_asid session id
*/
/*
* data above this line is exported / imported
* To maintain upward compatibility, the above structures
* can't change, so for version 2, all changes will need
* to be added here and the old format (above) maintained.
*/
int as_session_model;
};
/*
* export data format
* version number changes when adt_internal_state's export portion
* changes.
*/
/*
* most recent version is at the top; down level consumers are
* expected to search down via "prev_offsetX" to a version they
* understand. "v1" is first, "v0" is used to illustrate correct
* order for future use.
*/
struct adt_export_v2 {
int ax_audit_state;
/* char ax_label[ax_label_len]; if, is_system_labeled */
};
struct adt_export_v1 {
int ax_audit_state;
};
struct export_link {
};
struct export_header {
};
struct adt_export_data {
/*
* end of version 2 data
*/
/*
* end of version 1 data
* struct export_link ax_next_A;
* data for older version
* struct adt_export_v0 ax_v0;
*/
};
/*
* struct entry defines rows in tables defined in adt_xlate.c
*/
struct entry {
};
struct translation {
};
struct token_jmp {
long jmp_id;
};
struct msg_text {
int ml_min_index;
int ml_max_index;
char **ml_msg_list;
int ml_offset;
};
extern struct msg_text adt_msg_text[];
extern void adt_write_syslog(const char *, int);
extern void adt_token_open(struct adt_event_state *);
extern int adt_token_close(struct adt_event_state *);
extern void adt_generate_token(struct entry *, void *,
struct adt_event_state *);
#ifdef __cplusplus
}
#endif
#endif /* _BSM_XLATE_H */