Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ldi_getmsg(9f) [sunos man page]

ldi_putmsg(9F)						   Kernel Functions for Drivers 					    ldi_putmsg(9F)

NAME
ldi_putmsg, ldi_getmsg - Read/write message blocks from/to a stream SYNOPSIS
#include <sys/sunldi.h> int ldi_putmsg(ldi_handle_t lh, mblk_t *smp); int ldi_getmsg(ldi_handle_t lh, mblk_t **rmp, timestruc_t *timeo); PARAMETERS
lh Layered handle. smp Message block to send. rmp Message block to receive. timeo Optional timeout for data reception. DESCRIPTION
The ldi_putmsg function allows a caller to send a message block to a streams device specified by the layered handle lh. Once the message (smp) has been passed to ldi_putmsg(), the caller must not free the message even if an error occurs. The ldi_getmsg() function allows a caller to receive a message block from a streams device specified by the layered handle lh. Callers must free the message received with freemsg(9F). If a NULL timeout value is specified when the caller receives a message, the caller sleeps until a message is received. RETURN VALUES
The ldi_putmsg() and ldi_getmsg() functions return 0 upon success. If a failure occurs before the request is passed to the device, the pos- sible return values are shown below. Otherwise any other error number may be returned by the device. EINVAL Invalid input parameters. ENOTSUP Operation is not supported for this device. The ldi_getmsg() function may also return: ETIME Returned if the timeout timeo expires with no messages received. CONTEXT
These functions may be called from user or kernel context. SunOS 5.10 3 June 2003 ldi_putmsg(9F)

Check Out this Related Man Page

ldi_read(9F)						   Kernel Functions for Drivers 					      ldi_read(9F)

NAME
ldi_read, ldi_write - Read and write from a device SYNOPSIS
#include <sys/sunldi.h> int ldi_read(ldi_handle_t lh, struct uio *uiop, cred_t *cr); int ldi_write(ldi_handle_t lh, struct uio *uiop, cred_t *cr); PARAMETERS
lh Layered handle. cr Pointer to a credential structure used to open a device. uiop Pointer to the uio(9S) structure. uio(9S) specifies the location of the read or write data. (Either userland or kernel.) DESCRIPTION
The ldi_read() function passes a read request to the device entry point for the device specified by the layered handle. This operation is supported for block, character, and streams devices. The ldi_write() function passes a write request to the device entry point for a device specified by the layered handle. This operation is supported for block, character, and streams devices. RETURN VALUES
The ldi_read() and ldi_write() functions return 0 upon success. If a failure occurs before the request is passed to the device, the pos- sible return values are shown below. Otherwise any other error number may be returned by the device. EINVAL Invalid input parameters. ENOTSUP Operation is not supported for this device. CONTEXT
These functions may be called from user or kernel context. SunOS 5.11 3 June 2003 ldi_read(9F)
Man Page