[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 5

strchg Command

Purpose

Changes stream configuration.

Syntax

To push modules onto a stream:

strchg 
-h Module1 [ ,Module2 ... ]

To pop modules off a stream:

strchg 
-p 
[ -a | 
-u Module ]

To push and pop modules to conform to the configuration file:

strchg 
-f File

Description

The strchg command is used to alter the configuration of the stream associated with the user's standard input. The strchg command pushes modules on the stream, pops modules off of the stream, or both. Only the root user or owner of a STREAMS device can alter the configuration of that stream. If another user attempts to alter the configuration, the strchg command will not succeed.

Note: If modules are pushed in the wrong order, the stream might not function as expected.

Flags

-a Pops all modules above the topmost driver off of a stream. The -p flag must be used in front of the -a flag.
-f File Pushes and pops the necessary modules to conform the stream to the configuration given in the specified file.

The -h, -p, and -f flags are mutually exclusive.

-h Module1 Pushes modules onto a stream. The modules are listed on the command line in the order they are to be pushed.
-p Pops a module off of a stream. Used alone, the -p flag pops the topmost module from the stream.
-u Module Pops all modules above the specified module off of a stream. The -p flag must be used in front of the -u flag.

The -a and -u flags are mutually exclusive.

Parameters

Module1 Specifies the module to be pushed onto a stream. (Used by the -h flag.)
Module Specifies the topmost module to remain on a stream. All modules above this module are popped off of the stream. (Used by the -u flag.)
File Contains a list of modules representing the desired configuration of the stream. Each module name must appear on a separate line, where the first name represents the topmost module and the last name represents the module that is closest to the driver.

Return Values

On successful completion, the strchg command returns a value of 0. Otherwise, it returns a nonzero value and prints an error message indicating usage error, a bad module name, too many modules to push, failure of an ioctl operation on the stream, or failure to open the file specified by the File parameter.

Examples

  1. To push the ldterm module on the stream, enter:
    strchg -h ldterm
  2. To pop the topmost module from the stream associated with the /dev/term/24 device, enter:
    strchg -p < /dev/term/24
    The user must be the owner of this device or the root user.
  3. If the fileconf file contains the following:
    compat
    ldterm
    ptem
    the following command configures the stream so that the ptem module is pushed over the driver, followed by the ldterm module, and the compat module is pushed closest to the stream head.
    strchg -f fileconf

Related Information

The strconf command.

List of Streams Commands, STREAMS Overview in AIX Version 4.3 Communications Programming Concepts.

The streamio operations in AIX Version 4.3 Technical Reference: Communications Volume 2.


[ Previous | Next | Contents | Glossary | Home | Search ]