xref: /titanic_50/usr/src/man/man9f/linkb.9f (revision 174bc6499d233e329ecd3d98a880a7b07df16bfa)
te
Copyright 1989 AT&T
Copyright (C) 2006, Sun Microsystems, Inc.
All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
LINKB 9F "Jan 16, 2006"
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: Printed copy or docs.sun.com shows a 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

STREAMS Programming Guide