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

📄 strqget.9

📁 7号信令功能代码,为开源代码
💻 9
字号:
'\" tr.\" -*- nroff -*-.\".\" @(#) strqget.9,v 1.1.4.1 2004/01/12 23:33:11 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:11 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 STRQGET 9 "2004/01/12 23:33:11" "LiS-2_16_18-8" "Linux STREAMS DDI/DKI".SH NAME.B strqget, lis_strqget\- gets information about a \fISTREAMS\fR message queue.SH SYNOPSIS.PP.B #include <sys/stream.h>.HP 8.BI "int " retval " = strqget(queue_t *" q ", qfields_t " what ", unsigned char " band ", long *" val );.SH DESCRIPTION.PP.BR strqget ()returns the value or pointer requested by.I whatfor the queue pointed to by.I qand band specified by.I bandinto the memory area pointed to by.IR val .The attribute retrieved can be either a scalar or a pointer..PPWhen.I bandis zero,.BR strqget ()will retrieve the attribute specified by.I whatfor the queue.When.I bandis non-zero (between 1 and 255),.BR strqget ()will retrieve the attribute specified by.I whatfor the queue band specified by.IR band ..PPThe argument.I whatspecifies which queue (or queue band if.I bandis non-zero) attribute is to be retrieved..I whatcan be one of the following values:.TP 12.B QHIWATGets the high water mark associated with the.I qor queue.IR band ..TP 12.B QLOWATGets the low water mark associated with the.I qor queue.IR band ..TP 12.B QCOUNTGets the count of bytes associated with the.I qor queue.IR band ..TP 12.B QFIRSTGets the first message pointer associated with the.I qor queue.IR band ..TP 12.B QLASTGets the last message pointer associated with the.I qor queue.IR band ..TP 12.B QFLAGGets the flags associated with the.I qor queue.IR band ..TP 12.B QMAXPSZGets the maximum packet size associated with the.IR q .For this operation.I bandmust be zero (0)..TP 12.B QMINPSZGets the minimum packet size associated with the.IR q .For this operation.I bandmust be zero (0)..PP.BR strqget ()provides a mechanism whereby a.IR STREAMS (4)module or driver can access informationabout a queue or queue band without directly accessing the.B queueor.B qbandstructures.Values retrieved by.BR strqget ()are equivalent to directly accessing the.B queueor.B qbandstructure members described below..PPThe.B queuestructure contains at least the following members:.HP.BI "ulong " q_hiwat\- the high water mark for the queue..HP.BI "ulong " q_lowat\- the low water mark for the queue..HP.BI "ulong " q_count\- the count of the number of bytes in the queue..HP.BI "struct msgb *" q_first\- the first message in the queue..HP.BI "struct msgb *" q_last\- the last message in the queue..HP.BI "ulong " q_flag\- the flags associated with the queue, see.BR "\*(lqQueue Flags\*(rq" ,above..HP.BI "long " q_maxpsz\- the maximum message size accepted by the queue..HP.BI "long " q_minpsz\- the minimum message size accepted by the queue..PPThe.B qbandstructure contains at least the following members:.HP.BI "ulong " qb_hiwat\- the high water mark for the band..HP.BI "ulong " qb_lowat\- the low water mark for the band..HP.BI "ulong " qb_count;\- the count of the number of bytes in the band..HP.BI "struct msgb *" qb_first\- the first message in the band..HP.BI "struct msgb *" qb_last\- the last message in the band..HP.BI "ulong " qb_flag\- the flags associated with the band, see.BR "\*(lqQueue Band Flags\*(rq" ,above..\".\".\".SS "Queue Flags".PPWhen.BR strqget ()is called with.I whatset to.B QFLAGand.I bandis set to zero (0),.BR strqget ()returns the queue flags in the area pointed to by.IR val .The queue flags in the area pointed to by.I valcan contain the following flags:.TP 12.B QENABset when the queue is enabled..TP 12.B QWANTRset when the previous queue wants to read..TP 12.B QWANTWset when the previous queue wants to write..TP 12.B QFULLset when the queue is full.  The queue is full when the count ofbytes in the queue is greater than the high water mark for thequeue..TP 12.B QREADRset when the queue is the reader..TP 12.B QUSEset when the queue is not free..TP 12.B QNOENBset when the queue is not to be enabled..TP 12.B QBACKset when the queue is a back-enabled queue..TP 12.B QRETRYset when the retry timer is set for the queue..TP 12.B QSCANset when the queue is in the scan list..TP 12.B QCLOSINGset when the stream head wants to close this queue..TP 12.B QWASFULLset when the queue was previously full (QFULL was set) but thequeue count has not yet dropped to the low water mark..TP 12.B QCLOSEWTset when the stream head is waiting for the queue to drain..TP 12.B QPROCSOFFset when the put and service procedures for the queue are turned off..TP 12.B QRUNNINGset while the queue's service procedure is running..TP 12.B QWAITINGset when qdetach is waiting on the queue for a wakeup..\".\".\".SS "Queue Band Flags".PPWhen.BR strqget ()is called with.I whatset to.B QFLAGand.I bandis set between 1 and 255,.BR strqget ()returns the queue band flags associated with.I bandin the area pointed to by.IR val .The queue band flags in the area pointed to by.I valcan contain the following flags:.TP 12.B QB_FULLset when the queue band is full.  The queue band is full when the count of thebytes in the queue band is greater than the high water mark for the queueband..TP 12.B QB_WANTWset when the previous queue wants to write to this queue band..TP 12.B QB_BACKset when the queue band is back-enabled..TP 12.B QB_WASFULLset when the queue band was previously full (QB_FULL was set) but the queueband count has not yet dropped to the low water mark for the queue band..SH "RETURN VALUES".PPUpon success,.BR strqget ()returns zero (0) and places the appropriate value in thememory area pointed to by.IR val ..PPUpon failure,.BR strqget ()returns a non-zero error number.The memory area pointed to by.I valremains unchanged..SH ERRORS.PPWhen.BR strqget ()fails,it returns one of the following errors:.TP 12.RB [ EINVAL ]The value pointer.I valis.BR NULL ;the queue pointer.I qis.BR NULL;.I qdoes not point to a valid queue structure;the queue band specified in.I banddoes not exist;.BR QMAXPSZ " or " QMINPSZwas specified for.I whatand.I bandwas non-zero;.I whatis not a valid queue or queue band attribute..SH CAVEATS.PP.B LiS.[LiS.]defines a number of queue flags that are not elsewhere defined, yet returnsthose flags from a call to.BR strqget ()..B LiS.[LiS.]should mask off its private flags when returning flags from a call to.BR strqget ()..SH "SEE ALSO".PP.BR strqset (9)..SH VERSIONS.PPThis manpage was written for.B LiS\c..[LiS.].PP.BR strqget ()first appeared in SVR 3..[svr3.].\".\".XX.[magic.].[svr42.].[svr4.].\".\".[$LIST$.].TA

⌨️ 快捷键说明

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