mblk_t *
copyb(bp)
register mblk_t * bp;
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.
bp | Contains a pointer to the message block to be copied. |
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.
This utility is part of STREAMS Kernel Extensions.
The allocb utility, copymsg utility.
List of Streams Programming References and Understanding STREAMS Messages in AIX 5L Version 5.1 Communications Programming Concepts.