auditxml revision 69987563713261563f769bf902be7fd10691efc4
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# CDDL HEADER START
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# The contents of this file are subject to the terms of the
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# Common Development and Distribution License (the "License").
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# You may not use this file except in compliance with the License.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# See the License for the specific language governing permissions
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# and limitations under the License.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# When distributing Covered Code, include this CDDL HEADER in each
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# If applicable, add the following below this CDDL HEADER, with the
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# fields enclosed by brackets "[]" replaced with your own identifying
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# CDDL HEADER END
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# Use is subject to license terms.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# ident "%Z%%M% %I% %E% SMI"
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# auditxml [-d] <xml input file>
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# auditxml takes the audit record description (.xml file) and
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# generates the files needed for the C audit api.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncour $debug = 0; # normal use is to set via the file being parsed.
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync # <debug set="on"/> or <debug set="off"/> or <debug/>
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync # if the set attribute is omitted, debug state is toggled
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync # Override with appDebug, but toggle won't do what you
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncmy $appDebug = 0; # used after return from "new auditxml";
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsyncDO NOT EDIT. This file is auto generated by the Solaris Audit
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# trim leading/trailing newlines
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync# where everything comes from and where it goes:
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync generateAPIFile($event, $eventId, $eventType, $eventHeader, $idNo)
a734c64bff58bda2fa48c2795453e092167b0ff7vboxsync generateTableC($event, $eventId, $eventType, $eventHeader, $omit);
my $textList;
my $file = shift;
my $notice = $genNotice;
my $extDef;
@{$xlateEventTable{$eventId}};
my $entry;
my $externalRoot = $externalName;
$externalRoot =~ s/AUE_//;
my $externalId = $eventId;
$externalId =~ s/AUE_/ADT_/;
$entry =~ s/selfReference/$structName/;
my $firstEvent = 1;
$firstEvent = 0;
my @preloads = @{$xlateDefault{$id}};
my $fieldName = shift @preloads;
my $listName;
my @listName;
my $listValue;
my $listLength = $#listValue + 1;
my $ffirst = 1;
$ffirst = 0;
my $ffirst = 1;
$ffirst = 0;
my $file = shift;
my $xmlDoc = shift;
my @Hfile;
my $notice = $genNotice;
my $shortName = uc $listName;
$shortName =~ s/_TEXT//;
my $listValue;
my $j = $#listValue;
$line =~ s/\t\t/\t/;
$eline =~ s/ {8}//;
my $externalId = $eventId;
$externalId =~ s/AUE_/ADT_/;
my $entry;
$entry =~ s/termid/adt_termid_t/;
$outputState[$header] = 0;
$outputState[$header] = 1;
my $elementName = $eventId;
$elementName =~ s/^AUE_/adt_/;
$elementName =~ s/_t$//;
my $event = shift;
my $eventId = shift;
my $eventType = shift;
my $eventHeader = shift;
my $omit = shift;
my $entryRef;
my @inputOrder;
$firstTokenIndex = $j;
last;
my $sequence = 0;
$enumGroup =~ s/^msg\s*//i;
my $tsol = 0;
my $token;
my $tokenName;
print STDERR
$sequence++;
my $xlateLabelInc = 0;
my $dataType;
my $dataSize;
my $entryType = ${$entryDef{$type}}[0];
my $typeCount = 1;
$type =~ s/\[\]//;
$xlateLabelInc = 1;
@list = @{$xlateDefault{$eventId}};
$xlateDefault{$eventId} = \@list;
my $dataType;
my $entryType = ${$entryDef{$dtype}}[0];
$type =~ s/\[\]//;
$xlateLabelInc = 1;
@list = @{$xlateDefault{$eventId}};
$xlateDefault{$eventId} = \@list;
my $event = shift;
my $eventId = shift;
my $eventType = shift;
my $eventHeader = shift;
my $idNo = shift;
print STDERR
$#id = $#type;
$#type = $#id;
$eventExtra{$eventId} = [$eventHeader, $idNo];
my $textList = shift;
my $entry;
my @entry;
[\@entry, [$header, $start, $public, $deprecated]];
my $header_index = shift;
# $header = 0 is a special case; it is for adt_event.h
# $header > 0 creates adt_event_N.h, where N = $header
my $header;
$HfileName[$header] = $tmp[$#tmp];
my @Hfile = @_;
my $header;