Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ linkb(9F) — SunOS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

unlinkb(9F)

linkb(9F)

NAME

linkb − concatenate two message blocks

SYNOPSIS

#include <sys/stream.h>
void linkb(mblk_t ∗mp1, mblk_t ∗mp2);

ARGUMENTS

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. 

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 the first message is set to point to the second message:

scale=100
define t302 |
[ box invis ht 26 wid 36 with .sw at 0,0
"data" at 18,20
"buffer" at 18,6
] |
 define t302 |
[ box invis ht 26 wid 36 with .sw at 0,0
"data" at 18,20
"buffer" at 18,6
] |
 define t317 |
[ box invis ht 34 wid 54 with .sw at 0,0
"b_datap" at 0,28 ljust
"" at 0,17 ljust
"b_cont" at 0,6 ljust
] |
 define t294 |
[ box invis ht 34 wid 72 with .sw at 0,0
"b_datap" at 0,28 ljust
"" at 0,17 ljust
"b_cont (0)" at 0,6 ljust
] |
 define m0 |
[ box invis ht 54 wid 70 with .sw at 0,0
"db_base" at 30,27
box ht 54 wid 70 with .nw at 0,54
] |
 define m1 |
[ box invis ht 56 wid 66 with .sw at 0,0
box ht 56 wid 66 with .nw at 0,56
t302 with .nw at 14,44
] |
 define m2 |
[ box invis ht 56 wid 94 with .sw at 0,0
box ht 56 wid 94 with .nw at 0,56
t294 with .nw at 10,44
] |
 define m3 |
[ box invis ht 56 wid 94 with .sw at 0,0
box ht 56 wid 94 with .nw at 0,56
t317 with .nw at 10,44
] |
 box invis ht 172 wid 368 with .sw at 0,0
line -> from 158,62 to 196,62
line -> from 256,62 to 302,62
"mp1" at 14,149
"linkb(mp1, mp2);" at 222,-8
"mp2" at 48,69
line  from 128,124 to 146,124
line -> from 146,124 to 146,80
m1 with .nw at 302,172
m1 with .nw at 302,90
m0 with .nw at 196,88
m0 with .nw at 196,172
m3 with .nw at 44,162
m2 with .nw at 76,80
line -> from 128,146 to 196,146
line -> from 258,146 to 302,146

CONTEXT

linkb() can be called from user or interrupt context.

EXAMPLE

See dupb(9F) for an example of using linkb().

SEE ALSO

unlinkb(9F)

SunOS 5.1 Writing Device Drivers
SunOS 5.1 STREAMS Programmer’s Guide

SunOS 5.1  —  Last change: 11 Apr 1991

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026