---
name: "VOP_IOCTL"
section: "9"
platform: "linux"
package: "freebsd-manpages"
version: "6.0-5"
release: "Debian 4.0 (Etch)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/VOP_IOCTL"
---

# VOP\_IOCTL(9)

device specific control

## NAME

**VOP\_IOCTL** – device specific control

## SYNOPSIS

**#include \<sys/param.h\>**

**#include \<sys/vnode.h\>**

*int*\

**VOP\_IOCTL**(*struct vnode \*vp*, *u\_long command*, *caddr\_t data*, *int fflag*, *struct ucred \*cred*, *struct thread \*td*);

## DESCRIPTION

Manipulate a file in device dependent ways.

Its arguments are:

- *vp*

  The vnode of the file (normally representing a device).

- *command*

  The device specific operation to perform.

- *data*

  Extra data for the specified operation.

- *fflag*

  Some flags ???

- *cred*

  The caller's credentials.

- *td*

  The calling thread.

Most file systems do not implement this entry point.

## LOCKS

The file should not be locked on entry.

## RETURN VALUES

If successful, zero is returned, otherwise an appropriate error code.

If the ioctl is not recognized or not handled, ENOTTY should be returned.

## PSEUDOCODE

```
int
vop_ioctl(struct vnode *vp, int command, caddr_t data, int fflag,
	  struct ucred *cred, struct thread *td)
{
    return ENOTTY;
}
```

## SEE ALSO

[vnode(9)](/vnode/9.md)

## AUTHORS

This manual page was written by Doug Rabson.
