strchg, strconf - Alters and queries stream configuration
strchg -h module1 [,module2,...modulen]
strchg -p [-a|-u module]
strchg -f file
strconf [-t|-m module]
modify and return information about the configuration of the Stream associated
with the user's standard input.
The strchg command has three formats, which must be specified separately. These formats offer the following options: When used with -p, removes all of the STREAMS modules above the topmost driver; that is, the command only affects the uppermost Stream created for a multiplexed driver, not any of the lower Streams. This option cannot be used with -u. Specifies a file that contains a list of STREAMS modules to be pushed on the standard input Stream for a desired configuration. The names of the modules must occupy separate lines in the file. The strchg command pushes any module that is desired but is not present on the Stream, and pops any module that is not desired and is present on the Stream. Pushes the STREAMS module or modules specified by the module argument or arguments on the standard input Stream. The command pushes the STREAMS modules on the Stream in the order that they are specified; that is, module1 is pushed first, module2 is pushed second, and so forth. Pops STREAMS modules off the standard input Stream. When the -p option is specified without any other options, the command removes the topmost module (the module immediately below the Stream head) from the Stream. The -a and -u options cannot be used simultaneously with the -p option. When used with -p, pops all of the modules above the specified module off the Stream, leaving that module on it. This option cannot be used with -a.
command options are the following:
Prints the name of the topmost module on the standard input
Stream, if this module exists.
Confirms whether or not the specified module
is present on the Stream.
The strchg command pushes and pops STREAMS modules on and off the user's standard input Stream to achieve a desired configuration. The strconf command queries the configuration of the Stream, then prints the names of the modules and the topmost device driver, or the name of the topmost module, or the name of a specific module.
When the -f option is used, the strchg command first determines the current configuration of the standard input Stream, then pushes or pops the modules named in the file argument to fix it. The module that is named first is meant to be the one that is located below the Stream head, while the module named last is meant to be at the bottom of the Stream, closest to the device driver. This is the opposite of the order in which the strchg command pushes and pops modules when it is invoked with the -h option.
To use the strchg command, you must either be the owner of the Stream or the superuser.
Without options, the strconf command prints the names of all of the modules, if any, and the name of the topmost driver. Names are printed one per line, with the driver's name last. When the autopush mechanism is used in a system, the strconf command returns the names of the modules that were automatically pushed on the standard input Stream at the opening of the associated device. If the Stream configuration has been changed since the device was opened, the command prints the altered list of module names.
If the -t option is used, the strconf command prints only the topmost module's name, if any exists. When the -m option is used, the command queries the standard input Stream for the module specified in the module argument. If this module is present on the Stream, it prints the message yes and returns a 0 (zero). If the module is not on the Stream, strchg prints no and returns a nonzero value. The -t and -m options cannot be used simultaneously.
To use the strconf command, you must either have read permission or be the superuser.
For both the
commands, note that if modules are pushed onto the user's standard input Stream
in the wrong order, that Stream will not function as expected. For example,
in the case of terminal lines (ttys), the line discipline module must be pushed
in the correct place; otherwise, the terminal might not respond correctly
The strchg command returns 0 (zero) on success. When the command encounters an error, it returns a nonzero status and prints an error message. The command returns errors for such conditions as a usage error, bad module name, failure of an ioctl system call, and failure to open the file specified by the -f option.
command returns 0 (zero) on success and
a nonzero status for errors. It prints an error message for any errors. When
options return successfully,
this indicates that the named, or topmost, module is present. The error conditions
that the command returns a status for include a usage error and a failure
To print out the names of the modules and driver present on the user's standard input Stream, enter: strconf To push the fictional line discipline module linedisp onto the user's standard input Stream, enter: strchg -h linedisp