MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Kernel Functions for Drivers                          unlinkb(9F)



NAME
     unlinkb - remove a message block from the head of a message

SYNOPSIS
     #include 



     mblkt *unlinkb(mblkt *mp);


INTERFACE LEVEL
     Architecture independent level 1 (DI/DKI).

PARAMETERS
     mp    Pointer to the message.


DESCRIPTION
     The unlinkb() function removes the first message block  from
     the  message  pointed  to  by  mp.  A new message, minus the
     removed message block, is returned.

RETURN VALUES
     If successful, the unlinkb() function returns a  pointer  to
     the  message  with the first message block removed. If there
     is only one message block in the message, NUL is returned.

CONTEXT
     The unlinkb() function can be called from  user,  interrupt,
     or kernel context.

EXAMPLES
     Example 1 unlinkb() example


     The routine expects to get passed an MPROTO TDATAIND mes-
     sage. It will remove and free the  MPROTO header and return
     the remaining  MDATA portion of the message.


       1  mblkt *
       2  makedata(mp)
       3      mblkt *mp;
       4  {
       5    mblkt *nmp;
       6
       7    nmp = unlinkb(mp);
       8    freeb(mp);
       9    return(nmp);
       10 }




SunOS 5.11          Last change: 16 Jan 2006                    1






Kernel Functions for Drivers                          unlinkb(9F)



SEE ALSO
     linkb(9F)


     Writing Device Drivers


     STREAMS Programming Guide















































SunOS 5.11          Last change: 16 Jan 2006                    2



OpenSolaris man pages main menu

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