[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Communications, Volume 2


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.

Parameters


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.

Implementation Specifics

This utility is part of STREAMS Kernel Extensions.

Related Information

The msgdsize utility.

List of Streams Programming References and Understanding STREAMS Messages in AIX 5L Version 5.1 Communications Programming Concepts.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]