'\" te .\" Copyright 1989 AT&T Copyright (c) 2008 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 AUTOPUSH 8 "Feb 15, 2008" .SH NAME autopush \- configures lists of automatically pushed STREAMS modules .SH SYNOPSIS .LP .nf \fBautopush\fR \fB-f\fR \fIfilename\fR .fi .LP .nf \fBautopush\fR \fB-g\fR \fB-M\fR \fImajor\fR \fB-m\fR \fIminor\fR .fi .LP .nf \fBautopush\fR \fB-r\fR \fB-M\fR \fImajor\fR \fB-m\fR \fIminor\fR .fi .SH DESCRIPTION .sp .LP The \fBautopush\fR command configures the list of modules to be automatically pushed onto the stream when a device is opened. It can also be used to remove a previous setting or get information on a setting. .SH OPTIONS .sp .LP The following options are supported: .sp .ne 2 .na \fB\fB-f\fR \fIfilename\fR\fR .ad .sp .6 .RS 4n Sets up the \fBautopush\fR configuration for each driver according to the information stored in \fIfilename\fR. An \fBautopush\fR file consists of lines of four or more fields, separated by spaces as shown below: .sp .in +2 .nf \fImajor minor last-minor module1 module2 \|.\|.\|. module8\fR .fi .in -2 .sp The first field is a string that specifies the \fImajor\fR device name, as listed in the \fB/kernel/drv\fR directory. The next two fields are integers that specify the \fIminor\fR device number and \fIlast-minor\fR device number. The fields following represent the names of modules. If \fIminor\fR is \fB\(mi1\fR, then all minor devices of a major driver specified by \fImajor\fR are configured, and the value for \fIlast-minor\fR is ignored. If \fIlast-minor\fR is \fB0\fR, then only a single minor device is configured. To configure a range of minor devices for a particular major, \fIminor\fR must be less than \fIlast-minor\fR. .sp The remaining fields list the names of modules to be automatically pushed onto the stream when opened, along with the position of an optional anchor. The maximum number of modules that can be pushed is eight. The modules are pushed in the order they are specified. The optional special character sequence \fB[anchor]\fR indicates that a STREAMS anchor should be placed on the stream at the module previously specified in the list; it is an error to specify more than one anchor or to have an anchor first in the list. .sp A nonzero exit status indicates that one or more of the lines in the specified file failed to complete successfully. .RE .sp .ne 2 .na \fB\fB-g\fR\fR .ad .sp .6 .RS 4n Gets the current configuration setting of a particular \fImajor\fR and \fIminor\fR device number specified with the \fB-M\fR and \fB-m\fR options respectively and displays the autopush modules associated with it. It will also return the starting minor device number if the request corresponds to a setting of a range (as described with the \fB-f\fR option). .RE .sp .ne 2 .na \fB\fB-m\fR \fIminor\fR\fR .ad .sp .6 .RS 4n Specifies the minor device number. .RE .sp .ne 2 .na \fB\fB-M\fR \fImajor\fR\fR .ad .sp .6 .RS 4n Specifies the major device number. .RE .sp .ne 2 .na \fB\fB-r\fR\fR .ad .sp .6 .RS 4n Removes the previous configuration setting of the particular \fImajor\fR and \fIminor\fR device number specified with the \fB-M\fR and \fB-m\fR options respectively. If the values of \fImajor\fR and \fIminor\fR correspond to a previously established setting of a range of minor devices, where \fIminor\fR matches the first minor device number in the range, the configuration would be removed for the entire range. .RE .SH EXIT STATUS .sp .LP The following exit values are returned: .sp .ne 2 .na \fB0\fR .ad .sp .6 .RS 4n Successful completion. .RE .sp .ne 2 .na \fBnon-zero\fR .ad .sp .6 .RS 4n An error occurred. .RE .SH EXAMPLES .LP \fBExample 1 \fRUsing the \fBautopush\fR command. .sp .LP The following example gets the current configuration settings for the \fImajor\fR and \fIminor\fR device numbers as indicated and displays the \fBautopush\fR modules associated with them for the character-special device \fB/dev/term/a:\fR .sp .in +2 .nf example# autopush \fB-g\fR \fB-M\fR 29 \fB-m\fR 0 Major Minor Lastminor Modules 29 0 1 ldterm ttcompat .fi .in -2 .sp .SH FILES .sp .LP \fB/etc/iu.ap\fR .SH SEE ALSO .sp .LP .BR sad (4D), .BR streamio (4I), .BR ldterm (4M), .BR ttcompat (4M), .BR attributes (7), .BR dladm (8), .BR ttymon (8) .sp .LP \fI\fR .SH NOTES .sp .LP The use of the \fBautopush\fR command is obsolete for networking data-links. The preferred method of configuring a list of automatically pushed STREAMS modules on a given networking data-link interface is the \fBdladm\fR(8) \fBautopush\fR link property. .sp .LP Because network devices are self-cloning, the \fBautopush\fR command is inadequate for networking devices. The granularity of the \fBautopush\fR command's configuration is driver-wide, and not per-interface as one might expect. Another reason not to use \fBautopush\fR is that administrators are more familiar with the names of their network interfaces than with device major and minor numbers. The \fBdladm\fR(8) command allows the configuration using data-link interface names.