summaryrefslogtreecommitdiff
path: root/usr/src/man/man3perl/Exacct::Catalog.3perl
diff options
context:
space:
mode:
authorRichard Lowe <richlowe@richlowe.net>2011-03-14 14:05:30 -0400
committerRichard Lowe <richlowe@richlowe.net>2011-03-14 14:05:30 -0400
commitc10c16dec587a0662068f6e2991c29ed3a9db943 (patch)
treef414286f4bba41d75683ed4fbbaa6bfa4bf7fabd /usr/src/man/man3perl/Exacct::Catalog.3perl
parent68caef18a23a498d9e3017b983562c0f4fd8ab23 (diff)
downloadillumos-joyent-c10c16dec587a0662068f6e2991c29ed3a9db943.tar.gz
243 system manual pages should live with the software
Reviewed by: garrett@nexenta.com Reviewed by: gwr@nexenta.com Reviewed by: trisk@opensolaris.org Approved by: gwr@nexenta.com --HG-- extra : rebase_source : 0c599d0bec0dc8865fbba67721a7a6cd6b1feefb
Diffstat (limited to 'usr/src/man/man3perl/Exacct::Catalog.3perl')
-rw-r--r--usr/src/man/man3perl/Exacct::Catalog.3perl234
1 files changed, 234 insertions, 0 deletions
diff --git a/usr/src/man/man3perl/Exacct::Catalog.3perl b/usr/src/man/man3perl/Exacct::Catalog.3perl
new file mode 100644
index 0000000000..be7a09cbe9
--- /dev/null
+++ b/usr/src/man/man3perl/Exacct::Catalog.3perl
@@ -0,0 +1,234 @@
+'\" te
+.\" Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved.
+.\" 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 or http://www.opensolaris.org/os/licensing. 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]
+.TH Exacct::Catalog 3PERL "1 Dec 2002" "SunOS 5.11" "Perl Library Functions"
+.SH NAME
+Exacct::Catalog \- exacct catalog tag manipulation
+.SH SYNOPSIS
+.LP
+.nf
+use Sun::Solaris::Exacct::Catalog qw(:ALL);
+my $ea_cat = Sun::Solaris::Exacct::Catalog->new(
+ &EXT_UINT64 | &EXC_DEFAULT | &EXD_PROC_PID);
+.fi
+
+.SH DESCRIPTION
+.sp
+.LP
+This class provides a wrapper around the 32-bit integer used as a catalog tag.
+The catalog tag is represented as a Perl object blessed into the
+\fBSun::Solaris::Exacct::Catalog\fR class so that methods can be used to
+manipulate fields in a catalog tag.
+.SS "Constants"
+.sp
+.LP
+All the \fBEXT_\fR*, \fBEXC_\fR*, and \fBEXD_\fR* macros are provided as
+constants. Constants passed to the methods below can either be the integer
+value such as \fBEXT_UINT8\fR or the string representation such as
+"\fBEXT_UINT8\fR".
+.SS "Functions"
+.sp
+.LP
+None.
+.SS "Class methods"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBregister($cat_pfx, $catalog_id, $export, @idlist)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This method is used to register application-defined \fBlibexacct\fR(3LIB)
+catalogs with the exacct Perl library. See
+<\fB/usr/include/sys/exacct_catalog.h\fR> for details of the catalog tag
+format. This method allows symbolic names and strings to be used for
+manipulating application-defined catalogs. The first two parameters define the
+catalog prefix and associated numeric catalog ID. If the \fB$export\fR
+parameter is true, the constants are exported into the caller's package. The
+final parameter is a list of (\fBid\fR, \fBname\fR) pairs that identify the
+required constants. The constants created by this method are formed by
+appending \fB$cat_pfx\fR and "_" to each name in the list, replacing any spaces
+with underscore characters and converting the resulting string to uppercase
+characters. The \fB$catalog_name\fR value is also created as a constant by
+prefixing it with\fB EXC_\fR and converting it to uppercase characters. Its
+value becomes that of \fB$catalog_id\fR shifted left by 24 bits. For example,
+the following call:
+.sp
+.in +2
+.nf
+Sun::Solaris::Exacct::Catalog->ea_register("MYCAT", 0x01, 1,
+ FIRST => 0x00000001, SECOND => 0x00000010);
+.fi
+.in -2
+
+results in the definition of the following constants:
+.sp
+.in +2
+.nf
+EXC_MYCAT 0x01 << 24
+MYCAT_FIRST 0x00000001
+MYCAT_SECOND 0x00000010
+.fi
+.in -2
+
+Only the catalog ID value of 0x01 is available for application use
+(\fBEXC_LOCAL\fR). All other values are reserved. While it is possible to use
+values other than 0x01, they might conflict with future extensions to the
+\fBlibexacct\fR file format.
+.sp
+If any errors are detected during this method, a string is returned containing
+the appropriate error message. If the call is sucessful, \fBundef\fR is
+returned.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBnew($integer)\fR\fR
+.ad
+.br
+.na
+\fB\fBnew($cat_obj)\fR\fR
+.ad
+.br
+.na
+\fB\fBnew($type, $catalog, $id)\fR\fR
+.ad
+.sp .6
+.RS 4n
+This method creates and returns a new Catalog object, which is a wrapper around
+a 32-bit integer catalog tag. Three possible argument lists can be given. The
+first variant is to pass an integer formed by bitwise-inclusive OR of the
+appropriate \fBEX[TCD]_\fR* constants. The second variant is to pass an
+existing Catalog object that will be copied. The final variant is to pass in
+the type, catalog and ID fields as separate values. Each of these values can be
+either an appropriate integer constant or the string representation of the
+constant.
+.RE
+
+.SS "Object methods"
+.sp
+.ne 2
+.mk
+.na
+\fB\fBvalue()\fR\fR
+.ad
+.RS 17n
+.rt
+This method allows the value of the catalog tag to be queried. In a scalar
+context it returns the 32-bit integer representing the tag. In a list context
+it returns a (\fBtype\fR, \fBcatalog\fR, \fBid\fR) triplet, where each member
+of the triplet is a dual-typed scalar.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtype()\fR\fR
+.ad
+.RS 17n
+.rt
+This method returns the type field of the catalog tag as a dual-typed scalar.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBcatalog()\fR\fR
+.ad
+.RS 17n
+.rt
+This method returns the catalog field of the catalog tag as a dual-typed
+scalar.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBid()\fR\fR
+.ad
+.RS 17n
+.rt
+This method returns the id field of the catalog tag as a dual-typed scalar.
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fBtype_str()\fR\fR
+.ad
+.br
+.na
+\fB\fBcatalog_str()\fR\fR
+.ad
+.br
+.na
+\fB\fBid_str()\fR\fR
+.ad
+.RS 17n
+.rt
+These methods return string representations of the appropriate value. These
+methods can be used for textual output of the various catalog fields. The
+string representations of the constants are formed by removing the \fBEXT_\fR,
+\fBEXC_\fR, or \fBEXD_\fR prefix, replacing any underscore characters with
+spaces, and converting the remaining string to lowercase characters.
+.RE
+
+.SS "Exports"
+.sp
+.LP
+By default nothing is exported from this module. The following tags can be used
+to selectively import constants and functions defined in this module:
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:CONSTANTS\fR\fR
+.ad
+.RS 14n
+.rt
+\fBEXT_\fR*, \fBEXC_\fR*, and \fBEXD_\fR*
+.RE
+
+.sp
+.ne 2
+.mk
+.na
+\fB\fB:ALL\fR\fR
+.ad
+.RS 14n
+.rt
+\fB:CONSTANTS\fR
+.RE
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Interface StabilityEvolving
+.TE
+
+.SH SEE ALSO
+.sp
+.LP
+\fBExacct\fR(3PERL), \fBExacct::File\fR(3PERL), \fBExacct::Object\fR(3PERL),
+\fBExacct::Object::Group\fR(3PERL), \fBExacct::Object::Item\fR(3PERL),
+\fBlibexacct\fR(3LIB), \fBattributes\fR(5)