unlinkb(9F) Kernel Functions for Drivers 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
unlinkb() 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, unlinkb() 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
unlinkb() can be called from user or interrupt 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
SunOS 5.10 11 Apr 1991 unlinkb(9F)
Check Out this Related Man Page
linkb(9F) Kernel Functions for Drivers linkb(9F)NAME
linkb - concatenate two message blocks
SYNOPSIS
#include <sys/stream.h>
void linkb(mblk_t *mp1, mblk_t *mp2);
INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI).
DESCRIPTION
linkb() creates a new message by adding mp2 to the tail of mp1. The continuation pointer, b_cont, of mp1 is set to point to mp2.
The following figure describes how the linkb(m1, m2); function concatenates two message blocks, mp1 and mp2:
Please see the online man page on docs.sun.com or a print copy for the diagram.
Figure that describes how the linkb(m1, m2); function creates a new message by adding mp1 to the tail of mp2
PARAMETERS
mp1 The message to which mp2 is to be added. mblk_t is an instance of the msgb(9S) structure.
mp2 The message to be added.
CONTEXT
linkb() can be called from user or interrupt context.
EXAMPLES
See dupb(9F) for an example that uses linkb().
SEE ALSO dupb(9F), unlinkb(9F), msgb(9S)
Writing Device Drivers
STREAMS Programming Guide
SunOS 5.10 22 Mar 2002 linkb(9F)
When i run dmesg, I get the following message which clearly indicates that the file system is full. Please let me know what does (1 block extent) means in the following error message?
msgcnt 1 vxfs : mesg 001: vx_nospace - /dev/vg00/lvol4 file system full (1 block extent)
Thanks (6 Replies)
Hi everyone,
I need to know how to remove a chunk of codes from a file
for instance i have couple of lines which are commented out of the file and i need to remove that block. here is the example
--#------------------------------------------------------------------
--# File name= ... (5 Replies)
All,
So, I have an ldif file that contains about 6500 users worth of data. Some users have a block of text I'd like to remove, while some don't.
Example (block of text in question is the block starting with "authAuthority: ;Kerberosv5"):
User with text block:
# username, users,... (7 Replies)
Hi everyone
Need to get version of npm application that have several output like this:
root: nmp -version
10
root: nmp -version
10
root: nmp-new -version
3.1
root: nmp-old -version
Segmentation fault
count them , after that write to the file like this:
10 2
3.1 1 (1 Reply)