STREAMS/UX for the HP 9000 Reference Manual
109
How to Compile and Link STREAMS/UX Drivers, Modules, and Applications
Linking STREAMS/UX Drivers and Modules into the Kernel
An example of these declarations using the STREAMS test driver, “tlo” is as
follows: (The STREAMS tlo test driver is used only as an example
throughout this section. Please tailor this example to your specific driver
configuration).
drv_info_t
static drv_info_t tlo_drv_info = {
“tlo”, /* driver name */
“pseudo”, /* driver class */
DRV_CHAR | DRV_PSEUDO | DRV_MP_SAFE, /* flages */
-1, /* block major number */
-1, /* char major number */
NULL, NULL, NULL, /* cdio, gio_private and
cdio_
private always NULL
*/};
drv_ops_t
static drv_ops_t tlo_drv_ops = {
NULL, /* d_open */
NULL, /* d_close */
NULL, /* d_strategy */
NULL, /* d_dump */
NULL, /* d_psize */
NULL, /* d_mount */
NULL, /* d_read */
NULL, /* d_write */
NULL, /* d_ioctl */
NULL, /* d_select */
NULL, /* d_option1 */
NULL, NULL, NULL, NULL, /* reserved entry points */
NULL, /* d_flags */
};
streams_info_t
static streams_info_t tlo_str_info = {
“tlo”, /* name */
-1, /* dynamic major number */
{ &tlorinit, &tlowinit, NULL
NULL }, /* streamtab */
STR_IS_DEVICE | MGR_IS_MP | /* streams flags */
STR_SYSV4_OPEN,
SQLVL_QUEUE, /* sync level */
““, /* elsewhere sync name */
};