The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
ioctl.h
Go to the documentation of this file.
1#pragma once
2
3/**
4 * @file sys/ioctl.h
5 * @brief device control requests.
6 *
7 * the request numbers are ABI (src/kernel/console/termios.h).
8 */
9
10#define TCGETS 0x5401
11#define TCSETS 0x5402
12#define TCSETSW 0x5403
13#define TCSETSF 0x5404
14#define TIOCSCTTY 0x540E
15#define TIOCGPGRP 0x540F
16#define TIOCSPGRP 0x5410
17#define TIOCGWINSZ 0x5413
18#define TIOCSWINSZ 0x5414 // set the window size (SIGWINCH to the foreground)
19#define TIOCGPTN 0x80045430 // pty master: the number N of /dev/pts/N
20#define FIONREAD 0x541B // a socket: the bytes of the next datagram (int)
21
22// network interfaces, on any AF_INET socket, with a struct ifreq
23// (<net/if.h>). the S calls need root. SIOCGIFGATEWAY and SIOCSIFGATEWAY
24// are ginnOS's own: the gateway of the interface, in ifr_addr.
25#define SIOCGIFFLAGS 0x8913
26#define SIOCSIFFLAGS 0x8914
27#define SIOCGIFADDR 0x8915
28#define SIOCSIFADDR 0x8916
29#define SIOCGIFBRDADDR 0x8919
30#define SIOCGIFNETMASK 0x891B
31#define SIOCSIFNETMASK 0x891C
32#define SIOCGIFMTU 0x8921
33#define SIOCGIFHWADDR 0x8927
34#define SIOCGIFGATEWAY 0x89F0
35#define SIOCSIFGATEWAY 0x89F1
36#define TIOCSPTLCK 0x40045431 // pty master: lock (1) or unlock (0) the slave
37
38struct winsize
39{
40 unsigned short ws_row;
41 unsigned short ws_col;
42 unsigned short ws_xpixel;
43 unsigned short ws_ypixel;
44};
45
46int ioctl(int fd, unsigned int request, void *arg);
int ioctl(int fd, unsigned int request, void *arg)
Definition ioctl.h:39
unsigned short ws_row
Definition ioctl.h:40
unsigned short ws_col
Definition ioctl.h:41
unsigned short ws_xpixel
Definition ioctl.h:42
unsigned short ws_ypixel
Definition ioctl.h:43