Update contrib.
1 /** @file ../include/sys/ioccom.h
5 /** @fn ioctl(int aFid, unsigned long aCmd, ...)
9 @return If an error has occurred, a value of -1 is returned and errno is set to indicate the error.
12 #include < sys/ioctl.h >
14 The ioctl system call manipulates the underlying device parameters of special files.
15 In particular, many operating
16 characteristics of character special files (e.g. terminals)
17 may be controlled with ioctl requests.
19 must be an open file descriptor.
21 The third argument to ioctl is traditionally named char *argp .
22 Most uses of ioctl in 3.0,
23 however require the third argument to be a caddr_t
26 An ioctl request has encoded in it whether the argument is an "in"
29 argument, and the size of the argument argp in bytes.
30 Macros and defines used in specifying an ioctl request are located in the file \#include \<sys/ioctl.h \>
34 /* Detailed description : Sample usage of ioctl system call ,for command SIOCGIFINDEX
35 * which gets socket interface index , by passing socket interface home.*/
36 #include <sys/types.h>
37 #include <sys/socket.h>
39 #include <sys/ioctl.h>
46 sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
47 strncpy(ifr.ifr_name, "Ethernet with Daemon Dynamic IP", sizeof(ifr.ifr_name));
49 if (ioctl(sockfd, SIOCGIFINDEX, 𝔦) != -1)
62 @capability Deferred @ref Rsocket::Open