Query: adjmsg
OS: sunos
Section: 9f
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
adjmsg(9F) Kernel Functions for Drivers adjmsg(9F)NAMEadjmsg - trim bytes from a messageSYNOPSIS#include <sys/stream.h> int adjmsg(mblk_t *mp, ssize_t len);INTERFACE LEVELArchitecture independent level 1 (DDI/DKI).PARAMETERSmp Pointer to the message to be trimmed. len The number of bytes to be removed.DESCRIPTIONThe adjmsg() function removes bytes from a message. |len| (the absolute value of len) specifies the number of bytes to be removed. The adjmsg() function only trims bytes across message blocks of the same type. The adjmsg() function finds the maximal leading sequence of message blocks of the same type as that of mp and starts removing bytes either from the head of that sequence or from the tail of that sequence. If len is greater than 0, adjmsg() removes bytes from the start of the first message block in that sequence. If len is less than 0, it removes bytes from the end of the last message block in that sequence. The adjmsg() function fails if |len| is greater than the number of bytes in the maximal leading sequence it finds. The adjmsg() function may remove any except the first zero-length message block created during adjusting. It may also remove any zero- length message blocks that occur within the scope of |len|.RETURN VALUESThe adjmsg() function returns: 1 Successful completion. 0 An error occurred.CONTEXTThe adjmsg() function can be called from user or interrupt context.SEE ALSOSTREAMS Programming Guide SunOS 5.10 20 Nov 1996 adjmsg(9F)