man Pages(9F): DDI and DKI Kernel Functions
只搜尋這本書
以 PDF 格式下載這本書

NAME

adjmsg - trim bytes from a message

SYNOPSIS

#include <sys/stream.h>
int adjmsg(mblk_t * mp, int len);

ARGUMENTS

mp
Pointer to the message to be trimmed.
len
The number of bytes to be removed.

INTERFACE LEVEL

Architecture independent level 1 (DDI/DKI).

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( ) 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 Programmer's Guide