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

📄 copymsg.9

📁 7号信令功能代码,为开源代码
💻 9
字号:
'\" tr.\" -*- nroff -*-.\".\" @(#) copymsg.9,v 1.1.4.1 2004/01/12 23:32:59 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:32:59 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 COPYMSG 9 "2004/01/12 23:32:59" "LiS-2_16_18-8" "Linux STREAMS DDI/DKI".SH NAME.B copymsg\- copy a \fISTREAMS\fR message.SH SYNOPSIS.PP.B #include <sys/stream.h>.HP 8.BR "struct msgb *" msg " = copymsg(struct msgb *" mp );.SH DESCRIPTION.PP.BR copymsg ()generates a new copy of each of the message blocks and data blocks and buffersin the message indicated by.IR mp ,and returns a pointer to the new message as.IR msg .The new data blocks each have the same type as the copied data blocks and the.IR b_rptr " and " b_wptrof each block in the new message are set to the beginning and end of thecopied data from the corresponding blocks in the old message..SH "RETURN VALUES".PPUpon success,.BR copymsg ()returns a pointer,.IR msg ,to the copied message..PPUpon failure,.BR copymsg ()returns a.B NULL.I msgpointer..SH ERRORS.PPWhen.BR copymsg ()fails, it returns a.B NULLpointer..BR copymsg ()can fail because the passed in message pointer,.IR mp ,is.BR NULL ;the size of any of the blocks to be copied has a negative message length (i.e.the.I b_wptrpointer is less than the.IR b_rptr );if any of the data blocks are mangled (i.e. the.I db_limpointer is less than the.IR db_base );or, memory allocation for any of the copied blocks fails..SH CAVEATS.PP.B LiS.[LiS.]copies each block from the copied message on a block by block basis using.BR copyb (9)..PPBecause the.B LiS.[LiS.]implementaiton of.BR copyb (9)fails if the message block has a negative length (i.e..I b_wptris less than.IR b_rptr),.BR copymsg ()will fail if any of the message blocks in the message to be copied has anegative length (i.e. the.I b_wptrpointer is less than the.IR b_rptr ),or if any of the data blocks are mangled (i.e. the.I db_limpointer is less than the.IR db_base )..PPThis does not appear consistent with SVR 4.2 STREAMS..[svr42.].SH "SEE ALSO".PP.BR copyb (9),.BR dupb "(9) and ".BR dupmsg (9)..SH VERSIONS.PP.BR copymsg ()first appeared in SVR 3..[svr3.].\".\".XX.[magic.].[svr42.].[svr4.].\".\".[$LIST$.].TA

⌨️ 快捷键说明

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