[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Communications Technical Reference, Volume 2

copyb Utility

Purpose

Copies a message block.

Syntax

mblk_t *
copyb(bp)
register mblk_t *bp;

Description

The copyb utility copies the contents of the message block pointed to by the bp parameter into a newly allocated message block of at least the same size. The copyb utility allocates a new block by calling the allocb utility. All data between the b_rptr and b_wptr pointers of a message block are copied to the new block, and these pointers in the new block are given the same offset values they had in the original message block.

Parameters

bp Contains a pointer to the message block to be copied.

Return Values

On successful completion, the copyb utility returns a pointer to the new message block containing the copied data. Otherwise, it returns a null value. The copy is rounded to a fullword boundary.

Implementation Specifics

This utility is part of STREAMS Kernel Extensions.

Related Information

The allocb utility, copymsg utility.

List of Streams Programming References and Understanding STREAMS Messages in AIX Version 4.3 Communications Programming Concepts.


[ Previous | Next | Contents | Glossary | Home | Search ]