MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Kernel Functions for Drivers                       ldiputmsg(9F)



NAME
     ldiputmsg, ldigetmsg - Read/write message blocks from/to a
     stream

SYNOPSIS
     #include 

     int ldiputmsg(ldihandlet lh, mblkt *smp);


     int  ldigetmsg(ldihandlet lh, mblkt **rmp, timestruct *timeo);


PARAMETERS
     lh        Layered handle.


     smp       Message block to send.


     rmp       Message block to receive.


     timeo     Optional timeout for data reception.


DESCRIPTION
     The ldiputmsg 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  ldiputmsg(),
     the  caller  must  not  free  the  message  even if an error
     occurs.


     The ldigetmsg() function allows a caller to receive a  mes-
     sage  block  from  a streams device specified by the layered
     handle lh. Callers  must  free  the  message  received  with
     freemsg(9F).


     If a  NUL  timeout  value  is  specified  when  the  caller
     receives  a  message,  the  caller sleeps until a message is
     received.

RETURN VALUES
     The ldiputmsg() and ldigetmsg() functions  return  0  upon
     success. If a failure occurs before the request is passed to
     the device, the possible return values are shown below. Oth-
     erwise any other error number may be returned by the device.

     EINVAL     Invalid input parameters.




SunOS 5.11          Last change: 3 June 2003                    1






Kernel Functions for Drivers                       ldiputmsg(9F)



     ENOTSUP    Operation is not supported for this device.

                The ldigetmsg() 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.11          Last change: 3 June 2003                    2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™