I_LIST streamio Operation

Purpose

Lists all the module names on a stream.

Description

The I_LIST operation lists all of the modules present on a stream, including the topmost driver name. If the value of the arg parameter is null, the I_LIST operation returns the number of modules on the stream pointed to by the fildes parameter. If the value of the arg parameter is nonnull, it points to an str_list structure that contains the following elements:

int sl_nmods;
struct str_mlist      *sl_modlist;

The str_mlist structure contains the following element:

char l_name[FMNAMESZ+1];

The fields are defined as follows:

Field Description
sl_nmods Specifies the number of entries the user has allocated in the array.
sl_modlist Contains the list of module names (on return).

This operation is part of STREAMS Kernel Extensions.

Error Codes

If unsuccessful, the errno global variable is set to one of the following values:

Value Description
EAGAIN Unable to allocate buffers.
EINVAL The sl_nmods member is less than 1.