xref: /illumos-gate/usr/src/man/man9f/strqget.9f (revision bbf21555)
te
Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved.
Copyright 1989 AT&T
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.
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.
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]
STRQGET 9F "Jan 16, 2006"
NAME
strqget - get information about a queue or band of the queue
SYNOPSIS

#include <sys/stream.h>



int strqget(queue_t *q, qfields_t what, unsigned char pri, void *valp);
INTERFACE LEVEL

Architecture independent level 1 (DDI/DKI).

PARAMETERS
q

Pointer to the queue.

what

Field of the queue structure for (or the specified priority band) to return information about. Valid values are one of: QHIWAT

High water mark.

QLOWAT

Low water mark.

QMAXPSZ

Largest packet accepted.

QMINPSZ

Smallest packet accepted.

QCOUNT

Approximate size (in bytes) of data.

QFIRST

First message.

QLAST

Last message.

QFLAG

Status.

pri

Priority band of interest.

valp

The address of where to store the value of the requested field.

DESCRIPTION

The strqget() function gives drivers and modules a way to get information about a queue or a particular band of a queue without directly accessing STREAMS data structures, thus insulating them from changes in the implementation of these data structures from release to release.

RETURN VALUES

On success, 0 is returned and the value of the requested field is stored in the location pointed to by valp. An error number is returned on failure.

CONTEXT

The strqget() function can be called from user, interrupt, or kernel context.

SEE ALSO

strqset (9F), queue (9S)

Writing Device Drivers

STREAMS Programming Guide