Performs housekeeping during STREAMS driver or module open operations.
#include <pse/mi.h> #include <sys/stream.h>
int mi_open_comm ( StaticPointer, Size, Queue, Device, Flag, SFlag, credp)
caddr_t *StaticPointer;
uint Size;
queue_t *Queue;
dev_t *Device;
int Flag;
int SFlag;
cred_t *credp;
The mi_open_comm subroutine performs housekeeping during STREAMS driver or module open operations. It is intended to be called by the driver or module open routine. It assigns a minor device number to the stream (as specified by the SFlag parameter), allocates the requested per-stream data, and sets the q_ptr fields of the stream being opened.
Notes:
- Each call to the mi_open_comm subroutine must have a corresponding call to the mi_close_comm subroutine. Executing one of these utilities without making a corresponding call to the other will lead to unpredictable results.
- The stream.h header file must be the last included header file of each source file using the stream library.
On successful completion, the
mi_open_comm subroutine returns a value of zero, otherwise one of
the following codes is returned:
ENXIO | Indicates an invalid parameter. |
EAGAIN | Indicates that an internal structure could not be allocated, and that the call should be retried. |
The mi_open_comm subroutine is part of STREAMS kernel extensions.
List of Streams Programming References in AIX 5L Version 5.1 Communications Programming Concepts .
STREAMS Overview in AIX 5L Version 5.1 Communications Programming Concepts .
The mi_close_comm subroutine, mi_next_ptr subroutine, mi_bufcall subroutine.