mi_next_ptr Utility

Purpose

Traverses a STREAMS module's linked list of open streams.

Syntax

#include <pse/mi.h>
#include <sys/stream.h>

caddr_t mi_next_ptr ( Origin)
caddr_t Origin;

Description

The mi_next_ptr utility traverses a module's linked list of open streams. The Origin argument specifies the address of a per-instance list item, and the return value indicates the address of the next item. The first time the mi_next_ptr utility is called, the Origin parameter should be initialized with the value of the static pointer which was passed to the mi_open_comm utility. Subsequent calls to the mi_next_ptr utility should pass the address which was returned by the previous call, until a NULL address is returned, indicating that the end of the queue has been reached.

The mi_next_ptr utility is part of STREAMS kernel extensions.

Note: The stream.h header file must be the last included header file of each source file using the stream library.

Parameter

Item Description
Origin Specifies the address of the current list item being examined.

Return Values

The mi_next_ptr utility returns the address of the next list item, or NULL if the end of the list has been reached.