Page 772 HISTORY These system calls appeared in BSD 4.2. BUGS Several of the socket options should be handled at lower levels of the system. SEE ALSO ioctl(2), socket(2), getprotoent(3), protocols(5) BSD Man Page, 22 April 1996 gettimeofday, settimeofdaygettimeofday, settimeofdayGet/set time SYNOPSIS #include <sys/time.h> #include <unistd.h> int gettimeofday(struct timeval *tv, struct timezone *tz); int settimeofday(const struct timeval *tv , const struct timezone *tz); DESCRIPTION gettimeofday and settimeofday can set the time as well as a time zone. tv is a timeval struct, as specified in /usr/include/sys/time.h: struct timeval { long tv_sec; /* seconds */ long tv_usec; /* microseconds */ }; and tz is a timezone: struct timezone { int tz_minuteswest; /* minutes west of Greenwich */ int tz_dsttime; /* type of dst correction */ }; with daylight savings times defined as follows: DST_NONE /* not on dst */ DST_USA /* USA style dst */ DST_AUST /* Australian style dst */ DST_WET /* Western European dst */ DST_MET /* Middle European dst */ DST_EET /* Eastern European dst */ DST_CAN /* Canada */ DST_GB /* Great Britain and Eire */ DST_RUM /* Rumania */ DST_TUR /* Turkey */ DST_AUSTALT /* Australian style with shift in 1986 */ Page 773 And the following macros are defined to operate on this : #define timerisset(tvp)\ ((tvp)->tv_sec || (tvp)->tv_usec) #define timercmp(tvp, uvp, cmp)\ ((tvp)->tv_sec cmp (uvp)->tv_sec ||\ (tvp)->tv_sec == (uvp)->tv_sec &&\ (tvp)->tv_usec cmp (uvp)->tv_usec) #define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0) If either tv or tz is null, the corresponding structure is not set or returned. Only the superuser can use settimeofday. ERRORS
CONFORMS TO BSD 4.3 SEE ALSO date(1), adjtimex(2), time(2), ctime(3), ftime(3) Linux 1.2.4, 15 April 1995 getuid, geteuidgetuid, geteuidGet user identity SYNOPSIS #include <unistd.h> uid_t getuid(void); uid_t geteuid(void); DESCRIPTION getuid returns the real user ID of the current process. geteuid returns the effective user ID of the current process. The real ID corresponds to the ID of the calling process. The effective ID corresponds to the set ID bit on the file being executed. ERRORS These functions are always successful. CONFORMS TO POSIX, BSD 4.3 SEE ALSO setreuid(2), setuid(2) Linux 0.99.11, 23 July 1993 Page 774 idleidleMakes process 0 idle SYNOPSIS #include <unistd.h> void idle(void); DESCRIPTION idle is an internal system call used during bootstrap. It marks the process's pages as swappable, lowers its priority, and enters the main scheduling loop. idle never returns. Only process 0 may call idle. Any user process, even a process with superuser permission, will receive EPERM. RETURN VALUE idle never returns for process 0, and always returns _1 for a user process. ERRORS
Linux 1.1.46, 21 August 1994 ioctlioctlControls devices SYNOPSIS #include <sys/ioctl.h> int ioctl(int d,intrequest, ...); (The "third" argument is traditionally char *argp and will be so named for this discussion.) DESCRIPTION The ioctl function manipulates the underlying device parameters of special files. In particular, many operating characteristics of character special files (for example, terminals) may be controlled with ioctl requests. The argument d must be an open file descriptor. An ioctl request has encoded in it whether the argument is an in parameter or out parameter, and the size of the argument argp in bytes. Macros and defines used in specifying an ioctl request are located in the file <sys/ioctl.h>. RETURN VALUE On success, 0 is returned. On error, _1 is returned and errno is set appropriately. ERRORS
HISTORY An ioctl function call appeared in version 7 AT&T UNIX. Page 775 SEE ALSO execve(2), fcntl(2), mt(4), sd(4), tty(4) INTRODUCTION This is ioctl List 1.3.27, a list of ioctl calls in Linux/i386 kernel 1.3.27. It contains 421 ioctls from /usr/include/fasm,linuxg/*.h. For each ioctl, you'll find the numerical value, name, and argument type. An argument type of const struct foo * means the argument is input to the kernel. struct foo * means the kernel outputs the argument. If the kernel uses the argument for both input and output, this is marked with // I-O. Some ioctls take more arguments or return more values than a single structure. These are marked // MORE and are documented further in a separate section. This list is incomplete. It does not include
And, of course, I may have errors and omissions. Please e-mail changes and comments to mec@duracef.shout.net. I am particularly interested in loadable modules that define their own ioctls. If you know of such a module, tell me where I can ftp it, and I'll include its ioctls in my next release. MAIN TABLE <include/asm-i386/socket.h>
<include/asm-i386/termios.h>
|