putctl Utility

Purpose

Passes a control message.

Syntax

int
putctl( q,  type)
queue_t *q;

Description

The putctl utility creates a control message of the type specified by the type parameter, and calls the put procedure of the queue pointed to by the q parameter. The argument of the put procedure is a pointer to the created message. The putctl utility allocates new blocks by calling the allocb utility.

This utility is part of STREAMS Kernel Extensions.

Parameters

Item Description
q Specifies the queue that contains the desired put procedure.
type Specifies the type of control message to create.

Return Values

On successful completion, the putctl utility returns a value of 1. It returns a value of 0 if it cannot allocate a message block, or if the value of the type parameter is M_DATA, M_PROTO, M_PCPROTO, or M_DELAY.