.if n .pH ddi.rm/d3/gen/adjmsg @(#)adjmsg 43.9 of 11/27/92 .\" Copyright 1992, 1991 UNIX System Laboratories, Inc. .TH adjmsg D3 .IX "\f4adjmsg\fP(D3)" .SH NAME \f4adjmsg\f1 \- trim bytes from a message .IX "STREAMS messages" .SH SYNOPSIS .nf .na .ft 4 #include #include .sp 0.4 int adjmsg(mblk_t *\f2mp\fP, int \f2len\fP); .ft 1 .ad .fi .SS Arguments .RS 0 .IP "\f2mp\f1" 10n Pointer to the message to be trimmed. .IP "\f2len\f1" 10n The number of bytes to be removed. .RE .SH DESCRIPTION \f4adjmsg\f1 removes bytes from a message. .SS "Return Values" If the message can be trimmed successfully, 1 is returned. Otherwise, 0 is returned. .SH USAGE |\^\f2len\fP\^| (the absolute value of \f2len\fP) specifies how many bytes are to be removed. If \f2len\f1 is greater than \f40\f1, bytes are removed from the head of the message. If \f2len\f1 is less than \f40\f1, bytes are removed from the tail. \f4adjmsg\f1 fails if |\^\f2len\fP\^| is greater than the number of bytes in \f2mp\f1. If \f2len\fP spans more than one message block in the message, the messages blocks must be the same type, or else \f4adjmsg\fP will fail. .P If \f2len\fP is greater than the amount of data in a single message block, that message block is not freed. Rather, it is left linked in the message, and its read and write pointers are set equal to each other, indicating no data present in the block. .SS Level Base or Interrupt. .SS "Synchronization Constraints" Does not sleep. .P Driver-defined basic locks, read/write locks, and sleep locks may be held across calls to this function. .SH REFERENCES \f4msgb\fP(D4)