ldi_putmsg, ldi_getmsg - Read/write message blocks from/to a stream
#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);
lh
smp
rmp
timeo
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.
The ldi_putmsg() and ldi_getmsg() functions return 0 upon success. If a failure occurs before the request is passed to the device, the possible return values are shown below. Otherwise any other error number may be returned by the device.
EINVAL
ENOTSUP
The ldi_getmsg() function may also return:
ETIME
These functions may be called from user or kernel context.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |