]> git.karo-electronics.de Git - karo-tx-redboot.git/blob - packages/net/tcpip/v2_0/doc/ioctl.man
Initial revision
[karo-tx-redboot.git] / packages / net / tcpip / v2_0 / doc / ioctl.man
1 NAME
2        ioctl - control device
3
4 SYNOPSIS
5        #include <sys/ioctl.h>
6
7        int ioctl(int d, int request, ...)
8
9        [The  "third"  argument  is  traditionally char *argp, and
10        will be so named for this discussion.]
11
12 DESCRIPTION
13        The  ioctl  function  manipulates  the  underlying  device
14        parameters  of special files.  In particular, many operat-
15        ing characteristics of sockets and network devices
16        may be controlled with ioctl requests.  The argu-
17        ment d must be an open file descriptor.
18
19        An ioctl request has encoded in it whether the argument is
20        an  in  parameter  or  out  parameter, and the size of the
21        argument argp in bytes.  Macros and defines used in speci-
22        fying   an   ioctl   request   are  located  in  the  file
23        <sys/ioctl.h>.
24
25 RETURN VALUE
26        On success, zero is returned.  On error, -1  is  returned,
27        and errno is set appropriately.
28
29 ERRORS
30        EBADF  d is not a valid descriptor.
31
32        EFAULT argp references an inaccessible memory area.
33
34        ENOTTY d  is  not  associated  with  a  character  special
35               device.
36
37        ENOTTY The specified request does not apply to the kind of
38               object that the descriptor d references.
39
40        EINVAL Request or argp is not valid.