adjmsg(9r)adjmsg(9r)NAMEadjmsg - STREAMS: Removes the specified number of bytes from a message
SYNOPSIS
#include <sys/stream.h>
int adjmsg(
MBLKP message_ptr,
int len_to_trim );
ARGUMENTS
Specifies a pointer to the message that you want adjmsg to trim. Spec‐
ifies the number of bytes that you want adjmsg to remove (trim) from
the message.
DESCRIPTION
The adjmsg interface removes a specified number of bytes from a mes‐
sage. The absolute value of the len_to_trim argument specifies how many
bytes that adjmsg removes. If the number of bytes passed to
len_to_trim is greater than 0 (zero), adjmsg removes bytes from the
head of the message. If the number of bytes passed to len_to_trim is
less than 0 (zero), adjmsg removes bytes from the tail of the message.
The adjmsg interface fails if the value you pass to the len_to_trim
argument is greater than the number of bytes stored in the message
pointer argument, message_ptr.
RETURN VALUES
If the adjmsg interface successfully trims the message, it returns the
value 1. Otherwise, it returns the value 0 (zero).
adjmsg(9r)