[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

vn_ioctl Entry Point

Purpose

Requests I/O control operations on special files.

Syntax

int vn_ioctl (vp, cmd, arg, flags, ext, crp)
struct vnode *vp;
int cmd;
caddr_t arg;
int flags, ext;
struct ucred *crp;

Parameters

vp Points to the virtual node (v-node) on which to perform the operation.
cmd Identifies the specific command. Common operations for the ioctl subroutine are defined in the /usr/include/sys/ioctl.h file. The file system implementation can define other ioctl operations.
arg Defines a command-specific argument. This parameter can be a single word or a pointer to an argument (or result structure).
flags Identifies flags from the open file structure.
ext Specifies the extended parameter passed by the ioctl subroutine. The ioctl subroutine always sets the ext parameter to 0.
crp Points to the cred structure. This structure contains data that the file system can use to validate access permission.

Description

The vn_ioctl entry point is used by the logical file system to perform miscellaneous operations on special files. If the file system supports special files, the information is passed down to the ddioctl entry point of the device driver associated with the given v-node.

Execution Environment

The vn_ioctl entry point can be called from the process environment only.

Return Values

0 Indicates success.

Nonzero return values are returned from the /usr/include/sys/errno.h file to indicate failure. A valid value includes:

EINVAL Indicates the file system does not support the entry point.

Related Information

The ioctl subroutine.

Virtual File System Overview, Virtual File System Kernel Extensions Overview, Logical File System Overview, Understanding Virtual Nodes (V-nodes) in AIX Kernel Extensions and Device Support Programming Concepts.

List of Virtual File System Operations.

Special Files Overview.


[ Previous | Next | Contents | Home | Search ]