adjmsg Utility

Purpose

Trims bytes in a message.

Syntax

int adjmsg (mp, len)
mblk_t * mp;
register int  len;

Description

The adjmsg utility trims bytes from either the head or tail of the message specified by the mp parameter. It only trims bytes across message blocks of the same type. The adjmsg utility is unsuccessful if the mp parameter points to a message containing fewer than len bytes of similar type at the message position indicated.

This utility is part of STREAMS Kernel Extensions.

Parameters

Item Description
mp Specifies the message to be trimmed.
len Specifies the number of bytes to remove from the message.

If the value of the len parameter is greater than 0, the adjmsg utility removes the number of bytes specified by the len parameter from the beginning of the mp message. If the value of the len parameter is less than 0, it removes len bytes from the end of the mp message. If the value of the len parameter is 0, the adjmsg utility does nothing.

Return Values

On successful completion, the adjmsg utility returns a value of 1. Otherwise, it returns a value of 0.