msgpullup(D3) msgpullup(D3)
NAME
msgpullup - concatenate bytes in a message
SYNOPSIS
#include <sys/stream.h>
#include <sys/ddi.h>
mblk_t *msgpullup(mblk_t *mp, int len);
Arguments
mp Pointer to the message whose blocks are to be
concatenated.
len Number of bytes to concatenate.
DESCRIPTION
msgpullup concatenates and aligns the first len data bytes of
the message pointed to by mp, copying the data into a new
message. All message blocks that remain in the original
message once len bytes have been concatenated and aligned
(including any partial message blocks) are copied and linked
to the end of the new message, so that the length of the new
message is equal to the length of the original message.
The original message is unaltered. If len equals -1, all data
are concatenated. If len bytes of the same message type
cannot be found, msgpullup fails and returns NULL.
Warnings
Drivers should not assume that the memory allocated for the
data buffer(s) is usable for DMA operations. nor should
drivers assume that the memory has any specific physical
properties such as starting address alignment, physical
address range, or physical contiguity. Beginning with ddi
version 6, memory with specific physical properties can be
obtained through msgpullup_physreq(D3) or msgphysreq(D3).
Return Values
On success, msgpullup returns a pointer to the new message.
On failure, msgpullup returns NULL.
USAGE
Level
Base or Interrupt.
Copyright 1994 Novell, Inc. Page 1
msgpullup(D3) msgpullup(D3)
Synchronization Constraints
Does not sleep.
Driver-defined basic locks, read/write locks, and sleep locks
may be held across calls to this function.
REFERENCES
allocb(D3), msgphysreq(D3), msgpullup_physreq(D3), msgb(D4)
NOTICES
Portability
All processors
Applicability
ddi: 3, 5, 5mp, 6, 6mp, 7, 7mp
In versions 1, 2, 3, 4, 5, and 5mp, the memory for the data
buffer(s) returned by msgpullup will be DMA-able; that is, it
will satisfy worst-case DMA-ability requirements on systems
with restricted DMA and will be physically contiguous; see
phys_dmasize of physreq(D4). For other versions, there are no
guarantees on the memory properties.
Copyright 1994 Novell, Inc. Page 2