adjmsg(9F)
NAME
adjmsg − trim bytes from a message
SYNOPSIS
#include <sys/stream.h>
int adjmsg(mblk_t ∗mp, int len);
INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI).
ARGUMENTS
mp Pointer to the message to be trimmed.
len The number of bytes to be removed.
DESCRIPTION
adjmsg() removes bytes from a message. |len| (the absolute value of len) specifies the number of bytes to be removed. If len is greater than 0, adjmsg() removes bytes from the head of the message. If len is less than 0, it removes bytes from the tail.
adjmsg() only trims bytes across message blocks of the same type. It fails if mp points to a message containing fewer than len bytes of similar type at the message position indicated.
adjmsg() fails if |len| is greater than the number of bytes in the message.
RETURN VALUES
adjmsg() returns:
1 on success.
0 on failure.
CONTEXT
adjmsg() can be called from user or interrupt context.
SEE ALSO
STREAMS Programming Guide
SunOS 5.5.1 — Last change: 20 Jul 1994