Merge commit '9276b3991ba20d5a5660887ba81b0bc7bed25a0c'
[unleashed.git] / share / man / man9f / strqget.9f
blob3bf1e4ddf3a461be16e2e3e3b25cd34ae1c4c319
1 '\" te
2 .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved.
3 .\" Copyright 1989 AT&T
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH STRQGET 9F "Jan 16, 2006"
8 .SH NAME
9 strqget \- get information about a queue or band of the queue
10 .SH SYNOPSIS
11 .LP
12 .nf
13 #include <sys/stream.h>
17 \fBint\fR \fBstrqget\fR(\fBqueue_t *\fR\fIq\fR, \fBqfields_t\fR \fIwhat\fR, \fBunsigned char\fR \fIpri\fR, \fBvoid *\fR\fIvalp\fR);
18 .fi
20 .SH INTERFACE LEVEL
21 .sp
22 .LP
23 Architecture independent level 1 (DDI/DKI).
24 .SH PARAMETERS
25 .sp
26 .ne 2
27 .na
28 \fB\fIq\fR\fR
29 .ad
30 .RS 8n
31 Pointer to the queue.
32 .RE
34 .sp
35 .ne 2
36 .na
37 \fB\fIwhat\fR\fR
38 .ad
39 .RS 8n
40 Field of the \fBqueue\fR structure for (or the specified priority band) to
41 return information about. Valid values are one of:
42 .sp
43 .ne 2
44 .na
45 \fB\fBQHIWAT\fR\fR
46 .ad
47 .RS 11n
48 High water mark.
49 .RE
51 .sp
52 .ne 2
53 .na
54 \fB\fBQLOWAT\fR\fR
55 .ad
56 .RS 11n
57 Low water mark.
58 .RE
60 .sp
61 .ne 2
62 .na
63 \fB\fBQMAXPSZ\fR\fR
64 .ad
65 .RS 11n
66 Largest packet accepted.
67 .RE
69 .sp
70 .ne 2
71 .na
72 \fB\fBQMINPSZ\fR\fR
73 .ad
74 .RS 11n
75 Smallest packet accepted.
76 .RE
78 .sp
79 .ne 2
80 .na
81 \fB\fBQCOUNT\fR\fR
82 .ad
83 .RS 11n
84 Approximate size (in bytes) of data.
85 .RE
87 .sp
88 .ne 2
89 .na
90 \fB\fBQFIRST\fR\fR
91 .ad
92 .RS 11n
93 First message.
94 .RE
96 .sp
97 .ne 2
98 .na
99 \fB\fBQLAST\fR\fR
101 .RS 11n
102 Last message.
106 .ne 2
108 \fB\fBQFLAG\fR\fR
110 .RS 11n
111 Status.
117 .ne 2
119 \fB\fIpri\fR\fR
121 .RS 8n
122 Priority band of interest.
126 .ne 2
128 \fB\fIvalp\fR\fR
130 .RS 8n
131 The address of where to store the value of the requested field.
134 .SH DESCRIPTION
137 The \fBstrqget()\fR function gives drivers and modules a way to get information
138 about a queue or a particular band of a queue without directly accessing
139 STREAMS data structures, thus insulating them from changes in the
140 implementation of these data structures from release to release.
141 .SH RETURN VALUES
144 On success, \fB0\fR is returned and the value of the requested field is stored
145 in the location pointed to by \fIvalp\fR. An error number is returned on
146 failure.
147 .SH CONTEXT
150 The \fBstrqget()\fR function can be called from user, interrupt, or kernel
151 context.
152 .SH SEE ALSO
155 \fBstrqset\fR(9F), \fBqueue\fR(9S)
158 \fIWriting Device Drivers\fR
161 \fISTREAMS Programming Guide\fR