unlinkb man page on SmartOS

Man page or keyword search:  
man Server   16655 pages
apropos Keyword Search (all sections)
Output format
SmartOS logo
[printable version]

UNLINKB(9F)							   UNLINKB(9F)

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

SYNOPSIS
       #include <sys/stream.h>

       mblk_t *unlinkb(mblk_t *mp);

INTERFACE LEVEL
       Architecture independent level 1 (DDI/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, NULL 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  M_PROTO  T_DATA_IND  message.  It
       will  remove  and  free	the   M_PROTO  header and return the remaining
       M_DATA portion of the message.

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

SEE ALSO
       linkb(9F)

       Writing Device Drivers

       STREAMS Programming Guide

				 Jan 16, 2006			   UNLINKB(9F)
[top]

List of man pages available for SmartOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net