?? copyb.9
字號(hào):
'\" tr.\" -*- nroff -*-.\".\" @(#) copyb.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 COPYB 9 "2004/01/12 23:32:59" "LiS-2_16_18-8" "Linux STREAMS DDI/DKI".SH NAME.B copyb\- copy a \fISTREAMS\fR message block.SH SYNOPSIS.PP.B #include <sys/stream.h>.HP 8.BI "struct msgb *" bp " = copyb(struct msgb *" mp );.SH DESCRIPTION.PP.BR copyb ()generates a new copy of the message block and data block and buffer indicatedby.IR mp ,and returns a pointer to the new message block as.IR bp .The new data block has the same type as the copied data block and the.IR b_rptr " and " b_wptrin the new message block are set to the beginning and end of the copied datain the new data block and buffer..SH "RETURN VALUES".PPUpon success,.BR copyb ()returns a pointer to the new message block..PPUpon failure,.BR copyb ()returns a.B NULLpointer..SH ERRORS.PPWhen.BR copyb ()fails, it returns a.B NULLpointer..BR copyb ()can fail because the passed in message pointer,.IR mp ,is.BR NULL ;the size of the data buffer is negative;the size of the data indicated by.IR b_rptr " and " b_wptrof the message block to be copied is negative;or memory allocation failed.Normally if.B copybfails,.BR bufcall (9)should be called with the.I sizeof the data block necessary and the.I priorityassociated with the operation..SH CAVEATS.PPThe.B LiS.[LiS.]implementation of.BR copyb ()will fail if the block to be copied has a negative message length (i.e. the.I b_wptris less than the.IR b_rptr ),or if the data block is 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.].SS "Considerations for MP".PP.BR copyb ()is kernel thread-safe and MP-safe can be invoked from inside or outside andinterrupt handler..SH "SEE ALSO".PP.BR bufcall (9),.BR copymsg (9),.BR dupb "(9) and ".BR dupmsg (9)..SH VERSIONS.PPThis manpage was written for.B LiS\c..[LiS.].PP.BR copyb ()first appeared in SVR 3..[svr3.].\".\".XX.[magic.].[svr42.].[svr4.].\".\".[$LIST$.].TA
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -