Linux Fast-STREAMS
Linux Fast-STREAMS Installation and Reference Manual
About This Manual
This is Edition 4, last updated 2008-10-31, of The
Linux Fast-STREAMS Installation and Reference Manual, for Version 0.9.2
release 4 of the Linux Fast-STREAMS package.
Preface
Notice
This package is released and distributed under the AGPL (see GNU Affero General Public License). Please note, however, that there are different licensing terms for the manual pages and
some of the documentation (derived from OpenGroup1
publications and other sources). Consult the permission notices contained in the documentation for
more information.
This manual is released under the FDL (see GNU Free Documentation License) with no
sections invariant.
Abstract
This manual provides a Installation and Reference Manual for Linux Fast-STREAMS.
Objective
The objective of this manual is to provide a guide for the STREAMS programmer when
developing STREAMS modules, drivers and application programs for Linux Fast-STREAMS.
This guide provides information to developers on the use of the STREAMS mechanism at user and
kernel levels.
STREAMS was incorporated in UNIX System V Release 3 to augment the character input/output
(I/O) mechanism and to support development of communication services.
STREAMS provides developers with integral functions, a set of utility routines, and facilities
that expedite software design and implementation.
Intent
The intent of this manual is to act as an introductory guide to the STREAMS programmer. It
is intended to be read alone and is not intended to replace or supplement the
Linux Fast-STREAMS manual pages. For a reference for writing code, the manual pages
(see STREAMS(9)) provide a better reference to the programmer.
Although this describes the features of the Linux Fast-STREAMS package,
OpenSS7 Corporation is under no obligation to provide any software,
system or feature listed herein.
Audience
This manual is intended for a highly technical audience. The reader should already be familiar
with Linux kernel programming, the Linux file system, character devices, driver input
and output, interrupts, software interrupt handling, scheduling, process contexts, multiprocessor
locks, etc.
The guide is intended for network and systems programmers, who use the STREAMS mechanism at
user and kernel levels for Linux and UNIX system communication services.
Readers of the guide are expected to possess prior knowledge of the Linux and UNIX
system, programming, networking, and data communication.
Revisions
Take care that you are working with a current version of this manual: you will not be notified of
updates. To ensure that you are working with a current version, contact the
Author, or check The OpenSS7 Project website for a current version.
A current version of this manual is normally distributed with the Linux Fast-STREAMS
package.
Version Control
STREAMS.texi,v
Revision 0.9.2.45 2008-09-20 11:04:35 brian
- added package patchlevel
Revision 0.9.2.44 2008-08-03 06:03:36 brian
- protected agains texinfo commands in log entries
Revision 0.9.2.43 2008/07/27 08:49:17 brian
- no invariant sections, more libtool ignores
Revision 0.9.2.42 2008-04-28 12:54:00 brian
- update file headers for release
Revision 0.9.2.41 2008-04-25 11:50:49 brian
- updates to AGPLv3
Revision 0.9.2.40 2007/12/15 20:19:44 brian
- updates
Revision 0.9.2.39 2007/11/06 10:27:04 brian
- miscellaneous corrections
Revision 0.9.2.38 2007/08/12 06:44:32 brian
- updated licenses in manuals
Revision 0.9.2.37 2007/03/17 08:31:56 brian
- corrected formatting problems
Revision 0.9.2.36 2007/02/28 06:30:55 brian
- updates and corrections, #ifdef instead of #if
Revision 0.9.2.35 2007/01/02 16:32:03 brian
- updates for release, disable streams-bcm by default
Revision 0.9.2.34 2006/12/31 13:26:37 brian
- documentation updates for release
Revision 0.9.2.33 2006/09/18 01:06:57 brian
- updated manuals and release texi docs
Revision 0.9.2.32 2006/08/28 10:47:05 brian
- correction
Revision 0.9.2.31 2006/08/28 10:32:54 brian
- updated references
Revision 0.9.2.30 2006/08/27 12:26:58 brian
- finalizing auto release files
Revision 0.9.2.29 2006/08/26 18:31:44 brian
- handle long urls
Revision 0.9.2.28 2006/08/26 09:18:27 brian
- better release file generation
Revision 0.9.2.27 2006/08/23 11:00:41 brian
- added preface, corrections and updates for release
Revision 0.9.2.26 2006/08/22 12:36:49 brian
- udpates to documentation, tweaks to Stream head
Revision 0.9.2.25 2006/03/22 10:02:04 brian
- added makefile target index
Revision 0.9.2.24 2006/03/03 10:57:11 brian
- 32-bit compatibility support, updates for release
Revision 0.9.2.23 2005/09/15 13:03:08 brian
- added new graphics and updates
Revision 0.9.2.22 2005/07/08 13:16:11 brian
- updates to documentation
Revision 0.9.2.21 2005/06/24 13:38:59 brian
- added troubleshooting section to manuals
Revision 0.9.2.20 2005/05/14 08:34:34 brian
- copyright header correction
Revision 0.9.2.19 2005/04/15 00:58:31 brian
- working up documentation
Revision 0.9.2.18 2005/04/14 08:06:09 brian
- added figures
Revision 0.9.2.17 2005/04/12 09:28:59 brian
- corrections
Revision 0.9.2.16 2005/04/11 20:48:41 brian
- documentation updates and corrections
Revision 0.9.2.15 2005/03/15 12:06:58 brian
- Updated texinfo documentation.
Revision 0.9.2.14 2005/03/15 00:56:42 brian
- Updated version numbering in texinfo files.
Revision 0.9.2.13 2005/03/15 00:51:34 brian
- Updated version numbering in texinfo files.
Revision 0.9.2.12 2005/02/17 22:57:34 brian
- Some cross-reference corrections.
Revision 0.9.2.11 2005/02/17 11:34:53 brian
- Corrected some more texi problems.
Revision 0.9.2.10 2005/01/24 11:57:57 brian
- Updated texinfo headers.
Revision 0.9.2.9 2004/12/19 15:15:02 brian
- Corrected include position.
Revision 0.9.2.8 2004/12/17 04:02:46 brian
- Improving spec files.
Revision 0.9.2.7 2004/11/06 10:24:35 brian
- Updated documentation.
Revision 0.9.2.6 2004/08/22 07:28:53 brian
- Converted to shared common files.
Revision 0.9.2.5 2004/08/22 06:17:50 brian
- Checkin on new working branch.
Revision 0.9.2.4 2004/08/15 19:59:29 brian
- Build system updates.
Revision 0.9.2.3 2004/05/29 08:28:01 brian
- Working up stable release.
Revision 0.9.2.2 2004/03/15 07:59:39 brian
- Working up manual pages.
Revision 0.9.2.1 2004/03/13 05:46:34 brian
- Working up more documentation.
ISO 9000 Compliance
Only the TeX, texinfo, or roff source for this manual is controlled. An opaque (printed,
postscript or portable document format) version of this manual is an UNCONTROLLED
VERSION.
Disclaimer
OpenSS7 Corporation disclaims all warranties with regard to this documentation including all
implied warranties of merchantability, fitness for a particular purpose, non-infringement, or title;
that the contents of the manual are suitable for any purpose, or that the implementation of such
contents will not infringe on any third party patents, copyrights, trademarks or other rights. In
no event shall OpenSS7 Corporation be liable for any direct, indirect, special or
consequential damages or any damages whatsoever resulting from loss of use, data or profits, whether
in an action of contract, negligence or other tortious action, arising out of or in connection with
any use of this manual or the performance or implementation of the contents thereof.
OpenSS7 Corporation reserves the right to revise this software and documentation for any
reason, including but not limited to, conformity with standards promulgated by various agencies,
utilization of advances in the state of the technical arts, or the reflection of changes in the
design of any techniques, or procedures embodied, described, or referred to herein. OpenSS7
Corporation is under no obligation to provide any feature listed herein.
U.S. Government Restricted Rights
If you are licensing this Software on behalf of the U.S. Government ("Government"), the following
provisions apply to you. If the Software is supplied by the Department of Defense ("DoD"), it is
classified as "Commercial Computer Software" under paragraph 252.227-7014 of the DoD Supplement to
the Federal Acquisition Regulations ("DFARS") (or any successor regulations) and the Government is
acquiring only the license rights granted herein (the license rights customarily provided to
non-Government users). If the Software is supplied to any unit or agency of the Government other
than DoD, it is classified as "Restricted Computer Software" and the Government's rights in the
Software are defined in paragraph 52.227-19 of the Federal Acquisition Regulations ("FAR") (or any
successor regulations) or, in the cases of NASA, in paragraph 18.52.227-86 of the NASA Supplement to
the FAR (or any successor regulations).
Acknowledgements
As with most open source projects, this project would not have been possible without the valiant
efforts and productive software of the Free Software Foundation
and the Linux Kernel Community.
Sponsors
Funding for completion of the OpenSS7 Linux Fast-STREAMS package was
provided in part by:
Additional funding for The OpenSS7 Project was provided by:
Contributors
The primary contributor to the OpenSS7 Linux Fast-STREAMS package is
Brian F. G. Bidulock. The following is a list of significant
contributors to The OpenSS7 Project:
| − Per Berquist
|
| − John Boyd
|
| − Chuck Winters
|
| − Peter Courtney
|
| − Tom Chandler
|
| − Gurol Ackman
|
| − Kutluk Testicioglu
|
| − John Wenker
|
| − Others
|
Authors
The authors of the OpenSS7 Linux Fast-STREAMS package include:
See Author Index, for a complete listing and cross-index of authors to
sections of this manual.
Maintainer
The maintainer of the OpenSS7 Linux Fast-STREAMS package is:
Please send bug reports to bugs@openss7.org using the send-pr script
included in the package, only after reading the BUGS file in the release, or See Problem Reports.
Web Resources
The OpenSS7 Project provides a website dedicated to the software
packages released by the OpenSS7 Project.
Bug Reports
Please send bug reports to bugs@openss7.org using the send-pr script included in the
Linux Fast-STREAMS package, only after reading the BUGS file in the release, or
See Problem Reports. You can access the
OpenSS7 GNATS database directly via the web, however,
the preferred method for sending new bug reports is via mail with the send-pr script.
Mailing Lists
The OpenSS7 Project provides a number of general discussion
Mailing Lists for discussion concerning the
OpenSS7 Linux Fast-STREAMS package as well as other packages released by
The OpenSS7 Project.
These are mailman mailing lists and so have convenient web interfaces for subscribers to
control their settings. See http://www.openss7.org/mailinglist.html.
The mailing lists are as follows:
- openss7
- The openss7 mailing list is for general enquiries, information exchange and announcements
regarding the OpenSS7 Project. This is our original mailing list
and takes the highest amount of traffic.
- openss7-announce
- The openss7-announce mailing list is for announcements related to the
OpenSS7 Project. This list will accept announcements posted by
subscribers. Subscribe to this list if you are interested in announcements from the
OpenSS7 Project, subscribers and sponsors, related to the
OpenSS7 Project or STREAMS, SS7, SIGTRAN or SCTP in general.
- openss7-cvs
- The openss7-cvs mailing list is for automatic CVS log reporting. You must get permission of
the owner to subscribe to this list. Subscribers are not allowed to post to this list, this is
merely for distributing notification of changes to the CVS repository.h
- openss7-develop
- The openss7-develop mailing list is for email exchange related to the development projects
under the OpenSS7 Project. This includes development requests,
proposals, requests for comment or proposal. Subscribe to this list if you are interested in
ongoing development details regarding the OpenSS7 Project.
- openss7-test
- The openss7-test mailing list is for email exchange related to the testing of code under the
OpenSS7 Project. This specifically relates to conformance testing,
verification testing, interoperability testing and beta testing. Subscribe to this list if you are
interested in participating in and receiving ongoing details of test activities under the
OpenSS7 Project.
- openss7-bugs
- The openss7-bugs mailing list is specifically tailored to bug tracking. The mailing list
takes a feed from the OpenSS7 GNATS bug tracking
system and accepts posting of responses to bug reports, tracking and resolution. Subscribe to this
list if you are interested in receiving detailed OpenSS7 release code bug tracking
information. This list is not archived; for historical information on problem reports, see our
GNATS databases.
- openss7-updates
- The openss7-updates mailing list provides updates on OpenSS7 Project code releases and ongoing activities. Subscribers are not allowed to post to this list;
this list is for official OpenSS7 Project announcements only.
Subscribe to this list if you are interested in receiving updates concerning official releases and
activities of the OpenSS7 Project.
- openss7-streams
- The openss7-streams mailing list is for email exchange related to the STREAMS
development projects under the OpenSS7 Project. This includes
development requests, proposals, requests for comment or proposal. Subscribe to this list if you
are interested in ongoing development details regarding the OpenSS7 Project STREAMS components.
- linux-streams
- The linux-streams mailing list is for mail exchange related to Linux Fast-STREAMS or
Linux STREAMS. This includes patches, development requests, proposals, requests for comment
or proposal. Subscribe to this list if you are interested in ongoing development details regarding
the STREAMS for Linux components. This is the the new (September 2006) home of the
linux-streams list formerly of <
gsyc.escet.urjc.es>.
Spam
To avoid spam being sent to the members of the OpenSS7 mailing list(s), we have blocked mail
from non-subscribers. Please subscribe to the mailing list before attempting to post to them.
(Attempts to post when not subscribed get bounced.)
As an additional measure against spam, subscriber lists for all OpenSS7 mailing lists are not
accessible to non-subscribers; for most lists subscriber lists are only accessible to the list
administrator. This keeps your mailing address from being picked off our website by bulk mailers.
Acceptable Use Policy
It is acceptable to post professional and courteous messages regarding the OpenSS7 package or
any general information or questions concerning STREAMS, SS7, SIGTRAN, SCTP
or telecommunications applications in general.
Large Attachments
The mailing list is blocked from messages of greater than 40k. If you have attachments
(patches, test programs, etc.) and you mail them to the list, it will bounce to the list
administrator. If you are interested in making your patches, test programs, test results or other
large attachments available to the members of the mailing list, state in the message that you would
like them posted and the list administrator will place them in the mail archives.
Quick Start Guide
Linux Fast-STREAMS
Package streams-0.9.2.4 was released under AGPLv3 2008-10-31.
The OpenSS7 Linux Fast-STREAMS package is a High-Performance STREAMS framework for
Linux that is compatible with SVR 4.2 MP STREAMS and a host of other commercial
UNIX® STREAMS implementations, with complete debugging and production release
capabilities. It is as a high-performance, production replacement for the buggy and now deprecated
Linux STREAMS (LiS).
The Linux Fast-STREAMS package includes kernel modules, SVR 4.2 STREAMS
drivers, modules, libraries, utilities, test programs, daemons, and development environment for the
development and execution of STREAMS modules and drivers under Linux Fast-STREAMS.
It is completely documented with over four hundred (435) manual pages, and three (3) major print
set manuals.
The package configures, compiles, installs and builds rpms or debs for a wide range of
Linux rpm(1)- or dpkg(1)-based distributions, and can be used on production
kernels without patching, recompiling or tainting the kernel. Its small run-time footprint makes
the release suitable for embedded targets.
This distribution is only currently applicable to Linux 2.4 and 2.6 kernels and was targeted
at ix86, x86_64, ppc and ppc64 architectures, but should build and
install for other architectures as well.
Release
This is the streams-0.9.2.4 package, released 2008-10-31. This
‘0.9.2.4’ release, and the latest version, can be obtained from the
download area of The OpenSS7 Project website using a command such as:
$> wget http://www.openss7.org/tarballs/streams-0.9.2.4.tar.bz2
The release is available as an autoconf(1) tarball, src.rpm or dsc, as a
set of binary rpms or debs, or as a yum(8) or apt(8) repository.
See the download page for the autoconf(1)
tarballs, src.rpms, dscs, or repository access instructions. See the
streams package page for
tarballs, source and binary packages.
Please see the
NEWS
file for release notes and history of user visible changes for the current version, and the
ChangeLog
file for a more detailed history of implementation changes. The
TODO
file lists features not yet implemented and other outstanding items.
Please see the
INSTALL,
INSTALL-streams
and
README-make,
files (or
see Installation)
for installation instructions.
When working from cvs(1) or git(1), please see the
README-cvs,
file (or
see Downloading from CVS).
An abbreviated installation procedure that works for most applications appears below.
This release of the package is published strictly under Version 3 of the GNU Affero Public License
which can be found in the file
COPYING.
Package specific licensing terms (if any) can be found in the file
LICENSES.
Please respect these licensing arrangements. If you are interested in different licensing terms,
please contact the copyright holder, or
OpenSS7 Corporation <sales@openss7.com>.
See
README-alpha
(if it exists) for alpha release information.
Prerequisites
The quickest and easiest way to ensure that all prerequisites are met is to download and install
this package from within the OpenSS7 Master Package,
openss7-0.9.2.G, instead of separately.
Prerequisites for the Linux Fast-STREAMS package are as follows:
- Linux distribution, somewhat Linux Standards Base compliant, with a 2.4 or 2.6 kernel
and the appropriate tool chain for compiling out-of-tree kernel modules. Most recent Linux
distributions are usable out of the box, but some development packages must be installed. For more
information, see Compatibility.
| −
A fairly LSB compliant GNU/Linux distribution.2
|
| −
Linux 2.4 kernel (2.4.10 - 2.4.27), or
|
| −
Linux 2.6 kernel (2.6.3 - 2.6.26);
|
| −
glibc2 or better.
|
| −
GNU groff (for man pages).3
|
| −
GNU texinfo (for info files).
|
| −
GNU bison and flex (for config programs).
|
| −
net-snmp (for SNMP agents).4
|
When configuring and building multiple OpenSS7 Project release packages, place all of the
source packages (unpacked tarballs) at the same directory level and all build directories at the
same directory level (e.g. all source packages under /usr/src).
When installing packages that install as kernel modules, it is necessary to have the correct kernel
development package installed. For the following distributions, use the following commands:
Ubuntu: $> apt-get install linux-headers
Debian: $> apt-get install kernel-headers
Fedora: $> yum install kernel-devel
You also need the same version of gcc(1) compiler with which the kernel was built. If it is not the
default, add ‘CC=kgcc’ on the line after ‘./configure’, for example:
$> ../streams-0.9.2.4/configure CC='gcc-3.4'
Installation
The following commands will download, configure, build, check, install, validate, uninstall and
remove the package:
$> wget http://www.openss7.org/tarballs/streams-0.9.2.4.tar.bz2
$> tar -xjvf streams-0.9.2.4.tar.bz2
$> mkdir build
$> pushd build
$> ../streams-0.9.2.4/configure --enable-autotest
$> make
$> make check
$> sudo make install
$> sudo make installcheck
$> sudo make uninstall
$> popd
$> sudo rm -rf build
$> rm -rf streams-0.9.2.4
$> rm -f streams-0.9.2.4.tar.bz2
If you have problems, try building with the logging targets instead. If the make of a logging
target fails, an automatic problem report will be generated that can be mailed to
The OpenSS7 Project.5 Installation steps using the logging targets proceed as follows:
$> wget http://www.openss7.org/tarballs/streams-0.9.2.4.tar.bz2
$> tar -xjvf streams-0.9.2.4.tar.bz2
$> mkdir build
$> pushd build
$> ../streams-0.9.2.4/configure --enable-autotest
$> make compile.log
$> make check.log
$> sudo make install.log
$> sudo make installcheck.log
$> sudo make uninstall.log
$> popd
$> sudo rm -rf build
$> rm -rf streams-0.9.2.4
$> rm -f streams-0.9.2.4.tar.bz2
See
README-make
for additional specialized make targets.
For custom applications, see the
INSTALL
and
INSTALL-streams
files or the see
Installation,
as listed below. If you encounter troubles, see
Troubleshooting,
before issuing a bug report.
Brief Installation Instructions
The Linux Fast-STREAMS package is available from the downloads area of The OpenSS7 Project website using a command such as:
$> wget http://www.openss7.org/tarballs/streams-0.9.2.4.tar.bz2
Unpack the tarball using a command such as:
$> tar -xjvf streams-0.9.2.4.tar.bz2
The tarball will unpack into the relative subdirectory named after the package name:
streams-0.9.2.4.
The package builds using the GNU autoconf utilities and the configure script. To
build the package, we recommend using a separate build directory as follows:
$> mkdir build
$> cd build
$> ../streams-0.9.2.4/configure
In general, the package configures and builds without adding any special options to the
configure script. For general options to the configure script, see the GNU
INSTALL
file in the distribution:
$> less ../streams-0.9.2.4/INSTALL
For specific options to the configure script, see the
INSTALL-streams
file in
the distribution, or simply execute the configure script with the --help option like so:
$> ../streams-0.9.2.4/configure --help
After configuring the package, the package can be compiled simply by issuing the ‘make’
command:
$> make
Some specialized makefile targets exists, see the
README-make
file in the distribution or simply invoke the ‘help’ target like so:
$> make help | less
After successfully building the package, the package can be checked by invoking the ‘check’
make target like so:
$> make check
After successfully checking the package, the package can be installed by invoking the ‘install’
make target (as root) like so:
$> sudo make install
The test suites that ship with the package can be invoked after the package has been installed by
invoking the ‘installcheck’ target. This target can either be invoked as root, or as a normal
user, like so:
$> make installcheck
(Note: you must add the --enable-autotest flag to configure, above for the
test suites to be invoked with ‘make installcheck’.)
The package can be cleanly removed by invoking the ‘uninstall’ target (as root):
$> sudo make uninstall
Then the build directory and tarball can be simply removed:
$> cd ..
$> rm -rf build
$> rm -rf streams-0.9.2.4
$> rm -f streams-0.9.2.4.tar.bz2
Detailed Installation Instructions
More detailed installation instructions can be found in the
Installation,
contained in the distribution in ‘text’, ‘info’, ‘html’ and ‘pdf’
formats:
$> cd ../streams-0.9.2.4
$> less doc/manual/streams.txt
$> lynx doc/manual/streams.html
$> info doc/manual/streams.info
$> xpdf doc/manual/streams.pdf
The ‘text’ version of the manual is always available in the
MANUAL
file in the release.
The current manual is also always available online from The OpenSS7 Project website at:
$> lynx http://www.openss7.org/streams_manual.html
1 Introduction
This manual documents the design, implementation, installation, operation and future development
schedule of the Linux Fast-STREAMS package.
1.1 Overview
This manual documents the design, implementation, installation, operation and future development of
the Linux Fast-STREAMS package.
1.2 Organization of this Manual
This manual is organized (loosely) into several sections as follows:
1.3 Conventions and Definitions
This manual uses texinfo typographic conventions.
2 Objective
2.1 Background
STREAMS derives from Dennis Ritchie's original paper,6 was incorporated into the UNIX® System V Release 3 operating
system, replaced the terminal input-output subsystem, pipes and FIFOs in
UNIX® System V Release 4, and was improved in the USL release of
the UNIX® System V Release 4.2 operating system.
Today, STREAMS is a part of every major branded UNIX® variant,
such as
AIX®,
HP-UX®,
IRIX®,
MacOT®,
OSF/1®,
Solaris®,
SUPER-UX®,
UnixWare®,
UXP/V®,
and including many UNIX-like operating systems and popular embedded RTOS, but with
the notable exception of Berkeley System Distribution releases, variants and offshoots, and
Linux.
2.2 What is STREAMS?
STREAMS is a flexible framework for communication between a user level process and a kernel resident
driver. It encompasses a set of kernel system calls providing a user-kernel interface that is
backward compatible with the traditional character device driver interface, as well as a set of
STREAMS driver and module entry points forming a driver-kernel interface. STREAMS also provides a
rich set of kernel utility functions for the development and implementation of kernel-resident
drivers and modules. STREAMS prompted the specification of the DDI/DKI which is an architecture
independent driver-kernel interface that provides a standardized set of kernel functions (beyond
just STREAMS) for the development of device and software drivers.
STREAMS provides a reconfigurable full-duplex communications path between user level process and
kernel resident driver, termed a Stream. Modules can be inserted in the path between the user
and driver under user level control. Streams can be linked across multiplexers under user control
to form complex (yet reconfigurable) topologies of user level processes and drivers.
Communication of control and data information along a Stream is accomplished by message passing.
There is no direct function call interface between components of a Stream. A Stream exists within
the STREAMS framework inside the kernel and extend from the user-kernel interface to the kernel
driver interface. Each component of a Stream consists of a pair of queues used to pass messages in
the upstream direction to the kernel-user interface; or downstream, the kernel-driver interface.
At the kernel-user end of the Stream is a component called the Stream head. As with all
components of a Stream, the Stream head consists of a queue pair and a specialized set of
procedures. The Stream head procedures are responsible for converting between the system call
interface presented to users and the message passing mechanism within the Stream.
At the kernel-driver end of the Stream is the Stream end. The Stream end also contains a
queue pair and a set of procedures. The Stream end (or simply driver) procedures are responsible
for converting between the message passing mechanism within the Stream and the actions and events of
a hardware (or pseudo-) device.
Intermediate components within the Stream are called Modules. Modules consist of a queue pair
for passing messages upstream and downstream, as well as a set of procedures for processing
messages. Modules can be pushed onto the module stack between the Stream head and Stream end using
a set of standardized input-output control commands.
In support of topologies more complex than these simple linear segments, STREAMS also provides a
specialized Stream end (driver) called a Multiplexing driver. A Multiplexing driver has the
ability to open multiple Streams to its upper interface (multiplexer) as well as linking multiple
Streams beneath its lower interface (multiplexer). Again, a standardized set of input-output
controls provide the user with the ability to configure a Multiplexing driver.
2.3 Why STREAMS?
With the ability to open multiple Streams to a driver, push and pop modules to and from the module
stack on a Stream, and to link any Stream under a multiplexing driver–all under user control using
standardized input-output controls–allows STREAMS to configure complex topologies to form protocol
stacks.
Almost all specialized standard telecommunications software developed since 1990 was developed to
run on STREAMS. This is for several reasons:
- Since 1990, STREAMS and the associated DDI/DKI has been, and remains, the only way to incorporate
OEM protocol stacks into mainstream UNIX® system kernels.
- The original UNIX System Laboratories (later X/Open then later the OpenGroup)
support for ITU-T developed OSI protocols, makes STREAMS amenable to an open
model for development for ITU-T protocols. (ITU-T, formerly CCITT, is
the International Telecommunications Union – Telephone Sector responsible for international
telephone standards, and original developers of the OSI model.)
As a result, there is a significant body of commercial software implementing telecommunications
protocol stacks that was developed, tested, validated, conformance tested, field verified, to run on
STREAMS: and is still running on STREAMS.
The cost of reimplementation, retesting, revalidation, redoing conformance testing, and field
re-verification, would likely be prohibitive: after all, the point of Linux is reducing cost,
is it not?
2.4 Why STREAMS for Linux?
The Linux kernel was not developed with STREAMS in mind. For TPI/IP networking,
Linux originally followed in the footsteps of the BSD NET2 release. Currently, the
implementation of TCP/IP in the Linux kernel has long departed from the classical
BSD organization and exhibits characteristics unique to the GNU/Linux operating
system. For character device and terminal input-output, Linux follows closely the
SVR 3 pre-STREAMS approach to pipes, FIFOs and terminal subsystem. The terminal subsystem
implementation, too, has become unique to GNU/Linux.
Therefore, from the perspective of TCP/IP networking and Terminal I/O, there
would be little reason to provide STREAMS for Linux. That is, if it were not for the body of
software supporting OSI and telecommunications protocols based solely on STREAMS, for
which Linux has little or no support.
So, the answer to the question, "Why STREAMS for Linux?" is: so that a GNU/Linux platform
can enjoy the same wealth of telecommunications and OSI protocol stacks otherwise only
available to big-iron UNIX®. Without STREAMS, Linux is probably
just another BSD, and probably not a very good one.
2.5 History of STREAMS for Linux
In the mid-90's, GCOM Inc. embarked on development on an open
source implementation of STREAMS called Linux STREAMS (LiS), likely driven by its use for
porting existing OSI protocol stacks to Linux. In 2000,
The OpenSS7 Project abandoned using the Linux networking
model for implementation of the Signalling System No. 7 protocol (primarily due to the lack of
support for the full BSD networking model under Linux) and switched to using
STREAMS as the basis for all future development. The GCOM LiS release (2.2 at the time) was
used as the STREAMS package. Over the span of the next 5 years, (and not surprisingly given the body
of software), almost all Signalling System No. 7 products released on Linux used
LiS for STREAMS. In 2005, Dave Grothe (the G in GCOM) announced that he would
no longer be maintaining or developing LiS subsequent to the 2.18.0 release, stranding many
users of the package.
Later in 2005, after briefly maintaining two GPL'ed releases of LiS, (2.18.1 and 2.18.2),
The OpenSS7 Project release (after two years of development) the
streams-0.7a.4 package: a reimplementation of SVR 4.2 STREAMS with compatibility
modules for all major UNIX® releases, called Linux Fast-STREAMS.
Linux Fast-STREAMS was intended as a POSIX/SUSv3 XSR conforming, high performance,
production grade, replacement for LiS, suitable for mainline Linux adoption, and a
better foundation on which to base SIGTRAN, VoIP, ISDN and
SS7 protocol stacks developed under the The OpenSS7 Project, as well as a better foundation for porting commercial UNIX®
OEM implementations to Linux. It is the streams-0.9.2.4
package that contains the documentation you are reading now.
2.6 Why Fast?
After working with LiS releases for over 3 years, in late 2003,
The OpenSS7 Project decided to begin implementation of a
replacement for LiS, because of a number of shortcomings of the LiS releases:
- unsuitable for mainline kernel adoption due to coding style and organization;
- poorly adapted to distribution production kernels;
- is unsuitable for packaging and repeatability;
- portability objective unsuitable for mainline kernel adoption;
- ports form the same baseline obfuscate the code;
- performs poorly due to portability and coding style;
- code bloat and over sized memory footprint;
- redundant debug statements obscuring defects and obfuscating code;
- overuse of semaphores;
- contains serious races and not suitable for threaded applications;
- does not conform to mainstream UNIX® implementations;
- does not conform to POSIX or any release of the Single UNIX Specification;
- limited set of standard drivers and modules;
- limited set of diagnostic and administrative utilities;
- limited test programs;
- poorly documented.
The replacement, named Linux Fast-STREAMS, was to correct all of these difficulties, and,
by the initial ‘streams-0.7a.4’ release, was:
- completely Lindented and follows kernel coding practises;
- automatically adapts to production kernels with autoconf;
- packages itself into LSB compliant RPMs and DEBs;
- designed and implemented specifically for GNU/Linux;
- no ports considered;
- over twice the performance;
- less than one-eighth of the memory footprint;
- proper programming by assertion;
- proper use of lightweight spin locks;
- race free locking strategies and synchronization;
- compatible with all mainstream UNIX® implementations;
- conforms to POSIX/SUSv3 XSR;
- complete set of standard drivers and modules;
- complete set of diagnostic and administrative utilities;
- integrated set of conformance test suites;
- fully documented.
Many specific difficulties encountered with LiS not repeated by Linux Fast-STREAMS
are contained in the COMPATIBILITY section of most of the manual pages.
3 Reference
3.1 Files
The following kernel modules are installed by Linux Fast-STREAMS in the
/lib/modules/2.4.20-28.7/streams/directory, with either a ‘.o’ or ‘.ko’ extension.
7
- specfs
-
This kernel module contains the STREAMS Special Shadow Filesystem.
See
specfs(5) for more information.
- streams
-
This kernel module contains the STREAMS scheduler, utility functions, and STREAMS Device
Driver Interface/Driver Kernel Interface (DDI/DKI).
See
STREAMS(9) for more information.
- streams-fifo
-
This kernel module contains the fifo STREAMS driver.
This is a standard STREAMS driver, but is also used by the conformance and validation test suite.
See
fifo(4) for more information.
- streams-sad
-
This kernel module contains the sad STREAMS driver.
This is the standard STREAMS Administrative Driver.
See
sad(4) for more information.
- streams-nsdev
-
This kernel module contains the nsdev STREAMS driver.
This is a Linux Fast-STREAMS specific driver.
See
nsdev(4) for more information.
- streams-echo
-
This kernel module contains the echo STREAMS driver.
This is a standard STREAMS driver, but is also used by the conformance and validation test suite.
See
echo(4) for more information.
- streams-mux
-
This kernel module contains the mux STREAMS driver.
This is a standard STREAMS driver< but is also used by the conformance and validation test suite.
See
mux(4) for more information.
- streams-nuls
-
This kernel module contains the nuls STREAMS driver.
This is a standard STREAMS module.
See
nuls(4) for more information.
- streams-pipe
-
This kernel module contains the pipe STREAMS driver.
This is a standard STREAMS driver.
See
pipe(4) for more information.
- streams-log
-
This kernel module contains the log STREAMS driver.
This is a standard STREAMS driver.
See
log(4) for more information.
- streams-loop
-
This kernel module contains the loop STREAMS driver.
This is a standard STREAMS driver, but is also used by the conformance and validation test suite.
See
loop(4) for more information.
- streams-sfx
-
This kernel module contains the sfx STREAMS driver.
This is a common character device driver for implementing STREAMS FIFOs.
See
sfx(4) for more information.
- streams-spx
-
This kernel module contains the spx STREAMS driver.
This is a common character device driver for implementing STREAMS pipes.
See
spx(4) for more information.
- streams-bufmod
-
This kernel module contains the bufmod STREAMS module. The bufmod STREAMS
module is a simple buffer module (a module that always defers to its service procedure and then
passes any message along). This module is used for performance testing of the STREAMS
package.
See
bufmod(4) for more information.
- streams-nullmod
-
This kernel module contains the nullmod STREAMS module. The nullmod
STREAMS module is a simple null module (a module that always passes messages to the next
module in along the Stream). This module is used for performance testing of the STREAMS
package and is also used by the conformance and validation test suite.
See
nullmod(4) for more information.
- streams-pipemod
-
This kernel module contains the pipemod STREAMS module.
This is a standard STREAMS module used with pipes.
See
pipemod(4) for more information.
- streams-connld
-
This kernel module contains the connld STREAMS module.
This is a standard STREAMS module.
See
connld(4) for more information.
- streams-sc
-
This kernel module contains the sc STREAMS module.
This is a common STREAMS Configuration module.
See
sc(4) for more information.
- streams-testmod
-
This kernel module contains the testmod STREAMS module.
This is a Linux Fast-STREAMS specific test module that is used for conformance and validation
testing of STREAMS.
See
testmod(4) for more information.
Additional kernel modules are provided by add-on packages.
3.2 Drivers
The configuration of STREAMS drivers and modules is performed when compiling the
Linux Fast-STREAMS subsystem. The STREAMS subsystem, core drivers and modules are
part of every Linux Fast-STREAMS system.
The following lists the core drivers and modules, STREAMS kernel tunable parameters, and
STREAMS configuration information:8
- clone(4) (streams)
-
Clone device driver.
This is a standard SVR 4.2 STREAMS driver.
The clone(4) driver is a integral part of STREAMS and is used to create clone
instances of a STREAMS driver.
See clone(4) for more information.
- echo(4) (streams-echo)
-
Echo (loopback) device driver.
This is a commonly implemented STREAMS driver. It is implemented by HP-UX® and
OSF/1®. The echo(4) driver provides a simple FIFO-like device without full
POSIX FIFO semantics. Its primary purpose is for the STREAMS Verification function,
strvf(8), and the test-streams(8) validation test suite.
See echo(4) for more information.
- fifo(4) (streams-fifo)
-
FIFO (Named Pipe) device driver.
This is a standard SVR 4.2 STREAMS driver.
The fifo(4) driver provides POSIX-compliant STREAMS-based FIFO device.
Not all implementations of STREAMS provide STREAMS-based FIFOs: some
implementations use the older SVR 3-style FIFOs that are not STREAMS-based.
Linux Fast-STREAMS provides STREAMS-based FIFOs with the fifo(4)
driver.
See fifo(4) for more information.
- log(4) (streams-log)
-
STREAMS log driver.
This is a standard SVR 4.2 STREAMS driver.
The log(4) driver provides a STREAMS capable logger in addition to the BSD
logger present in Linux. The log(4) driver provides additional support for
STREAMS modules and drivers using the
strlog(9) kernel level utility.
Linux Fast-STREAMS also provides the strace(8), strerr(8) and
strclean(8) administrative utility functions and startup scripts for controlling the
log(4) driver.
See log(4) for more information.
- loop(4) (streams-loop)
-
Loop device driver.
This is a standard SVR 4.2 STREAMS driver.
The loop driver is detailed in the UNIX System V Release 4 Programmer's Manual – STREAMS.
The loop(4) driver provides capabilities used primarily for validation test programs (see
test-streams(8)) as well as serving as an example driver.
See loop(4) for more information.
- mux(4) (streams-mux)
-
Multiplexing driver.
This is a standard SVR 4.2 STREAMS driver.
The mux driver is detailed in the UNIX System V Release 4 Programmer's Manual – STREAMS.
The mux(4) driver provides capabilities used primarily for validation test programs (see
test-streams(8) as well as serving as an example multiplexing driver. This
mux(4) driver also provides the minimux capabilities formerly present in LiS.
See mux(4) for more information.
- nsdev(4) (streams-nsdev)
-
Named STREAMS device driver.
This is a Linux Fast-STREAMS specific driver.
The nsdev(4) driver is a clone(4)-like driver that permits the specification of
major and minor device numbers using the device node name. It provides one of three mechanisms
under Linux Fast-STREAMS that remove STREAMS driver dependency on statically
allocated device numbers.
See nsdev(4) for more information.
- nuls(4) (streams-nuls)
-
Null Stream driver.
This is a standard SVR 4.2 STREAMS driver.
The nuls(4) driver is usually called ‘null’. Linux has its own
SVR3-style /dev/null driver, so it was renamed to ‘nuls’.
See nuls(4) for more information.
- pipe(4) (streams-pipe)
-
STREAMS-based pipe driver.
This is a standard SVR 4.2 STREAMS driver.
However, pipe(4) is not normally implemented as a STREAMS driver, but is implemented
as a system call. Linux Fast-STREAMS provides pipe(2s) system call emulation
which invokes this driver internal to the kernel.
See pipe(4) for more information.
- sad(4) (streams-sad)
-
STREAMS Administrative Driver.
This is a standard SVR 4.2 STREAMS driver.
The sad(4) driver is used by the
autopush(8) utility to examine and specify the
autopush lists for STREAMS drivers. Also, it is used to examine and verify the present of
STREAMS modules or drivers in the system.
See sad(4) for more information.
- sfx(4) (streams-sfx)
-
STREAMS FIFO device driver.
This is commonly implemented STREAMS driver that is used to implement STREAMS FIFOs
(Named Pipes) using a regular character device.
The sfx(4) driver provides a character based device approach to creating FIFOs.
See sfx(4) for more information.
- spx(4) (streams-spx)
-
STREAMS pipe device driver.
This is commonly implemented STREAMS driver that is used to implement STREAMS pipes
using a regular character device.
The spx(4) driver provides a character based device approach to creating FIFOs and pipes.
Only UnixWare® and AIX(4) document this device.
See spx(4) for more information.
Additional drivers are provided by add-on packages.
3.3 Modules
The configuration of STREAMS drivers and modules is performed when compiling the
Linux Fast-STREAMS subsystem. The STREAMS subsystem, core drivers and modules are
part of every Linux Fast-STREAMS system.
The following lists the core drivers and modules, STREAMS kernel tunable parameters, and
STREAMS configuration information:9
- pipemod(4) (streams-pipemod)
-
Pipe module.
This is a standard SVR 4.2 STREAMS module.
The pipemod(4) module can be pushed over a pipe end or FIFO before other modules are
pushed (on either end) to reverse the sense of the M_FLUSH(9) message that traverse the
pipe.
See pipemod(4) for more information.
- connld(4) (streams-connld)
-
Connection Line Discipline module.
This is a standard SVR 4.2 STREAMS module.
The connld(4) module can be pushed over a pipe end that has been attached to a file system
file using
fattach(3) and will then create a new pipe instance on each open(2s)
of the attached file and pass the new remove file pointer to the remove end using
M_PASSFP(9) to be received with I_RECVFD(7). This allows servers to be created
that use pipe(4)s for communication.
See connld(4) for more information.
- sc(4) (streams-sc)
-
STREAMS Configuration module.
This is a commonly implemented STREAMS module.
It is implemented by HP-UX and AIX, and perhaps other Mentat-derived
STREAMS implementations.
The sc(4) modules provides the ability to access STREAMS driver information by name
rather than major device number. It also provides access to the
module_info(9) and
module_stat(9) structure information for the named STREAMS module or driver, not
accessible using the sad(4) driver. The sc(4) module is used by the
scls(8) utility.
See sc(4) for more information.
- bufmod(4) (streams-bufmod)
-
Buffer module.
This is a standard SVR 4.2 STREAMS module described in the UNIX System V Release 4
Programmer's Manual – STREAMS.
The bufmod(4) module also has Linux Fast-STREAMS specific extensions.
The bufmod(4) module is used by the
perftest(8) performance test program to test
the effect of additional levels of service procedure pushed over a Stream.
The module also serves as an example of a STREAMS module using service procedures.
See bufmod(4) for more information.
- nullmod(4) (streams-nullmod)
-
Null module.
This is a standard SVR 4.2 STREAMS module described in the UNIX System V Release 4
Programmer's Manual – STREAMS.
The nullmod(4) module also has Linux Fast-STREAMS specific extensions.
The nullmod(4) module is used by the
perftest(8) performance test program to test
the effect of additional levels of put procedure pushed over a Stream.
The module also serves as an example of a STREAMS module not using service procedures.
See nullmod(4) for more information.
- testmod(4) (streams-testmod)
-
Test module.
This is a Linux Fast-STREAMS specific STREAMS module.
The primary purpose of the testmod(4) modules is to provide the
test-streams(8)
validation test program with the capability to pass specific M_ERROR(9) and
M_HANGUP(9) messages to the Stream head for POSIX validation testing.
It also serves as an example of how a STREAMS module can properly process M_IOCTL(9)
and related messages.
See testmod(4) for more information.
Additional modules are provided by add-on packages.
3.4 Libraries
During the installation process of Linux Fast-STREAMS a subroutine library is built and
installed on your system. For 64-bit systems that support 32-bit compatibility, two versions of
each library are built and installed: one 64-bit native library and one 32-bit compatibility
library. 64-bit native libraries are installed to the /usr/lib64 subdirectory. 32-bit
native and 32-bit compatibility libraries are installed to the /usr/lib subdirectory.
- libstreams.so.0.0.1
- libstreams.so.0
- libstreams.so
- Provides a shared object library for use by STREAMS applications programs.
- libstreams.a
- Provides a static library for use by STREAMS applications programs.
- libstreams.la
- Provides the libtool definitions for the library.
In addition to the libstreams library, Linux Fast-STREAMS also installs
compatibility libraries for LiS. These compatibility libraries permit applications
previously linked with LiS shared libraries to function with Linux Fast-STREAMS
without recompiling or relinking.
- libLiS.so.0.0.1
- libLiS.so.0
- libLiS.so
- Provides a shared object library for use by legacy LiS applications programs.
- libLiS.a
- Provides a static library for use by legacy LiS applications programs.
- libLiS.la
- Provides the libtool definitions for the library.
- libpLiS.so.0.0.1
- libpLiS.so.0
- libpLiS.so
- Provides a shared object library for use by legacy LiS applications programs.
- libpLiS.a
- Provides a static library for use by legacy LiS applications programs.
- libpLiS.la
- Provides the libtool definitions for the library.
3.4.1 libstreams Library Routines
The following routines are present in the libstreams libraries. The routines in these
libraries are standard STREAMS interface system calls documented in the System V Release
4.2 Programmer's Manual – STREAMS. Refer to the associated manual pages for detailed information
on these routines.
fattach(2)- Name a STREAMS special file.
fdetach(2)- Unname a STREAMS special file.
getmsg(2)- Get next message off of a Stream.
getpmsg(2s)- Get next message off of a Stream.
isastream(2)- Test for a STREAMS special file.
pipe(2s)- Create a STREAMS pipe.
putmsg(2)- Put a message to a STREAMS character device.
putpmsg(2s)- Put a band message to a STREAMS character device.
pstrlog(3)- Print a STREAMS log buffer.
strlog(3)- Print a STREAMS log buffer.
vstrlog(3)- Print a STREAMS log buffer.
3.4.2 libLiS Library Routines
The following routines are present in the libLiS libraries. The routines are identical to
the routines present in the libstreams library and are provided in the libLiS library
for compatibility with existing applications linked against libLiS.
fattach(2)- Name a STREAMS special file.
fdetach(2)- Unname a STREAMS special file.
getmsg(2)- Get next message off of a Stream.
getpmsg(2s)- Get next message off of a Stream.
isastream(2)- Test for a STREAMS special file.
pipe(2s)- Create a STREAMS pipe.
putmsg(2)- Put a message to a STREAMS character device.
putpmsg(2s)- Put a band message to a STREAMS character device.
3.4.3 libpLiS Library Routines
The following routines are present in the libpLiS libraries. The libpLiS library is
the same as the libLiS and libstreams libraries but omits the pipe(2s)
subroutine. The purpose of the libpLiS library was to permit it to be used as a library
preload without affecting the pipe(2s) function used by existing programs linked against
libc.
fattach(2)- Name a STREAMS special file.
fdetach(2)- Unname a STREAMS special file.
getmsg(2)- Get next message off of a Stream.
getpmsg(2s)- Get next message off of a Stream.
isastream(2)- Test for a STREAMS special file.
putmsg(2)- Put a message to a STREAMS character device.
putpmsg(2s)- Put a band message to a STREAMS character device.
3.4.4 Using the Library
To use one of the Linux Fast-STREAMS libraries you can include the file
sys/stropts.h in you application program source code. On you compiler command line, add the
option ‘-I/usr/include/streams’ to include the version of sys/stropts.h that is
distributed with Linux Fast-STREAMS.
When linking our program, or performing a final gcc to build your executable, include one
of the following options on your command line:
- ‘/usr/lib/libstreams.a’
- ‘-lstreams -static’
- Link against the static version of the library.
- ‘-lstreams’
- Link against the shared object version of the library.
- ‘/usr/lib/libstreams.la’
- Use with libtool to link additional convenience libraries against the shared or static
versions of the library.
Failure to link the executable runtime path for libstreams will result in linker-loader
warnings that the functions getpmsg(2s) or putpmsg(2s) are not implemented and
will always fail.10.
See also Development for more information.
3.5 Utilities
3.5.1 Init Scripts
Following are System V Init Scripts that are installed by the package:
- specfs(8) (/etc/init.d/specfs)
- specfs.sh(8) (/etc/init.d/specfs.sh)
-
System V Init Script for the STREAMS Special Shadow Filesystem.
The specfs(8) init script provides the ability to initialize, configure and mount the
STREAMS Special Shadow Filesystem, specfs(5).
The specfs(8) script provides the RedHat-style init script, whereas the
specfs.sh(8) script provides the Debian-style init script.
See specfs(8) for more information.
- streams(8) (/etc/init.d/streams)
- streams.sh(8) (/etc/init.d/streams.sh)
-
System V Init Script for the STREAMS Subsystem.
The streams(8) init script provides the ability to initialize, configure and mount the
STREAMS subsystem, STREAMS(9).
The streams(8) script provides the RedHat-style init script, whereas the
streams.sh(8) script provides the Debian-style init script.
See streams(8) for more information.
3.5.2 User Utilities
Following are user utilities for manipulating Streams:
- strchg(1) (/usr/bin/strchg)
-
Change Stream configuration.
strchg(1) is a standard SVR 4.2 STREAMS user utility.
strchg(1) is a C-language user program that can be used to alter the configuration of the
Stream associated with the caller's standard input. The strchg(1) command pushes
modules on the Stream, pops modules off of the Stream, or both. Only the superuser or
owner of the STREAMS device can alter the configuration of that Stream. If another user
attempts to alter the configuration, the strconf(1) command will fail.
strchg(1) is useful from the shell and, when standard input is redirected from an open
file descriptor to the command, can be used to push and pop modules from arbitrary Streams,
not just those associated with STREAMS-based terminal devices.
See strchg(1) for more information.
- strconf(1) (/usr/bin/strconf)
-
Query Stream configuration.
strconf(1) is a standard SVR 4.2 STREAMS user utility.
strconf(1) is a C-language user program that can be used to query the configuration of a
Stream. When use without any options, it prints a list of the modules in the Stream
associated with the standard input, as well as the topmost driver. The list is printed with one
name per line, where the first name printed is the topmost module on the Stream and the last
item printed is the name of the topmost driver associated with the Stream.
strconf(1) is useful from the shell and, when standard input is redirected from an open
file descriptor to the command, can be used to query arbitrary Streams, not just the
associated with STREAMS-based terminal devices.
See strconf(1) for more information.
- strreset(1) (/usr/bin/strreset)
-
Reset a Stream.
strreset(1) is a standard SVR 4.2 STREAMS user utility.
strreset(1)is a C-language user program that resets an open Stream by generating an
M_FLUSH(9) message to the Stream head. It is used mainly to reset blocked
Streams. Wehn it is impossible to reopen the Stream, issue an I_FLUSH or
equivalent command. This situation may happen with a process sleeping in a module's close routine,
when signals can not be sent to the process (a zombie process exiting, for example).
See strreset(1) for more information.
3.5.3 Administrative Utilities
Following are administrative utilities for manipulating and examining the STREAMS subsystem:
- autopush(8) (/usr/sbin/autopush)
-
Control the autopush module list for a STREAMS device.
autopush(8) is a standard SVR 4.2 STREAMS administrative utility.
autopush(8) is a C-language program that can be used to manipulate and examine which
STREAMS modules are automatically pushed over a device when it is opened. It is also possible
to restrict the ability to push further modules on the Stream without proper privilege.
The autopush(8) utility provides a user program interface to the STREAMS
Administrative Driver (sad(4)).
See autopush(8) for more information.
- fattach(8) (/usr/sbin/fattach)
-
Name a STREAMS file.
fattach(8) is an LiS utility. Although OSF/1 documentation mentions an
fattach manual page in section 8, one does not exist.
fattach(8) opens a pipe(4) and attaches one end of the pipe to a file using
fattach(3), and optionally pushes the connld(4) module on the side of the pipe
being attached to the file. The other end of the pipe remains available for use by the shell
program invoking this command.
fattach(8) provides a easy way for shell programs to use STREAMS-based pipes and to
use the facilities of the connld(4) module.
See fattach(8) for more information.
- fdetach(8) (/usr/sbin/fdetach)
-
Unlink a named STREAMS file.
fdetach(8) is a standard SVR 4.2 STREAMS administrative utility.
fdetach(8) is a C-language program that detaches or disassociates a file descriptor for an
open STREAMS device or pipe from its filename in the file system.
See fdetach(8) for more information.
- insf(8) (/usr/sbin/insf)
-
Install special files.
insf(8) is the HP-UX way to install special (device) files. This program is not
even partially implemented in Linux Fast-STREAMS. Use
streams_mknod(8) and
friends instead.
See insf(8) for more information.
- scls(8) (/usr/sbin/scls)
-
List STREAMS configuration.
scls(8) is a rather useful AIX administrative utility that is also implemented by
Linux Fast-STREAMS.
scls(8) is a C-language program that can be used to list module and driver names as well
as information and statistics associated with those modules or drivers.
The scls(8) utility provides a user program interface to the STREAMS Configuration
module (sc(4)).
See scls(8) for more information.
- strace(8) (/usr/sbin/strace)
-
Write STREAMS event trace messages to the standard output.
strace(8) is a standard SVR 4.2 STREAMS administrative utility.
The strace(8) C-language program receives trace event messages from the STREAMS log
driver (log(4)) and writes these messages to the standard output. When run as a daemon,
strace(8) appends these messages to a log file.
Messages that appear in the trace log are intended to report debugging information that assists with
troubleshooting a running STREAMS module or driver.
See strace(8) for more information.
- strclean(8) (/usr/sbin/strclean)
-
Clean up after the STREAMS error logger.
strclean(8) is a standard SVR 4.2 STREAMS administrative utility.
The strclean(8) utility is a bash script that can be used to delete aged log files
generated by the STREAMS error logger, strerr(8).
See strclean(8) for more information.
- streams_mknod(8) (/usr/sbin/streams_mknod)
-
Make special device nodes for STREAMS.
streams_mknod(8) is a Linux Fast-STREAMS specific administrative utility.
The streams_mknod(8) C-language program can be used to make (or remove) the special
device nodes under the /dev directory required by streams-0.9.2.4
package modules and drivers. streams_mknod(8) in invoked by the System V startup script,
/etc/init.d/streams.
See streams_mknod(8) for more information.
- strerr(8) (/usr/sbin/strerr)
-
Receive error log messages from the STREAMS log(4) driver.
strerr(8) is a standard SVR 4.2 STREAMS administrative utility.
The strerr(8) utility is a C-language program, run as a daemon, that receives error log
messages from the STREAMS log driver (log(4)) and writes these message to a log
file. By default, strerr(8) logs all STREAM error messages from all drivers and
modules.
Messages that appear in the error log are intended to report exceptional conditions that require the
attention of the person who administers your system.
See strerr(8) for more information.
- strinfo(8) (/usr/sbin/strinfo)
-
List Stream information.
strinfo(8) is a rather useful AIX administrative utility that is also implemented by
Linux Fast-STREAMS.
The strinfo(8) C-language program can be used to list Stream instance information as
well as information and statistics on a module or driver basis.
The scls(8) utility provides a user program interface to the STREAMS Configuration
module (sc(4)).
This program is not even partially implemented in Linux Fast-STREAMS yet. User
proc(5) file system and the /proc/streams directory instead. Also, see
scls(8) for driver and module specific information.
See strinfo(8) for more information.
- strload(8) (/usr/sbin/strload)
-
Loads the STREAMS subsystem.
strload(8) is a useful AIX administrative utility that is also implemented by
Linux Fast-STREAMS.
The strload(8) bash script can be used to load STREAMS modules and drivers
individually or from a configuration file.
See strload(8) for more information.
- strsetup(8) (/usr/sbin/strsetup)
-
Bash script.
See strsetup(8) for more information.
- strvf(8) (/usr/sbin/strvf)
-
C-language program.
See strvf(8) for more information.
3.5.4 Performance Test Programs
Following are performance test programs:
- perftest(8) (/usr/sbin/perftest)
-
C-language program.
See perftest(8) for more information.
- perftestn(8) (/usr/sbin/perftestn)
-
C-language program.
See perftestn(8) for more information.
3.5.5 Conformance Test Programs
Following and conformance and validation testing programs:
- test-clone(8) (/usr/libexec/streams/test-clone)
-
The test-clone(8) C-language program is a conformance and validation test program, in the
OpenSS7 Project style, for the
clone(4) STREAMS driver.
See test-clone(8) for more information.
- test-connld(8) (/usr/libexec/streams/test-connld)
-
The test-connld(8) C-language program is a conformance and validation test program, in the
OpenSS7 Project style, for the
connld(4) STREAMS driver.
See test-connld(8) for more information.
- test-echo(8) (/usr/libexec/streams/test-echo)
-
The test-echo(8) C-language program is a conformance and validation test program, in the
OpenSS7 Project style, for the
echo(4) STREAMS driver.
See test-echo(8) for more information.
- test-fifo(8) (/usr/libexec/streams/test-fifo)
-
The test-fifo(8) C-language program is a conformance and validation test program, in the
OpenSS7 Project style, for the
fifo(4) STREAMS driver.
See test-fifo(8) for more information.
- test-log(8) (/usr/libexec/streams/test-log)
-
The test-log(8) C-language program is a conformance and validation test program, in the
OpenSS7 Project style, for the
log(4) STREAMS driver.
See test-log(8) for more information.
- test-loop(8) (/usr/libexec/streams/test-loop)
-
The test-loop(8) C-language program is a conformance and validation test program, in the
OpenSS7 Project style, for the
loop(4) STREAMS driver.
See test-loop(8) for more information.
- test-mux(8) (/usr/libexec/streams/test-mux)
-
The test-mux(8) C-language program is a conformance and validation test program, in the
OpenSS7 Project style, for the
mux(4) STREAMS driver.
See test-mux(8) for more information.
- test-nsdev(8) (/usr/libexec/streams/test-nsdev)
-
The test-nsdev(8) C-language program is a conformance and validation test program, in the
OpenSS7 Project style, for the
nsdev(4) STREAMS driver.
See test-nsdev(8) for more information.
- test-nuls(8) (/usr/libexec/streams/test-nuls)
-
The test-nuls(8) C-language program is a conformance and validation test program, in the
OpenSS7 Project style, for the
nuls(4) STREAMS driver.
See test-nuls(8) for more information.
- test-pipe(8) (/usr/libexec/streams/test-pipe)
-
The test-pipe(8) C-language program is a conformance and validation test program, in the
OpenSS7 Project style, for the
pipe(4) STREAMS driver.
See test-pipe(8) for more information.
- test-pipemod(8) (/usr/libexec/streams/test-pipemod)
-
The test-pipemod(8) C-language program is a conformance and validation test program, in the
OpenSS7 Project style, for the
pipemod(4) STREAMS driver.
See test-pipemod(8) for more information.
- test-sad(8) (/usr/libexec/streams/test-sad)
-
The test-sad(8) C-language program is a conformance and validation test program, in the
OpenSS7 Project style, for the
sad(4) STREAMS driver.
See test-sad(8) for more information.
- test-sc(8) (/usr/libexec/streams/test-sc)
-
The test-sc(8) C-language program is a conformance and validation test program, in the
OpenSS7 Project style, for the
sc(4) STREAMS driver.
See test-sc(8) for more information.
- test-streams(8) (/usr/libexec/streams/test-streams)
-
The test-streams(8) C-language program is a conformance and validation test program, in the
OpenSS7 Project style, for the
STREAMS(9) subsystem and primarily the sth(4) Stream head.
See test-streams(8) for more information.
For the proper way to execute these validation test programs in a conformance and validation test
suite, see Running Test Suites.
4 Development
For development using the streams package, See About This Manual.
4.1 Header Files
Header files are installed, typically, in the /usr/include/streams subdirectory. To
use the header files from the package, ‘-I/usr/include/streams’ must be included in the
gcc command line as a compile option. This is true regardless of whether user space or
kernel space programs are being compiled.
In general, ‘-I’ include directives on the gcc command line should be ordered in the
reverse order of the dependencies between packages. So, for example, if the include files from all
add-on packages are required, the order of these directives would be: ‘-I/usr/include/strss7
-I/usr/include/strsctp -I/usr/include/strinet -I/usr/include/strxnet -I/usr/include/strxns
-I/usr/include/strcompat -I/usr/include/streams’.
Following are the user visible header files provided by the
streams-0.9.2.4 package in directory /usr/include/streams:
- strlog.h
-
This is the primary header file for the
strlog(4) driver.
It is normally only included by user space programs when interacting with the log(4) driver.
See log(4) for more information.
- stropts.h
-
This is the primary user header file for the Stream head.
It is normally only included by user space programs when interacting with the Stream head.
See
sth(4) for more information.
- log.h
-
This is the primary header file for the
log(4) driver.
It is normally only included by user space programs when interacting with the log(4) driver.
See log(4) for more information.
- loop.h
-
This is the primary header file for the
loop(4) driver.
It is normally only included by user space programs when interacting with the loop(4) driver.
See loop(4) for more information.
- sad.h
-
This is the primary header file for the
sad(4) driver.
It is normally only included by user space programs when interacting with the sad(4) driver.
See sad(4) for more information.
- sys/cmn_err.h
-
This is the system specific kernel header file for the
cmn_err(9) utility.
- sys/ddi.h
-
This is the system specific kernel header file for various STREAMS
DDI(9) utilities.
It is normal only included by kernel space STREAMS modules and drivers.
See DDI(9) for more information.
- sys/debug.h
-
This is the system specific kernel header file for kernel debugging macros.
It is normal only included by kernel space STREAMS modules and drivers.
- sys/dki.h
-
This is the system specific kernel header file for various STREAMS
DKI(9) utilities.
It is normal only included by kernel space STREAMS modules and drivers.
See DKI(9) for more information.
- sys/kmem.h
-
This is the system specific kernel header file for
kmem_alloc(9) and related utilities.
It is normal only included by kernel space STREAMS modules and drivers.
See kmem_alloc(9) for more information.
- sys/strconf.h
-
This is the system specific kernel header file for STREAMS driver and module configuration.
It is normal only included by kernel space STREAMS modules and drivers.
- sys/strdebug.h
-
This is the system specific kernel header file for STREAMS driver and module debugging macros.
It is normal only included by kernel space STREAMS modules and drivers.
- sys/stream.h
-
This is the system specific kernel header file for STREAMS drivers and modules.
It is normal only included by kernel space STREAMS modules and drivers.
See
STREAMS(9) for more information.
- sys/strlog.h
-
This is the system specific header file for the
strlog(4) and strlog(9) facilities.
It is normally only included by kernel space programs when interacting with the log(4) driver.
See log(4) for more information.
- sys/stropts.h
-
This is the system specific user header file for the Stream head.
It is normally only included by user space programs when interacting with the Stream head.
See
sth(4) for more information.
- sys/stropts32.h
-
This is the system specific user 32/64-bit header file for the Stream head.
It is normally only included by user space programs when interacting with the Stream head.
See
sth(4) for more information.
- sys/strsubr.h
-
This is the system specific kernel header file for STREAMS private definitions.
It is normal only included by kernel space STREAMS modules and drivers.
See
STREAMS(9) for more information.
- sys/log.h
-
This is the system specific header file for the
log(4) driver.
It is normally only included by kernel space programs when interacting with the log(4) driver.
See log(4) for more information.
- sys/loop.h
-
This is the system specific header file for the
loop(4) driver.
It is normally only included by kernel space programs when interacting with the loop(4) driver.
See loop(4) for more information.
- sys/sad.h
-
This is the system specific header file for the
sad(4) driver.
It is normally only included by kernel space programs when interacting with the sad(4) driver.
See sad(4) for more information.
- sys/sc.h
-
This is the system specific header file for the
sc(4) module.
It is normally only included by user or kernel space programs when interacting with the sc(4) driver.
See sc(4) for more information.
- sys/testmod.h
-
This is the system specific header file for the
testmod(4) module.
It is normally only included by user or kernel space programs when interacting with the testmod(4) driver.
See testmod(4) for more information.
4.1.1 User Space Programs
Typical include files for interacting with STREAMS from user space include the
stropts.h header file. Additional header files for interacting with specific drivers or
modules may also be required.
4.1.2 Kernel Space Drivers and Modules
Typical include files for writing STREAMS modules and drivers for kernel space include the
sys/cmn_err.h, sys/kmem.h, sys/dki.h, sys/stream.h, sys/ddi.h,
and sys/strconf.h header files. Additional header files for interacting with specific
drivers or modules may also be required.
4.2 Libraries
Shared or static versions of the libstreams library must be linked when using the
streams-0.9.2.4 package. This library must either be specified on the
gcc command line as a shared library (e.g. ‘-lstreams’) or as a static library (e.g.
‘/usr/lib/libstreams.a’).
If the shared library is linked, include the following options on the gcc command line:
- ‘-lstreams’
- Link to the /usr/lib/libstreams.so shared library.
If the static library is linked, include the following options on the gcc command line:
- ‘/usr/lib/libstreams.a’
- Link to the /usr/lib/libstreams.a static library.
4.3 Kernel Modules
Developing STREAMS kernel modules is similar to user space programs with regard to header
files. /usr/include/streams should be placed as an include directory to search in
the gcc command line. The rules for compiling Linux kernel modules should be
followed. In particular, several important intricacies should be considered:
- The gcc compiler used to compile the kernel modules must be the same version of compiler
that was used to compile the kernel.
- The gcc command line must have the same compile flags that were used to compile the
kernel.
- The gcc command line must define several important kernel defines including
‘-DLINUX’, ‘-D__KERNEL__’, as well as the base name of the module.
- The gcc command line must include several important include files directly on the command
line such as ‘--include /lib/modules/2.4.20-28.7/build/include/linux/autoconf.h’ and
maybe even ‘--include
/lib/modules/2.4.20-28.7/build/include/linux/modversions.h’.11
4.4 Manual Pages
The streams-0.9.2.4 package installs a number of manual pages in the
/usr/share/man directory as follows:
The following manual pages are installed in Section 1 of the manual (in the subdirectory /usr/share/man/man1):
The following manual pages are installed in Section 2 of the manual (in the subdirectory /usr/share/man/man2):
The following manual pages are installed in Section 3 of the manual (in the subdirectory /usr/share/man/man3):
The following manual pages are installed in Section 4 of the manual (in the subdirectory /usr/share/man/man4):
bufmod(4) – | STREAMS buffering null module.
|
clone(4) – | the STREAMS clone driver.
|
connld(4) – | STREAMS connection line discipline module.
|
conslog(4) – | STREAMS log device.
|
echo(4) – | echo STREAMS device.
|
fifo(4s) – | STREAMS-based FIFO device.
|
log(4) – | STREAMS log device.
|
loop(4) – | STREAMS loop-around pseudo-device driver.
|
loop_clone(4) – | STREAMS loop-around pseudo-device driver.
|
mux(4) – | STREAMS multiplexing pseudo-device driver.
|
nsdev(4) – | named STREAMS device.
|
nullmod(4) – | STREAMS null module.
|
nuls(4) – | null STREAMS device.
|
pipe(4) – | STREAMS bi-directional pipe device.
|
pipemod(4) – | STREAMS-based pipe module.
|
s_fifo(4) – | STREAMS-based FIFO device.
|
sad(4) – | STREAMS Administrative Driver.
|
sc(4) – | STREAMS Configuration module.
|
sfx(4) – | STREAMS-based FIFO device.
|
sloop(4) – | STREAMS loop-around pseudo-device driver.
|
spx(4) – | STREAMS bi-directional pipe device.
|
sth(4) – | STREAMS Stream head module.
|
strlog(4) – | STREAMS log device.
|
testmod(4) – | STREAMS test module.
|
The following manual pages are installed in Section 5 of the manual (in the subdirectory /usr/share/man/man5):
The following manual pages are installed in Section 7 of the manual (in the subdirectory /usr/share/man/man7):
The following manual pages are installed in Section 8 of the manual (in the subdirectory /usr/share/man/man8):
The following manual pages are installed in Section 9 of the manual (in the subdirectory /usr/share/man/man9):
5 Porting
Linux Fast-STREAMS provides a rich set of STREAMS functions, DDI/DKI functions and
utilities based on SVR 4.2 MP for the development of STREAMS modules and drivers.
Although these functions and capabilities provide all of the utilities necessary for the development
of STREAMS modules and drivers, it represents the common set of functions provided by other
STREAMS implementations.
Some other STREAMS implementations provide interfaces, utilities and helper functions specific
to those implementations. Where STREAMS implementations differ the most is in the manner in
which they configure and register STREAMS drivers and modules for interface to the operating
system, including registration functions, device numbering, creation of minor device nodes,
administration and other mechanisms not specified by the System V Release 4 Programmer's Guide
– STREAMS.
To assist with porting of STREAMS drivers and modules from other STREAMS implementations
and UNIX based operating systems to Linux Fast-STREAMS,
Linux Fast-STREAMS provides a separate STREAMS Compatibility add-on package,
called strcompat-0.9.2.7,12 that provide source level compatibility
with a wide range of mainstream STREAMS implementations and significant groups of
compatibility and helper functions (such as those from Solaris and Mentat). These
compatibility packages also provide separate demand loadable kernel modules that provide the
additional compatibility functionality with Linux Fast-STREAMS.
Perhaps one of the most important ports to Linux Fast-STREAMS is from the deprecated and
deficient LiS package to Linux Fast-STREAMS. The STREAMS
Compatibility package, strcompat, also provides a source level compatibility module that
provides source level compatibility to LiS to ease porting LiS drivers and modules to
the superior Linux Fast-STREAMS.
In general, when porting to Linux Fast-STREAMS from another STREAMS implementation,
the following items will need the most attention:
- Header Files
- The STREAMS and operating system specific header files that must be included by kernel modules
to implement STREAMS drivers or modules are specific to each STREAMS implementation.
Although there are some basic header files to include (sys/stream.h, sys/strconf.h,
sys/ddi.h, sys/cmn_err.h, sys/dki.h, sys/kmem.h), the order in which
these headers are included and the additional operating system specific headers are implementation
specific. See the example drivers and modules for the header files that are necessary for
Linux Fast-STREAMS STREAMS modules and drivers.
- Kernel Module Mechanism
- The mechanism for creating, configuring and loading kernel modules is specific to the operating
system implementation. Linux Fast-STREAMS uses the normal Linux mechanisms for
kernel modules also for STREAMS drivers and modules.
- Configuration and Registration
- The STREAMS driver or module will need to be converted to use the Linux Fast-STREAMS
configuration and registration mechanisms. See
register_strdev(9),
unregister_strdev(9), register_strmod(9) and unregister_strmod(9) for
more specific information on the Linux Fast-STREAMS configuration and registration
mechanisms.
- Non-STREAMS DDI/DKI Facilities
- Any of the non-STREAMS DDI/DKI facilities or operating system specific facilities that are
used by the STREAMS driver or module may need to be replaced with the Linux equivalent.
Examples of such facilities include basic locks, read-write locks, semaphores and mutexes, atomic
integers, interrupt suppression, bus access and memory mapping functions.
- Binary Modules
- When STREAMS drivers or modules are released as binary objects and source code is not
available, it is still possible to convert the binary module for use with
Linux Fast-STREAMS. The facility to convert binary modules for use with
Linux Fast-STREAMS is not, however, part of the base package and is not part of the
STREAMS Compatibility package. A separate add-on package, the Binary Compatibility
Modules package, strbcm-0.9.2.5 was developed explicitly for this
purpose.13
5.1 Porting from LiS
Applications programs to not need to be ported, or even recompiled when they use shared libraries.
Linux Fast-STREAMS provides LiS compatible shared object libraries. Applications
compiled against static libraries will need to be recompiled unless Linux Fast-STREAMS was
configured for STREAMS binary compatibility mode.14
In general, if no LiS specific functions are used (other than STREAMS driver or module
registration functions), porting of LiS drivers and modules to Linux Fast-STREAMS
is straightforward. Linux Fast-STREAMS provides several STREAMS drivers and modules
that are common to both OpenSS7 Linux Fast-STREAMS and LiS releases. These drivers
and modules provide examples of how to write STREAMS drivers or modules that can run under
either LiS or Linux Fast-STREAMS. The common modules and drivers are as follows:
When built for Linux Fast-STREAMS, ‘C’ preprocessor symbol ‘LFS’ is defined; when
built for LiS, ‘LIS’ is defined.
LiS provides many simple wrapper functions that are Linux kernel functions with
‘lis_’ prepended to the name. Aside from licensing issues associated with using these wrapper
functions, in many cases it is possible to simply drop the ‘lis_’ from the function call and
use the Linux functions directly. This is true for most spin locks, read-write locks,
semaphores, mutexes, atomic integers, bus access and memory mapping functions.
When many or specific LiS functions calls are necessary, it is better to use the LiS
compatibility module present in the strcompat-0.9.2.7 package.
5.2 Porting from SVR 4.2 MP
When porting from SVR 4.2 MP or a STREAMS implementation based closely on SVR 4.2
MP, such as SUPER-UX, UXP/V, IRIX or many of the real-time operating system
implementations (e.g. VxWorks), it is possible to port directly to
Linux Fast-STREAMS without using the STREAMS Compatibility package. Event when
porting from AIX, HP-UX and OSF/1 it is possible to avoid using the
compatibility package.
Most pseudo-device drivers and modules should not require any special facilities beyond basic locks
and porting may be straightforward. Where extensive implementation specific DDI/DKI or operating
system functions are required, it is better to use the STREAMS Compatibility package and
modules closest to the specific implementation being ported from.
5.3 Porting from Solaris
When porting from Solaris there are both STREAMS facilities and extensive DDI/DKI
facilities that differ greatly from basic SVR 4.2 MP STREAMS and DDI/DKI functions.
For porting all but the most trivial of STREAMS drivers and modules written specifically for
Solaris, it is better to use the STREAMS Compatibility package and the Solaris
compatibility module provided by that package.15
5.4 Porting from UnixWare
When porting from UnixWare there are extensive operating system facilities that differ
greatly from basic Linux facilities. For the most part these are basic locks, read-write
locks, condition variables, sleep locks, atomic integers, bus access and mapping functions.
Although Linux provides equivalents in most of these categories, the STREAMS
Compatibility package contains a compatibility module for UnixWare that provides source
compatibility with most of these functions. It is recommended that all but the most trivial of
UnixWare drivers and modules use the STREAMS Compatibility package when porting.
5.5 Porting from Mentat
When porting a STREAMS driver or module from a Mentat implementation (such as
AIX, HP-UX, OSF/1, Mac OT) that makes heavy use of the Mentat
‘mi_’ or ‘mps_’ helper functions, it is best to use the OpenSS7 implementations of those
functions available in the STREAMS Compatibility package directly. The STREAMS
Compatibility package provides a Mentat Portable STREAMS compatibility module that provides
implementations of the Mentat functions found in AIX, OSF/1 and Mac
OT.16
6 Conformance
6.1 Standards Compliance
Linux Fast-STREAMS was designed and implemented to be compliant with as many standards
impinging on STREAMS as possible. There are three areas of standards compliance as follows:
6.1.1 User Interface Compliance
The STREAMS user interface standards are primarily specified by the IEEE and
OpenGroup standards and take the form of the POSIX 2003 and Single UNIX
Specification standards simultaneously released by the OpenGroup in conjunction with
IEEE. The latest POSIX/IEEE/OpenGroup standard provide an XSI extension that
includes the STREAMS user interface. For the most part, the OpenGroup XSI interface is
completely compatible with the user interface described in the System V Release 4
Programmer's Manual – STREAMS, and where it does not, Stream head options are provided to select
between the default OpenGroup XSI behaviour and the traditional SVR 4 behaviour.
Most of the XSI specifications of the OpenGroup describe the behaviour of the Stream head and
the behaviour of specific STREAMS drivers or modules (such as pipes, FIFOs and terminals).
Also described is the poll(2s) behaviour, generation of signals, and read(2s) and
write(2s) behaviour as it applies to STREAMS character special devices.17
User interface compliance of the Linux Fast-STREAMS is tested with custom validation test
suites that ship with the package. See Conformance Test Programs for more information on
conformance and validation test suites.
6.1.2 Service Interface Compliance
The OpenGroup (now and in previous incarnations) have issued standardized service interface
specifications as part of the Common Application Environment (CAE) specifications. These service
interface specifications usually concern networking interfaces such as the Data Link Provider
Interface (DLPI), the Network Provider Interface (NPI), the Transport Provider
Interface (TPI), the X/Open Transport Interface (XTI) and the Sockets API. Although
these standards impinge upon various networking add-on packages for Linux Fast-STREAMS,
they do not impinge upon the base STREAMS package documented here. See the Installation
and Reference Manual for the appropriate add-on package.
6.1.3 Kernel Interface Compliance
The STREAMS kernel interfaces, DDI/DKI and other facilities available to the STREAMS
driver or module writer has not been subjected to formal standardization. For the most part, the
descriptions that are present in the System V Programmer's Manual – STREAMS provide the most
definitive ipso facto standard for STREAMS implementation. In addition to this, some
STREAMS implementations have provided some enhancements or restrictions over the SVR 4
descriptions. Perhaps the most extensive embellishments have been provided for the Solaris
implementation of STREAMS.
Linux Fast-STREAMS has been implemented to provide maximum compatibility over a wide range
of STREAMS implementations based on SVR 4 and provides additional capabilities similar
to those specific embellishments found in implementations such as Solaris through an add-on
STREAMS Compatibility package.
The most delicate areas of compatibility across STREAMS implementations regard, not the use of
STREAMS or DDI/DKI functions from within the STREAMS environment, but the invocation of
STREAMS functions from outside the STREAMS environment. In particular, use of private
locks and synchronization in the face of interrupts and external asynchronous callbacks is where
implementations deviate the greatest. Linux Fast-STREAMS attempts to address these
differences by providing a greater level of assurance and wider range of calling contexts for each
of the STREAMS facilities.
Kernel interface compliance of the Linux Fast-STREAMS to SVR 4 specifications is
tested with custom validation test suites, test modules and test drivers that ship with the package.
See Conformance Test Programs for more information on conformance and validation test
suites.
6.2 STREAMS Compatibility
Linux Fast-STREAMS provides a high degree of compatibility with other STREAMS
implementation as listed below. Through the separate add-on STREAMS Compatibility package,
source level compatibility is also provided.
- — SVR 3.2
- Linux Fast-STREAMS provides a degree of operational compatibility with
SVR 3.2
to ease portability and common comprehension. Specific kernel utilities are provided by the
STREAMS Compatibility package to provide full source level compatibility with
SVR 3.2.
- — SVR 4.2 ES/MP
- Linux Fast-STREAMS provides a high degree of operational compatibility with
SVR 4.2 ES/MP
to ease portability and common comprehension. Specific kernel utilities are provided by the
STREAMS Compatibility package to provide full source level compatibility with
SVR 4.2 ES/MP.
- — Mentat Portable STREAMS
- Linux Fast-STREAMS provides a high degree of operational compatibility with
Mentat Portable STREAMS
to ease portability and common comprehension. Specific kernel utilities are provided by the
STREAMS Compatibility package to provide full source level compatibility with
Mentat Portable STREAMS.
- — AIX 5L Version 5.1
- Linux Fast-STREAMS provides a high degree of operational compatibility with
AIX 5L Version 5.1
to ease portability and common comprehension. Specific kernel utilities are provided by the
STREAMS Compatibility package to provide full source level compatibility with
AIX 5L Version 5.1.
- — HP-UX 11.0i v2
- Linux Fast-STREAMS provides a high degree of operational compatibility with
HP-UX 11.0i v2
to ease portability and common comprehension. Specific kernel utilities are provided by the
STREAMS Compatibility package to provide full source level compatibility with
HP-UX 11.0i v2.
- — OSF/1 1.2/Digital UNIX/True 64
- Linux Fast-STREAMS provides a high degree of operational compatibility with
OSF/1 1.2/Digital UNIX
to ease portability and common comprehension.
- — UnixWare 7.1.3 (OpenUnix 8)
- Linux Fast-STREAMS provides a high degree of operational compatibility with
UnixWare 7.1.3 (OpenUnix 8)
to ease portability and common comprehension. Specific kernel utilities are provided by the
STREAMS Compatibility package to provide full source level compatibility with
UnixWare 7.1.3 (OpenUnix 8).
- — Solaris 9/SunOS 5.9
- Linux Fast-STREAMS provides a high degree of operational compatibility with
Solaris 9/SunOS 5.9
to ease portability and common comprehension. Specific kernel utilities are provided by the
STREAMS Compatibility package to provide full source level compatibility with
Solaris 9/SunOS 5.9.
- — IRIX 6.5.17
- Linux Fast-STREAMS provides a high degree of operational compatibility with
IRIX 6.5.17
to ease portability and common comprehension. Specific kernel utilities are provided by the
STREAMS Compatibility package to provide full source level compatibility with
IRIX 6.5.17.
- — Mac OS 9 Open Transport
- Linux Fast-STREAMS provides a high degree of operational compatibility with
Mac OS 9 Open Transport
to ease portability and common comprehension. Specific kernel utilities are provided by the
STREAMS Compatibility package to provide full source level compatibility with
Mac OS 9 Open Transport.
- — SUPER-UX
- Linux Fast-STREAMS provides a high degree of operational compatibility with
SUPER-UX
to ease portability and common comprehension.
- — UXP/V
- Linux Fast-STREAMS provides a high degree of operational compatibility with
UXP/V
to ease portability and common comprehension.
- — LiS-2.16.18 and LiS 2.18.0
- Linux Fast-STREAMS provides a high degree of operational compatibility with
LiS 2.16.18 and LiS 2.18.0
to ease portability and common comprehension.
to ease portability and common comprehension. Specific kernel utilities are provided by the
STREAMS Compatibility package to provide full source level compatibility with
LiS 2.16.18 and LiS 2.18.0.
For additional details,
see About This Manual.
7 Releases
This is the OpenSS7 Release of the Linux Fast-STREAMS core, tools, drivers and modules that
implement the Linux Fast-STREAMS SVR 4.2 MP STREAMS utility for Linux.
This package is intended as a replacement package for Linux STREAMS (LiS).
The following sections provide information on Linux Fast-STREAMS releases as well as
compatibility information of OpenSS7 release to mainstream UNIX releases of the core, modules and
drivers, as well as Linux kernel compatibility.
7.1 Prerequisites
The quickest and easiest way to ensure that all prerequisites are met is to download and install
this package from within the OpenSS7 Master Package,
openss7-0.9.2.G, instead of separately.
Prerequisites for the Linux Fast-STREAMS package are as follows:
- Linux distribution, somewhat Linux Standards Base compliant, with a 2.4 or 2.6 kernel
and the appropriate tool chain for compiling out-of-tree kernel modules. Most recent Linux
distributions are usable out of the box, but some development packages must be installed. For more
information, see Compatibility.
| −
A fairly LSB compliant GNU/Linux distribution.18
|
| −
Linux 2.4 kernel (2.4.10 - 2.4.27), or
|
| −
Linux 2.6 kernel (2.6.3 - 2.6.26);
|
| −
glibc2 or better.
|
| −
GNU groff (for man pages).19
|
| −
GNU texinfo (for info files).
|
| −
GNU bison and flex (for config programs).
|
| −
net-snmp (for SNMP agents).20
|
If you need to rebuild the package from sources with modifications, you will need a larger GNU
tool chain as described in See Downloading from CVS.
7.2 Compatibility
This section discusses compatibility with major prerequisites.
7.2.1 GNU/Linux Distributions
Linux Fast-STREAMS is compatible with the following Linux
distributions:21
- CentOS Enterprise Linux 3.4 (centos34) TBD
- CentOS Enterprise Linux 4.0 (centos4) TBD
- CentOS Enterprise Linux 4.92 (centos49) TBD
- CentOS Enterprise Linux 5.0 (centos5)
- CentOS Enterprise Linux 5.1 (centos51)
- CentOS Enterprise Linux 5.2 (centos52)
- Debian 3.0r2 Woody (deb3.0) TBD
- Debian 3.1r0a Sarge (deb3.1) TBD
- Debian 4.0r1 Etch (deb4.0)
- Debian 4.0r2 Etch (deb4.0)
- Debian 4.0r3 Etch (deb4.0)
- Fedora Core 1 (FC1) TBD
- Fedora Core 2 (FC2) TBD
- Fedora Core 3 (FC3) TBD
- Fedora Core 4 (FC4) TBD
- Fedora Core 5 (FC5) TBD
- Fedora Core 6 (FC6) TBD
- Fedora 7 (FC7)
- Fedora 8 (FC8)
- Fedora 9 (FC9)
- Gentoo 2006.1 (untested) TBD
- Gentoo 2007.1 (untested) TBD
- Lineox 4.026 (LEL4) TBD
- Lineox 4.053 (LEL4) TBD
- Mandrakelinux 9.2 (MDK92) TBD
- Mandrakelinux 10.0 (MDK100) TBD
- Mandrakelinux 10.1 (MDK101) TBD
- Mandriva Linux LE2005 (MDK102) TBD
- Mandriva Linux LE2006 (MDK103) TBD
- Mandriva One (untested)
- RedHat Linux 7.2 (RH7)
- RedHat Linux 7.3 (RH7)
- RedHat Linux 8.0 (RH8) TBD
- RedHat Linux 9 (RH9) TBD
- RedHat Enterprise Linux 3.0 (EL3) TBD
- RedHat Enterprise Linux 4 (EL4)
- RedHat Enterprise Linux 5 (EL5)
- SuSE 8.0 Professional (SuSE8.0) TBD
- SuSE 9.1 Personal (SuSE9.1) TBD
- SuSE 9.2 Professional (SuSE9.2) TBD
- SuSE OpenSuSE (SuSEOSS) TBD
- SuSE 10.0 (SuSE10.0) TBD
- SuSE 10.1 (SuSE10.1) TBD
- SuSE 10.2 (SuSE10.2) TBD
- SuSE 10.3 (SuSE10.3) TBD
- SuSE 11.0 (SuSE11.0)
- SLES 9 (SLES9) TBD
- SLES 9 SP2 (SLES9) TBD
- SLES 9 SP3 (SLES9) TBD
- SLES 10 (SLES10)
- Ubuntu 5.10 (ubu5.10) TBD
- Ubuntu 6.03 LTS (ubu6.03) TBD
- Ubuntu 6.10 (ubu6.10) TBD
- Ubuntu 7.04 (ubu7.04) TBD
- Ubuntu 7.10 (ubu7.10)
- Ubuntu 8.04 (ubu8.04)
- WhiteBox Enterprise Linux 3.0 (WBEL3) TBD
- WhiteBox Enterprise Linux 4 (WBEL4) TBD
When installing from the tarball (see Installing the Tar Ball), this distribution is probably
compatible with a much broader array of distributions than those listed above. These are the
distributions against which the current maintainer creates and tests builds.
7.2.2 Kernel
The Linux Fast-STREAMS package compiles as a Linux kernel module. It is not
necessary to patch the Linux kernel to build or use the package.22 Nor do you have to
recompile your kernel to build or use the package. OpenSS7 packages use autoconf scripts
to adapt the package source to your existing kernel. The package builds and runs nicely against
production kernels from the distributions listed above. Rather than relying on kernel versions, the
autoconf scripts interrogate the kernel for specific features and variants to better adapt
to distribution production kernels that have had patches applied over the official
kernel.org sources.
The Linux Fast-STREAMS package is compatible with 2.4 kernel series after 2.4.10 and has
been tested up to and including 2.4.27. It has been tested from 2.6.3 up to and including 2.6.26
(with Fedora 9, openSUSE 11.0 and Ubuntu 8.04 patchsets). Please note that your mileage may vary if
you use a kernel more recent than 2.6.26.4: it is difficult to anticipate changes that kernel
developers will make in the future. Many kernels in the 2.6 series now vary widely by release
version and if you encounter problems, try a kernel within the supported series.
UP validation testing for kernels is performed on all supported architectures. SMP validation
testing was initially performed on UP machines, as well as on an Intel 3.0GHz Pentium IV 630 with
HyperThreading enabled (2x). Because HyperThreading is not as independent as multiple CPUs, SMP
validation testing was limited. Current releases have been tested on dual 1.8GHz Xeon HP servers
(2x) as well as dual quad-core SunFire (8x) servers.
It should be noted that, while the packages will configure, build and install against XEN kernels,
that problems running validation test suites against XEN kernels has been reported. XEN
kernels are explicitly not supported. This may change at some point in the future if someone
really requires running OpenSS7 under a XEN kernel.
7.2.3 Architectures
The Linux Fast-STREAMS package compiles and installs on a wide range of architectures.
Although it is believed that the package will work on all architectures supported by the Linux
kernel being used, validation testing has only been performed with the following architectures:
- ix86
- x86_64
- ppc (MPC 860)
- ppc64
32-bit compatibility validation testing is performed on all 64-bit architectures supporting 32-bit
compatibility. If you would like to validate an OpenSS7 package on a specific machine architecture,
you are welcome to sponsor the project with a test machine.
7.2.4 Linux STREAMS
Linux Fast-STREAMS provides a suitable replacement for the (now deprecated) Linux
STREAMS (LiS) 2.18.0 package formerly maintained by Dave Goethe of GCOM.
7.3 Release Notes
The sections that follow provide information on OpenSS7 releases of the
Linux Fast-STREAMS package.
Major changes for release streams-0.9.2.4
This is the thirteenth OpenSS7 Project release of Linux Fast-STREAMS. LiS
was fully deprecated as of the previous release and Linux Fast-STREAMS is the only STREAMS
package contained in the OpenSS7 Master Package (since openss7-0.9.2.D).
This release is a stable, production grade release
and is part of the OpenSS7 Master Package (openss7-0.9.2.G).
The release includes maintenance support for recent distributions and tool chain, but also includes
some performance and feature upgrades and inspection bug fixes.
It deprecates previous releases. Please upgrade before reporting bugs on previous releases.
This release is primarily a maintenance release.
Major features since the last public release are as follows:
This is a public stable production grade release of the package: it deprecates previous
releases. Please upgrade to the current release before reporting bugs.
As with other OpenSS7 releases, this release configures, compiles, installs and builds RPMs and DEBs
for a wide range of Linux 2.4 and 2.6 RPM- and DPKG-based distributions, and can be used on
production kernels without patching or recompiling the kernel.
This package is publicly released under the GNU Affero General Public License Version 3. The
release is available as an autoconf tarball, SRPM, DSC, and set of binary RPMs and DEBs.
See the downloads page for the autoconf
tarballs, SRPMs and DSCs. For tarballs, SRPMs, DSCs and binary RPMs and DEBs, see the
streams package page.
See http://www.openss7.org/codefiles/streams-0.9.2.4/ChangeLog and
http://www.openss7.org/codefiles/streams-0.9.2.4/NEWS in the release for more
information. Also, see the STREAMS.pdf manual in the release (also in html
http://www.openss7.org/STREAMS_manual.html).
For the news release, see http://www.openss7.org/rel20081029_K.html.
Major changes for release streams-0.9.2.3
This is the twelveth OpenSS7 Project release of Linux
Fast-STREAMS. LiS was fully deprecated as of the previous release and
Linux Fast-STREAMS is the only STREAMS package contained in the OpenSS7
Master Package (since openss7-0.9.2.D).
This release is a stable, production grade release. The release includes
maintenance support for recent distributions and tool chain, but also includes
some performance and feature upgrades and inspection bug fixes.
Major features since the last public release are as follows:
- Support build on openSUSE 10.2.
- Support build on Fedora 7 and 2.6.21 kernel.
- The
strace(8), strerr(8) utilities and log(4) driver
have had some corrections. The STREAMS trace logger is now an excellent way for
trace logging of fielded production drivers. A number of OpenSS7 drivers have
already been converted to use this facility.
- Support build on CentOS 5.0 (RHEL5).
- Support build on Ubuntu 7.04.
- Significant rework of the Stream head and both enabling and backenabling
utilities. Handling of enabling flags QWANTR and QWANTW were not being
performed quite properly. Also, service procedures for the read side stream
head queue was added to defer wakeups when possible. The result is very
significant performance improvements (like it wasn't fast enough already).
STREAMS-based pipes in this package now perform 2 to 5 times (yes %200 to %500)
faster than the old legacy 4.1BSD/SVR4 Linux pipes currently in the kernel:
perhaps we should shout the "Fast" too.
The impact of these performance changes is that Linux Fast-STREAMS now
runs faster and looser on SMP systems: if your drivers have race conditions they
will likely be exacerbated by this version.
- Corrected a few bugs. See BUGS in the release for more information.
- Significant rework of STREAMS syncrhonization. OSF/1-Mentat style
syncrhonization levels, Solaris style perimeters, and SVR 4.2 style load refusal
are fully supported. Some idiosynchracies of AIX, HP-UX, MacOT and VxWorks is
also supported.
- Updated to gettext 0.16.1.
- Changes to support build on 2.6.20-1.2307.fc5 and 2.6.20-1.2933.fc6 kernel.
- Supports build on Fedora Core 6.
- Support for recent distributions and tool chains.
Major changes for release streams-0.9.2.2
This is the eleventh OpenSS7 Project release of Linux
Fast-STREAMS. LiS was fully deprecated as of the previous release and
Linux Fast-STREAMS is now the only STREAMS package contained in the
OpenSS7 Master Package (since openss7-0.9.2.D).
This release is a stable, production grade release for Linux
Fast-STREAMS. The release is primarily a maintenance release to support recent
distributions and tool chain.
Major features since the last public release are as follows:
- Fix for clone open failure locking problems, demand loading of clone minors,
an error in clone minor device deregistration, and an error in queue
syncrhornization. See
http://www.openss7.org/codefiles/streams-0.9.2.4/BUGS in
the release for more information.
- Added feature to perform automatic reference counting of modules for the
esballoc(9) free routines on Linux 2.6 kernels. See new
esballoc(9).
- Added versions to all exported symbols. Made LFS unique functions GPL export.
- Improvements to the common build environment with better support for standalone
package builds on 2.4 kernels.
- Support for autoconf 2.61, automake 1.10 and gettext 0.16.
- Support for Ubuntu 6.10 distribution and bug fixes for i386 kernels.
Major changes for release streams-0.9.2.1
This is the tenth OpenSS7 Project release of Linux Fast-STREAMS.
The release number has been moved from the 0.9a sequence to 0.9.2 to indicate
that the package has moved to a production grade. LiS has been fully
deprecated by this release and Linux Fast-STREAMS is now the only
STREAMS package contained in the OpenSS7 Master Package
(openss7-0.9.2.D).
This release is a stable, production grade release for Linux
Fast-STREAMS. The release is primarily a maintenance release. Some minor
defect corrections have been applied, but no significant development has
occurred. The release provides the following enhancements and fixes:
- Testing of, and a few bug corrections to, the strlog() feature. Trace and
error logging working well.
- Support for most recent 2.6.18 kernels (including Fedora Core 5 with inode
diet patch set).
- The package now builds a replacement libLiS and libpLiS library so that user
applications written to work with LiS-2.18.1 through LiS-2.18.7
do no need to be recompiled. Added versions to all library symbols in all
three libraries.
- Minor bug fixes to STREAMS library. isastream(3) and fattach(3) must not
contain an asynchronous thread cancellation point, but they could. Added
asynchronous thread cancellation protection to these functions to remove any
thread cancellation points.
- Now builds 32-bit compatibility libraries, as well, and tests them against
64-bit kernel modules and drivers. The ‘make installcheck’ target will
now automatically test both 64-bit native and 32-bit compatibility versions,
one after the other, on 64-bit platforms.
- Many documentation updates for all OpenSS7
packages. Automated release file generation making for vastly improved and
timely text documentation present in the release directory.
- Dropped support for LiS.
- Updated init scripts for proper addition and removal of modules.
- Start assigning majors at major device number 231 instead of major device
number 230. Assign major device number 230 explicitly to the clone device.
Package will now support extended ranges of minor devices on 2.6 kernels under
Linux Fast-STREAMS only. streams now supports expanded
addressable minor device numbers, permitting 2^16 addressable minor devices
per major device number on 2.6 kernels: LiS cannot support this change.
- Better detection of SUSE distributions, release numbers and SLES
distributions: support for additional SuSE distributions on
ix86
as well as x86_64. Added distribution support includes SLES 9,
SLES 9 SP2, SLES 9 SP3, SLES 10, SuSE 10.1.
- Improved compiler flag generation and optimizations for recent gcc
compilers and some idiosyncratic behaviour for some distributions (primarily
SUSE).
- Optimized compilation is now available also for user level programs in
addition to kernel programs. Added new --with-optimize option to
configure to accomplish this.
- Added --disable-devel configure option to suppress
building and installing development environment. This feature is for embedded
or pure runtime targets that do not need the development environment (static
libraries, manual pages, documentation).
- Added send-pr script for automatic problem report generation.
- The package will now build doxygen(1) html documentation with the 'doxy'
make target. See 'make help' or README-make in the distribution for more
information.
Major changes for release streams-0.7a.6.rc3
Third release candidate.
- Minor bug fixes to STREAMS library. isastream(3) and fattach(3) must not
contain an asynchronous thread cancellation point, but they could. Added
asynchronous thread cancellation protection to these functions to remove any
thread cancellation points.
- The package will now build doxygen(1) html documentation with the 'doxy' make
target. See 'make help' or README-make in the distribution for more
information.
- Now builds 32-bit compatibility libraries and tests them against 64-bit kernel
modules and drivers. The ‘make installcheck’ target will now automatically
test both 64-bit native and 32-bit compatibility versions, one after the other,
on 64-bit platforms.
- Added versions to all library symbols.
- Automated release file generation making for vastly improved and timely text
documentation present in the release directory.
- Many documentation updates for all OpenSS7
packages.
- This release candidate includes the changes made to the strsctp drivers at the
2006 SCTP Interop at the University of British Columbia. This
version was interoperability tested with all implementations present.
- This release candidate provides support for additional SuSE distributions
on
ix86 as well as x86_64. Added distribution support includes
SLES 9, SLES 9 SP2, SLES 9 SP3, SLES 10, SuSE
10.1.
- Better detection of SUSE distributions, release numbers and SLES distributions.
- Optimized compilation is now available also for user level programs in addition
to kernel programs. Added new --with-optimize option to
configure to accomplish this.
- Improved compiler flag generation and optimizations for recent gcc
compilers and some idiosyncratic behaviour for some distributions (primarily
SUSE):
| − | Remove -fno-reorder-blocks and
-fno-reorder-functions options added by some recent 2.6
Makefiles for ‘x86_64’ architecture: it impedes performance
optimizations.
|
| − | Remove -ffunction-sections option added by some
recent 2.6 Makefiles for ‘x86_64’ architecture: this is an
insane option and should never have been used.
|
| − | Add -ffreestanding that some older 2.6
Makefiles (such as that with SLES 9 2.6.5 kernel) neglect to add
to the gcc command line.
|
| − | SLES 10 expands the directory before
autoconf.h on the gcc command line for some reason.
configure script watches out for this now.
|
- Updated init scripts for proper addition and removal of modules.
- Start assigning majors at major device number 231 instead of major device
number 230. Assign major device number 230 explicitly to the clone device.
- streams now supports expanded addressable minor device numbers,
permitting 2^16 addressable minor devices per major device number on 2.6
kernels: LiS cannot support this change.
This release is an internal release candidate and was not publicly released.
Major changes for release streams-0.7a.6.rc2
Second release candidate.
This release candidate also contains the results of performance testing of the
new second generation UDP driver (implemented completely in
STREAMS instead of using an internal socket).
This release candidate also contains support for SuSE 10.1.
This release is an internal release candidate and was not publicly released.
Major changes for release streams-0.7a.6rc1
Release candidate for Mark Fugate.
Added ‘--enable-devel’ configure option for embedded targets.
Added send-pr script for automatic problem report generation.
This release is an internal release candidate and was not publicly released.
Major changes for release streams-0.7a.5
This release is primarily to support additional compilers (gcc 4.0.2),
architectures (x86_64, SMP, 32-bit compatibility), recent Linux distributions
(EL4, SuSE 10, LE2006, OpenSuSE) and kernels (2.6.15).
- Changes to wait queues. Split single wait queue into four independent
wait queues. Reworked wait queues for both old style (2.4) and new style (2.6)
semantics.
- Changes to satisfy gcc 4.0.2 compiler.
- Corrected build flags for Gentoo and 2.6.15 kernels as reported on mailing
list. Build and run tested on FC4 i686 and x86_64 kernels based on 2.6.15.
- Corrections for and testing of 64-bit clean compile and test runs on
x86_64 architecture. Some bug corrections resulting from gcc 4.0.2 compiler
warnings.
- Initial corrections for and testing of SMP operation on Intel 630
Hyper-Threaded SMP on x86_64. This package should now run well on N-way Xeons
even with Hyper-Threading enabled.
- Corrections and validation of 32-bit compatibility over 64-bit on x86_64.
Should apply well to other 64-bit architectures as well.
This is a public beta test release of the package.
Major changes for release streams-0.7a.4
This is primarily a bug fixes release and corrections resulting from testing.
Major changes for release streams-0.7a.3
With this release version numbers were changed to reflect an upstream version
only to be consistent with other OpenSS7 package releases. All RPM
release numbers will be ‘-1$(PACKAGE_RPMEXTRA)’ and all Debian
release numbers will be ‘_0’. If you wish to apply patches and release
the package, please bump up the release number and apply a suitable release
suffix for your organization. We leave Debian release number ‘_1’
reserved for your use, so you can still bundle the source in the .dsc
file.
Major changes for this release include build against Linux 2.6 kernels and
popular distributions based on the 2.6 kernel as well as wider distribution
support.
This was an internal beta test release and was not released publicly.
Major changes for release streams-0.7a-3
Updates to common build process. Documentation updates.
This was an internal alpha test release and was not released publicly.
Major changes for release streams-0.7a-2
Removed all XTI/TLI and Linux networking code, headers and documentation from
streams distribution and set epoch at 0. Linux networking code has been
migrated to the strxnet, strinet and strsctp packages. The purpose for doing
this was to allow the Linux networking to build against
Linux Fast-STREAMS as well as Linux STREAMS and is a
preparation for phasing out LiS and phasing in LfS.
This was an internal alpha test release and was not released publicly.
Initial release streams-0.7a-1
This is the initial release of the Linux Fast-STREAMS package for Linux.
This is intended as a high-performance, production replacement for Linux
STREAMS (LiS). Linux Fast-STREAMS has the following features:
- optimized for Linux kernels.
- prepared for mainstream Linux kernel adoption.
- lindented and follows kernel coding practises.
- compatibility modes for AIX, HPUX, OSF, Solaris, UnixWare, SVR 4.2 and LiS.
- supports all major SVR4.2 variants.
- licensed under GPL with commercial licensing available.
- supports full SVR 4.2 MP synchronization models.
- runs at SoftIRQ.
- provides common SVR 4.2 system tunable parameters and sysctls.
- provides /proc file system access for debugging and performance tuning.
- provides a full set of common STREAMS modules and drivers.
- provides full name-streams device and shadow special file system support.
This was an internal alpha test release and was not released publicly.
7.4 Maturity
The OpenSS7 Project adheres to the following release philosophy:
- pre-alpha release
- alpha release
- beta release
- gamma release
- production release
- unstable release
7.4.1 Pre-Alpha Releases
Pre-alpha releases are releases that have received no testing whatsoever. Code in the release
is not even known to configure or compile. The purpose of a pre-alpha release is to make code and
documentation available for inspection only, and to solicit comments on the design approach or other
characteristics of the software package.
Pre-alpha release packages ship containing warnings recommending that the user not even
execute the contained code.
7.4.2 Alpha Releases
Alpha releases are releases that have received little to no testing, or that have been tested
and contains known bugs or defects that make the package unsuitable even for testing. The purpose
for an alpha release are the same as for the pre-alpha release, with the additional purpose
that it is an early release of partially functional code that has problems that an external
developer might be willing to fix themselves and contribute back to the project.
Alpha release packages ship containing warnings that executing the code can crash machines and
might possibly do damage to systems upon which it is executed.
7.4.3 Beta Releases
Beta releases are releases that have received some testing, but the testing to date is not
exhaustive. Beta release packages do not ship with known defects. All known defects are
resolved before distribution; however, as exhaustive testing has not been performed, unknown
defects may exist. The purpose for a beta release is to provide a baseline for other
organizations to participate in the rigorous testing of the package.
Beta release packages ship containing warnings that the package has not been exhaustively
tested and that the package may cause systems to crash. Suitability of software in this category
for production use is not advised by the project; however, as always, is at the discretion of the
user of the software.
7.4.4 Gamma Releases
Gamma releases are releases that have received exhaustive testing within the project, but
external testing has been minimal. Gamma release packages do not ship with known defects. As
exhaustive internal testing has been performed, unknown defects should be few. Please remember that
there is NO WARRANTY on public release packages.
Gamma release packages typically resolve problems in previous beta releases, and might
not have had full regression testing performed. Suitability of software in this category for
production use is at the discretion of the user of the software. The OpenSS7 Project
recommends that the complete validation test suites provided with the package be performed and pass
on target systems before considering production use.
7.4.5 Production Releases
Production releases are releases that have received exhaustive testing within the project and
validated on specific distributions and architectures. Production release packages do not
ship with known defects. Please remember that there is NO WARRANTY on public release packages.
Production packages ship containing a list of validated distributions and architectures.
Full regression testing of any maintenance changes is performed. Suitability of software in this
category for production use on the specified target distributions and architectures is at the
discretion of the user. It should not be necessary to preform validation tests on the set of
supported target systems before considering production use.
7.4.6 Unstable Releases
Unstable releases are releases that have received extensive testing within the project and
validated on a a wide range of distributions and architectures; however, is has tested unstable and
found to be suffering from critical problems and issues that cannot be resolved. Maintenance of the
package has proved impossible. Unstable release packages ship with known defects (and loud
warnings). Suitability of software in this category for production use is at the discretion of the
user of the software. The OpenSS7 Project recommends that the problems and issues be closely
examined before this software is used even in a non-production environment. Each failing test
scenario should be completely avoided by the application. OpenSS7 beta software is more
stable that software in this category.
7.5 Bugs
7.5.1 Defect Notices
Linux Fast-STREAMS could possibly contain unknown defects. This is a production
release. Nevertheless, some remaining unknown defects could possibly be harmful. Validation
testing has been performed by the OpenSS7 Project and external entities on this software for
the set of systems listed in the release notes. Nevertheless, the software might still fail to
configure or compile on other systems. The OpenSS7 Project recommends that you validate
this software for your target system before using this software. Use at your own risk. Remember
that there is NO WARRANTY.23
This software is production software. As such, it is stable on validated systems but might
still crash your kernel in unique circumstances. Installation of the software on a non-validated
distribution might mangle your header files or Linux distribution in such a way as to make it
unusable. Crashes could possibly lock your system and rebooting the system might not repair the
problem. You can possibly lose all the data on your system. Because this software stands a chance
of crashing your kernel, the resulting unstable system could possibly destroy computer hardware or
peripherals making them unusable. You might void the warranty on any system on which you run this
software. YOU HAVE BEEN WARNED.
7.5.2 Known Defects
With the exception of packages not originally created by the OpenSS7 Project, the
OpenSS7 Project software does not ship with known bugs in any release stage except
pre-alpha. Linux Fast-STREAMS had no known bugs at the time of release.
7.5.3 Defect History
This section contains historical bugs that were encountered during development
and their resolutions. This list serves two purposes:
- It captures bugs encountered between releases during development that could possibly reoccur (and
the Moon is made of blue cheese). It therefore provides a place for users to look if they encounter
a problem.
- It provides a low overhead bug list between releases for developers to use as a TODO list.
Bugs
025. 2008-10-17T05:57:29+0000-
‘putnext(q, mp)’ was checking whether procedures had been turned off on queue ‘q’. This
was not correct as it is only the ‘q->q_next’ put procedure that would be executed. It should
only check procedures on ‘q->q_next’.
*fixed* in streams-0.9.2.4
024. 2008-10-11T19:36:41+0000-
A list delete corruption bug in the STREAMS driver and module lookup functions (e.g.
__cdrv_lookup) was discovered by the list debugging in the FC9 kernel.
*fixed* in streams-0.9.2.4
023. 2008-10-11T19:36:23+0000-
Not really a bug, but newer (2.6.25) kernels no longer permit registration of binary identifiers for
sysctls (i.e. ctl_name). The proc filesystem entries (i.e. procname) are still
permitted and ctl_name should be set to zero for these kernels. Added a check for the
existence of symbol sysctl_check_table() to identify when binary registration is
forbidden. Another related problem is that when binary registration of system controls is not
possible,
sysctl(2) becomes worthless. Unfortunately, the STREAMS MIB agent was written to
use sysctl(2) and needs to be rewritten to use the /proc/sys filesystem instead ala
sysctl(8).
*fixed* in streams-0.9.2.4
022. 2008-10-07T18:40:25+0000-
When overriding 32-bit compatability on input-output controls conflicting from the CDROM block
device with STREAMS input-output controls, the override was not properly passing CDROM input-output
controls through due to a missing break statement in the override loop. This bug affected
pre-2.6.11 kernels, likely manifesting itself in a non-function CDROM device while STREAMS was
loaded. Bug reported and one-line fix provided by Sylvain Chouleur for DGAC.
*fixed* in streams-0.9.2.4
021. 2008-08-01T22:32:08+0000-
When flushing queues the backenable bits were not being initialized to zero in __flushq(),
resulting in back-enabling of bands (or the normal queue) was being performed depending on the
uninitialized values in the backenable bit array. This only affected
I_SETSIG signals
for SWRNORM and SWBAND, and the only when flushing queues. Fix properly
initializes the backenable array.
*fixed* in streams-0.9.2.4
020. 2008-07-31T04:59:41+0000-
Not really a bug (for STREAMS), but when the streams.ko kernel module is loaded, the
crash(8) debugger will not debug a running kernel because it finds the
runqueues() exported function in the streams.ko module instead of the the static
one from the kernel. This has been temporarily renamed by macro to srunqueues() (notice
the leading ‘s’) until crash(8) learns to do the right thing and check that the
symbol it looks up comes from the kernel instead of a kernel module.
*workaround* in streams-0.9.2.4
019. 2008-07-25T22:41:47+0000-
When
M_READ was being issued by the Stream Head downstream an srlock() imbalance in
strsendmread() was causing soft-lockups on close for recent read-write lock
implementations on CentOS 5.2 for ‘x86_64’.
*fixed* in streams-0.9.2.4
018. 2008-07-25T01:15:26+0000-
Previous fix didn't work too good: returning [
EAGAIN] when hung-up on getmsg(2),
getpmsg(2), read(2), readv(2) instead of 0 and terminal end of file.
This caused a regression on four or five other test cases.
*fixed* in streams-0.9.2.4
017. 2008-04-10T15:17:30+0000-
When
M_DATA is sent upstream followed by M_HANGUP, read(2s) is returning zero
(0) and not permitting the data associated with the M_DATA to be read. This is a bug per
documentation. read(2s) should operate as normal following a hangup until all data is read
and then return zero (0).
The difficulty is that when waking up from a read sleep or when entering read the hangup condition
was generating an internal [ESTRPIPE] error. This was altered so that [ESTRPIPE] is
only returned during the hangup condition after the read queue has been tested and the caller is
about to sleep on read.
Test cases 3.2.1, 3.5.1 and 3.6.1 in the test-streams test suite executable were altered to validate
the fix for this case and curtail regressions.
*fixed* in streams-0.9.2.4
016. 2007-11-14T17:23:57+0000-
Read is blocking when data has been read,
O_NONBLOCK and O_NDELAY unset,
RFILL unset, in non-SVR4 mode. This violates POSIX specifications.
Test case 3.1.11.4 in the test-streams test suite executable was generated to validate the fix
for this case and to curtail regressions.
*fixed* in streams-0.9.2.4
015. 2007-11-14T17:19:01+0000-
Dynamic allocation of major device numbers is not working on recent 2.6 kernels. Someone slipped
some code in the kernel to have register_chrdev() allocate from major 255 down (again). Changed
code to allocate modid according to our own rules and then request the same for a major device
number. This also ensures that module ID and major are the same.
*fixed* in streams-0.9.2.4
014. 2007-05-17T21:48:24+0000-
The
dupb(9) utility had an obnoxious bug where it permitted the db_ref count to
wrap to zero, causing buffer allocation and freeing problems. This was very difficult to debug.
dupb(9) now fails if the reference count has reached 255. When dupb(9) fails, the
user should check if the reference count has reached 255, and if it has, attempt a deep
copyb(9) instead. At some point it might be useful to have STREAMS do the deep copy
automatically. This was discovered in strsctp loopback tests where message blocks are
rapidly duplicated for retransmission.
*fixed* in streams-0.9.2.3
013. 2007-05-17T21:48:06+0000-
The log driver, strace, strerr and strclean utilities had some bugs. The strsctp driver now
makes extensive use of
strlog(9) trace and error logging and the log driver and utilities
have been corrected. These facilities are now production grade.
*fixed* in streams-0.9.2.3
012. 2007-04-13T01:47:30+0000-
It appears that Ubuntu 6.10 has a rather broken implementation of the LSB
install_init that has been inherited from Debian (a python script, none the less). This
implementation refuses to properly install a disabled service (one with an empty or missing
Default-Start: tag), but, rather invokes updated-rc.d in such a way that the init script is started
at runlevels ‘2 3 4 5’ instead. This was causing problems with the strace and strerr services
which are normally installed disabled.
This uncovered the fact that the Debian-style init scripts were not working anyway. The scripts
have been fixed and the strace and strerr utilities now default to enabled.
*fixed* in streams-0.9.2.3
011. 2007-04-10T10:56:42+0000-
The strbcflag flag was never being cleared, causing infinite looping of the scheduler once the
maximum number of buffers was reached. This also revealed a problem that bufcalls were being run
unncecessarily (when strbcwait was set, instead of only when strbcflag was set).
*fixed* in streams-0.9.2.3
010. 2007-04-10T10:55:29+0000-
The stream event sequence number was wrapping and becoming larger than the event mask resulting in
inability to cancel buffer callbacks and timeouts.
*fixed* in streams-0.9.2.3
009. 2007-04-02T11:57:35+0000-
ldl was using an incorrect MKDEV command, but when the Stream head attempted to redirect the
open to the new (mangled) major device number, it properly returned ENXIO, but did not release a
reference to the module. Need to check code paths for this to see where the reference needed to be
released.
*known bug*
008. 2007-03-31T05:33:29-0600-
When loosening SMP locking, found a bug in the QWANTR handling in getq() and back-enabling in
flushq() and flushband(). Both of these were generating false back-enables. The getq() was
generating a lot of false back-enables. Whenever getq() found an empty queue it was not only
setting QWANTR, but it was back-enabling the queue. The result is that if service procedures are
used exclusively (that is, qi_put() always does a putq()), getq() would generate a false back-enable
for each message. Also, the enabled queue would generate another false back-enable. Significant
performance gains should be noticed.
*fixed* in streams-0.9.2.3
007. 2007-03-16T17:33:20-0600-
Jérémy
Compostella pointed out an error in strallocpmsg() where it was always assigining M_PCPROTO to
messages created with I_FDINSERT.
*fixed* in streams-0.9.2.3
006. 2007-03-14T23:48:26-0600-
There appears to be an inode lock imbalance that occurred for several clone error paths in stropen.
If the returned major device number does not correspond to a driver, or an snode cannot be acquired
for the new entry and the stream head reparented.
*fixed* in streams-0.9.2.2
005. 2007-03-07T15:53:06-0700-
Demand loading of kernel modules for clone devices opened, for example, as /dev/streams/clone/mux
was requesting module streams-clone-mux and /dev/streams/clone/mux but was not requesting
streams-mux or /dev/streams/mux and the modules were failing to demand load.
*fixed* in streams-0.9.2.2
004. 2007-02-26T08:25:09-0700-
Jérémy
Compostella pointed out error in clone.c. When an automatic clone minor device was unregistered, it
was unregistering the modid instead of the major number. This was not noticed because all OpenSS7
drivers have the same modid as major number (strconf does this automatically).
*fixed* in streams-0.9.2.2
003. 2007-02-26T08:25:09-0700-
Jérémy
Compostella pointed out syntax error in strsched.c that kept synqs from compiling properly.
*fixed* in streams-0.9.2.2
002. 2006-09-24T20:02:00+0000-
Discovered asynchronous thread cancellation inconsistencies in libLiS libpLiS by inspection during
documentation.
isastream(2), fattach(2) were not performing proper asynchronous
thread cancellation suppression so that these function contained a cancellation point when the
should not.
*fixed* in streams-0.7a.6.rc3
001. 2006-07-05T21:54:49+0000-
Fedora Core 5 reports a rwlock bug during udp module unloading as follows:
BUG: rwlock wrong CPU on CPU#0, rmmod/7515
Call Trace:
{rwlock_bug+100}
{_raw_write_unlock+88}
{:streams:unregister_strnod+211}
{:streams:unregister_clone+64}
{:streams:unregister_strdev+24}
{:streams_udp:udpterminate+26}
{sys_delete_module+406}
{system_call+126}
It appears that unregister_strnod() is scheduling while holding a write lock on cdevsw_lock. This
is probably in iput() called within cmin_del.
*fixed* in streams-0.7a.6.rc2
There were a number of places where sleeping functions were called with spin-locks held, causing the
CPU awaking from the sleep to sometimes be different from the CPU that took the lock. This was
buggy, so I reworked all of these cdev and fmod sections to handle spin locks properly. FC5/SMP on
HT no longer reports these bugs.
7.6 Schedule
Current Plan
There are not many things left to be done on the production Linux Fast-STREAMS package. As of the
streams-0.9.3 release, performance modifications are complete. The package now exhibits performance
on STREAMS-based pipes and TPI drivers that is significantly (factor of 2 or more) superior to that
experienced by legacy Linux facilities.
Therefore, the current plan for Linux Fast-STREAMS is largely a maintenance plan. Items on the todo
list, below, will be picked up as time permits. The OpenSS7 Project intends to release regularly
new versions of Linux Fast-STREAMS that build and validate against upcoming releases of the
supported Linux Distributions available from major distributors and upcoming releases of the Linux
kernel, both mainline and as patched by major distributors. This release schedule is approximately
every 3 to 6 months. More recent corrections and support for new distributions and kernels can be
obtained by sponsoring the OpenSS7 Project and obtaining access to the live CVS repository (also
available as a git repository).
One development activity in the works for Linux Fast-STREAMS is to provide integral support for more
embedded cross-platform development systems such as the Denx ELDK, as well a existing and emerging
RT kernels such as Montavista and the upcoming SuSE and RedHat RT kernels. This is a significant
undertaking and will only be embarked upon when the OpenSS7 Project is given free access to these RT
kernels and distributions.
Things to Do
- Support for RT kernels. This is a little more than just having the STREAMS scheduler run as a
non-RT process kernel thread, which it does now, and which is trivial. (The existing package should
compile and run against these kernels with minor modification in this event.)
More to the point is working the light-weight STREAMS scheduler and service procedures into a
prioritized scheme where service procedures run as real-time, yet pre-emptable tasks. In contrast
to the current scheme, it is likely that the approach would be to either spawn multiple kernel
threads for the STREAMS scheduler at different priorities, or to alter the priority of the STREAMS
scheduler in response to the scheduling of specific queues at specific priorities. A design is not
really possible until the intricacies of upcoming RT kernels are discovered.
- TODO:
- Provide support for RT kernels.
- Per cpu data:- I am still using the older approach of using cache line aligned arrays for per-cpu
data. This, of course, does not fully utilize NUMA architectures. For NUMA architectures we need
to use the per-cpu utilities provided by the 2.6 kernel. I haven't touched converting this yet.
Also, there are several NUMA supporting STREAMS utility functions (allocb_node, etc.) that need to
be supported yet.
- TODO:
- Convert cacheline aligned arrays to NUMA per-cpu data on 2.6 kernels. Complete NUMA supporting
STREAMS facilities.
- Split include/sys/streams/stropts.h by architecture. There is conflicting numbering on the
standard STREAMS input-output controls:
System V Release 4 UNIX® vendors use one set and OSF
UNIX® vendors use another. Namely HP-UX, OSF/1.2, AIX,
Mac OpenTransport use OSF numbering, whereas IRIX, Solaris, UnixWare and
others use SVR4 numbering. So, for HPPA, Alpha, PowerPC, we should use the OSF numbering.
I know that it is a fall-back to the SVR4 way of separating architectural differences by UNIX vendor
(if it is HPPA, it must be sold by HP and it must be HP-UX running on it, for example), but even the
Linux kernel is victim to this (many ioctls and some errno numbering is split this way). It is
completely entrenched in GNU autoconf's config.guess.
- TODO:
- Split include/sys/streams/stropts.h by processor architecture.
- A similar numbering mismatch occurs for many of the message block types.
- TODO:
- Split include/sys/streams/streams.h by processor architecture.
- Implement
I_EGETSIG(7) and I_ESETSIG(7). These are Solaris enhanced
version of the I_GETSIG(7) and I_SETSIG(7) STREAMS input-output controls.
The difficulty with their implementation is that the entire signal handling setup inside the Stream
head code is geared toward the calling process and needs to be adjusted to be general enough for
any process or process group. Until then, Linux file asynchronous I/O is supported.
- PARTLY DONE:
- Wrote the manual pages and added them to the build. Placed function skeletons that return
[
EOPNOTSUPP] for these functions in the Stream head.
- TODO:
- Implement I_EGETSIG(7) and I_ESETSIG(7).
- It is possible on 2.6 kernels to use the ability to determine the module that owns a function to
perform module reference counting for
esballoc(9) callback functions. That is, when
esballoc(9) (and friends) are called, the module owning the callback function has its
module reference count incremented. When the block is freed and the callback function returns, the
module has its module reference count decremented. The pertinent kernel function is
module_text_address() that returns the module in which a text address resides.
- DONE:
- Module reference counting performed when module_text_address() is available.
- Add a tail padding amount to the stream head as a option to facilitate conversion of mblks to
sk_bufs.
- DONE:
- Implemented as SO_WRPAD.
- Socket buffer handling:
- Rather than write offset and padding, why not provide a flag (e.g. SO_SKBUFF) to indicate to the
stream head to allocate an sk_buff with the message block and share buffers between mblk and
sk_buff, then, the sk_buff can be used without allocation in the bottom half. esballoc() and
alloc_skbuff() can be used to set up the message block. dup() could be made aware of the hidden
sk_buff and increment the shared sk_buff count as well. Also, msgpullup() and pullupmsg() could be
made aware of message blocks containing sk_buffs and have them do the appropriate thing.
- The other thing that is needed is some way to tell the other end of a loopback connection that the
sk_buff it has received already has an mblk attached to it as above. Then the message block could
be simply passed upstream and one would not need to be esballoc'ed for it.
- Another thing is to provide the ability to partial checksum and copy data from user into these
sk_buffs, but setting an SO_CSUM flag along with the SO_SKBUFF flag to indicate the type of checksum
to perform.
The combination of the above three items should provide some serious performance gains for Linux
networking based stream heads.
- PARTIALLY DONE:
- Item (1) is done and complete. The 2nd generation UDP and RAW drivers are already using it. Item
(2) and (3) remain.
- Had another look at specfs, devfs and udev. It looks like we can create minor device nodes within
/dev (not just /dev/streams) using devfs or udev. Again, this doesn't do everything that specfs
does. specfs will demand load when an attempt is made to open a non-existent character device.
Nevertheless, we can describe a "streams" class for udev and when a module registers a minor device
node, we can have udev create that device node and provide permissions by adding our files to the
/etc/udev/rules.d and /etc/udev/permissions.d directories.
Therefore, on a udev system, we should make strconf-sh create the necessary rules.d and
permissions.d file entries. register_strnod will be modified to create a udev instance within the
stream class matching the rules.d and permissions.d entry when creating a minor device node within
the specfs.
On a devfs system, register_strdev and register_strnod should perform devfs calls instead of calling
register_chrdev. That way minor device nodes will automatically appear at least once the module is
loaded.
- TODO:
- rationalize specfs to devfs and udev
- Have the STREAMS subsystem register a panic notifier on 2.6 kernels to be able to recover from
panics caused by misbehaving STREAMS modules or drivers.
- TODO:
- Register panic notifier.
- Timers and Buffer callbacks:- Still haven't tested these.
- DONE:
- Timers are working nicely for SCTP that was tested at the Vancouver interop. Had no problems
whatsoever. Probably didn't run into a buffer callback, though, so those need to be more rigorously
tested.
Even mi_timers on M2PA are working fine.
- More performance testing and profiling on SMP. On the same kernel running non-SMP we get pipe
performance of about 80-90% of a Linux native pipe. Just running an SMP kernel drops this to 60%
comparative. Running both CPUs in an SMP kernel does not improve matters. Need to profile this up
80-90% on SMP too. Also, so many changes were made for 64bit and 32bit compatibility that the old
profiling information is out of date and needs to be updated.
- DONE:
- Profile and performance tests on SMP.
- I am interested to convert the perftest program to use a FIFO instead of a pipe. This is because a
FIFO is more closely related to a Linux Native pipe (i.e it has a read side and a write side, is
really only one file pointer, and only supports unidirectional flow). Comparative tests as opposed
to STREAMS-based pipes should be interesting.
- DONE:
- Tested. Results were unimpressive. STREAMS FIFOs perform about 1% better than STREAMS-based pipes.
- 32bit compatibility:- Not done yet, but a plan in place. Override stupid CDROM ioctl conversions on
kernels before 2.6.11, use compat_ioctl after that. For the older read/write interface it will be
necessary to have two "magic" lengths: one the same as the old one for 32-bit and a new 64-bit
"magic" length. This is so that the internal function can convert. Perhaps it can really be the
same number in the lower 32-bits. Note that on later kernels there is a CONFIG_COMPAT define that
we might want to check in the configure script.
- DONE:
- Tested on x86_64 with i686.
- DONE:
- Documentation of new registration functions.
- SMP:- Finally got at least a Hyper-Threaded Intel 630 for testing. There are some issues discovered
when running the test suites. Initial debugging is done (everything runs and doesn't crash) it is
just that some multiple writers and readers are getting stuck in wait queues. What we need to do is
to split the wait queues into open, close, read, write and ioctl from the big wait queue that it is,
and largely get rid of the RSLEEP, WSLEEP, IOCWAIT type bits (we could still set them for
compatibility with SVR4 but not examine them).
- DONE:
- Tested on X86_64 SMP.
- 64bit clean:- Pretty good now. I have clean compiles and test suite runs on 2.6.9-22.EL x86_64
kernels.
- DONE:
- Tested on x86_64.
- LiS Binary Compatibility:- Pretty much messed up right now. I have the regparm(0) stuff on the
callout and callback functions, and the STREAMS Compatibility Modules does regparm(0) on all the
lis_ functions. Primary STREAMS data structures align on the first portion of the data structure.
Sizes vary, so don't do q+1. Flags are a little different. There are however several problematic
data structures: cred_t and the ioctypes: iocblk, copyreq, copyresp, and the linkblk. When you
enable binary compatibility mode, it uses the LiS versions of these.
- DONE:
- Needs testing.
- LfS Binary Compatibility:- A little better. Callouts and callbacks always regparm(0). STREAMS
utility functions are always regparm(3). Data structures are stable for the most part. cred_t,
however, is variable depending on the kernel. Compile with the LiS binary compatibility and the
cred_t will be fixed size.
- DONE:
- Needs testing.
- Finish the documentation.
- MOSTLY DONE:
- updated documentation alot.
- Finish the full STREAMS logger and proper implementation of the strlog() utility.
- DONE:
- Added to strutil package. Needs testing.
- Need to rework the specfs. There are now several situations to consider:
The following four situations require the specfs.
- 2.4 kernel without devfs
- 2.6 kernel without devfs
- 2.4 kernel with devfs but without devfsd
- 2.6 kernel with devfs but without devfsd
The following two situations could use devfs instead of specfs.
- 2.4 kernel with devfs and with devfsd
- 2.6 kernel with devfs and with devfsd
The following one situation could use udev instead of devfs or specfs.
- 2.6 kernel with udev
To get this to work requires that there be an independent layer between the file system providing
device access for STREAMS and the STREAMS subsystem. A set of registration functions need to be
provided and a common set of call outs from the file system made to the STREAMS executive.
The registration functions need to be called when a STREAMS driver loads and the file system needs to
do the right thing. This also needs to include the registration of major and minor devices,
including clone devices.
The call out functions from the file system need to invoke the STREAMS device file operations in a
predictable manner, and the STREAMS subsystem requires the ability to chain open calls, or even open
STREAMS devices from within the kernel (e.g. for pipes and connld and such).
It is difficult to get the file system (specfs, devfs, udev) to hold data structures in a manner that
is also usable by the STREAMS subsystem, so the file system adaptation layer needs to maintain data
structures in the same manner for all file systems.
Well,... After a little investigation, it is all messed up. udev doesn't do what we need when
demand loading pseudo devices, and devfs is probably not used anymore (I found most production
kernels disabled for devfs) so it looks like spefs is the way to go. I might use udev for "real"
device drivers, but that's just for SS7. So it looks like we are stuck with mounting the specfs. I
notice that ptys still use their own file system too...
So, what we need now is to rework data structures and the specfs to be a little more stable.
- DONE:
- Tested.
- Kernel objects are another thing. For 2.6 kernels, we need to hold our data structures in the
kobject manner so that the /sys file system is usable. This requires another adaptation layer
because 2.4 kernels do this in a completely different way. Much of our /proc file system stuff needs
to move into /sys for 2.6 kernels by stay the same for 2.4 kernels.
The /sys file system does not really do much for STREAMS. The /dev/streams specfs file system does
more for us.
- SKIPPED.
7.7 History
For the latest developments with regard to history of changes, please see the ChangeLog file
in the release package.
8 Installation
8.1 Repositories
The Linux Fast-STREAMS package release can be accessed from the repositories of
The OpenSS7 Project. For rpm(1) based systems, the
package is available in a yum(8) repository based on repomd XML and may also be
accessed using zypper(8) or yast(8). For dpkg(1) based systems, the
package is available in a apt(8) repository.
By far the easiest (most repeatable and manageable) form for installing and using OpenSS7
packages is to install packages from the yum(8) or apt(8) repositories. If your
distribution does not support yum(8), zypper(8), yast(8) or
apt(8), then it is still possible to install the RPMs or DEBs from the repositories using
rpm(1), dpkg(1); or by using wget(1) and then installing them from RPM
or DEB using rpm(1) or dpkg(1) locally.
If binaries are not available for your distribution or specific kernel, but your distribution
supports rpm(1) or dpkg(1), the next best method for installing and using
OpenSS7 packages is to download and rebuild the source RPMs or DSCs from the repository.
This can also be performed with yum(8), zypper(8), yast(8),
apt(8); or directly using wget(1), rpm(1) or dpkg(1).
If your architecture does not support rpm(1) or dpkg(1) at all, or you have
special needs (such as cross-compiling for embedded targets), the final resort method is to
download, configure, build and install from tarball. In this later case, the easiest way to build
and install OpenSS7 packages from tarball is to use the tarball for the OpenSS7 Master
Package, openss7-0.9.2.G.
8.1.1 Repositories for YUM
To install or upgrade from the OpenSS7 repomd repositories, you will need a file in
your /etc/yum.repo.d/ directory. This file can be obtained directly from the OpenSS7
repository, like so:
$> REPOS="http://www.openss7.org/repos/rpms"
$> wget $REPOS/centos/5.2/x86_64/repodata/openss7.repo
$> sudo cp -f openss7.repo /etc/yum.repo.d/
$> sudo yum makecache
This example assumes the the distribution is ‘centos’ and the distribution release is
‘5.2’ and the architecture requires is ‘x86_64’. Another example would be
$REPOS/i686/suse/11.0/i686/repodata/openss7.repo, for using yum(8) with SUSE.
Once the repository is set up, OpenSS7 includes a number of virtual package definitions that
eas the installation and removal of kernel modules, libraries and utilities. Downloading,
configuring, building and installation for a single-kernel distribution is as easy as:
$> sudo yum install streams
Removing the package is as easy as:
$> sudo yum remove streams
If you have difficulty downloading the openss7.repo file, edit the following information into
the file and place it into the /etc/yum.repo.d/openss7.repo file:
-| [openss7]
-| enabled = 1
-| name = OpenSS7 Repository
-| baseurl = http://www.openss7.org/repos/rpms/centos/5.2/x86_64
-| gpgcheck = 1
-| gpgkey = http://www.openss7.org/pubkey.asc
Note that it is also possible to point to these repositories as an additional installation source
when installing CentOS, RedHat, Fedora, or others. You will have an additional STREAMS
category from which to choose installation packages.
Some additional installation real or virtual package names and the installations they accomplish are
as follows:
- ‘streams’
-
This package can be used to install or remove the entire Linux Fast-STREAMS package. When
installing, kernel modules will be installed automatically for the highest version kernel on your
system. When removing, all corresponding kernel modules will also be removed.
- ‘streams-devel’
-
This package can be used to install or remove the development components of the
Linux Fast-STREAMS package. When installing, ‘streams’ and appropriate kernel
module and kernel module development and debug packages will also be installed. When removing, the
development package and all kernel module development and debug packages will also be removed.
- ‘streams-2.4.20-28.7’
-
This package can be used to install or remove the package for a specific kernel version. When
installing, the ‘streams’ package will also be installed if necessary. When removing
the last kernel module package, the ‘streams’ package will also be removed.
Note that the version ‘2.4.20-28.7’ is just an example. Use the version returned by
‘$(uname -r)’ for the kernel for which you wish to install or remove the packages.
- ‘streams-2.4.20-28.7-devel’
-
This package can be used to install or remove the development and debug packages for a specific
kernel version. When installing, the ‘streams’ and ‘streams-devel’
packages will also be installed if necessary. When removing the development and debug for kernel
modules for the last kernel, the ‘streams-devel’ package will also be removed.
Note that the version ‘2.4.20-28.7’ is just an example. Use the version returned by
‘$(uname -r)’ for the kernel for which you wish to install or remove the packages.
For assistance with specific RPMs, see Downloading the Binary RPM.
8.1.2 Repositories for APT
For assistance with specific DEBs, see Downloading the Debian DEB.
8.2 Downloading
The Linux Fast-STREAMS package releases can be downloaded from the downloads page of
The OpenSS7 Project.
The package is available as a binary RPM (for popular architectures) a source RPM, Debian binary DEB
and source DSC, or as a tar ball.
If you are using a browsable viewer, you can obtain the OpenSS7 release of
streams from the links in the sections that follow.
By far the easiest (most repeatable and manageable) form for installing and using OpenSS7
packages is to download and install individual packages from binary RPM or DEB. If binary RPMs or
DEBs are not available for your distribution, but your distribution supports rpm(1) or
dpkg(1), the next best method for installing and using OpenSS7 packages is to
download and rebuild the source RPMs or DSCs.
If your architecture does not support rpm(1) or dpkg(1) at all, or you have
special needs (such as cross-compiling for embedded targets), the final resort method is to
download, configure, build and install from tarball. In this later case, the easiest way to build
and install OpenSS7 packages from tarball is to use the tarball for the
OpenSS7 Master Package, openss7-0.9.2.G.
8.2.1 Downloading with YUM
OpenSS7 repositories support yum(8) and zypper(8) in repomd XML format as well as
YaST and YaST2 formats.
OpenSS7 includes virtual packages that ease the installation and removal of kernel modules,
libraries and utilities.
Downloading, configuration, building and installation for a signle-kernel distribution installation
is as easy as:
% sudo yum install streams
|
This and additional packages for installation are detailed as follows:
- streams
- Install this package if you need the runtime streams package.
% sudo yum install streams
This will install the streams, streams-lib and
streams-KVERSION RPMs, where ‘KVERSION’ is the highest version number kernel on
your system.
Remove this package if you need to remove all vestages of the streams package.
% sudo yum remove streams
This will remove the streams, streams-lib,
streams-devel, streams-KVERSION and
streams-devel-KVERSION RPMs for all kernels on your system.
- streams-devel
- Install this package if you need the development streams package.
% sudo yum install streams-devel
This will install the streams, streams-lib,
streams-devel, streams-KVERSION and
streams-devel-KVERSION RPMs, where ‘KVERSION’ is the highest version number
kernel on your system.
Remove this package if you do not need development capabilities for the streams
package for any kernel.
% sudo yum remove streams-devel
This will remove the streams-devel and streams-devel-KVERSION
RPMs for all kernels on your system.
- streams-2.4.20-28.7
- Install this package if you need the runtime streams for kernel version
‘2.4.20-28.7’. The value ‘2.4.20-28.7’ is just an example. For the running
kernel, you can install the runtime streams components with:
% sudo yum install streams-$(uname -r)
This will install the streams, streams-lib and
streams-2.4.20-28.7 RPMs, where ‘2.4.20-28.7’ is the kernel version
specified.
Remove this package if you no longer need the runtime streams for kernel version
‘2.4.20-28.7’. The value ‘2.4.20-28.7’ is just an example. For the running
kernel, you can remove the runtime streams components with:
% sudo yum remove streams-$(uname -r)
This will remove the streams-2.4.20-28.7 and
streams-devel-2.4.20-28.7 RPMs, where ‘2.4.20-28.7’ is the kernel
version specified. Also, if this is the last kernel for which streams was installed,
the streams streams-lib and streams-devel RPMs will
also be removed.
Note that this is a virtual package name: the actual RPMs installed or removed from the system is a
kernel module package whose precise name will depend upon the system being used.
- streams-devel-2.4.20-28.7
- Install this package if you need the development streams package for kernel version
‘2.4.20-28.7’. The value ‘2.4.20-28.7’ is just an example. For the running
kernel, you can install the kernel development streams components with:
% sudo yum install streams-devel-$(uname -r)
This will install the streams, streams-lib,
streams-devel, streams-2.4.20-28.7 and
streams-devel-2.4.20-28.7 RPMs, where ‘2.4.20-28.7’ is the kernel
version specified.
Remove this package if you no longer need the development capabilities for the
streams package for kernel version ‘2.4.20-28.7’. The value
‘2.4.20-28.7’ is just an example. For the running kernel, you can remove the kernel
development streams components with:
% sudo yum remove streams-devel-$(uname -r)
This will remove the streams-devel-2.4.20-28.7 RPMs, where
‘2.4.20-28.7’ is the kernel version specified. Also, if this is the last kernel for
which streams was installed, the streams-devel RPMs will also be
removed.
Note that this is a virtual package name: the actual RPMs installed or removed from the system is a
kernel module package whose precise name will depend upon the system being used.
- streams-lib
- This package is an auxillary package that should be removed and inserted automatically by
yum(8). In rare instances you might need to remove or install this package explicitly.
8.2.2 Downloading with APT
OpenSS7 repositries support apt(8) repositorie digests and signatures.
8.2.3 Downloading the Binary RPM
To install from binary RPM, you will need several of the RPM for a complete installation. Binary
RPM fall into several categories. To download and install a complete package requires the
appropriate RPM from each of the several categories below, as applicable. Some release packages do
not provide RPMs in each of the several categories.
To install from Binary RPM, you will need all of the following kernel
independent packages for your architecture, and one of the kernel-dependent
packages from the next section.
Independent RPM
Independent RPM are
not dependent on the Linux kernel version.
For example, the
source package
‘streams-source-0.9.2.4-1.7.2.noarch.rpm’,
is not dependent on
kernel.
All of the following kernel independent RPM are required for your architecture.
Binary RPMs listed here are for example only: additional binary RPMs are
available from the downloads site. If your architecture is not available, you
can build binary RPM from the source RPM (see see Building from the Source RPM).
Architecture Independent
- streams-dev-0.9.2.4-1.7.2.noarch.rpm
- The streams-dev package contains the device definitions necessary
to run applications programs developed for Linux Fast-STREAMS.24
- streams-doc-0.9.2.4-1.7.2.noarch.rpm
- The streams-doc package contains this manual in plain text,
postscript, pdf and html forms, along with the meta-information from the
streams package. It also contains all of the manual pages
necessary for developing Linux Fast-STREAMS applications and
Linux Fast-STREAMS STREAMS modules or drivers.
- streams-init-0.9.2.4-1.7.2.noarch.rpm
- The streams-init package contains the init scripts and provides
the ‘postinst’ scripts necessary to create kernel module preloads and modules
definitions for all kernel module ‘core’ subpackages.
- streams-source-0.9.2.4-1.7.2.noarch.rpm
- The streams-source package contains the source code necessary for
building the Linux Fast-STREAMS release. It includes the autoconf(1)
configuration utilities necessary to create and distribute tarballs, rpm and
deb/dsc.
Architecture Dependent
- streams-devel-0.9.2.4-1.7.2.i686.rpm
- The streams-devel package contains library archives for static
compilation, header files to develop Linux Fast-STREAMS modules and drivers.
This also includes the header files and static libraries required to compile
Linux Fast-STREAMS applications programs.
- streams-lib-0.9.2.4-1.7.2.i686.rpm
- The streams-lib package contains the run-time shared libraries
necessary to run application programs and utilities developed for the
streams package.
- streams-util-0.9.2.4-1.7.2.i686.rpm
- The streams-util package provides administrative and
configuration test utilities and commands associated with the
Linux Fast-STREAMS package.
Kernel-Dependent RPM
Kernel-Dependent RPM are dependent on specific Linux Kernel Binary RPM releases.
Packages are provided for popular released RedHat kernels. Packages
dependent upon RedHat or other kernel RPM will have the ‘_kversion’
kernel package version in the package name.
One of the following Kernel-Dependent packages is required for your architecture
and kernel version. If your architecture or kernel version is not on the list,
you can build binary RPM from the source RPM (see see Building from the Source RPM).25
- streams-core-2.4.20-28.7-0.9.2.4-1.7.2.i686.rpm
- The streams-core package contains the loadable kernel modules
that depend only on the kernel. This package is heavily tied to the kernel for
which it was compiled. This particular package applies to kernel version
‘2.4.20-28.7’.26
- streams-info-2.4.20-28.7-0.9.2.4-1.7.2.i686.rpm
- The streams-info package27 contains the
module symbol version information for the core subpackage, above. It is
possible to load this subpackage and compile modules that use the exported
symbols without loading the actual kernel modules (from the core
subpackage above). This package is heavily tied to the kernel for which it was
compiled. This particular package applies to kernel version
‘2.4.20-28.7’.28
Configuration and Installation
To configure, build and install the binary RPM, See Configuring the Binary RPM.
8.2.4 Downloading the Debian DEB
To install from binary DEB, you will need several of the DEB for a complete installation. Binary
DEB fall into several categories. To download and install a complete package requires the
appropriate DEB from each of the several categories below,
as applicable. Some release packages do not provide DEBs in each of the several categories.
To install from Binary DEB, you will need all of the following kernel
independent packages for your architecture,
and one of the kernel-dependent packages from the next section.
Independent DEB
Independent DEB are not dependent on the Linux kernel version. For
example, the source package
‘streams-source_0.9.2.4-0_i386.deb’, is not
dependent on kernel.
All of the following kernel
independent DEB are required for your architecture.
Binary DEBs listed here are for example only: additional binary DEBs are available from the
downloads site. If your architecture is not available, you can build binary DEB from the Debian DSC
(see see Building from the Debian DSC).
Architecture Independent
- streams-dev_0.9.2.4-0_all.deb
- The streams-dev package contains the device definitions necessary to run
applications programs developed for Linux Fast-STREAMS. 29
- streams-doc_0.9.2.4-0_all.deb
- The streams-doc package contains this manual in plain text, postscript, pdf and html
forms, along with the meta-information from the streams package. It also
contains all of the manual pages necessary for developing Linux Fast-STREAMS applications and
Linux Fast-STREAMS STREAMS modules or drivers.
- streams-init_0.9.2.4-0_all.deb
- The streams-init package contains the init scripts and provides the postinst
scripts necessary to create kernel module preloads and modules definitions for all kernel module
‘core’ subpackages.
- streams-source_0.9.2.4-0_all.deb
- The streams-source package contains the source code necessary for
building the Linux Fast-STREAMS release. It includes the autoconf(1)
configuration utilities necessary to create and distribute tarballs, rpms and
deb/dscs.
!ignore
30
!end ignore
Architecture Dependent
- streams-devel_0.9.2.4-0_i386.deb
- The streams-devel package contains library archives for static
compilation, header files to develop Linux Fast-STREAMS modules and drivers.
This also includes the header files and static libraries required to compile
Linux Fast-STREAMS applications programs.
- streams-lib_0.9.2.4-0_i386.deb
- The streams-lib package contains the run-time shared libraries
necessary to run application programs and utilities developed for the
streams package.
Kernel-Dependent DEB
Kernel-Dependent DEB are dependent on specific Linux Kernel Binary DEB releases.
Packages are provided for popular released Debian kernels. Packages
dependent upon Debian or other kernel DEB will have the ‘_kversion’
kernel package version in the package name.
One of the following Kernel-Dependent packages is required for your architecture
and kernel version. If your architecture or kernel version is not on the list,
you can build binary DEB from the source DEB (see see Building from the Debian DSC).31
- streams-core-2.4.20-28.7_0.9.2.4-0_i386.deb
- The streams-core package contains the loadable kernel modules
that depend only on the kernel. This package is heavily tied to the kernel for
which it was compiled. This particular package applies to kernel version
‘2.4.20-28.7’.32
- streams-info-2.4.20-28.7_0.9.2.4-0_i386.deb
- The streams-info package33 contains the
module symbol version information for the core subpackage, above. It is
possible to load this subpackage and compile modules that use the exported
symbols without loading the actual kernel modules (from the core
subpackage above). This package is heavily tied to the kernel for which it was
compiled. This particular package applies to kernel version
‘2.4.20-28.7’.34
Configuration and Installation
To configure, build and install the Debian DEB, See Configuring the Debian DEB.
8.2.5 Downloading the Source RPM
If you cannot obtain a binary RPM for your architecture, or would like to roll you own binary RPM,
download the following source RPM.
- streams-0.9.2.4-1.src.rpm
- This is the source RPM for the package. From this source RPM it is possible to build binary RPM for
any supported architecture and for any 2.4 or 2.6 kernel.
Configuration
To configure the source RPM, See Configuring the Source RPM.
8.2.6 Downloading the Debian DSC
If you cannot obtain a binary DEB for your architecture, or would like to roll your own DEB,
download the following Debian DSC.
- streams_0.9.2.4-0.dsc
- streams_0.9.2.4-0.tar.gz
- This is the Debian DSC for the package. From this Debian DSC it is possible to build binary DEB for
any supported architecture and for any 2.4 or 2.6 kernel.
Configuration
To configure the source RPM, See Configuring the Debian DSC.
8.2.7 Downloading the Tar Ball
For non-rpm(1) and non-dpkg(1) architectures,
download the tarball as follows:
- streams-0.9.2.4.tar.gz
- streams-0.9.2.4.tar.bz2
- These are the tar(1) balls for the release. These tar(1) balls contain the
autoconf(1) distribution which includes all the source necessary for building and
installing the package. These tarballs will even build Source RPM and Binary RPM on
rpm(1) architectures and Debian DSC and DEB on dpkg(1) architectures.
The tar ball may be downloaded easily with wget(1) as follows:
% wget http://www.openss7.org/streams-0.9.2.4.tar.bz2
|
or
% wget http://www.openss7.org/streams-0.9.2.4.tar.gz
|
Note that you will need an OpenSS7 Project user name and password to download release
candidates (which are only available to subscribers and sponsors of the OpenSS7 Project).
Unpacking the Archive
After downloading one of the tar balls, unpack the archive using one of the
following commands:
% wget http://www.openss7.org/streams-0.9.2.4.tar.gz
% tar -xzvf streams-0.9.2.4.tar.gz
|
or
% wget http://www.openss7.org/streams-0.9.2.4.tar.bz2
% tar -xjvf streams-0.9.2.4.tar.bz2
|
Either will create a subdirectory name
streams-0.9.2.4
containing all of the files and subdirectories for the
streams package.
Configuration
To configure and install the tar ball, See Configuring the Tar Ball.
8.2.8 Downloading from CVS
If you are a subscriber or sponsor of The OpenSS7 Project with CVS
archive access privileges then you can download release, mid-release or release candidate versions
of the streams package from the project CVS archive.
The Linux Fast-STREAMS package is located in the streams module of
/var/cvs. For release tag information, see Releases.
To access the archive from the project CVS pserver, use the following commands to check out a
version from the archive:
% export CVSROOT='-d:pserver:username@cvs.openss7.com:2401/var/cvs'
% cvs login
Password: *********
% cvs co -r streams_0.9.2.4 streams
% cvs logout
|
It is, of course, possible to check out by date or by other criteria. For more information, see
cvs(1).
Preparing the CVS Working Directory
Although public releases of the streams package do not require reconfiguration,
creating a configurable directory from the CVS archive requires tools not normally distributed with
the other releases.
The build host requires the following GNU tools:
- m4 1.4.12
- autoconf 2.63
- automake 1.10.1
- libtool 2.2.4
- gettext 0.17
- flex 2.5.33
- bison 2.3
Most desktop development GNU/Linux distributions wil have these tools; however, some non-development
or server-style installations might not and they must be installed separately.35
Also, these tools can be acquired from the FSF website in the free
software directory, and also at the following locations:
It should be stressed that, in particular, the autoconf(1), and automake(1),
must be at version releases 2.63 and 1.10.1. The versions normally
distributed in some mainstream GNU/Linux distributions are, in fact, much older than these
versions.36 GNU version of these packages configured and
installed to default directories will install in /usr/local/ allowing them to coexist with
distribution installed versions.
For building documentation, the build host also requires the following documentation tools:
- gs 6.51 or ghostscript 6.51, or newer.
- tetex 3.0 or texlive 2007, or newer.
- texinfo 4.13a or newer.
- transfig 3.2.3d or newer.
- imagemagick 5.3.8 or ImageMagick 5.3.8, or newer.
- groff 1.17.2 or newer.
- gnuplot 3.7 or newer.
- latex2html 1.62 or newer.
Most desktop GNU/Linux distributions will have these tools; however, some server-style installations
(e.g. Ubuntu-server, SLES 9 or Fedora 6 or 7) will not and they must be
installed separately.37
Note that texinfo 4.12 must not be used as it breaks the build process.
For uncooked manual pages, the entire groff(1) package is required on Debian and
Ubuntu systems (the base package does not include grefer(1) which is used extensively by
uncooked manual pages). The following will get what you need:
Debian: % apt-get install groff_ext
Ubuntu: % apt-get install groff
|
In addition, the build host requires a complete tool chain for compiling for the target host,
including kernel tools such as genksyms(8) and others.
If you wish to package rpms on an rpm(1) system, or debs on a
dpkg(1) system, you will need the appropriate tool chain. Systems based on
rpm(1)
typically have the necessary tool chain available, however, dpkg(1) systems do not. The
following on a Debian or Ubuntu system will get what you need:
% apt-get install debhelper
% apt-get install fakeroot
|
To generate a configuration script and the necessary scriptlets required by the GNU
autoconf(1) system, execute the following commands on the working directory:
% autoreconf -fiv streams
|
where, streams is the name of the directory to where the working copy was
checked out under the previous step. This command generates the configure script and
other missing pieces that are normally distributed with the release Tar Balls, SRPMs and DSCs.
Make sure that ‘autoreconf --version’ returns ‘2.63’. Otherwise, you may need to perform
something like the following:
% PATH="/usr/local/bin:$PATH"
% autoreconf -fiv streams
|
After reconfiguring the directory, the package can then be configured and built using the same
instructions as are used for the Tar Ball, see Configuring the Tar Ball, and Building from the Tar Ball.
Do note, however, that make(1) will rebuild the documentation that is normally released
with the package. Additional tools may be necessary for building the documentation. To avoid
building and installing the documentation, use the --disable-devel or
--disable-docs option to configure described in Configuring the Tar Ball.
When configuring the package in a working directory and while working a change-compile-test cycle
that involves configuration macros or documentation, I find it of great advantage to invoke the GNU
configure options --enable-maintainer-mode, --enable-dependency-tracking
and --disable-devel. The first of these three options will add maintainer-specific targets
to any generated Makefile, the second option will invoke automatic dependency tracking within
the Makefile so rebuilds after changes to macro, source or documentation files will be
automatically rebuilt; and the last option will suppress rebuilding and reinstalling documentation
manual pages and header files. Header files will still be available under the /usr/src
directory.
8.3 Configuration
8.3.1 Configuring the Binary RPM
In general the binary RPM do not require any configuration, however, during installation it is
possible to relocate some of the installation directories. This allows some degree of
customization. Relocations that are available on the binary RPM are as follows:
- streams-core-2.4.20-28.7-0.9.2.4-1.7.2.i686.rpm
-
- /lib/modules/2.4.20-28.7
- This relocatable directory contains the kernel modules that provide the
streams core, drivers and modules.38
- streams-info-2.4.20-28.7-0.9.2.4-1.7.2.i686.rpm
-
- /usr/include/streams/2.4.20-28.7
- This relocatable directory contains the kernel module exported symbol
information that allows other kernel modules to be compiled against the correct
version of the streams package.39
- streams-dev-0.9.2.4-1.7.2.i686.rpm
- (not relocatable)
- streams-devel-0.9.2.4-1.7.2.i686.rpm
-
- /usr/lib
- This relocatable directory contains streams libraries.
- /usr/include/streams
- This relocatable directory contains streams header files.
- streams-doc-0.9.2.4-1.7.2.i686.rpm
-
- /usr/share/doc
- This relocatable directory contains all package specific documentation
(including this manual). The subdirectory in this directory is the
streams-0.9.2.4 directory.
- /usr/share/info
- This relocatable directory contains info files (including the info version of
this manual).
- /usr/share/man
- This relocatable directory contains manual pages.
- streams-lib-0.9.2.4-1.7.2.i686.rpm
-
- /usr/lib
- This relocatable directory contains the run-time shared libraries necessary to
run applications programs and utilities developed for Linux Fast-STREAMS.
- /usr/share/locale
- This relocatable directory contains the locale information for shared library
files.
- streams-source-0.9.2.4-1.7.2.i686.rpm
-
- /usr/src
- This relocatable directory contains the source code.
- streams-util-0.9.2.4-1.7.2.i686.rpm
-
- /usr/bin
- This relocatable directory contains binary programs and utilities.
- /usr/sbin
- This relocatable directory contains system binary programs and utilities.
- /usr/libexec
- This relocatable directory contains test programs.
- /etc
- This relocatable directory contains init scripts and configuration information.
Installation
To install the binary RPM, See Installing the Binary RPM.
8.3.2 Configuring the Debian DEB
In general the binary DEB do not require any configuration.
Installation
To install the Debian DEB, See Installing the Debian DEB.
8.3.3 Configuring the Source RPM
When building from the source RPM (see Building from the Source RPM), the rebuild process uses a
number of macros from the user's .rpmmacros file as described in rpm(8).
Following is an example of the ~/.rpmmacros file that I use for rebuilding RPMS:
#
# RPM macros for building rpms
#
%vendor OpenSS7 Corporation
%distribution OpenSS7
%disturl http://www.openss7.org/
%packager Brian Bidulock <bidulock@openss7.org>
%url http://www.openss7.org/
%_signature gpg
%_gpg_path /home/brian/.gnupg
%_gpg_name openss7@openss7.org
%_gpgbin /usr/bin/gpg
%_source_payload w9.bzdio
%_binary_payload w9.bzdio
%_unpackaged_files_terminate_build 1
%_missing_doc_files_terminate_build 1
%_use_internal_dependency_generator 0
%_repackage_all_erasures 0
%_rollback_transaction_on_failure 0
%configure2_5x %configure
%make make
|
When building from the source RPM (see Building from the Source RPM), it is possible to pass a
number of additional configuration options to the rpmbuild(1) process.
The additional configuration options are described below.
Note that distributions that use older versions of rpm do not have the --with or
--without options defined. To achieve the same effect as:
--with someparm=somearg
do:
--define "_with_someparm --with-someparm=somearg"
--define "_kversion $PACKAGE_KVERSION"- Specifies the kernel version other than the running kernel for which to build. If
_kversion is not defined when rebuilding, the environment variable PACKAGE_KVERSION
is used. If the environment variable PACKAGE_KVERSION is not defined, then the version of the
running kernel (i.e. discovered with ‘uname -r’) is used as the target version for
kernel-dependent packages. This option can also be defined in an .rpmspec file using the
macro name ‘_kversion’.
--with checks--without checks- Enable or disable preinstall checks. Each packages supports a number of preinstall checks that can
be performed by invoking the ‘check’ target with automake(1). These currently consist of
checking each kernel module for unresolved kernel symbols, checking for documentation for exported
kernel module symbols, checking for documentation for exported library symbols, checking for
standard options for build and installable programs, checking for documentation for built and
installable programs. Normally these checks are only run in maintainer mode, but can be enabled and
disabled with this option.
--with k-optimize=HOW--without k-optimize- Specify ‘HOW’ optimization, normal, size, speed or quick. size
compiles kernel modules
-Os, speed compiles kernel modules -O3, and quick
compiles kernel modules -O0. The default is normal. Use with care.
--with cooked-manpages--without cooked-manpages- Some systems do not like grefer(1) references in manual pages.40 This option will cook
soelim(1), refer(1), tbl(1) and pic(1) commands from the manual pages and
also strip groff(1) comments. The default is to leave manual pages uncooked: they are actually
smaller that way.
--with public--without public- Release public packages or private packages. This option has no effect on the
streams package. The default is to release public packages.
--with k-debug--without k-debug- Specifies whether kernel debugging is to be performed on the build kernel modules. Mutually
exclusive with
test and safe below. This has the effect of removing static and inline
attributes from functions and invoking all debugging macros in the code. The default is to not
perform kernel debugging.
--with k-test--without k-test- Specifies whether kernel testing is to be performed. Mutually exclusive with
debug above and
safe below. This has the effect of removing static and inline attributes from functions and
invoking most debugging macros in the code. The default is to not perform kernel testing.
--with k-safe--without k-safe- Specifies whether kernel saftey is to be performed. Mutually exclusive with
debug and
test above. This has the effect of invoking some more pedantic assertion macros in the code.
The default is not to apply kernel safety.
--with k-inline--without k-inline- Specifies whether kernel
inline functions are to be placed inline. This has the effect of
adding the -finline-functions flag to CFLAGS for compiling kernel modules. Linux 2.4
kernels are normally compiled -O2 which does not respect the inline directive. This
compiles kernel modules with -finline-functions to get closer to -O3 optimization.
For better optimization controls, See Configuring the Tar Ball.
--with k-modversions--without k-modversions- Specifies whether kernel symbol versions are to be applied to symbols exported by package kernel
modules. The default is to version exported module symbols. This package does not export symbols
so this option has no effect.
--with devfs--without devfs- Specifies whether the build is for a device file system daemon enabled system with autoloading, or
not. The default is to build for devfsd(1) autoloading when CONFIG_DEVFS_FS is defined in the
target kernel. The ‘rebuild’ target uses this option to signal to the RPM spec file that the
‘dev’ subpackage need not be built. This option does not appear when the package has no
devices.
--with devel--without devel- Specifies whether to build development environment packages such as those that include header files,
static libraries, manual pages and texinfo(1) documentation. The default is to build development
environment packages. This option can be useful when building for an embedded target where only the
runtime components are desired.
--with docs--without docs- Specifies whether to build and install major documentation such manual pages and
texinfo(1) documentation. The default is to build and install documentation. This option
can be useful when building for an embedded target where only the runtime and static compile
components are desired, but not major documentation. This option does not override the setting of
--without devel.
--with tools--without tools- Specifies whether user space packages are to be built. The default is to build user space packages.
This option can be useful when rebuilding for multiple architectures and target kernels. The
‘rebuild’ automake(1) target uses this feature when rebuilding for all available architectures
and kernels, to rebuild user packages once per architecture instead of once per kernel.
--with modules--without modules- Specifies whether kernel modules packages are to be built. The default is to build kernel module
packages. This option can be useful when rebuilding for multiple architectures and target kernels.
The ‘rebuild’ automake(1) target uses this feature to rebuild for all available architectures
and kernels.
In addition, the following rpm options, specific to the
Linux Fast-STREAMS package are available:
- --with streams-syncqs
- When enabled, MP synchronization queues are enabled for SMP kernels.
This option defaults to ‘disabled’.
This option is not tested for early releases.
- --without streams-kthreads
- When enabled, the STREAMS scheduler runs as a kernel thread. When disabled, the STREAMS scheduler
runs as a software interrupt (bottom half).
Running the STREAMS scheduler at bottom half instead of a kernel thread breaks the strinet
driver, which must be able to invoke kernel functions that might sleep (but don't).
This option defaults to ‘enabled’.
- --without streams-utils
- I have experimented with putting the STREAMS utilities into their own package, strutil,
however, this is not complete yet.
This option defaults to ‘enabled’.
Do not disable this option.
- --without big-compile
- When enabled, the STREAMS, the Stream head, and the clone driver are all compiled together in one
big compilation unit. This allows the compiler greater opportunity to optimize.
This option defaults to ‘enabled’.
Do not disable this option.
- --with module-sth
- Enable sth (stream head) module linked into streams object.
The default is to create the module as a separate loadable kernel module,
unless option ‘big-compile’ is specified.
This option defaults to ‘disabled’.
This option defaults to ‘enabled’ if ‘big-compile’ is enabled.
- --with module-bufmod
- Enable bufmod module linked into streams object.
The default is to create the module as a separate loadable kernel module.
This option defaults to ‘disabled’.
- --with module-nullmod
- Enable nullmod module linked into streams object.
The default is to create the module as a separate loadable kernel module.
This option defaults to ‘disabled’.
- --with module-pipemod
- Enable pipemod module linked into streams object.
The default is to create the module as a separate loadable kernel module.
This option defaults to ‘disabled’.
- --with module-connld
- Enable connld module linked into streams object.
The default is to create the module as a separate loadable kernel module.
This option defaults to ‘disabled’.
- --with module-sc
- Enable sc module linked into streams object.
The default is to create the module as a separate loadable kernel module.
This option defaults to ‘disabled’.
- --with module-testmod
- Enable testmod module linked into streams object.
The default is to create the module as a separate loadable kernel module.
This option defaults to ‘disabled’.
- --with driver-clone
- Enable clone driver linked into streams object.
The default is to create the driver as a separate loadable kernel module,
unless option ‘big-compile’ is specified.
This option defaults to ‘disabled’.
This option defaults to ‘enabled’ if ‘big-compile’ is enabled.
- --with driver-echo
- Enable echo driver linked into streams object.
The default is to create the driver as a separate loadable kernel module.
This option defaults to ‘disabled’.
- --with driver-fifo
- Enable fifo driver linked into streams object.
The default is to create the driver as a separate loadable kernel module.
This option defaults to ‘disabled’.
- --with driver-log
- Enable log driver linked into streams object.
The default is to create the driver as a separate loadable kernel module.
This option defaults to ‘disabled’.
- --with driver-loop
- Enable loop driver linked into streams object.
The default is to create the driver as a separate loadable kernel module.
This option defaults to ‘disabled’.
- --with driver-nsdev
- Enable nsdev driver linked into streams object.
The default is to create the driver as a separate loadable kernel module.
This option defaults to ‘disabled’.
- --with driver-mux
- Enable mux driver linked into streams object.
The default is to create the driver as a separate loadable kernel module.
This option defaults to ‘disabled’.
- --with driver-nuls
- Enable nuls driver linked into streams object.
The default is to create the driver as a separate loadable kernel module.
This option defaults to ‘disabled’.
- --with driver-pipe
- Enable pipe driver linked into streams object.
The default is to create the driver as a separate loadable kernel module.
This option defaults to ‘disabled’.
- --with driver-sad
- Enable sad driver linked into streams object.
The default is to create the driver as a separate loadable kernel module.
This option defaults to ‘disabled’.
- --with driver-sfx
- Enable sfx driver linked into streams object.
The default is to create the driver as a separate loadable kernel module.
This option defaults to ‘disabled’.
- --with driver-spx
- Enable spx driver linked into streams object.
The default is to create the driver as a separate loadable kernel module.
This option defaults to ‘disabled’.
- --with streams-fifos
- Enable override of system fifos with STREAMS-based fifos.
This option defaults to ‘disabled’.
This option is not tested. Do not enable this option yet.
- --with streams-bcm
- Enable STREAMS binary compatibility mode.
When enabled, exported functions (and callouts) will never pass three arguments in registers on
architectures supporting
regparm (i.e. __i386__, __x86_64__, __k8__)
regardless of how the kernel was compiled. Additional LiS binary compatibility is also
enabled (e.g. credentials).
This option defaults to ‘disabled’.
In general, the default values of these options are sufficient for most purposes and no options need
be provided when rebuilding the Source RPMs.
Build
To build from the source RPM, See Building from the Source RPM.
8.3.4 Configuring the Debian DSC
The Debian DSC can be configured by passing options in the environment variable
BUILD_DEBOPTIONS. The options placed in this variable take the same form as those passed to
the configure script, See Configuring the Tar Ball. For an example, See Building from the Debian DSC.
Build
To build from the Debian DSC, See Building from the Debian DSC.
8.3.5 Configuring the Tar Ball
All of the normal GNU autoconf(1) configuration options and environment variables apply.
Additional options and environment variables are provided to tailor or customize the build and are
described below.
8.3.5.1 Configure Options
Following are the additional configure options, their meaning and use:
- --enable-checks
- --disable-checks
- Enable or disable preinstall checks. Each release package supports a number of preinstall
checks that can be performed by invoking the ‘check’ target with make(1). These
currently consist of checking each kernel module for unresolved kernel symbols, checking for
documentation for exported kernel module symbols, checking for documentation for exported library
symbols, checking for standard options for build and installable programs, checking for
documentation for built and installable programs. Normally these checks are only run in maintainer
mode, but can be enabled and disabled with this option.
- --enable-autotest
- --disable-autotest
- Enable or disable pre- and post-installation testing. Each release package supports a
number of autotest test suites that can be performed by invoking the ‘installcheck’
target with make(1). These currently consist of running installed modules, commands and
binaries against a number of specific test cases. Normally these checks are only run in maintainer
mode, but can be enabled and disabled with this option.
- --disable-compress-manpages
- Compress manual pages with ‘gzip -9’ or ‘bzip2 -9’ or leave them uncompressed. The default is
to compress manual pages with ‘gzip -9’ or ‘bzip2 -9’ if a single compressed manual page exists in
the target installation directory (--mandir). This disables automatic compression.
- --disable-public
- Disable public release. This option is not usable on public releases and only has a usable effect
on Linux Fast-STREAMS when the package is acquired from CVS. In particular, the STREAMS
SS7/VoIP/ISDN/SIGTRAN Stacks (strss7-0.9a.8) release package has a large
number of non-public components. Specifying this option will cause the package to build and install
all private release components in addition to the public release components. This option affects
all release packages. Most release packages do not have private release components.
- --disable-initscripts
- Disables the installation of init scripts.
The default is to configure and install init scripts and their associated
configuration files.
Although the default is to install init scripts, installation attempts to detect a System V init
script configuration, and if one is not found, the init scripts are installed into the appropriate
directories, but the symbolic links to the run level script directories are not generated and the
script is not invoked. Therefore, it is safe to leave this option unchanged, even on distributions
that do not support System V init script layout.
- --disable-32bit-libs
- Disables the build and install of 32-bit compatibility libraries and test binaries on 64-bit systems
that support 32-bit compatibility. The default is to build and install 32-bit compatibility
libraries and test binaries. This option can be usefule when configuring for an embedded target
where only native shared libraries and binaries are desired.
- --disable-devel
- Disables the installation of development environment components such as header files, static
libraries, manual pages and texinfo(1) documentation. The default is to install development
environment components. This option can be useful when configuring for an embedded target where
only the runtime components are desired, or when performing a edit-compile-test cycle.
- --disable-docs
- Disables the build and installation of major documentation such manual pages and
texinfo(1) documentation. The default is to build and install documentation. This option
can be useful when building for an embedded target where only the runtime and static compile
components are desired, but not major documentation. This option does not override the setting of
--disable-devel.
- --enable-tools
- Specifies whether user space programs and libraries are to be built and installed. The default is
to build and install user space programs and libraries. This option can be useful when rebuilding
for multiple architectures and target kernels, particularly under rpm(1) or
dpkg(1). The ‘rebuild’ automake(1) target uses this feature when rebuilding
RPMs for all available architectures and kernels, to rebuild user packages once per architecture
instead of once per kernel.
- --enable-modules
- Specifies whether kernel modules are to be built and installed. The default is to build and install
kernel modules. This option can be useful when rebuilding for multiple architectures and target
kernels, particularly under rpm(1) or dpkg(1). The ‘rebuild’
automake(1) target uses this feature to rebuild for all available architectures and
kernels.
- --enable-arch
- Specifies whether architectural dependent package components are to be built and installed. This
option can be useful when rebuilding for multiple architectures and target kernels, particularly
under dpkg(1). The default is to configure, build and install architecture dependent
package components.
- --enable-indep
- Specifies whether architecture independent package components are to be built and installed. This
option can be useful when rebuilding for multiple architectures and target kernels, particularly
under dpkg(1). The default is to configure, build and install architecture independent
package components.
- --enable-k-inline
- Enable kernel inline functions. Most Linux kernels build without -finline-functions. This
option adds the -finline-functions and -Winline flags to the compilation of kernel
modules. Use with care.
- --enable-k-safe
- Enable kernel module run-time safety checks. Specifies whether kernel safety is to be performed.
This option is mutually exclusive with --enable-k-test and --enable-k-debug below.
This has the effect of invoking some more pedantic assertion macros in the code. The default is not
to apply kernel safety.
- --enable-k-test
- Enable kernel module run-time testing. Specifies whether kernel testing is to be performed. This
option is mutually exclusive with --enable-k-safe above and --enable-k-debug
below. This has the effect of remove
static and inline attributes from functions and
invoking most non-performance affecting debugging macros in the code. The default is not to perform
kernel testing.
- --enable-k-debug
- Enable kernel module run-time debugging. Specifies whether kernel debugging is to be performed.
This option is mutually exclusive with --enable-k-safe and --enable-k-test above.
This has the effect of removing
static and inline attributes from functions and
invoking all debugging macros in the code (including performance-affecting debug macros). The
default is to not perform kernel debugging.
- --enable-devfs
- --disable-devfs
- Specifies whether the build is for a device file system daemon enabled system with autoloading, or
not. The default is to build for devfsd(8) autoloading when CONFIG_DEVFS_FS is
defined in the target kernel. The ‘reuild’ automake(1) target uses this option to
signal to the RPM spec file that the ‘dev’ subpackage need not be built. This option has no
effect for release packages that do not provide devices.
- --with-gpg-user=GNUPGUSER
- Specify the
gpg(1) ‘GNUPGUSER’ for signing RPMs and tarballs. The default is the
content of the environment variable GNUPGUSER. If unspecified, the gpg(1) program
will normally use the user name of the account invoking the gpg(1) program. For building
source RPMs, the RPM macro ‘_gpg_name’ will override this setting.
- --with-gpg-home=GNUPGHOME
- Specify the ‘GNUPGHOME’ directory for signing RPMs and tarballs. The default is the user's
~/.gpg direct