STREAMS/UX for the HP 9000 Reference Manual
111
How to Compile and Link STREAMS/UX Drivers, Modules, and Applications
Linking STREAMS/UX Drivers and Modules into the Kernel
assigned “dynamic” major number by running the lsdev(1) command after
the system has rebooted with the kernel that includes your driver. There are
details later in this section on lsdev(1).
STREAMS Module
For STREAMS modules, steps identical to those executed for a STREAMS
driver are needed, but with the following exceptions:
For the driver header, you only need to declare a streams_info_t structure.
This is because STREAMS modules do not have any cdevsw-related
information. They only have STREAMS-specific information and this is
configured by calling str_install() with a defined streams_info_t.
For the driver install routine, you need only to call the str_install() function.
There is no need to call install_driver(CDIO3).
An example of these declarations using the STREAMS test module,
“lmodb,” is as follows: (The STREAMS lmodb test module is used only as
an example. Please tailor this example to your specific module
configuration).
The streams_flags and the sync level to be used in the streams_info_t
structure are the same as illustrated above in the “STREAMS Driver”
section, except we are using “STR_IS_MODULE,” instead of
“STR_IS_DEVICE.”
streams_info_t
static streams_info_t lmodb_str_info = {
“lmodb”, /* name */
-1, /* major number */
{ &lmodbrinit, &lmodbwinit, NULL, NULL},/* streamtab */
STR_IS_MODULE, /* streams flags */
SQLVL_QUEUEPAIR, /* sync level */
““, /* elsewhere sync name */
};