⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 msgutil.9

📁 7号信令功能代码,为开源代码
💻 9
字号:
'\" tr.\" -*- nroff -*-.\".\" @(#) msgutil.9,v 1.1.4.1 2004/01/12 23:33:09 brian Exp.\".\" =========================================================================.\".\" Copyright (C) 2001-2004  OpenSS7 Corp. <www.openss7.com>.\".\" All Rights Reserved..\".\" Permission is granted to make and distribute verbatim copies of this.\" manual provided the copyright notice and this permission notice are.\" preserved on all copies..\".\" Permission is granted to copy and distribute modified versions of this.\" manual under the conditions for verbatim copying, provided that the.\" entire resulting derived work is distributed under the terms of a.\" permission notice identical to this one.\" .\" Since the Linux kernel and libraries are constantly changing, this.\" manual page may be incorrect or out-of-date.  The author(s) assume no.\" responsibility for errors or omissions, or for damages resulting from.\" the use of the information contained herein.  The author(s) may not.\" have taken the same level of care in the production of this manual,.\" which is licensed free of charge, as they might when working.\" professionally..\" .\" Formatted or processed versions of this manual, if unaccompanied by.\" the source, must acknowledge the copyright and authors of this work..\".\" =========================================================================.\".\" Modified 2004/01/12 23:33:09 by brian.\".\" =========================================================================.so lis.macros.R1bracket-label "\fR[\fB" "\fR]" "\fR, \fB"no-default-databasedatabase lis.refsaccumulatemove-punctuationabbreviate Ajoin-authors ", " ", " " and "et-al " et al" 2 3abbreviate-label-ranges ".."sort-adjacent-labels.R2.\".\".TH MSGUTIL 9 "2004/01/12 23:33:09" "LiS-2_16_18-8" "Linux STREAMS DDI/DKI".SH "NAME".B msgutil, lis_msgutil\- \fISTREAMS\fR message utilities.SH "SYNOPSIS".PP.B #include <sys/stream.h>.HP 8.BI "int " retval " = msgsize(mblk_t *" mp );.HP 8.BI "int " retval " = msgdsize(mblk_t *" mp );.HP 8.BI "int " retval " = xmsgsize(mblk_t *" mp );.HP 8.BI "int " retval " = adjmsg(mblk_t *" mp ", int " len );.HP 8.BI "mblk_t *" mp " = copyb(mblk_t *" mp );.HP 8.BI "mblk_t *" mp " = copymsg(mblk_t *" mp );.HP 8.BI "mblk_t *" mp " = dupb(mblk_t *" mp );.HP 8.BI "mblk_t *" mp " = dupmsg(mblk_t *" mp );.HP 8.BI "void linkb(mblk_t *" mp );.HP 8.BI "mblk_t *" mp " = unlinkb(mblk_t *" mp );.HP 8.BI "int " retval " = pullupmsg(mblk_t *" mp ", int " len );.HP 8.BI "int " retval " = msgpullup(mblk_t *" mp ", int " len );.HP 8.BI "mblk_t *" mp " = rmvb(mblk_t *" mp ", mblk_t *" bp );.fi.SH "DESCRIPTION"This man page describes the STREAMS message utility functions..TP\fBmsgsize\fRcalculates and returns the aggregated sizes of all of themessage blocks in the message block chain pointed to by \fImp\fR (in bytes)..TP\fBmsgdsize\fRcalculates and returns the aggregated sizes of all of the\fBM_DATA\fR blocks in the message block chain pointed to by \fImp\fR (inbytes)..TP\fBxmsgsize\fRcalculates and the returns the aggregated sizes of all of theblocks in the message block chain which are of the same block type as thefirst block in the chain pointed to by \fImp\fR (in bytes)..PP\fBmsgsize\fR reads the available space (in contrast to used space) in eachmessage block for the calculation.\fBmsgdsize\fR and \fBxmsgsize\fR reads the used space (in contrast toavailable space) in each message block for the calculation..TP\fBadjmsg\fRtrims the absolute value of \fIlen\fR bytes from a message.If \fIlen\fR is positive, \fIlen\fR bytes will be trimmed from the head of themessage.  If \fIlen\fR is greater than the aggregate sizes of the blocks ofthe same type at the beginning of \fImp\fR, \fBadjmsg\fR fails.If \fIlen\fR is negative, \fI-len\fR bytes will be trimmed from the tail ofthe message.  If \fI-len\fR is greater than the aggregate sizes of the blocksof the same type at the end of \fImp\fR, \fBadjmsg\fR fails..PPAny message blocks whose resulting sizes are zero are not removed from themessage, but have their \fIb_rptr\fR set to their \fIb_wptr\fR..TP\fBcopyb\fR.TP\fBcopymsg\fR.TP\fBdupb\fR.TP\fBdupmsg\fR.PP.TP\fBlinkb\fR.TP\fBunlinkb\fR.PP.TP\fBpullupmsg\fR.TP\fBmsgpullup\fR.PP.TP\fBrmvb\fRRemove the message block pointed to by \fIbp\fR from the message pointed to by\fImp\fR.  When successful, it returns a pointer to the modified message, or\fBNULL\fR if \fIbp\fR was the only block in \fImp\fR.  When \fIbp\fR is notin message \fImp\fR, \fBrmvb\fR fails and returns \fI(mblk_t *)-1\fR..PP.SH "RETURN VALUES"\fBmsgsize\fR, \fBmsgdsize\fR and \fBxmsgsize\fR return the aggregated sizesof the message blocks counted in bytes.  Only positive values will bereturned.  If there are no messages of the particular type, the functionreturns zero.\fBadjmsg\fR returns non-zero on success and zero on failure..SH "ERRORS"\fBmsgsize\fR, \fBmsgdsize\fR and \fBxmsgsize\fR always succeed..SH "SEE ALSO".BR msgsize (9),.BR msgdsize (9),.BR xmsgsize (9),.BR adjmsg (9),.BR copyb (9),.BR copymsg (9),.BR dupb (9),.BR dupmsg (9),.BR linkb (9),.BR unlinkb (9),.BR pullupmsg (9),.BR msgpullup (9),.BR rmvb (9).SH "HISTORY"UNIX SVR 4 and 4.2 STREAMS.[svr4.].[svr42.].SH "BUGS"These functions should probably return \fIsize_t\fR instead of \fIint\fR..SH "NOTICES".\".\".[$LIST$.].TA

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -