aboutsummaryrefslogtreecommitdiff
path: root/vapi/posix.vapi
blob: e2202f584f813d141b7e049589103b4e4bd1ad17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
/* posix.vapi
 *
 * Copyright (C) 2008  Emmanuele Bassi
 * Copyright (C) 2008  Matias De la Puente
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.

 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.

 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 * Authors:
 * 	Matias De la Puente <mfpuente.ar@gmail.com>
 *  Emmanuele Bassi
 */

namespace Posix
{
	[CCode (cname = "assert", cheader_filename = "assert.h")]
	public static void assert (string expresion);
	
	
	[CCode (lower_case_cprefix = "", cheader_filename = "ctype.h")]
	namespace CType
	{
		public static int digittoint (int c);
		public static bool isalnum (int c);
		public static bool isalpha (int c);
		public static bool isascii (int c);
		public static bool iscntrl (int c);
		public static bool isdigit (int c);
		public static bool isgraph (int c);
		public static bool ishexnumber (int c);
		public static bool isideogram (int c);
		public static bool islower (int c);
		public static bool isnumber (int c);
		public static bool isphonogram (int c);
		public static bool isspecial (int c);
		public static bool isprint (int c);
		public static bool ispunct (int c);
		public static bool isrune (int c);
		public static bool isspace (int c);
		public static bool isupper (int c);
		public static bool isxdigit (int c);
		public static int toascii (int c);
		public static int tolower (int c);
		public static int toupper (int c);
	}
	
	
	[CCode (cname = "dirent", cheader_filename = "dirent.h")]
	public struct Dirent
	{
		public ulong d_ino;
		public long d_off;
		public ushort d_reclen;
		public weak string d_name;
	}
		
	[Compact]
	[CCode (cname = "DIR", free_function = "closedir", cheader_filename = "dirent.h")]
	public class Directory
	{
		[CCode (cname = "opendir")]
		public static Directory open (string name);
		[CCode (cname = "readdir")]
		public Dirent read ();
		[CCode (cname = "rewinddir")]
		public Dirent rewind ();
		[CCode (cname = "seekdir")]
		public void seek (long offset);
		[CCode (cname = "telldir")]
		public long tell ();
		[CCode (cname = "dirfd")]
		public int get_fd ();
	}

	
	[CCode (lower_case_cprefix = "", cheader_filename = "errno.h")]
	namespace Error
	{
		// see errno(3)
		public const int E2BIG;
		public const int EACCESS;
		public const int EADDRINUSE;
		public const int EADDRNOTAVAIL;
		public const int EAFNOSUPPORT;
		public const int EAGAIN;
		public const int EALREADY;
		public const int EBADE;
		public const int EBADF;
		public const int EBADFD;
		public const int EBADMSG;
		public const int EBADR;
		public const int EBADRQC;
		public const int EBADSLT;
		public const int EBUSY;
		public const int ECANCELED;
		public const int ECHILD;
		public const int ECHRNG;
		public const int ECOMM;
		public const int ECONNABORTED;
		public const int ECONNREFUSED;
		public const int ECONNRESET;
		public const int EDEADLK;
		public const int EDEADLOCK;
		public const int EDESTADDRREQ;
		public const int EDOM;
		public const int EDQUOT;
		public const int EEXIST;
		public const int EFAULT;
		public const int EFBIG;
		public const int EHOSTDOWN;
		public const int EHOSTUNREACH;
		public const int EIDRM;
		public const int EILSEQ;
		public const int EINPROGRESS;
		public const int EINTR;
		public const int EINVAL;
		public const int EIO;
		public const int EISCONN;
		public const int EISDIR;
		public const int EISNAM;
		public const int EKEYEXPIRED;
		public const int EKEYREJECTED;
		public const int EKEYREVOKED;
		public const int EL2HLT;
		public const int EL2NSYNC;
		public const int EL3HLT;
		public const int EL3RST;
		public const int ELIBACC;
		public const int ELIBBAD;
		public const int ELIBMAX;
		public const int ELIBSCN;
		public const int ELIBEXEC;
		public const int ELOOP;
		public const int EMEDIUMTYPE;
		public const int EMFILE;
		public const int EMLINK;
		public const int EMSGSIZE;
		public const int EMULTIHOP;
		public const int ENAMETOOLONG;
		public const int ENETDOWN;
		public const int ENETRESET;
		public const int ENETUNREACH;
		public const int ENFILE;
		public const int ENOBUFS;
		public const int ENODATA;
		public const int ENODEV;
		public const int ENOENT;
		public const int ENOEXEC;
		public const int ENOKEY;
		public const int ENOLCK;
		public const int ENOLINK;
		public const int ENOMEDIUM;
		public const int ENOMEM;
		public const int ENOMSG;
		public const int ENONET;
		public const int ENOPKG;
		public const int ENOPROTOOPT;
		public const int ENOSPC;
		public const int ENOSR;
		public const int ENOSTR;
		public const int ENOSYS;
		public const int ENOTBLK;
		public const int ENOTCONN;
		public const int ENOTDIR;
		public const int ENOTEMPTY;
		public const int ENOTSOCK;
		public const int ENOTSUP;
		public const int ENOTTY;
		public const int ENOTUNIQ;
		public const int ENXIO;
		public const int EOPNOTSUPP;
		public const int EOVERFLOW;
		public const int EPERM;
		public const int EPFNOSUPPORT;
		public const int EPIPE;
		public const int EPROTO;
		public const int EPROTONOSUPPORT;
		public const int EPROTOTYPE;
		public const int ERANGE;
		public const int EREMCHG;
		public const int EREMOTE;
		public const int EREMOTEIO;
		public const int ERESTART;
		public const int EROFS;
		public const int ESHUTDOWN;
		public const int ESPIPE;
		public const int ESOCKTNOSUPPORT;
		public const int ESRCH;
		public const int ESTALE;
		public const int ESTRPIPE;
		public const int ETIME;
		public const int ETIMEDOUT;
		public const int ETXTBSY;
		public const int EUCLEAN;
		public const int EUNATCH;
		public const int EUSERS;
		public const int EWOULDBLOCK;
		public const int EXDEV;
		public const int EXFULL;

		// this is a const int because you're only supposed to copy
		// the errno value, not change it
		public const int errno;

		[CCode (cname = "strerror")]
		public static weak string to_string (int err_no);

		[CCode (cname = "perror")]
		public static void print_error (string? prefix = null);
	}
	
	
	[CCode (cheader_filename = "fcntl.h,unistd.h")]
	namespace File
	{
		[CCode (lower_case_cprefix = "F_")]
		namespace FDFlag
		{
			public const int DUPFD;
			public const int DUP2FD;
			public const int GETFD;
			public const int SETFD;
			public const int GETFL;
			public const int SETFL;
			public const int GETOWN;
			public const int SETOWN;
			public const int GETSIG;
			public const int SETSIG;
			public const int FREESP;
			public const int GETLK;
			public const int GETLK64;
			public const int SETLK;
			public const int SETLK64;
			public const int SETLKW;
			public const int SETLKW64;
			public const int SHARE;
			public const int UNSHARE;
			// linux 2.4 onwards
			public const int GETLEASE;
			public const int SETLEASE;
			public const int RDLCK;
			public const int WRLCK;
			public const int UNLCK;
			public const int NOTIFY;
		}
		
		[CCode (lower_case_cprefix = "DN_")]
		namespace NotifyMask
		{
			public const int ACCESS;
			public const int MODIFY;
			public const int CREATE;
			public const int DELETE;
			public const int RENAME;
			public const int ATTRIB;
			public const int MULTISHOT;
		}
		
		[CCode (lower_case_cprefix = "O_")]
		namespace AccessMode
		{
			public const int ACCMODE;
			public const int RDONLY;
			public const int WRONLY;
			public const int RDWR;
		}
		
		[CCode (lower_case_cprefix = "O_")]
		namespace FileCreation
		{
			public const int CREAT;
			public const int EXCL;
			public const int NOCTTY;
			public const int TRUNC;
			public const int XATTR;
		}
		
		[CCode (lower_case_cprefix = "O_")]
		namespace FileStatus
		{
			public const int APPEND;
			public const int ASYNC;
			public const int DIRECT;
			public const int DIRECTORY;
			public const int DSYNC;
			public const int LARGEFILE;
			public const int NOATIME;
			public const int NOFOLLOW;
			public const int NONBLOCK;
			public const int NDELAY;
			public const int RSYNC;
			public const int SYNC;
		}
		
		[CCode (lower_case_cprefix = "S_")]
		namespace FileMode
		{
			public const ulong IRWXU;
			public const ulong IRUSR;
			public const ulong IWUSR;
			public const ulong IXUSR;
			public const ulong IRWXG;
			public const ulong IRGRP;
			public const ulong IWGRP;
			public const ulong IXGRP;
			public const ulong IRWXO;
			public const ulong IROTH;
			public const ulong IWOTH;
			public const ulong IXOTH;
		}
		
		[CCode (cname = "flock")]
		public struct FLock
		{
			public short l_type;
			public short l_whence;
			public long l_start;
			public long l_len;
			public long l_pid;
		}
		
		[CCode (cname = "iovec", cheader_filename = "sys/uio.h")]
		public struct IOVector
		{
			public void* iov_base;
			public size_t iov_len;
		}
		
		[CCode (cname = "fcntl")]
		public static int fcntl (int fd, int cmd);
		[CCode (cname = "fcntl")]
		public static int fcntl_with_arg (int fd, int cmd, ulong arg);
		[CCode (cname = "fcntl")]
		public static int fcntl_with_flock (int fd, int cmd, FLock @lock);
		[CCode (cname = "open")]
		public static int open (string pathname, int flags, ulong mode = 0);
		[CCode (cname = "creat")]
		public static int creat (string pathname, ulong mode);
		[CCode (cname = "openat")]
		public static int open_at (int dirfd, string pathname, int flags, ulong mode = 0);
		[CCode (cname = "read")]
		public static ssize_t read (int fd, void* buf, size_t nbyte);
		[CCode (cname = "pread")]
		public static ssize_t pread (int fd, void* buf, size_t nbyte, long offset);
		[CCode (cname = "readv", cheader_filename = "sys/uio.h")]
		public static int read_vector (int fd, IOVector vector, size_t count);
		[CCode (cname = "write")]
		public static ssize_t write (int fd, void* buf, size_t nbyte);
		[CCode (cname = "pwrite")]
		public static ssize_t pwrite (int fd, void* buf, size_t nbyte, long offset);
		[CCode (cname = "writev", cheader_filename = "sys/uio.h")]
		public static int write_vector (int fd, IOVector vector, size_t count);
		[CCode (cname = "close")]
		public static int close (int fd);
	}

	
	[CCode (lower_case_cprefix = "", cheader_filename = "fenv.h")]
	namespace FloatEnv
	{
		[CCode (cname = "fenv_t")]
		public struct FloatEnv { }
		
		public static int feclearexcept (int excepts);
		public static int fegetexceptflag (out ushort flagp, int excepts);
		public static int feraiseexcept (int excepts);
		public static int fesetexceptflag (ref ushort flagp, int excepts);
		public static int fetestexcept (int excepts);
		public static int fegetround ();
		public static int fesetround (int rounding_mode);
		public static int fegetenv (out FloatEnv envp);
		public static int feholdexcept (out FloatEnv envp);
		public static int fesetenv (ref FloatEnv envp);
		public static int feupdateenv (ref FloatEnv envp);
	}

	
	[CCode (cname = "group", cheader_filename = "grp.h")]
	public struct Group
	{
		public weak string gr_name;
		public weak string gr_passwd;
		public long gr_gid;
		public weak string[] gr_mem;
		
		[CCode (cname = "getgrnam")]
		public static Group get_by_name (string name);
		[CCode (cname = "getgrgid")]
		public static Group get_by_gid (long gid);
		[CCode (cname = "getgrent")]
		public static Group get_entry ();
		[CCode (cname = "setgrent")]
		public static void set_entry ();
		[CCode (cname = "entgrent")]
		public static void end_entry ();
		[CCode (cname = "fgetgrent")]
		public static Group get_entry_by_stream (GLib.FileStream stream);
	}
	
	[CCode (cname = "passwd", cheader_filename = "pwd.h")]
	public struct Password
	{
		public weak string pw_name;
		public weak string pw_passwd;
		public long pw_uid;
		public long pw_gid;
		public weak string pw_gecos;
		public weak string pw_dir;
		public weak string pw_shell;
		
		[CCode (cname = "getpw")]
		public static int reconstruct (long uid, string buf);
		[CCode (cname = "getpwnam")]
		public static Password get_by_name (string name);
		[CCode (cname = "getpwuid")]
		public static Password get_by_uid (long uid);
		[CCode (cname = "getpwent")]
		public static Password get_entry ();
		[CCode (cname = "setpwent")]
		public static void set_entry ();
		[CCode (cname = "entpwent")]
		public static void end_entry ();
		[CCode (cname = "fgetpwent")]
		public static Password get_entry_by_stream (GLib.FileStream stream);
	}
	
	[CCode (cheader_filename = "signal.h")]
	namespace Signal
	{
		// signals defined in signal(7)
		[CCode (cname = "SIGHUP")]
		public const int HUP;
		[CCode (cname = "SIGINT")]
		public const int INT;
		[CCode (cname = "SIGQUIT")]
		public const int QUIT;
		[CCode (cname = "SIGILL")]
		public const int ILL;
		[CCode (cname = "SIGABRT")]
		public const int ABRT;
		[CCode (cname = "SIGFPE")]
		public const int FPE;
		[CCode (cname = "SIGKILL")]
		public const int KILL;
		[CCode (cname = "SIGSEGV")]
		public const int SEGV;
		[CCode (cname = "SIGPIPE")]
		public const int PIPE;
		[CCode (cname = "SIGALRM")]
		public const int ALRM;
		[CCode (cname = "SIGTERM")]
		public const int TERM;
		
		// dispositions defined in signal(2)
		[CCode (cname = "SIG_DFL")]
		public const int DFL;
		[CCode (cname = "SIG_IGN")]
		public const int IGN;
		
		public static delegate void Handler (int sig_num);
		
		// vala does not have overloading, so we simply create
		// to functions, one taking the handler and one taking
		// the value
		[CCode (cname = "signal")]
		public static void set_handler (int sig_num, Handler hnd);
		[CCode (cname = "signal")]
		public static void set_value (int sig_num, int disposition = DFL);
		
		[CCode (cname = "siginfo_t")]
		public struct Info
		{
			int si_signo;
			int si_errno;
			int si_code;
			// pid_t si_pid;
			long si_pid;
			// uid_t si_uid;
			long si_uid;
			int si_status;
			// clock_t si_utime;
			long si_utime;
			// clock_t si_stime;
			long si_stime;
			// sigval_t si_value;
			int si_value;
			int si_int;
			void* si_ptr;
			void* si_addr;
			int si_band;
			int si_fd;
		}

		public static delegate void ActionHandler (int sig_num, Info info, void* context);
		
		[CCode (cname = "struct sigaction")]
		public struct Action
		{
			public Handler sa_handler;
			public ActionHandler sa_sigaction;
			public int sa_mask;
			public int sa_flags;
		}
		
		[CCode (cname = "SA_NOCLDSTOP")]
		public const int NO_CLDSTOP;
		[CCode (cname = "SA_NOCLDWAIT")]
		public const int NO_CLDWAIT;
		[CCode (cname = "SA_RESETHAND")]
		public const int RESETHAND;
		[CCode (cname = "SA_ONSTACK")]
		public const int ONSTACK;
		[CCode (cname = "SA_RESTART")]
		public const int RESTART;
		[CCode (cname = "SA_NODEFER")]
		public const int NODEFER;
		[CCode (cname = "SA_SIGINFO")]
		public const int SIGINFO;
		
		[CCode (cname = "sigaction")]
		public static int set_action (int sig_num, Action act, out Action? old_act = null);
		[CCode (cname = "kill")]
		public static int kill (long pid, int sig);
		[CCode (cname = "killpg")]
		public static int kill_process_group (long pgrp, int sig);
		[CCode (cname = "raise")]
		public static int raise (int sig);
		[CCode (cname = "sigpause")]
		public static int pause (int sig);
		[CCode (cname = "sighold")]
		public static int hold (int sig);
		[CCode (cname = "sigignore")]
		public static int ignore (int sig);
		[CCode (cname = "sigrelse")]
		public static int relse (int sig);	
	}


	[CCode (cname="termios", cheader_filename = "termios.h")]
	public struct Termios
	{
		public uint c_iflag;
		public uint c_oflag;
		public uint c_cflag;
		public uint c_lflag;
		public uchar c_line;
		public weak uchar[] c_cc;
		public uint c_ispeed;
		public uint c_ospeed;
			
		[CCode (cname = "cfgetispeed")]
		public uint get_input_speed ();
		[CCode (cname = "cfgetospeed")]
		public uint get_output_speed ();
		[CCode (cname = "cfsetispeed")]
		public int set_input_speed (uint speed);
		[CCode (cname = "cfsetospeed")]
		public int set_output_speed (uint speed);
		[CCode (cname = "tcdrain")]
		public static int drain (int fd);
		[CCode (cname = "tcflow")]
		public static int flow (int fd, int action);
		[CCode (cname = "tcflush")]
		public static int flush (int fd, int queue_selector);
		[CCode (cname = "tcgetattr", instance_pos = -1)]
		public int get_attributes (int fd);
		[CCode (cname = "tcgetsid")]
		public static long get_session_id (int fd);
		[CCode (cname = "tcsendbreak")]
		public static int send_break (int fd, int duration);
		[CCode (cname = "tcsetattr", instance_pos = -1)]
		public int set_attribute (int fd, int optional_actions);
	}
			
	[CCode (lower_case_cprefix = "V", cheader_filename = "termios.h")]
	namespace CCIndex
	{
		public const int INTR;
		public const int QUIT;
		public const int ERASE;
		public const int KILL;
		public const int EOF;
		public const int MIN;
		public const int EOL;
		public const int TIME;
		public const int START;
		public const int STOP;
		public const int SUSP;
	}
		
	[CCode (lower_case_cprefix = "", cheader_filename = "termios.h")]
	namespace InputMode
	{
		public const uint BRKINT;
		public const uint ICRNL;
		public const uint IGNBRK;
		public const uint IGNCR;
		public const uint IGNPAR;
		public const uint INLCR;
		public const uint INPCK;
		public const uint ISTRIP;
		public const uint IXANY;
		public const uint IXOFF;
		public const uint IXON;
		public const uint PARMRK;
	}
	
	[CCode (lower_case_cprefix = "", cheader_filename = "termios.h")]
	namespace OutputMode
	{
		public const uint OPOST;
		public const uint ONLCR;
		public const uint OCRNL;
		public const uint ONOCR;
		public const uint ONLRET;
		public const uint OFILL;
		public const uint NLDLY;
		public const uint NL0;
		public const uint NL1;
		public const uint CRDLY;
		public const uint CR0;
		public const uint CR1;
		public const uint CR2;
		public const uint CR3;
		public const uint TABDLY;
		public const uint TAB0;
		public const uint TAB1;
		public const uint TAB2;
		public const uint TAB3;
		public const uint BSDLY;
		public const uint BS0;
		public const uint BS1;
		public const uint VTDLY;
		public const uint VT0;
		public const uint VT1;
		public const uint FFDLY;
		public const uint FF0;
		public const uint FF1;
	}
	
	[CCode (lower_case_cprefix = "", cheader_filename = "termios.h")]
	namespace BaudRate
	{
		public const uint B0;
		public const uint B50;
		public const uint B75;
		public const uint B110;
		public const uint B134;
		public const uint B150;
		public const uint B200;
		public const uint B300;
		public const uint B600;
		public const uint B1200;
		public const uint B1800;
		public const uint B2400;
		public const uint B4800;
		public const uint B9600;
		public const uint B19200;
		public const uint B38400;
	}
	
	[CCode (lower_case_cprefix = "", cheader_filename = "termios.h")]
	namespace ControlMode
	{
		public const uint CSIZE;
		public const uint CS5;
		public const uint CS6;
		public const uint CS7;
		public const uint CS8;
		public const uint CSTOPB;
		public const uint CREAD;
		public const uint PARENB;
		public const uint PARODD;
		public const uint HUPCL;
		public const uint CLOCAL;
	}
	
	[CCode (lower_case_cprefix = "", cheader_filename = "termios.h")]
	namespace LocalMode
	{
		public const uint ECHO;
		public const uint ECHOE;
		public const uint ECHOK;
		public const uint ECHONL;
		public const uint ICANON;
		public const uint IEXTEN;
		public const uint ISIG;
		public const uint NOFLSH;
		public const uint TOSTOP;
	}
	
	[CCode (lower_case_cprefix = "TCSA", cheader_filename = "termios.h")]
	namespace AttributeSelection
	{
		public const int NOW;
		public const int DRAIN;
		public const int FLUSH;
	}
	
	[CCode (lower_case_cprefix = "TC", cheader_filename = "termios.h")]
	namespace LineControl
	{
		public const int IFLUSH;
		public const int IOFLUSH;
		public const int OFLUSH;
		public const int IOFF;
		public const int ION;
		public const int OOFF;
		public const int OON;
	}
}