systoken.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster/*
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * CDDL HEADER START
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * The contents of this file are subject to the terms of the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Common Development and Distribution License, Version 1.0 only
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * (the "License"). You may not use this file except in compliance
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * with the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * or http://www.opensolaris.org/os/licensing.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * See the License for the specific language governing permissions
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * and limitations under the License.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * When distributing Covered Code, include this CDDL HEADER in each
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * If applicable, add the following below this CDDL HEADER, with the
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * fields enclosed by brackets "[]" replaced with your own identifying
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * information: Portions Copyright [yyyy] [name of copyright owner]
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster *
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * CDDL HEADER END
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster/*
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Use is subject to license terms.
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
c49468bbfa37132e6989d263741ca8c3b436f8f4Peter Major#ifndef _SYSTOKEN_H
22e447f16376d70c72a621de30818e00ccd45cccPeter Major#define _SYSTOKEN_H
c49468bbfa37132e6989d263741ca8c3b436f8f4Peter Major
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#pragma ident "%Z%%M% %I% %E% SMI"
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#ifdef __cplusplus
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern "C" {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#endif
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#include "sysplugin.h"
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#include <bsm/adt.h>
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster/*
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * parse_context -- doc and cur are for XML input, chunk and
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * remaining for "plain text input, i.e., the traditiona
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * output from praudit
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterstruct parse_context {
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster adr_t adr; /* input buffer pointers */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster uint32_t id; /* message sequence number */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster tosyslog_t out; /* output data */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster};
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fostertypedef struct parse_context parse_context_t;
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#define AU_TEXT_NAME " text "
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#ifdef useless
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster/*
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * the following *_ar_token() functions parallel the *_token()(
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * functions defined in praudit/toktable.h
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster/*
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * These tokens are the same for all versions of Solaris
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster/*
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Control tokens
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void file_token(adr_t *, uint64_t, uint64_t);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void trailer_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void header_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void header32_ex_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster/*
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Data tokens
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void arbitrary_data_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void s5_IPC_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void path_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void subject32_token();
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void process32_token();
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void return_value32_token();
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void text_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void opaque_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void ip_addr_token();
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void ip_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void iport_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void argument32_token();
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void socket_token();
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void sequence_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster/*
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Modifier tokens
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void acl_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void attribute_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void s5_IPC_perm_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void group_token();
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void ilabel_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void slabel_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void clearance_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void privilege_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void useofpriv_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void zonename_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void liaison_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void newgroup_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void exec_args_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void exec_env_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void attribute32_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void useofauth_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster/*
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * X windows tokens
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void xatom_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void xselect_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void xcolormap_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void xcursor_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void xfont_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void xgc_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void xpixmap_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void xproperty_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void xwindow_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void xclient_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster/*
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Command tokens
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void cmd_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void exit_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster/*
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Miscellaneous tokens
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void host_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster/*
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Solaris64 tokens
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void argument64_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void return64_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void attribute64_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void header64_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void subject64_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void process64_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void file64_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster/*
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster * Extended network address tokens
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void header64_ex_token();
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void subject32_ex_token();
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void process32_ex_token();
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void subject64_ex_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void process64_ex_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void ip_addr_ex_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Fosterextern void socket_ex_token(adr_t *, parse_context_t *);
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#endif
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#ifdef __cplusplus
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster}
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#endif
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster#endif /* _SYSTOKEN_H */
8af80418ba1ec431c8027fa9668e5678658d3611Allan Foster