man pages section 9: DDI and DKI Kernel Functions

Exit Print View

Updated: July 2014
 
 

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

The linkb() function 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:

image: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

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

Examples

See dupb(9F) for an example that uses linkb().

See Also

dupb(9F), unlinkb(9F), msgb(9S)

Writing Device Drivers for Oracle Solaris 11.2

STREAMS Programming Guide