summaryrefslogtreecommitdiff
path: root/vapi/linux.vapi
blob: cb580308ff91855bb47c180f6638e2aa4f7f7e75 (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
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
/* linux.vapi
 *
 * Copyright (C) 2009-2021 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
 *
 * 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
 */

[CCode (cprefix = "", lower_case_cprefix = "")]
namespace Linux {

    /*
     * Console
     */
    [CCode (cprefix = "", lower_case_cprefix = "")]
    namespace Console {

        /* constants */

        [CCode (cheader_filename = "linux/kd.h")]
        public const int GIO_FONT;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int PIO_FONT;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int GIO_FONTX;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int PIO_FONTX;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int PIO_FONTRESET;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int GIO_CMAP;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int PIO_CMAP;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KIOCSOUND;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDMKTONE;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDGETLED;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDSETLED;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDGKBTYPE;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KB_84;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KB_101;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KB_OTHER;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDADDIO;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDDELIO;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDENABIO;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDDISABIO;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDSETMODE;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDGETMODE;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDMAPDISP;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDUNMAPDISP;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int E_TABSZ;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int GIO_SCRNMAP;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int PIO_SCRNMAP;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int GIO_UNISCRNMAP;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int PIO_UNISCRNMAP;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int GIO_UNIMAP;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int PIO_UNIMAP;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int PIO_UNIMAPCLR;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int UNI_DIRECT_BASE;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int UNI_DIRECT_MASK;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDGKBMODE;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDSKBMODE;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDGKBMETA;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDSKBMETA;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDGKBLED;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDSKBLED;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int K_NORMTAB;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int K_SHIFTTAB;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int K_ALTTAB;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int K_ALTSHIFTTAB;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDGKBSENT;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDSKBSENT;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDGKBDIACR;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDSKBDIACR;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDGKBDIACRUC;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDSKBDIACRUC;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDGETKEYCODE;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDSETKEYCODE;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDSIGACCEPT;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDKBDREP;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KDFONTOP;
        [CCode (cheader_filename = "linux/kd.h")]
        public const int KD_FONT_FLAG_DONT_RECALC;

        /* enums */

        [CCode (cprefix = "KD_FONT_OP_", has_type_id = false, cheader_filename = "linux/kd.h")]
        public enum FontOperationCode {
            SET,
            GET,
            SET_DEFAULT,
            COPY
        }

        [CCode (cprefix = "K_", has_type_id = false, cheader_filename = "linux/kd.h")]
        public enum KeyboardMode {
            RAW,
            XLATE,
            MEDIUMRAW,
            UNICODE
        }

        [CCode (cprefix = "K_", has_type_id = false, cheader_filename = "linux/kd.h")]
        public enum LedMode {
            SCROLLLOCK,
            NUMLOCK,
            CAPSLOCK
        }

        [CCode (cprefix = "LED_", has_type_id = false, cheader_filename = "linux/kd.h")]
        public enum LedType {
            SCR,
            NUM,
            CAP
        }

        [CCode (cprefix = "KD_", has_type_id = false, cheader_filename = "linux/kd.h")]
        public enum TerminalMode {
            TEXT,
            GRAPHICS
        }

        [CCode (cprefix = "K_", has_type_id = false, cheader_filename = "linux/kd.h")]
        public enum MetaMode {
            METABIT,
            ESCPREFIX
        }

        /* structs */

        [CCode (cname = "struct kbdiacr", has_type_id = false, cheader_filename = "linux/kd.h")]
        public struct Diacritic {
            public uchar diacr;
            public uchar base;
            public uchar result;
        }

        [CCode (cname = "struct kbdiacrs", has_type_id = false, cheader_filename = "linux/kd.h")]
        public struct Diacritics {
            public uint kb_cnt;
            public Diacritic kbdiacr[256];
        }

        [CCode (cname = "struct kbdiacruc", has_type_id = false, cheader_filename = "linux/kd.h")]
        public struct Diacruc {
            public uint diacr;
            public uint base;
            public uint result;
        }

        [CCode (cname = "struct kbdiacrsuc", has_type_id = false, cheader_filename = "linux/kd.h")]
        public struct Diacrucs {
            public uint kb_cnt;
            public Diacruc kbdiacruc[256];
        }

        [CCode (cname = "struct console_font", has_type_id = false, cheader_filename = "linux/kd.h")]
        public struct Font {
            public uint width;
            public uint height;
            public uint charcount;
            public uchar* data;
        }

        [CCode (cname = "struct consolefontdesc", has_type_id = false, cheader_filename = "linux/kd.h")]
        public struct FontDescription {
            public uint16 charcount;
            public uint16 charheight;
            public char* chardata;
        }

        [CCode (cname = "struct console_font_op", has_type_id = false, cheader_filename = "linux/kd.h")]
        public struct FontOperation {
            public FontOperationCode op;
            public uint flags;
            public uint width;
            public uint height;
            public uint charcount;
            public uchar* data;
        }

        [CCode (cname = "struct kbkeycode", has_type_id = false, cheader_filename = "linux/kd.h")]
        public struct KeyCode {
            public uint scancode;
            public uint keycode;
        }

        [CCode (cname = "struct kbentry", has_type_id = false, cheader_filename = "linux/kd.h")]
        public struct KeyboardEntry {
            public uchar kb_table;
            public uchar kb_index;
            public uint16 kb_value;
        }

        [CCode (cname = "struct kbsentry", has_type_id = false, cheader_filename = "linux/kd.h")]
        public struct KeyboardEntries {
            public uchar kb_func;
            public uchar kb_string[512];
        }

        [CCode (cname = "struct kbd_repeat", has_type_id = false, cheader_filename = "linux/kd.h")]
        public struct KeyRepeat {
            public int delay;
            public int period;
        }

        [CCode (cname = "struct unipair", has_type_id = false, cheader_filename = "linux/kd.h")]
        public struct UniPair {
            public uint16 unicode;
            public uint16 fontpos;
        }

        [CCode (cname = "struct unimapdesc", has_type_id = false, cheader_filename = "linux/kd.h")]
        public struct UniMapDesc {
            public uint16 entry_ct;
            [CCode (array_length_cname = "entry_ct")]
            public UniPair[] entries;
        }

        [CCode (cname = "struct unimapinit", has_type_id = false, cheader_filename = "linux/kd.h")]
        public struct UniMapInit {
            public uint16 advised_hashsize;
            public uint16 advised_hashstep;
            public uint16 advised_hashlevel;
        }
    }

    /*
     * EventFd
     */
    [CCode (cprefix = "EFD_", has_type_id = false, cheader_filename = "sys/eventfd.h")]
    public enum EventFdFlags {
        CLOEXEC,
        NONBLOCK
    }

    [CCode (cheader_filename = "sys/eventfd.h")]
    public int eventfd (uint count = 0, EventFdFlags flags = 0);
    public int eventfd_read (int fd, out uint64 value);
    public int eventfd_write (int fd, uint64 value);

    /*
     * Epoll
     */
    [CCode (cprefix = "EPOLL_", has_type_id = false, cheader_filename = "sys/epoll.h")]
    public enum EpollFdFlags {
        CLOEXEC,
    }

    [CCode (cheader_filename = "sys/epoll.h", has_type_id = false, cname = "union epoll_data")]
    public struct EpollData {
        public void* ptr;
        public int fd;
        public uint32 u32;
        public uint64 u64;
    }

    [CCode (cheader_filename = "sys/epoll.h", has_type_id = false, cname = "struct epoll_event")]
    public struct EpollEvent {
        public uint32 events;
        public EpollData data;
    }

    [CCode (cheader_filename = "sys/epoll.h")]
    public int epoll_create (int size = 0);
    [CCode (cheader_filename = "sys/epoll.h")]
    public int epoll_create1 (int flags = 0);
    [CCode (cheader_filename = "sys/epoll.h")]
    public int epoll_wait (int epfd, EpollEvent[] events, int timeout);
    [CCode (cheader_filename = "sys/epoll.h")]
    public int epoll_pwait (int epfd, EpollEvent[] events, int timeout, Posix.sigset_t? sigmask);
    [CCode (cheader_filename = "sys/epoll.h")]
    public int epoll_ctl (int epfd, int op, int fd, EpollEvent? ev);
    [CCode (cheader_filename = "sys/epoll.h")]
    public const int EPOLLIN;
    [CCode (cheader_filename = "sys/epoll.h")]
    public const int EPOLLOUT;
    [CCode (cheader_filename = "sys/epoll.h")]
    public const int EPOLLERR;
    [CCode (cheader_filename = "sys/epoll.h")]
    public const int EPOLLHUP;
    [CCode (cheader_filename = "sys/epoll.h")]
    public const int EPOLLET;
    [CCode (cheader_filename = "sys/epoll.h")]
    public const int EPOLL_CTL_ADD;
    [CCode (cheader_filename = "sys/epoll.h")]
    public const int EPOLL_CTL_MOD;
    [CCode (cheader_filename = "sys/epoll.h")]
    public const int EPOLL_CTL_DEL;

    /*
     * Framebuffer
     */
    [CCode (cprefix = "", lower_case_cprefix = "")]
    namespace Framebuffer {

        /* ioctls */
        [CCode (cheader_filename = "linux/fb.h")]
        public const int FBIOGET_VSCREENINFO;
        [CCode (cheader_filename = "linux/fb.h")]
        public const int FBIOPUT_VSCREENINFO;
        [CCode (cheader_filename = "linux/fb.h")]
        public const int FBIOGET_FSCREENINFO;
        [CCode (cheader_filename = "linux/fb.h")]
        public const int FBIOGETCMAP;
        [CCode (cheader_filename = "linux/fb.h")]
        public const int FBIOPUTCMAP;
        [CCode (cheader_filename = "linux/fb.h")]
        public const int FBIOPAN_DISPLAY;
        [CCode (cheader_filename = "linux/fb.h")]
        public const int FBIO_CURSOR;
        [CCode (cheader_filename = "linux/fb.h")]
        public const int FBIOGET_MONITORSPEC;
        [CCode (cheader_filename = "linux/fb.h")]
        public const int FBIOPUT_MONITORSPEC;
        [CCode (cheader_filename = "linux/fb.h")]
        public const int FBIOSWITCH_MONIBIT;
        [CCode (cheader_filename = "linux/fb.h")]
        public const int FBIOGET_CON2FBMAP;
        [CCode (cheader_filename = "linux/fb.h")]
        public const int FBIOPUT_CON2FBMAP;
        [CCode (cheader_filename = "linux/fb.h")]
        public const int FBIOBLANK;
        [CCode (cheader_filename = "linux/fb.h")]
        public const int FBIOGET_VBLANK;
        [CCode (cheader_filename = "linux/fb.h")]
        public const int FBIO_ALLOC;
        [CCode (cheader_filename = "linux/fb.h")]
        public const int FBIO_FREE;
        [CCode (cheader_filename = "linux/fb.h")]
        public const int FBIOGET_GLYPH;
        [CCode (cheader_filename = "linux/fb.h")]
        public const int FBIOGET_HWCINFO;
        [CCode (cheader_filename = "linux/fb.h")]
        public const int FBIOPUT_MODEINFO;
        [CCode (cheader_filename = "linux/fb.h")]
        public const int FBIOGET_DISPINFO;

        /* enums */

        [CCode (cname = "guint32", cprefix = "FB_TYPE_", has_type_id = false, cheader_filename = "linux/fb.h")]
        public enum Type {
            PACKED_PIXELS,
            PLANES,
            INTERLEAVED_PLANES,
            TEXT,
            VGA_PLANES
        }

        [CCode (cname = "guint32", cprefix = "FB_ACTIVATE_", has_type_id = false, cheader_filename = "linux/fb.h")]
        public enum Activate {
            NOW,
            NXTOPEN,
            TEST,
            MASK,
            VBL,
            [CCode (cname = "FB_CHANGE_CMAP_VBL")]
            CHANGE_CMAP_VBL,
            ALL,
            FORCE,
            INV_MODE
        }

        [CCode (cname = "guint32", cprefix = "FB_ACCEL_", has_type_id = false, cheader_filename = "linux/fb.h")]
        public enum Accel {
            NONE
        }

        [CCode (cname = "guint32", cprefix = "FB_AUX_", has_type_id = false, cheader_filename = "linux/fb.h")]
        public enum Aux {
             TEXT_MDA,
             TEXT_CGA,
             TEXT_S3_MMIO,
             TEXT_MGA_STEP16,
             TEXT_MGA_STEP8,
             TEXT_SVGA_GROUP,
             TEXT_SVGA_MASK,
             TEXT_SVGA_STEP2,
             TEXT_SVGA_STEP4,
             TEXT_SVGA_STEP8,
             TEXT_SVGA_STEP16,
             TEXT_SVGA_LAST,
             VGA_PLANES_VGA4,
             VGA_PLANES_CFB4,
             VGA_PLANES_CFB8
        }

        [CCode (cprefix = "FB_BLANK_", has_type_id = false, cheader_filename = "linux/fb.h")]
        public enum Blank {
            UNBLANK,
            NORMAL,
            VSYNC_SUSPEND,
            HSYNC_SUSPEND,
            POWERDOWN
        }

        [CCode (cprefix = "FB_CUR_", has_type_id = false, cheader_filename = "linux/fb.h")]
        public enum Cur {
            SETIMAGE,
            SETPOS,
            SETHOT,
            SETCMAP,
            SETSHAPE,
            SETSIZE,
            SETALL
        }

        [CCode (cname = "guint32", cprefix = "ROP_", has_type_id = false, cheader_filename = "linux/fb.h")]
        public enum Rop {
            COPY,
            XOR
        }

        [CCode (cprefix = "FB_ROTATE_", has_type_id = false, cheader_filename = "linux/fb.h")]
        public enum Rotate {
            UR,
            CW,
            UD,
            CCW
        }

        [CCode (cname = "guint32", cprefix = "FB_SYNC_", has_type_id = false, cheader_filename = "linux/fb.h")]
        public enum Sync {
            HOR_HIGH_ACT,
            VERT_HIGH_ACT,
            EXT,
            COMP_HIGH_ACT,
            BROADCAST,
            ON_GREEN
        }

        [CCode (cname = "guint32", cprefix = "FB_VISUAL_", has_type_id = false, cheader_filename = "linux/fb.h")]
        public enum Visual {
            MONO01,
            MONO10,
            TRUECOLOR,
            PSEUDOCOLOR,
            DIRECTCOLOR,
            STATIC_PSEUDOCOLOR
        }

        [CCode (cname = "guint32", cprefix = "FB_VMODE_", has_type_id = false, cheader_filename = "linux/fb.h")]
        public enum Vmode {
            NONINTERLACED,
            INTERLACED,
            DOUBLE,
            ODD_FLD_FIRST,
            MASK,
            YWRAP,
            SMOOTH_XPAN,
            CONUPDATE
        }

        /* structures */

        [CCode (cname = "struct fb_bitfield", has_type_id = false, cheader_filename = "linux/fb.h")]
        public struct BitField {
            public uint32 offset;
            public uint32 length;
            public uint32 msb_right;
        }

        [CCode (cname = "struct fb_cmap", has_type_id = false, cheader_filename = "linux/fb.h")]
        public struct Cmap {
            public uint32 start;
            public uint32 len;
            public uint16* red;
            public uint16* green;
            public uint16* blue;
            public uint16* transp;
        }

        [CCode (cname = "struct fb_con2fbmap", has_type_id = false, cheader_filename = "linux/fb.h")]
        public struct Con2FbMap {
            public uint32 console;
            public uint32 framebuffer;
        }

        [CCode (cname = "struct fbcurpos", has_type_id = false, cheader_filename = "linux/fb.h")]
        public struct CurPos {
            public uint16 x;
            public uint16 y;
        }

        [CCode (cname = "struct fb_cursor", has_type_id = false, cheader_filename = "linux/fb.h")]
        public struct Cursor {
            public uint16 set;
            public uint16 enable;
            public uint16 rop;
            public unowned string mask;
            public CurPos hot;
            public Image image;
        }

        [CCode (cname = "struct fb_copyarea", has_type_id = false, cheader_filename = "linux/fb.h")]
        public struct CopyArea {
            public uint32 dx;
            public uint32 dy;
            public uint32 width;
            public uint32 height;
            public uint32 sx;
            public uint32 sy;
        }

        [CCode (cname = "struct fb_fillrect", has_type_id = false, cheader_filename = "linux/fb.h")]
        public struct FillRect {
            public uint32 dx;
            public uint32 dy;
            public uint32 width;
            public uint32 height;
            public uint32 color;
            public Rop rop;
        }

        [CCode (cname = "struct fb_image", has_type_id = false, cheader_filename = "linux/fb.h")]
        public struct Image {
            public uint32 dx;
            public uint32 dy;
            public uint32 width;
            public uint32 height;
            public uint32 fg_color;
            public uint32 bg_color;
            public uint8 depth;
            public char* data;
            public Cmap cmap;
        }

        [CCode (cname = "struct fb_fix_screeninfo", has_type_id = false, cheader_filename = "linux/fb.h")]
        public struct FixScreenInfo {
            public char id[16];
            public long smem_start;
            public uint32 smem_len;
            public Type type;
            public Aux type_aux;
            public Visual visual;
            public uint16 xpanstep;
            public uint16 ypanstep;
            public uint16 ywrapstep;
            public uint32 line_length;
            public long mmio_start;
            public uint32 mmio_len;
            public Accel accel;
        }

        [CCode (cname = "struct fb_var_screeninfo", has_type_id = false, cheader_filename = "linux/fb.h")]
        public struct VarScreenInfo {
            public uint32 xres;
            public uint32 yres;
            public uint32 xres_virtual;
            public uint32 yres_virtual;
            public uint32 xoffset;
            public uint32 yoffset;
            public uint32 bits_per_pixel;
            public uint32 grayscale;
            public BitField red;
            public BitField green;
            public BitField blue;
            public BitField transp;
            public uint32 nonstd;
            public Activate activate;
            public uint32 height;
            public uint32 width;
            public uint32 pixclock;
            public uint32 left_margin;
            public uint32 right_margin;
            public uint32 upper_margin;
            public uint32 lower_margin;
            public uint32 hsync_len;
            public uint32 vsync_len;
            public Sync sync;
            public Vmode vmode;
            public uint32 rotate;
        }

        [CCode (cname = "struct fb_vblank", has_type_id = false, cheader_filename = "linux/fb.h")]
        public struct Vblank {
            public uint32 flags;
            public uint32 count;
            public uint32 vcount;
            public uint32 hcount;
        }

        [CCode (lower_case_cprefix = "omapfb_", has_type_id = false, cheader_filename = "linux/omapfb.h")]
        namespace OMAP {
            [CCode (cname = "int", has_type_id = false, cprefix = "OMAPFB_")]
            public enum IOCTL {
                MIRROR,
                SYNC_GFX,
                VSYNC,
                SET_UPDATE_MODE,
                GET_CAPS,
                GET_UPDATE_MODE,
                LCD_TEST,
                CTRL_TEST,
                UPDATE_WINDOW_OLD,
                SET_COLOR_KEY,
                GET_COLOR_KEY,
                SETUP_PLANE,
                QUERY_PLANE,
                UPDATE_WINDOW,
                SETUP_MEM,
                QUERY_MEM,
                WAITFORVSYNC,
                MEMORY_READ,
                GET_OVERLAY_COLORMODE,
                WAITFORGO,
                GET_VRAM_INFO,
                SET_TEARSYNC
            }

            [Flags, CCode (cname = "int", has_type_id = false, cprefix = "OMAPFB_CAPS_")]
            public enum Caps {
                GENERIC_MASK,
                LCDC_MASK,
                PANEL_MASK,

                MANUAL_UPDATE,
                TEARSYNC,
                PLANE_RELOCATE_MEM,
                PLANE_SCALE,
                WINDOW_PIXEL_DOUBLE,
                WINDOW_SCALE,
                WINDOW_OVERLAY,
                WINDOW_ROTATE,
                SET_BACKLIGHT,
            }

            [Flags, CCode (cname = "int", has_type_id = false, cprefix = "OMAPFB_FORMAT_FLAG_")]
            public enum Format {
                [CCode (cname = "OMAPFB_FORMAT_MASK")]
                MASK,

                DOUBLE,
                TEARSYNC,
                FORCE_VSYNC,
                ENABLE_OVERLAY,
                DISABLE_OVERLAY
            }

            [CCode (cname = "int", has_type_id = false, cprefix = "OMAPFB_MEMTYPE_")]
            public enum MemType {
                SDRAM,
                SRAM,
                MAX
            }

            [CCode (cname = "enum omapfb_color_format", has_type_id = false, cprefix = "OMAPFB_COLOR_")]
            public enum ColorFormat {
                RGB565,
                YUV422,
                YUV420,
                CLUT_8BPP,
                CLUT_4BPP,
                CLUT_2BPP,
                CLUT_1BPP,
                RGB444,
                YUY422,

                ARGB16,
                RGB24U,
                RGB24P,
                ARGB32,
                RGBA32,
                RGBX32,
            }

            [CCode (cname = "struct omapfb_update_window", has_type_id = false)]
            public struct UpdateWindow {
                public uint32 x;
                public uint32 y;
                public uint32 width;
                public uint32 height;
                public uint32 format;
                public uint32 out_x;
                public uint32 out_y;
                public uint32 out_width;
                public uint32 out_height;
            }

            [CCode (cname = "enum omapfb_plane", has_type_id = false, cprefix = "OMAPFB_PLANE_")]
            public enum Plane {
                GFX,
                VID1,
                VID2
            }

            [CCode (cname = "enum omapfb_channel_out", has_type_id = false, cprefix = "OMAPFB_CHANNEL_OUT_")]
            public enum ChannelOut {
                LCD,
                DIGIT
            }

            [CCode (cname = "struct omapfb_plane_info", has_type_id = false)]
            public struct PlaneInfo {
                public uint32 pos_x;
                public uint32 pos_y;
                public uint8 enabled;
                public uint8 channel_out;
                public uint8 mirror;
                public uint32 out_width;
                public uint32 out_height;
            }

            [CCode (cname = "struct omapfb_mem_info", has_type_id = false)]
            public struct MemInfo {
                public uint32 size;
                public uint8 type;
            }

            [CCode (cname = "struct omapfb_caps", has_type_id = false)]
            public struct Capabilities {
                public uint32 ctrl;
                public uint32 plane_color;
                public uint32 wnd_color;
            }

            [CCode (cname = "enum omapfb_color_key_type", has_type_id = false, cprefix = "OMAPFB_COLOR_KEY_")]
            public enum ColorKeyType {
                DISABLED,
                GFX_DST,
                VID_SRC
            }

            [CCode (cname = "struct omapfb_color_key", has_type_id = false)]
            public struct ColorKey {
                public uint8 channel_out;
                public uint32 background;
                public uint32 trans_key;
                public uint8 key_type;
            }

            [CCode (cname = "enum omapfb_update_mode", has_type_id = false)]
            public enum UpdateMode {
                [CCode (cname = "OMAPFB_UPDATE_DISABLED")]
                DISABLED,
                [CCode (cname = "OMAPFB_AUTO_UPDATE")]
                AUTO,
                [CCode (cname = "OMAPFB_MANUAL_UPDATE")]
                MANUAL
            }

            [CCode (cname = "struct omapfb_memory_read", has_type_id = false)]
            public struct MemoryRead {
                public uint16 x;
                public uint16 y;
                public uint16 w;
                public uint16 h;
                public size_t buffer_size;
                public void* buffer;
            }

            [CCode (cname = "struct omapfb_ovl_colormode", has_type_id = false)]
            public struct OvlColorMode {
                public uint8 overlay_idx;
                public uint8 mode_idx;
                public uint32 bits_per_pixel;
                public uint32 nonstd;
                public Framebuffer.BitField red;
                public Framebuffer.BitField green;
                public Framebuffer.BitField blue;
                public Framebuffer.BitField transp;
            }

            [CCode (cname = "struct omapfb_vram_info", has_type_id = false)]
            public struct VRamInfo {
                public uint32 total;
                public uint32 free;
                public uint32 largest_free_block;
            }

            [CCode (cname = "struct omapfb_tearsync_info", has_type_id = false)]
            public struct TearSyncInfo {
                public uint8 enabled;
                public uint16 line;
            }
        }
    }

    // Non-Posix file control constants, -D _GNU_SOURCE
    [CCode (cheader_filename = "fcntl.h", feature_test_macro = "_GNU_SOURCE")]
    public const int O_DIRECT;
    [CCode (cheader_filename = "fcntl.h", feature_test_macro = "_GNU_SOURCE")]
    public const int O_NOATIME;
    [CCode (cheader_filename = "fcntl.h", feature_test_macro = "_GNU_SOURCE")]
    public const int O_PATH;
    [CCode (cheader_filename = "fcntl.h", feature_test_macro = "_GNU_SOURCE")]
    public const int O_TMPFILE;

    /*
     * Gsm
     */
    namespace Gsm {

        [CCode (cname = "GSMIOC_GETCONF", cheader_filename = "linux/gsmmux.h")]
        public const int GSMIOC_GETCONF;
        [CCode (cname = "GSMIOC_SETCONF", cheader_filename = "linux/gsmmux.h")]
        public const int GSMIOC_SETCONF;

        [CCode (cname = "struct gsm_config", has_type_id = false, cheader_filename = "linux/gsmmux.h")]
        public struct Config {
            public uint adaption;
            public uint encapsulation;
            public uint initiator;
            public uint t1;
            public uint t2;
            public uint t3;
            public uint n2;
            public uint mru;
            public uint mtu;
            public uint k;
            public uint i;
        }
    }

    /*
     * I2C and System Management Bus
     */
    [CCode (cprefix = "I2C_", lower_case_cprefix = "i2c_")]
    namespace I2C {

        [CCode (cheader_filename = "linux/i2c-dev.h")]
        const int RETRIES;
        [CCode (cheader_filename = "linux/i2c-dev.h")]
        const int TIMEOUT;
        [CCode (cheader_filename = "linux/i2c-dev.h")]
        const int SLAVE;
        [CCode (cheader_filename = "linux/i2c-dev.h")]
        const int SLAVE_FORCE;
        [CCode (cheader_filename = "linux/i2c-dev.h")]
        const int TENBIT;
        [CCode (cheader_filename = "linux/i2c-dev.h")]
        const int FUNCS;
        [CCode (cheader_filename = "linux/i2c-dev.h")]
        const int RDWR;
        [CCode (cheader_filename = "linux/i2c-dev.h")]
        const int PEC;
        [CCode (cname = "SMBUS", cheader_filename = "linux/i2c-dev.h")]
        const int SMBUS_TRANSFER;

        [CCode (cprefix = "", lower_case_cprefix = "i2c_smbus_")]
        namespace SMBUS {
            int32 write_byte_data_masked (int file, uint8 mask, uint8 command, uint8 value)
            {
                int32 result = read_byte_data (file, command);
                if (result == -1)
                {
                    return -1;
                }
                uint8 oldvalue = (uint8) result & 0xff;
                return write_byte_data (file, command, oldvalue | (value & mask) );
            }

            //[CCode (cheader_filename = "linux/i2c.h")]
            //int32 access(int file, char read_write, uint8 command, int size, union data *data);
            [CCode (cheader_filename = "i2c.h")]
            int32 write_quick (int file, uint8 value);
            [CCode (cheader_filename = "i2c.h")]
            int32 read_byte (int file);
            [CCode (cheader_filename = "i2c.h")]
            int32 write_byte (int file, uint8 value);
            [CCode (cheader_filename = "i2c.h")]
            int32 read_byte_data (int file, uint8 command);
            [CCode (cheader_filename = "i2c.h")]
            int32 write_byte_data (int file, uint8 command, uint8 value);
            [CCode (cheader_filename = "i2c.h")]
            int32 read_word_data (int file, uint8 command);
            [CCode (cheader_filename = "i2c.h")]
            int32 write_word_data (int file, uint8 command, uint16 value);
            [CCode (cheader_filename = "i2c.h")]
            int32 process_call (int file, uint8 command, uint16 value);
            [CCode (cheader_filename = "i2c.h")]
            int32 read_block_data (int file, uint8 command, [CCode (array_length=false)] uint8[] values);
            [CCode (cheader_filename = "i2c.h")]
            int32 write_block_data (int file, uint8 command, [CCode (array_length_pos = 2.3)] uint8[] values);
            [CCode (cheader_filename = "i2c.h")]
            int32 read_i2c_block_data (int file, uint8 command, [CCode (array_length_pos = 2.3)] uint8[] values);
            [CCode (cheader_filename = "i2c.h")]
            int32 write_i2c_block_data (int file, uint8 command, [CCode (array_length_pos = 2.3)] uint8[] values);
            [CCode (cheader_filename = "i2c.h")]
            int32 block_process_call (int file, uint8 command, [CCode (array_length_pos = 2.3)] uint8[] values);
        }
    }

    /*
     * Inotify
     */
    [CCode (cname = "struct inotify_event", has_type_id = false, cheader_filename = "sys/inotify.h")]
    public struct InotifyEvent {
        public int wd;
        public uint32 mask;
        public uint32 cookie;
        public uint32 len;
        public char name[0];
    }

    [Flags, CCode (cname = "int", cprefix = "IN_", has_type_id = false, cheader_filename = "sys/inotify.h")]

    public enum InotifyFlags {
        CLOEXEC,
        NONBLOCK
    }

    [Flags, CCode (cname = "int", cprefix = "IN_", has_type_id = false, cheader_filename = "sys/inotify.h")]
    public enum InotifyMaskFlags {
        ACCESS,
        ATTRIB,
        CLOSE,
        CLOSE_WRITE,
        CLOSE_NOWRITE,
        CREATE,
        DELETE,
        DELETE_SELF,
        MODIFY,
        MOVE,
        MOVE_SELF,
        MOVED_FROM,
        MOVED_TO,
        OPEN,
        DONT_FOLLOW,
        MASK_ADD,
        ONESHOT,
        ONLYDIR,
        IGNORED,
        ISDIR,
        Q_OVERFLOW,
        UNMOUNT
    }

    [CCode (cname = "inotify_init1", cheader_filename = "sys/inotify.h")]
    public int inotify_init (InotifyFlags flags = 0);
    public int inotify_add_watch (int fd, string pathname, InotifyMaskFlags mask);
    public int inotify_rm_watch (int fd, int wd);

    /*
     * RfKill
     */
    [CCode (cname = "struct rfkill_event", has_type_id = false, cheader_filename = "linux/rfkill.h")]
    public struct RfKillEvent {
        public uint32 idx;
        public RfKillType type;
        public RfKillOp op;
        public uint8 soft;
        public uint8 hard;
    }

    [CCode (cname = "guint8", cprefix = "RFKILL_OP_", has_type_id = false, cheader_filename = "linux/rfkill.h")]
    public enum RfKillOp {
        ADD,
        DEL,
        CHANGE,
        CHANGE_ALL
    }

    [CCode (cname = "guint8", cprefix = "RFKILL_STATE_", has_type_id = false, cheader_filename = "linux/rfkill.h")]
    public enum RfKillState {
        SOFT_BLOCKED,
        UNBLOCKED,
        HARD_BLOCKED
    }

    [CCode (cname = "guint8", cprefix = "RFKILL_TYPE_", has_type_id = false, cheader_filename = "linux/rfkill.h")]
    public enum RfKillType {
        ALL,
        WLAN,
        BLUETOOTH,
        UWB,
        WIMAX,
        WWAN,
        GPS,
        FM,
        NFC
    }

    /*
     * SocketCAN
     */
    [CCode (cheader_filename = "sys/socket.h")]
    public const int AF_CAN;
    [CCode (cheader_filename = "linux/can.h")]
    public const int CAN_RAW;
    [CCode (cheader_filename = "linux/can.h")]
    public const int CAN_BCM;
    [CCode (cheader_filename = "linux/can.h")]
    public const int CAN_TP16;
    [CCode (cheader_filename = "linux/can.h")]
    public const int CAN_TP20;
    [CCode (cheader_filename = "linux/can.h")]
    public const int CAN_MCNET;
    [CCode (cheader_filename = "linux/can.h")]
    public const int CAN_ISOTP;
    [CCode (cheader_filename = "linux/can.h")]
    public const int CAN_J1939;
    [CCode (cheader_filename = "linux/can.h")]
    public const int CAN_MAX_DLEN;
    [CCode (cheader_filename = "linux/can.h")]
    public const int CANFD_MAX_DLEN;

    [CCode (cname = "guint32", cprefix = "CAN_RAW_", has_type_id = false, cheader_filename = "linux/can/raw.h")]
    public enum CanRawOption {
        FILTER,
        ERR_FILTER,
        LOOPBACK,
        RECV_OWN_MSGS,
        FD_FRAMES,
        JOIN_FILTERS,
    }
    [CCode (cname = "struct can_filter", has_type_id = false, cheader_filename = "linux/can.h", destroy_function = "")]
    public struct CanFilter {
        uint32 can_id;
        uint32 can_mask;
    }
    [CCode (cname = "struct can_frame", has_type_id = false, cheader_filename = "linux/can.h", destroy_function = "")]
    public struct CanFrame {
        uint32 can_id;
        uint8 can_dlc;
        uint8 data[8];
    }
    [CCode (cname = "struct canfd_frame", has_type_id = false, cheader_filename = "linux/can.h", destroy_function = "")]
    public struct CanFdFrame {
        uint32 can_id;
        uint8 len;
        uint8 flags;
        uint8 data[64];
    }
    [CCode (cname = "struct tp", has_type_id = false, cheader_filename = "linux/can.h", destroy_function = "")]
    public struct CanTransportAddress {
        uint32 rx_id;
        uint32 tx_id;
    }
    [CCode (cname = "struct sockaddr_can", has_type_id = false, cheader_filename = "linux/can.h", destroy_function = "")]
    public struct SockAddrCan {
        int can_family;
        int can_ifindex;
        [CCode (cname = "can_addr.tp")]
        CanTransportAddress tp;
    }
    [CCode (cheader_filename = "linux/can/raw.h")]
    public const int SOL_CAN_RAW;

    /* ISOTP */
    [CCode (cheader_filename = "linux/can/isotp.h")]
    public const int SOL_CAN_ISOTP;

    [CCode (cname = "guint32", cprefix = "CAN_ISOTP_", has_type_id = false, cheader_filename = "linux/can/isotp.h")]
    public enum CanIsotpFlags {
        LISTEN_MODE,
        EXTEND_ADDR,
        TX_PADDING,
        RX_PADDING,
        CHK_PAD_LEN,
        CHK_PAD_DATA,
        HALF_DUPLEX,
        FORCE_TXSTMIN,
        FORCE_RXSTMIN,
        RX_EXT_ADDR,
        WAIT_TX_DONE,
        SF_BROADCAST,
    }

    [CCode (cname = "guint32", cprefix = "CAN_ISOTP_", has_type_id = false, cheader_filename = "linux/can/isotp.h")]
    public enum CanIsotpOptionType {
        OPTS,
        RECV_FC,
        TX_STMIN,
        RX_STMIN,
        LL_OPTS,
    }
    [CCode (cname = "struct can_isotp_options", has_type_id = false, cheader_filename = "linux/can/isotp.h", destroy_function = "")]
    public struct CanIsotpOptions {
        CanIsotpFlags flags;
        uint32 frame_txtime;
        uint8 ext_address;
        uint8 txpad_content;
        uint8 rxpad_content;
        uint8 rx_ext_address;
    }
    [CCode (cname = "struct can_isotp_fc_options", has_type_id = false, cheader_filename = "linux/can/isotp.h", destroy_function = "")]
    public struct CanIsotpFlowControlOptions {
        uint8 bs;
        uint8 stmin;
        uint8 wftmax;
    }
    [CCode (cname = "struct can_isotp_ll_options", has_type_id = false, cheader_filename = "linux/can/isotp.h", destroy_function = "")]
    public struct CanIsotpLowLevelOptions {
        uint8 mtu;
        uint8 tx_dl;
        uint8 tx_flags;
    }

    /*
     * SignalFd
     */
    [CCode (cprefix = "SFD_", has_type_id = false, cheader_filename = "sys/signalfd.h")]
    public enum SignalFdFlags {
        CLOEXEC,
        NONBLOCK
    }

    [CCode (cheader_filename = "sys/signalfd.h")]
    public int signalfd (int fd, Posix.sigset_t mask, SignalFdFlags flags = 0);

    /*
     * Misc non-posix additions
     */
    [CCode (cheader_filename = "dirent.h", has_type_id = false)]
    public enum DirEntType {
        DT_UNKNOWN,
        DT_FIFO,
        DT_CHR,
        DT_DIR,
        DT_BLK,
        DT_REG,
        DT_LNK,
        DT_SOCK,
        DT_WHT
    }

    [CCode (cheader_filename = "errno.h", feature_test_macro = "_GNU_SOURCE")]
    public const string program_invocation_name;
    [CCode (cheader_filename = "errno.h", feature_test_macro = "_GNU_SOURCE")]
    public const string program_invocation_short_name;

    [Version (deprecated_since = "vala-0.26", replacement = "Backtrace.get"), CCode (cheader_filename = "execinfo.h")]
    public int backtrace (void* buffer, int size);

    [Version (deprecated_since = "vala-0.26", replacement = "Backtrace.symbols"), CCode (cheader_filename = "execinfo.h", array_length = false)]
    public (unowned string)[]? backtrace_symbols (void* buffer, int size);

    [Version (deprecated_since = "vala-0.26", replacement = "Backtrace.symbols_fd"), CCode (cheader_filename = "execinfo.h")]
    public void backtrace_symbols_fd (void* buffer, int size, int fd);

    namespace Backtrace {
      [CCode (cname = "backtrace", cheader_filename = "execinfo.h")]
      public int @get (void*[] buffer);
      [CCode (cname = "backtrace_symbols", cheader_filename = "execinfo.h", array_length = false)]
      private (unowned string)[]? _symbols (void*[] buffer);
      [CCode (cname = "_vala_backtrace_symbols")]
      public (unowned string)[]? symbols (void*[] buffer) {
        (unowned string)[]? s = _symbols (buffer);
        s.length = buffer.length;
        return s;
      }
      [CCode (cheader_filename = "execinfo.h")]
      public void symbols_fd (void*[] buffer, int fd);
    }

    [CCode (cheader_filename = "signal.h")]
    public void psiginfo (Posix.siginfo_t pinfo, string message);

    [CCode (cheader_filename = "unistd.h", feature_test_macro = "_GNU_SOURCE")]
    public int dup3 (int oldfd, int newfd, int flags);

    [CCode (cheader_filename = "sys/types.h,unistd.h")]
    public int getgroups ([CCode (array_length_pos = 0.9)] Posix.gid_t[]? list = null);
    [CCode (cheader_filename = "unistd.h", feature_test_macro = "_GNU_SOURCE")]
    public int getresgid (out Posix.gid_t rgid, out Posix.gid_t egid, out Posix.gid_t sgid);
    [CCode (cheader_filename = "unistd.h", feature_test_macro = "_GNU_SOURCE")]
    public int getresuid (out Posix.uid_t ruid, out Posix.uid_t euid, out Posix.uid_t suid);
    [CCode (cheader_filename = "sys/types.h,grp.h,unistd.h")]
    public int setgroups ([CCode (array_length_pos = 0.9)] Posix.gid_t[] list);
    [CCode (cheader_filename = "unistd.h", feature_test_macro = "_GNU_SOURCE")]
    public int setresgid (Posix.gid_t rgid, Posix.gid_t egid, Posix.gid_t sgid);
    [CCode (cheader_filename = "unistd.h", feature_test_macro = "_GNU_SOURCE")]
    public int setresuid (Posix.uid_t ruid, Posix.uid_t euid, Posix.uid_t suid);

    [CCode (cheader_filename = "unistd.h")]
    public int sethostname (string name, size_t len);

    // additional sysconf(3) constants
    [CCode (cheader_filename = "unistd.h")]
    public const int _SC_PHYS_PAGES;
    [CCode (cheader_filename = "unistd.h")]
    public const int _SC_AVPHYS_PAGES;
    [CCode (cheader_filename = "unistd.h")]
    public const int _SC_NPROCESSORS_CONF;
    [CCode (cheader_filename = "unistd.h")]
    public const int _SC_NPROCESSORS_ONLN;

    [CCode (cheader_filename = "arpa/inet.h")]
    public int inet_aton (string cp, out Posix.InAddr addr);

    [CCode (cheader_filename = "sys/ioctl.h", sentinel = "")]
    public int ioctl (int fd, int request, ...);

    [CCode (cname = "makedev", cheader_filename = "sys/types.h")]
    public Posix.dev_t makedev (int maj, int min);
    [CCode (cname = "major", cheader_filename = "sys/types.h")]
    public int major (Posix.dev_t dev);
    [CCode (cname = "minor", cheader_filename = "sys/types.h")]
    public int minor (Posix.dev_t dev);

    [CCode (cname = "unsigned long int", cprefix = "MS_", has_type_id = false, cheader_filename = "sys/mount.h,linux/fs.h")]
    public enum MountFlags {
        RDONLY,
        NOSUID,
        NODEV,
        NOEXEC,
        SYNCHRONOUS,
        REMOUNT,
        MANDLOCK,
        DIRSYNC,
        NOATIME,
        NODIRATIME,
        BIND,
        MOVE,
        REC,
        SILENT,
        POSIXACL,
        UNBINDABLE,
        PRIVATE,
        SLAVE,
        SHARED,
        RELATIME,
        KERNMOUNT,
        I_VERSION,
        STRICTATIME,
        BORN,
        ACTIVE,
        NOUSER
    }

    [CCode (cname = "int", cprefix = "MNT_", has_type_id = false, cheader_filename = "sys/mount.h")]
    public enum UnmountFlags {
        FORCE,                /* Force unmounting.  */
        DETACH,               /* Just detach from the tree.  */
        EXPIRE                /* Mark for expiry.  */
    }

    [CCode (cheader_filename = "sys/mount.h")]
    public int mount (string source, string target, string filesystemtype, MountFlags flags = 0, string options = "");
    [CCode (cheader_filename = "sys/mount.h")]
    public int umount (string target);
    [CCode (cheader_filename = "sys/mount.h")]
    public int umount2 (string target, UnmountFlags flags);

    [CCode (cname = "struct winsize", has_type_id = false, cheader_filename = "termios.h", destroy_function = "")]
    public struct winsize {
        public ushort ws_row;
        public ushort ws_col;
        public ushort ws_xpixel;
        public ushort ws_ypixel;
    }

    [CCode (cheader_filename = "pty.h")]
    public Posix.pid_t forkpty (out int amaster,
                                [CCode (array_length=false, array_null_terminated=true)] char[] name,
                                Posix.termios? termp,
                                winsize? winp);

    [CCode (cheader_filename = "pty.h")]
    public int openpty (out int amaster,
                        out int aslave,
                        [CCode (array_length=false, array_null_terminated=true)] char[] name,
                        Posix.termios? termp,
                        winsize? winp);

    [CCode (cprefix = "RB_", has_type_id = false, cheader_filename = "unistd.h,sys/reboot.h")]
    public enum RebootCommands {
         AUTOBOOT,
         HALT_SYSTEM,
         ENABLE_CAD,
         DISABLE_CAD,
         POWER_OFF
    }

    [CCode (cheader_filename = "unistd.h,sys/reboot.h")]
    public int reboot (RebootCommands cmd);

    [CCode (cprefix = "CLONE_", has_type_id = false, cheader_filename = "sched.h")]
    public enum CloneFlags {
        FILES,
        FS,
        NEWNS
    }

    [CCode (cheader_filename = "sched.h")]
    public int unshare (CloneFlags flags);

    [CCode (cheader_filename = "sys/time.h")]
    public int adjtime (Posix.timeval delta, Posix.timeval? olddelta = null);

    // adjtimex(2)
    [CCode (cprefix = "ADJ_", has_type_id = false, cheader_filename = "sys/timex.h")]
    public enum AdjustModes {
        OFFSET,
        FREQUENCY,
        MAXERROR,
        ESTERROR,
        STATUS,
        TIMECONST,
        TICK,
        OFFSET_SINGLESHOT
    }

    [CCode (cheader_filename = "sys/timex.h")]
    public const int TIME_OK;
    [CCode (cheader_filename = "sys/timex.h")]
    public const int TIME_INS;
    [CCode (cheader_filename = "sys/timex.h")]
    public const int TIME_DEL;
    [CCode (cheader_filename = "sys/timex.h")]
    public const int TIME_OOP;
    [CCode (cheader_filename = "sys/timex.h")]
    public const int TIME_WAIT;
    [CCode (cheader_filename = "sys/timex.h")]
    public const int TIME_BAD;

    // adjtimex(2)
    [CCode (cname = "struct timex", has_type_id = false, cheader_filename = "sys/timex.h")]
    public struct timex {
        public AdjustModes modes;   /* mode selector */
        public long offset;         /* time offset (usec) */
        public long freq;           /* frequency offset (scaled ppm) */
        public long maxerror;       /* maximum error (usec) */
        public long esterror;       /* estimated error (usec) */
        public int status;          /* clock command/status */
        public long constant;       /* pll time constant */
        public long precision;      /* clock precision (usec) (read-only) */
        public long tolerance;      /* clock frequency tolerance (ppm) (read-only) */
        public Posix.timeval time;  /* current time (read-only) */
        public long tick;           /* usecs between clock ticks */
    }

    [CCode (cheader_filename = "sys/timex.h")]
    public int adjtimex (Linux.timex buf);

    [CCode (cheader_filename = "time.h")]
#if POSIX
    public time_t timegm (Posix.tm t);
#else
    public time_t timegm (GLib.Time t);
#endif

    [CCode (cheader_filename = "time.h")]
    public const Posix.clockid_t CLOCK_MONOTONIC_RAW;

    [CCode (cheader_filename = "utmp.h")]
    public int login_tty (int fd);

    // emulate gettid(2) for which no glib wrapper exists via syscall
    public Posix.pid_t gettid() {
        return (Posix.pid_t) syscall( SysCall.gettid );
    }

    // syscall(2)
    [CCode (cprefix = "SYS_", has_type_id = false, cname = "int")]
    public enum SysCall {
        gettid
    }

    [CCode (cname = "syscall", cheader_filename = "unistd.h,sys/syscall.h")]
    public int syscall (int number, ...);

    // mremap(2)
    [CCode (cprefix = "MREMAP_", has_type_id = false, cheader_filename = "sys/mman.h")]
    public enum MremapFlags {
        MAYMOVE,
        FIXED
    }

    [CCode (cheader_filename = "sys/mman.h")]
    public void *mremap (void *old_address, size_t old_size, size_t new_size, MremapFlags flags);

    // memfd_create(2)
    [CCode (cname = "unsigned int", cheader_filename = "linux/memfd.h", cprefix = "MFD_", has_type_id = false)]
    public enum MemfdFlags {
        CLOEXEC,
        ALLOW_SEALING,
        HUGETLB
    }

    [CCode (cheader_filename = "sys/mman.h", feature_test_macro = "_GNU_SOURCE")]
    public int memfd_create (string name, MemfdFlags flags);

    /*
     * Network
     */
    [CCode (cprefix = "", lower_case_cprefix = "")]
    namespace Network {

        // interface consts, structs, and methods
        [CCode (cname = "IFNAMSIZ", cheader_filename = "sys/socket.h,net/if.h")]
        public const int INTERFACE_NAME_SIZE;

        [CCode (cheader_filename = "net/if.h")]
        public uint if_nametoindex (string ifname);
        [CCode (cheader_filename = "net/if.h")]
        public unowned string if_indextoname (uint ifindex, string ifname);
        [CCode (cheader_filename = "net/if.h")]
        public IfNameindex? if_nameindex ();

        [CCode (cname = "int", cprefix = "IFF_", has_type_id = false, cheader_filename = "sys/socket.h,net/if.h")]
        public enum IfFlag {
            UP,
            BROADCAST,
            DEBUG,
            LOOPBACK,
            POINTOPOINT,
            NOTRAILERS,
            RUNNING,
            NOARP,
            PROMISC,
            ALLMULTI,
            MASTER,
            SLAVE,
            PORTSEL,
            AUTOMEDIA,
            DYNAMIC
        }

        [CCode (cname = "struct if_nameindex", has_type_id = false, cheader_filename = "sys/socket.h,net/if.h", destroy_function = "if_freenameindex")]
        public struct IfNameindex {
            public uint if_index;
            public string if_name;
        }

        [CCode (cname = "struct ifmap", has_type_id = false, cheader_filename = "sys/socket.h,net/if.h", destroy_function = "")]
        public struct IfMap {
            public ulong mem_start;
            public ulong mem_end;
            public short base_addr;
            public uchar irq;
            public uchar dma;
            public uchar port;
        }

        [CCode (cname = "struct ifreq", has_type_id = false, cheader_filename = "netinet/in.h,net/if.h", destroy_function = "")]
        public struct IfReq {
            public char ifr_name[INTERFACE_NAME_SIZE];
            public Posix.SockAddr ifr_addr;
            public Posix.SockAddr ifr_dstaddr;
            public Posix.SockAddr ifr_broadaddr;
            public Posix.SockAddr ifr_netmask;
            public Posix.SockAddr ifr_hwaddr;
            public short ifr_flags;
            public int ifr_metric;
            public int ifr_mtu;
            public IfMap ifr_map;
            public char ifr_slave[INTERFACE_NAME_SIZE];
            public char* ifr_data;
            public int ifr_ifindex;
            public int ifr_bandwidth;
            public int ifr_qlen;
            public char ifr_newname[INTERFACE_NAME_SIZE];
        }

        [CCode (cname = "struct ifconf", has_type_id = false, cheader_filename = "sys/socket.h,net/if.h", destroy_function = "")]
        public struct IfConf {
            public int ifc_len;
            public char* ifc_buf;
            [CCode (array_length_cname = "ifc_len")]
            public IfReq[] ifc_req;
        }

        [CCode (cname = "struct ifaddrmsg", has_type_id = false, cheader_filename = "linux/if_addr.h", destroy_function = "")]
        public struct IfAddrMsg {
            public uint8 ifa_family;
            public uint8 ifa_prefixlen;
            public uint8 ifa_flags;
            public uint8 ifa_scope;
            public uint32 ifa_index;
        }

        [Compact, CCode (cname = "struct ifaddrs", cheader_filename = "sys/types.h,ifaddrs.h", free_function = "freeifaddrs", has_type_id = false)]
        public class IfAddrs {
                public unowned IfAddrs? ifa_next;
                public string ifa_name;
                public uint ifa_flags;
                public Posix.SockAddr? ifa_addr;
                public Posix.SockAddr? ifa_netmask;
                [CCode (cname = "ifa_ifu.ifu_broadaddr")]
                public Posix.SockAddr? ifa_ifu_broadaddr;
                [CCode (cname = "ifa_ifu.ifu_dstaddr")]
                public Posix.SockAddr? ifa_ifu_dstaddr;
                public void* ifa_data;
        }

        [CCode (cname = "getifaddrs")]
        public static int getifaddrs (out IfAddrs ifap);

        [CCode (cprefix = "IFA_", has_type_id = false, cheader_filename = "linux/if_addr.h")]
        public enum IfAddrType {
            UNSPEC,
            ADDRESS,
            LOCAL,
            LABEL,
            BROADCAST,
            ANYCAST,
            CACHEINFO,
            MULTICAST
        }

        [CCode (cheader_filename = "linux/if_addr.h")]
        public int IFA_PAYLOAD (Linux.Netlink.NlMsgHdr nlh);
        [CCode (cheader_filename = "linux/if_addr.h")]
        public Linux.Netlink.RtAttr* IFA_RTA (Linux.Network.IfAddrMsg* msg);

        [CCode (cprefix = "ARPHRD_", has_type_id = false, cheader_filename = "linux/if_arp.h")]
        public enum IfArpHeaderType {
            NETROM,
            ETHER,
            EETHER,
            AX25,
            PRONET,
            CHAOS,
            IEEE802,
            ARCNET,
            APPLETLK,
            DLCI,
            ATM,
            METRICOM,
            IEEE1394,
            EUI64,
            INFINIBAND,
            SLIP,
            CSLIP,
            SLIP6,
            CSLIP6,
            RSRVD,
            ADAPT,
            ROSE,
            X25,
            HWX25,
            CAN,
            PPP,
            CISCO,
            HDLC,
            LAPB,
            DDCMP,
            RAWHDLC,
            TUNNEL,
            TUNNEL6,
            FRAD,
            SKIP,
            LOOPBACK,
            LOCALTLK,
            FDDI,
            BIF,
            SIT,
            IPDDP,
            IPGRE,
            PIMREG,
            HIPPI,
            ASH,
            ECONET,
            IRDA,
            FCPP,
            FCAL,
            FCPL,
            FCFABRIC,
            IEEE802_TR,
            IEEE80211,
            IEEE80211_PRISM,
            IEEE80211_RADIOTAP,
            IEEE802154,
            PHONET,
            PHONET_PIPE,
            CAIF,
            VOID,
            NONE
        }

        [CCode (cprefix = "ARPOP_", has_type_id = false, cheader_filename = "linux/if_arp.h")]
        public enum IfArpOpcode {
            REQUEST,
            REPLY,
            RREQUEST,
            RREPLY,
            InREQUEST,
            InREPLY,
            ARPOP_NAK
        }

        // route consts, structs, and methods
        [CCode (cname = "struct rtentry", has_type_id = false, cheader_filename = "net/route.h", destroy_function = "")]
        public struct RtEntry {
            public Posix.SockAddr rt_dst;
            public Posix.SockAddr rt_gateway;
            public Posix.SockAddr rt_genmask;
            public RtFlag rt_flags;
            public short rt_metric;
            public string rt_dev;
            public ulong rt_mtu;
            public ulong rt_window;
            public ushort rt_irtt;
        }

        [CCode (cname = "ushort", cprefix = "RTF_", has_type_id = false, cheader_filename = "net/route.h")]
        public enum RtFlag {
            UP,
            GATEWAY,
            HOST,
            REINSTATE,
            DYNAMIC,
            MODIFIED,
            MTU,
            WINDOW,
            IRTT,
            REJECT,
            STATIC,
            XRESOLVE,
            NOFORWARD,
            THROW,
            NOPMTUDISC
        }

        /* ioctls */
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCADDRT;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCDELRT;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCRTMSG;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCGIFNAME;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCSIFLINK;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCGIFCONF;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCGIFFLAGS;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCSIFFLAGS;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCGIFADDR;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCSIFADDR;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCGIFDSTADDR;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCSIFDSTADDR;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCGIFBRDADDR;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCSIFBRDADDR;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCGIFNETMASK;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCSIFNETMASK;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCGIFMETRIC;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCSIFMETRIC;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCGIFMEM;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCSIFMEM;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCGIFMTU;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCSIFMTU;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCSIFNAME;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCSIFHWADDR;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCGIFENCAP;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCSIFENCAP;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCGIFHWADDR;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCGIFSLAVE;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCSIFSLAVE;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCADDMULTI;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCDELMULTI;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCGIFINDEX;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCSIFPFLAGS;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCGIFPFLAGS;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCDIFADDR;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCSIFHWBROADCAST;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCGIFCOUNT;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCGIFBR;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCSIFBR;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCGIFTXQLEN;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCSIFTXQLEN;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCDARP;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCGARP;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCSARP;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCDRARP;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCGRARP;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCSRARP;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCGIFMAP;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCSIFMAP;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCADDDLCI;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int SIOCDELDLCI;
    }

    /*
     * Input subsystem
     */
    [CCode (cprefix = "", lower_case_cprefix = "")]
    namespace Input {

        /*
         * subsystem structures
         */

        [CCode (cname = "struct input_event", has_type_id = false, cheader_filename = "linux/input.h")]
        public struct Event {
            [Version (deprecated = true, replacement = "Event.input_event_sec and Event.input_event_usec")]
            public Posix.timeval time;
            public time_t input_event_sec;
            public long input_event_usec;
            public uint16 type;
            public uint16 code;
            public int32 value;
        }

        [CCode (cname = "struct input_id", has_type_id = false, cheader_filename = "linux/input.h")]
        public struct Id {
            public uint16 bustype;
            public uint16 vendor;
            public uint16 product;
            public uint16 version;
        }

        [CCode (cname = "struct input_absinfo", has_type_id = false, cheader_filename = "linux/input.h")]
        public struct AbsInfo {
            public int32 value;
            public int32 minimum;
            public int32 maximum;
            public int32 fuzz;
            public int32 flat;
        }

        [CCode (cname = "struct input_keymap_entry", has_type_id = false, cheader_filename = "linux/input.h")]
        public struct KeymapEntry {
            public uint8 flags;
            public uint8 len;
            public uint16 index;
            public uint32 keycode;
            public uint8 scancode[32];
        }

        [CCode (cname = "struct input_mask", has_type_id = false, cheader_filename = "linux/input.h")]
        public struct Mask {
            public uint32 type;
            public uint32 codes_size;
            public uint32 codes_ptr;
        }

        /*
         * ioctls
         */

        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public const int EVIOCGVERSION;
        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public const int EVIOCGID;
        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public const int EVIOCGREP;
        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public const int EVIOCSREP;

        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public const int EVIOCGKEYCODE;
        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public const int EVIOCGKEYCODE_V2;
        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public const int EVIOCSKEYCODE;
        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public const int EVIOCSKEYCODE_V2;

        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public int EVIOCGNAME( uint len );
        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public int EVIOCGPHYS( uint len );
        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public int EVIOCGUNIQ( uint len );
        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public int EVIOCGPROP( uint len );
        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public int EVIOCGMTSLOTS( uint len );

        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public int EVIOCGKEY( uint len );
        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public int EVIOCGLED( uint len );
        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public int EVIOCGSND( uint len );
        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public int EVIOCGSW( uint len );

        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public int EVIOCGBIT( uint ev, uint len );
        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public int EVIOCGABS( uint abs );
        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public int EVIOCSABS( uint abs );

        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public const int EVIOCSFF;
        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public const int EVIOCRMFF;
        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public const int EVIOCGEFFECTS;
        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public const int EVIOCGRAB;
        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public const int EVIOCREVOKE;
        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public const int EVIOCGMASK;
        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public const int EVIOCSMASK;
        [CCode (cheader_filename = "linux/input.h,sys/ioctl.h")]
        public const int EVIOCSCLOCKID;

        /*
         * device properties and quirks
         */

        [CCode (cheader_filename = "linux/input.h")]
        public const uint16 INPUT_PROP_POINTER;
        [CCode (cheader_filename = "linux/input.h")]
        public const uint16 INPUT_PROP_DIRECT;
        [CCode (cheader_filename = "linux/input.h")]
        public const uint16 INPUT_PROP_BUTTONPAD;
        [CCode (cheader_filename = "linux/input.h")]
        public const uint16 INPUT_PROP_SEMI_MT;
        [CCode (cheader_filename = "linux/input.h")]
        public const uint16 INPUT_PROP_TOPBUTTONPAD;
        [CCode (cheader_filename = "linux/input.h")]
        public const uint16 INPUT_PROP_POINTING_STICK;
        [CCode (cheader_filename = "linux/input.h")]
        public const uint16 INPUT_PROP_ACCELEROMETER;
        [CCode (cheader_filename = "linux/input.h")]
        public const uint16 INPUT_PROP_MAX;

        /*
         * event types
         */

        [CCode (cheader_filename = "linux/input.h")]
        public const uint16 EV_SYN;
        [CCode (cheader_filename = "linux/input.h")]
        public const uint16 EV_KEY;
        [CCode (cheader_filename = "linux/input.h")]
        public const uint16 EV_REL;
        [CCode (cheader_filename = "linux/input.h")]
        public const uint16 EV_ABS;
        [CCode (cheader_filename = "linux/input.h")]
        public const uint16 EV_MSC;
        [CCode (cheader_filename = "linux/input.h")]
        public const uint16 EV_SW;
        [CCode (cheader_filename = "linux/input.h")]
        public const uint16 EV_LED;
        [CCode (cheader_filename = "linux/input.h")]
        public const uint16 EV_SND;
        [CCode (cheader_filename = "linux/input.h")]
        public const uint16 EV_REP;
        [CCode (cheader_filename = "linux/input.h")]
        public const uint16 EV_FF;
        [CCode (cheader_filename = "linux/input.h")]
        public const uint16 EV_PWR;
        [CCode (cheader_filename = "linux/input.h")]
        public const uint16 EV_FF_STATUS;
        [CCode (cheader_filename = "linux/input.h")]
        public const uint16 EV_MAX;

        /*
         * synchronization events
         */

        [CCode (cheader_filename = "linux/input.h")]
        public const int SYN_REPORT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int SYN_CONFIG;
        [CCode (cheader_filename = "linux/input.h")]
        public const int SYN_MT_REPORT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int SYN_DROPPED;
        [CCode (cheader_filename = "linux/input.h")]
        public const int SYN_MAX;

        /*
         * keys, switches, buttons, etc.
         */

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_RESERVED;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_ESC;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_1;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_2;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_3;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_4;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_5;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_6;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_7;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_8;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_9;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_0;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_MINUS;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_EQUAL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BACKSPACE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_TAB;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_Q;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_W;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_E;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_R;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_T;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_Y;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_U;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_I;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_O;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_P;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_LEFTBRACE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_RIGHTBRACE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_ENTER;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_LEFTCTRL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_A;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_S;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_D;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_F;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_G;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_H;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_J;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_K;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_L;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SEMICOLON;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_APOSTROPHE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_GRAVE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_LEFTSHIFT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BACKSLASH;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_Z;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_X;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_C;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_V;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_B;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_N;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_M;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_COMMA;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_DOT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SLASH;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_RIGHTSHIFT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KPASTERISK;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_LEFTALT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SPACE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_CAPSLOCK;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_F1;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_F2;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_F3;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_F4;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_F5;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_F6;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_F7;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_F8;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_F9;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_F10;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_NUMLOCK;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SCROLLLOCK;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KP7;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KP8;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KP9;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KPMINUS;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KP4;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KP5;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KP6;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KPPLUS;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KP1;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KP2;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KP3;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KP0;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KPDOT;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_ZENKAKUHANKAKU;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_102ND;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_F11;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_F12;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_RO;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KATAKANA;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_HIRAGANA;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_HENKAN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KATAKANAHIRAGANA;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_MUHENKAN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KPJPCOMMA;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KPENTER;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_RIGHTCTRL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KPSLASH;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SYSRQ;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_RIGHTALT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_LINEFEED;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_HOME;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_UP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_PAGEUP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_LEFT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_RIGHT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_END;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_DOWN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_PAGEDOWN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_INSERT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_DELETE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_MACRO;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_MUTE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_VOLUMEDOWN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_VOLUMEUP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_POWER;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KPEQUAL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KPPLUSMINUS;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_PAUSE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SCALE;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KPCOMMA;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_HANGEUL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_HANGUEL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_HANJA;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_YEN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_LEFTMETA;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_RIGHTMETA;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_COMPOSE;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_STOP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_AGAIN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_PROPS;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_UNDO;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FRONT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_COPY;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_OPEN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_PASTE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FIND;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_CUT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_HELP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_MENU;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_CALC;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SETUP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SLEEP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_WAKEUP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FILE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SENDFILE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_DELETEFILE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_XFER;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_PROG1;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_PROG2;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_WWW;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_MSDOS;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_COFFEE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SCREENLOCK;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_DIRECTION;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_CYCLEWINDOWS;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_MAIL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BOOKMARKS;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_COMPUTER;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BACK;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FORWARD;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_CLOSECD;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_EJECTCD;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_EJECTCLOSECD;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_NEXTSONG;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_PLAYPAUSE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_PREVIOUSSONG;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_STOPCD;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_RECORD;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_REWIND;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_PHONE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_ISO;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_CONFIG;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_HOMEPAGE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_REFRESH;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_EXIT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_MOVE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_EDIT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SCROLLUP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SCROLLDOWN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KPLEFTPAREN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KPRIGHTPAREN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_NEW;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_REDO;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_F13;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_F14;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_F15;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_F16;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_F17;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_F18;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_F19;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_F20;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_F21;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_F22;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_F23;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_F24;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_PLAYCD;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_PAUSECD;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_PROG3;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_PROG4;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_DASHBOARD;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SUSPEND;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_CLOSE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_PLAY;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FASTFORWARD;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BASSBOOST;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_PRINT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_HP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_CAMERA;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SOUND;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_QUESTION;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_EMAIL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_CHAT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SEARCH;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_CONNECT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FINANCE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SPORT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SHOP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_ALTERASE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_CANCEL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BRIGHTNESSDOWN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BRIGHTNESSUP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_MEDIA;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SWITCHVIDEOMODE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KBDILLUMTOGGLE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KBDILLUMDOWN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KBDILLUMUP;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SEND;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_REPLY;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FORWARDMAIL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SAVE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_DOCUMENTS;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BATTERY;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BLUETOOTH;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_WLAN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_UWB;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_UNKNOWN;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_VIDEO_NEXT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_VIDEO_PREV;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BRIGHTNESS_CYCLE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BRIGHTNESS_AUTO;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BRIGHTNESS_ZERO;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_DISPLAY_OFF;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_WWAN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_WIMAX;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_RFKILL;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_MICMUTE;

        /* Code 255 is reserved for special needs of AT keyboard driver */

        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_MISC;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_0;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_1;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_2;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_3;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_4;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_5;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_6;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_7;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_8;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_9;

        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_MOUSE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_LEFT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_RIGHT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_MIDDLE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_SIDE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_EXTRA;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_FORWARD;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_BACK;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TASK;

        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_JOYSTICK;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_THUMB;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_THUMB2;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TOP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TOP2;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_PINKIE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_BASE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_BASE2;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_BASE3;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_BASE4;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_BASE5;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_BASE6;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_DEAD;

        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_GAMEPAD;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_A;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_B;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_C;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_X;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_Y;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_Z;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TR;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TL2;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TR2;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_SELECT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_START;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_MODE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_THUMBL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_THUMBR;

        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_DIGI;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TOOL_PEN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TOOL_RUBBER;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TOOL_BRUSH;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TOOL_PENCIL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TOOL_AIRBRUSH;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TOOL_FINGER;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TOOL_MOUSE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TOOL_LENS;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TOOL_QUINTTAP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TOUCH;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_STYLUS;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_STYLUS2;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TOOL_DOUBLETAP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TOOL_TRIPLETAP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TOOL_QUADTAP;

        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_WHEEL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_GEAR_DOWN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_GEAR_UP;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_OK;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SELECT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_GOTO;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_CLEAR;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_POWER2;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_OPTION;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_INFO;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_TIME;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_VENDOR;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_ARCHIVE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_PROGRAM;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_CHANNEL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FAVORITES;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_EPG;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_PVR;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_MHP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_LANGUAGE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_TITLE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SUBTITLE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_ANGLE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_ZOOM;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_MODE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KEYBOARD;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SCREEN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_PC;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_TV;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_TV2;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_VCR;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_VCR2;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SAT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SAT2;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_CD;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_TAPE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_RADIO;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_TUNER;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_PLAYER;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_TEXT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_DVD;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_AUX;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_MP3;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_AUDIO;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_VIDEO;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_DIRECTORY;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_LIST;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_MEMO;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_CALENDAR;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_RED;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_GREEN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_YELLOW;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BLUE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_CHANNELUP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_CHANNELDOWN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FIRST;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_LAST;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_AB;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_NEXT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_RESTART;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SLOW;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SHUFFLE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BREAK;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_PREVIOUS;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_DIGITS;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_TEEN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_TWEN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_VIDEOPHONE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_GAMES;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_ZOOMIN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_ZOOMOUT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_ZOOMRESET;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_WORDPROCESSOR;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_EDITOR;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SPREADSHEET;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_GRAPHICSEDITOR;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_PRESENTATION;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_DATABASE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_NEWS;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_VOICEMAIL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_ADDRESSBOOK;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_MESSENGER;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_DISPLAYTOGGLE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BRIGHTNESS_TOGGLE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SPELLCHECK;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_LOGOFF;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_DOLLAR;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_EURO;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FRAMEBACK;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FRAMEFORWARD;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_CONTEXT_MENU;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_MEDIA_REPEAT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_10CHANNELSUP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_10CHANNELSDOWN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_IMAGES;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_DEL_EOL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_DEL_EOS;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_INS_LINE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_DEL_LINE;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FN_ESC;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FN_F1;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FN_F2;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FN_F3;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FN_F4;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FN_F5;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FN_F6;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FN_F7;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FN_F8;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FN_F9;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FN_F10;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FN_F11;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FN_F12;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FN_1;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FN_2;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FN_D;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FN_E;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FN_F;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FN_S;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FN_B;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BRL_DOT1;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BRL_DOT2;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BRL_DOT3;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BRL_DOT4;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BRL_DOT5;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BRL_DOT6;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BRL_DOT7;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BRL_DOT8;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BRL_DOT9;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BRL_DOT10;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_NUMERIC_0;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_NUMERIC_1;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_NUMERIC_2;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_NUMERIC_3;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_NUMERIC_4;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_NUMERIC_5;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_NUMERIC_6;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_NUMERIC_7;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_NUMERIC_8;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_NUMERIC_9;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_NUMERIC_STAR;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_NUMERIC_POUND;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_NUMERIC_A;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_NUMERIC_B;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_NUMERIC_C;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_NUMERIC_D;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_CAMERA_FOCUS;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_WPS_BUTTON;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_TOUCHPAD_TOGGLE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_TOUCHPAD_ON;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_TOUCHPAD_OFF;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_CAMERA_ZOOMIN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_CAMERA_ZOOMOUT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_CAMERA_UP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_CAMERA_DOWN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_CAMERA_LEFT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_CAMERA_RIGHT;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_ATTENDANT_ON;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_ATTENDANT_OFF;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_ATTENDANT_TOGGLE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_LIGHTS_TOGGLE;

        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_DPAD_UP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_DPAD_DOWN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_DPAD_LEFT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_DPAD_RIGHT;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_ALS_TOGGLE;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BUTTONCONFIG;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_TASKMANAGER;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_JOURNAL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_CONTROLPANEL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_APPSELECT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SCREENSAVER;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_VOICECOMMAND;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BRIGHTNESS_MIN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_BRIGHTNESS_MAX;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KBDINPUTASSIST_PREV;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KBDINPUTASSIST_NEXT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KBDINPUTASSIST_PREVGROUP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KBDINPUTASSIST_NEXTGROUP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KBDINPUTASSIST_ACCEPT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_KBDINPUTASSIST_CANCEL;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_RIGHT_UP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_RIGHT_DOWN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_LEFT_UP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_LEFT_DOWN;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_ROOT_MENU;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_MEDIA_TOP_MENU;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_NUMERIC_11;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_NUMERIC_12;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_AUDIO_DESC;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_3D_MODE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_NEXT_FAVORITE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_STOP_RECORD;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_PAUSE_RECORD;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_VOD;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_UNMUTE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_FASTREVERSE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_SLOWREVERSE;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_DATA;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_ONSCREEN_KEYBOARD;

        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY1;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY2;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY3;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY4;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY5;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY6;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY7;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY8;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY9;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY10;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY11;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY12;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY13;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY14;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY15;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY16;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY17;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY18;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY19;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY20;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY21;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY22;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY23;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY24;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY25;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY26;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY27;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY28;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY29;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY30;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY31;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY32;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY33;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY34;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY35;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY36;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY37;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY38;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY39;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BTN_TRIGGER_HAPPY40;

        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_MIN_INTERESTING;
        [CCode (cheader_filename = "linux/input.h")]
        public const int KEY_MAX;

        /*
        * Relative axes
        */

        [CCode (cheader_filename = "linux/input.h")]
        public const int REL_X;
        [CCode (cheader_filename = "linux/input.h")]
        public const int REL_Y;
        [CCode (cheader_filename = "linux/input.h")]
        public const int REL_Z;
        [CCode (cheader_filename = "linux/input.h")]
        public const int REL_RX;
        [CCode (cheader_filename = "linux/input.h")]
        public const int REL_RY;
        [CCode (cheader_filename = "linux/input.h")]
        public const int REL_RZ;
        [CCode (cheader_filename = "linux/input.h")]
        public const int REL_HWHEEL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int REL_DIAL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int REL_WHEEL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int REL_MISC;
        [CCode (cheader_filename = "linux/input.h")]
        public const int REL_RESERVED;
        [CCode (cheader_filename = "linux/input.h")]
        public const int REL_WHEEL_HI_RES;
        [CCode (cheader_filename = "linux/input.h")]
        public const int REL_HWHEEL_HI_RES;
        [CCode (cheader_filename = "linux/input.h")]
        public const int REL_MAX;

        /*
         * Absolute axes
         */

        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_X;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_Y;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_Z;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_RX;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_RY;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_RZ;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_THROTTLE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_RUDDER;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_WHEEL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_GAS;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_BRAKE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_HAT0X;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_HAT0Y;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_HAT1X;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_HAT1Y;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_HAT2X;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_HAT2Y;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_HAT3X;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_HAT3Y;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_PRESSURE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_DISTANCE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_TILT_X;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_TILT_Y;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_TOOL_WIDTH;

        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_VOLUME;

        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_MISC;

        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_RESERVED;

        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_MT_SLOT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_MT_TOUCH_MAJOR;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_MT_TOUCH_MINOR;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_MT_WIDTH_MAJOR;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_MT_WIDTH_MINOR;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_MT_ORIENTATION;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_MT_POSITION_X;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_MT_POSITION_Y;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_MT_TOOL_TYPE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_MT_BLOB_ID;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_MT_TRACKING_ID;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_MT_PRESSURE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_MT_DISTANCE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_MT_TOOL_X;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_MT_TOOL_Y;

        [CCode (cheader_filename = "linux/input.h")]
        public const int ABS_MAX;

        /*
         * Switch events
         */

        [CCode (cheader_filename = "linux/input.h")]
        public const int SW_LID;
        [CCode (cheader_filename = "linux/input.h")]
        public const int SW_TABLET_MODE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int SW_HEADPHONE_INSERT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int SW_RFKILL_ALL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int SW_RADIO;
        [CCode (cheader_filename = "linux/input.h")]
        public const int SW_MICROPHONE_INSERT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int SW_DOCK;
        [CCode (cheader_filename = "linux/input.h")]
        public const int SW_LINEOUT_INSERT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int SW_JACK_PHYSICAL_INSERT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int SW_VIDEOOUT_INSERT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int SW_CAMERA_LENS_COVER;
        [CCode (cheader_filename = "linux/input.h")]
        public const int SW_KEYPAD_SLIDE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int SW_FRONT_PROXIMITY;
        [CCode (cheader_filename = "linux/input.h")]
        public const int SW_ROTATE_LOCK;
        [CCode (cheader_filename = "linux/input.h")]
        public const int SW_LINEIN_INSERT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int SW_MUTE_DEVICE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int SW_PEN_INSERTED;
        [CCode (cheader_filename = "linux/input.h")]
        public const int SW_MAX;

        /*
         * Misc events
         */

        [CCode (cheader_filename = "linux/input.h")]
        public const int MSC_SERIAL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int MSC_PULSELED;
        [CCode (cheader_filename = "linux/input.h")]
        public const int MSC_GESTURE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int MSC_RAW;
        [CCode (cheader_filename = "linux/input.h")]
        public const int MSC_SCAN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int MSC_TIMESTAMP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int MSC_MAX;

        /*
         * LEDs
         */

        [CCode (cheader_filename = "linux/input.h")]
        public const int LED_NUML;
        [CCode (cheader_filename = "linux/input.h")]
        public const int LED_CAPSL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int LED_SCROLLL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int LED_COMPOSE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int LED_KANA;
        [CCode (cheader_filename = "linux/input.h")]
        public const int LED_SLEEP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int LED_SUSPEND;
        [CCode (cheader_filename = "linux/input.h")]
        public const int LED_MUTE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int LED_MISC;
        [CCode (cheader_filename = "linux/input.h")]
        public const int LED_MAIL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int LED_CHARGING;
        [CCode (cheader_filename = "linux/input.h")]
        public const int LED_MAX;

        /*
         * Autorepeat values
         */

        [CCode (cheader_filename = "linux/input.h")]
        public const int REP_DELAY;
        [CCode (cheader_filename = "linux/input.h")]
        public const int REP_PERIOD;
        [CCode (cheader_filename = "linux/input.h")]
        public const int REP_MAX;

        /*
         * Sounds
         */

        [CCode (cheader_filename = "linux/input.h")]
        public const int SND_CLICK;
        [CCode (cheader_filename = "linux/input.h")]
        public const int SND_BELL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int SND_TONE;
        [CCode (cheader_filename = "linux/input.h")]
        public const int SND_MAX;

        /*
         * IDs.
         */

        [CCode (cheader_filename = "linux/input.h")]
        public const int ID_BUS;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ID_VENDOR;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ID_PRODUCT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int ID_VERSION;

        [CCode (cheader_filename = "linux/input.h")]
        public const int BUS_PCI;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BUS_ISAPNP;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BUS_USB;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BUS_HIL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BUS_BLUETOOTH;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BUS_VIRTUAL;

        [CCode (cheader_filename = "linux/input.h")]
        public const int BUS_ISA;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BUS_I8042;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BUS_XTKBD;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BUS_RS232;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BUS_GAMEPORT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BUS_PARPORT;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BUS_AMIGA;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BUS_ADB;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BUS_I2C;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BUS_HOST;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BUS_GSC;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BUS_ATARI;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BUS_SPI;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BUS_RMI;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BUS_CEC;
        [CCode (cheader_filename = "linux/input.h")]
        public const int BUS_INTEL_ISHTP;

        /* MT_TOOL types */
        [CCode (cheader_filename = "linux/input.h")]
        public const int MT_TOOL_FINGER;
        [CCode (cheader_filename = "linux/input.h")]
        public const int MT_TOOL_PEN;
        [CCode (cheader_filename = "linux/input.h")]
        public const int MT_TOOL_PALM;
        [CCode (cheader_filename = "linux/input.h")]
        public const int MT_TOOL_DIAL;
        [CCode (cheader_filename = "linux/input.h")]
        public const int MT_TOOL_MAX;

        /* Values describing the status of a force-feedback effect */
        [CCode (cheader_filename = "linux/input.h")]
        public const int FF_STATUS_STOPPED;
        [CCode (cheader_filename = "linux/input.h")]
        public const int FF_STATUS_PLAYING;
        [CCode (cheader_filename = "linux/input.h")]
        public const int FF_STATUS_MAX;
    }

    /*
     * Netlink subsystem
     */
    [CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "linux/netlink.h")]
    namespace Netlink {

        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NETLINK_ROUTE;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NETLINK_UNUSED;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NETLINK_USERSOCK;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NETLINK_FIREWALL;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NETLINK_INET_DIAG;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NETLINK_NFLOG;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NETLINK_XFRM;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NETLINK_SELINUX;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NETLINK_ISCSI;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NETLINK_AUDIT;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NETLINK_FIB_LOOKUP;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NETLINK_CONNECTOR;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NETLINK_NETFILTER;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NETLINK_IP6_FW;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NETLINK_DNRTMSG;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NETLINK_KOBJECT_UEVENT;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NETLINK_GENERIC;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NETLINK_SCSITRANSPORT;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NETLINK_ECRYPTFS;

        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NETLINK_ADD_MEMBERSHIP;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NETLINK_DROP_MEMBERSHIP;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NETLINK_PKTINFO;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NETLINK_BROADCAST_ERROR;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NETLINK_NO_ENOBUFS;

        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NLM_F_REQUEST;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NLM_F_MULTI;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NLM_F_ACK;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NLM_F_ECHO;

        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NLM_F_ROOT;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NLM_F_MATCH;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NLM_F_ATOMIC;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NLM_F_DUMP;

        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NLM_F_REPLACE;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NLM_F_EXCL;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NLM_F_CREATE;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NLM_F_APPEND;

        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NLMSG_ALIGNTO;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NLMSG_NOOP;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NLMSG_ERROR;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NLMSG_DONE;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NLMSG_OVERRUN;
        [CCode (cheader_filename = "linux/netlink.h")]
        public const int NLMSG_MIN_TYPE;

        /* netlink action macros, we bind them as functions for convenience */
        [CCode (cheader_filename = "linux/netlink.h")]
        public void NLMSG_ALIGN (int len);
        [CCode (cheader_filename = "linux/netlink.h")]
        public int NLMSG_HDRLEN ();
        [CCode (cheader_filename = "linux/netlink.h")]
        public int NLMSG_LENGTH (int len);
        [CCode (cheader_filename = "linux/netlink.h")]
        public void NLMSG_SPACE (int len);
        [CCode (cheader_filename = "linux/netlink.h")]
        public void* NLMSG_DATA (NlMsgHdr nlh);
        [CCode (cheader_filename = "linux/netlink.h")]
        public unowned NlMsgHdr NLMSG_NEXT (NlMsgHdr nlh, int len);
        [CCode (cheader_filename = "linux/netlink.h")]
        public bool NLMSG_OK (NlMsgHdr nlh, int len);
        [CCode (cheader_filename = "linux/netlink.h")]
        public int NLMSG_PAYLOAD (NlMsgHdr nlh, int len);

        // netlink socket, can be used instead of sockaddr
        [CCode (cname = "struct sockaddr_nl", has_type_id = false, cheader_filename = "linux/netlink.h", destroy_function = "")]
        public struct SockAddrNl {
            public int nl_family;
            public ushort nl_pad;
            public uint32 nl_pid;
            public uint32 nl_groups;
        }

        // netlink message header
        [CCode (cname = "struct nlmsghdr", has_type_id = false, cheader_filename = "linux/netlink.h", destroy_function = "")]
        public struct NlMsgHdr {
            public uint32 nlmsg_len;
            public uint16 nlmsg_type;
            public uint16 nlmsg_flags;
            public uint32 nlmsg_seq;
            public uint32 nlmsg_pid;
        }

        // netlink error message
        [CCode (cname = "struct nlmsgerr", has_type_id = false, cheader_filename = "linux/netlink.h", destroy_function = "")]
        public struct NlMsgErr {
            public int error;
            public NlMsgHdr msg;
        }

        // rtnetlink multicast groups ( userland compatibility values )
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTMGRP_LINK;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTMGRP_NOTIFY;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTMGRP_NEIGH;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTMGRP_TC;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTMGRP_IPV4_IFADDR;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTMGRP_IPV4_MROUTE;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTMGRP_IPV4_ROUTE;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTMGRP_IPV4_RULE;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTMGRP_IPV6_IFADDR;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTMGRP_IPV6_MROUTE;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTMGRP_IPV6_ROUTE;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTMGRP_IPV6_IFINFO;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTMGRP_DECnet_IFADDR;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTMGRP_DECnet_ROUTE;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTMGRP_IPV6_PREFIX;

        // rtnetlink multicast groups ( 1 << group )
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTNLGRP_NONE;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTNLGRP_LINK;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTNLGRP_NOTIFY;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTNLGRP_NEIGH;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTNLGRP_TC;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTNLGRP_IPV4_IFADDR;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTNLGRP_IPV4_MROUTE;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTNLGRP_IPV4_ROUTE;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTNLGRP_IPV4_RULE;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTNLGRP_IPV6_IFADDR;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTNLGRP_IPV6_MROUTE;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTNLGRP_IPV6_ROUTE;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTNLGRP_IPV6_IFINFO;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTNLGRP_DECnet_IFADDR;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTNLGRP_NOP2;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTNLGRP_DECnet_ROUTE;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTNLGRP_DECnet_RULE;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTNLGRP_NOP4;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTNLGRP_IPV6_PREFIX;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTNLGRP_IPV6_RULE;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTNLGRP_ND_USEROPT;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTNLGRP_PHONET_IFADDR;
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public const int RTNLGRP_PHONET_ROUTE;

        /* rtnetlink action macros, we bind them as functions for convenience */
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public void RTA_ALIGN (int len);
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public int RTA_HDRLEN ();
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public int RTA_LENGTH (int len);
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public void RTA_SPACE (int len);
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public void* RTA_DATA (RtAttr* rta);
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public RtAttr* RTA_NEXT (RtAttr* rta, int len);
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public bool RTA_OK (RtAttr* rta, int len);
        [CCode (cheader_filename = "linux/rtnetlink.h")]
        public void* RTA_PAYLOAD (RtAttr* rta, int len);

        /*
        [CCode (cheader_filename = "sys/socket.h", sentinel = "")]
        public int bind (int sockfd, SockAddrNl addr, ulong length);
        */

        // rtnetlink info message
        [CCode (cname = "struct ifinfomsg", has_type_id = false, cheader_filename = "linux/rtnetlink.h", destroy_function = "")]
        public struct IfInfoMsg {
            public uchar ifi_family;
            public uchar __ifi_pad;
            public ushort ifi_type;
            public int ifi_index;
            public uint32 ifi_flags;
            public uint32 ifi_change;
        }

        // rtnetlink attribute
        [CCode (cname = "struct rtattr", has_type_id = false, cheader_filename = "linux/rtnetlink.h", destroy_function = "")]
        public struct RtAttr {
            public ushort rta_len;
            public ushort rta_type;
        }

        // rtnetlink routing / discovery messages
        [CCode (cprefix = "RTM_", has_type_id = false, cheader_filename = "linux/rtnetlink.h")]
        public enum RtMessageType {
            NEWLINK,
            DELLINK,
            GETLINK,
            SETLINK,
            NEWADDR,
            DELADDR,
            GETADDR,
            NEWROUTE,
            DELROUTE,
            GETROUTE,
            NEWNEIGH,
            DELNEIGH,
            GETNEIGH,
            NEWRULE,
            DELRULE,
            GETRULE,
            NEWQDISC,
            DELQDISC,
            GETQDISC,
            NEWTCLASS,
            DELTCLASS,
            GETTCLASS,
            NEWTFILTER,
            DELTFILTER,
            GETTFILTER,
            NEWACTION,
            DELACTION,
            GETACTION,
            NEWPREFIX,
            GETMULTICAST,
            GETANYCAST,
            NEWNEIGHTBL,
            GETNEIGHTBL,
            SETNEIGHTBL,
        }
    }

    /*
     * Real time clock subsystem
     */

    [CCode (cprefix = "", lower_case_cprefix = "")]
    namespace Rtc {

        [CCode (cname = "struct rtc_time", cheader_filename = "linux/rtc.h", has_type_id = false)]
        public struct Time {
            public int tm_sec;
            public int tm_min;
            public int tm_hour;
            public int tm_mday;
            public int tm_mon;
            public int tm_year;
            public int tm_wday;
            public int tm_yday;
            public int tm_isdst;
        }

        [CCode (cname = "struct rtc_wkalrm", has_type_id = false, cheader_filename = "linux/rtc.h")]
        public struct WakeAlarm {
            public char enabled;
            public char pending;
            public Linux.Rtc.Time time;
        }

        [CCode (cheader_filename = "linux/rtc.h,sys/ioctl.h")]
        public const int RTC_RD_TIME;
        [CCode (cheader_filename = "linux/rtc.h,sys/ioctl.h")]
        public const int RTC_SET_TIME;
        [CCode (cheader_filename = "linux/rtc.h,sys/ioctl.h")]
        public const int RTC_WKALM_RD;
        [CCode (cheader_filename = "linux/rtc.h,sys/ioctl.h")]
        public const int RTC_WKALM_SET;
    }

    /*
     * Socket extensions (non-posix)
     */
    [CCode (cprefix = "", lower_case_cprefix = "")]
    namespace Socket {
        [CCode (cheader_filename = "sys/socket.h")]
        public const int AF_NETLINK;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int AF_PHONET;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int AF_UNSPEC;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SOCK_NONBLOCK;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SOCK_CLOEXEC;

        [CCode (cname = "struct ucred", has_type_id = false, cheader_filename = "linux/socket.h", destroy_function = "")]
        public struct ucred {
            public uint32 pid;
            public uint32 uid;
            public uint32 gid;
        }

        /* setsockopt(2) level constants */
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_IP;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_TCP;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_UDP;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_IPV6;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_ICMPV6;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_SCTP;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_UDPLITE;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_RAW;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_IPX;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_AX25;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_ATALK;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_NETROM;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_ROSE;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_DECNET;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_X25;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_PACKET;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_ATM;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_AAL;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_IRDA;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_NETBEUI;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_LLC;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_DCCP;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_NETLINK;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_TIPC;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_RXRPC;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_PPPOL2TP;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_BLUETOOTH;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_PNPIPE;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_RDS;
        [CCode (cheader_filename = "linux/socket.h")]
        public const int SOL_IUCV;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SOL_SOCKET;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_DEBUG;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_REUSEADDR;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_TYPE;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_ERROR;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_DONTROUTE;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_BROADCAST;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_SNDBUF;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_RCVBUF;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_SNDBUFFORCE;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_RCVBUFFORCE;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_KEEPALIVE;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_OOBINLINE;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_NO_CHECK;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_PRIORITY;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_LINGER;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_BSDCOMPAT;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_REUSEPORT;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_PASSCRED;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_PEERCRED;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_RCVLOWAT;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_SNDLOWAT;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_RCVTIMEO;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_SNDTIMEO;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_SECURITY_AUTHENTICATION;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_SECURITY_ENCRYPTION_TRANSPORT;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_SECURITY_ENCRYPTION_NETWORK;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_BINDTODEVICE;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_ATTACH_FILTER;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_DETACH_FILTER;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_GET_FILTER;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_PEERNAME;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_TIMESTAMP;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SCM_TIMESTAMP;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_ACCEPTCONN;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_PEERSEC;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_PASSSEC;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_TIMESTAMPNS;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SCM_TIMESTAMPNS;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_MARK;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_TIMESTAMPING;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SCM_TIMESTAMPING;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_PROTOCOL;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_DOMAIN;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_RXQ_OVFL;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_WIFI_STATUS;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SCM_WIFI_STATUS;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_PEEK_OFF;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_NOFCS;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_LOCK_FILTER;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_SELECT_ERR_QUEUE;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_BUSY_POLL;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_MAX_PACING_RATE;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_BPF_EXTENSIONS;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_INCOMING_CPU;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_ATTACH_BPF;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_DETACH_BPF;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_ATTACH_REUSEPORT_CBPF;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_ATTACH_REUSEPORT_EBPF;
        [CCode (cheader_filename = "sys/socket.h")]
        public const int SO_CNX_ADVICE;
    }

    /*
     * SPI (Serial Peripheral Interface)
     */

    [CCode (cprefix = "", lower_case_cprefix = "")]
    namespace Spi {

        [CCode (cname = "struct spi_ioc_transfer", has_type_id = false, cheader_filename = "linux/spi/spidev.h")]
        public struct IocTransfer {
            public uint64  tx_buf;
            public uint64  rx_buf;

            public uint32  len;
            public uint32  speed_hz;

            public uint16  delay_usecs;
            public uint8   bits_per_word;
            public uint8   cs_change;
            public uint32  pad;
        }

        /* mode constants */
        [CCode (cheader_filename = "linux/spi/spidev.h")]
        public const int SPI_CPHA;
        [CCode (cheader_filename = "linux/spi/spidev.h")]
        public const int SPI_CPOL;

        [CCode (cheader_filename = "linux/spi/spidev.h")]
        public const int SPI_MODE_0;
        [CCode (cheader_filename = "linux/spi/spidev.h")]
        public const int SPI_MODE_1;
        [CCode (cheader_filename = "linux/spi/spidev.h")]
        public const int SPI_MODE_2;
        [CCode (cheader_filename = "linux/spi/spidev.h")]
        public const int SPI_MODE_3;

        [CCode (cheader_filename = "linux/spi/spidev.h")]
        public const int SPI_CS_HIGH;
        [CCode (cheader_filename = "linux/spi/spidev.h")]
        public const int SPI_LSB_FIRST;
        [CCode (cheader_filename = "linux/spi/spidev.h")]
        public const int SPI_3WIRE;
        [CCode (cheader_filename = "linux/spi/spidev.h")]
        public const int SPI_LOOP;
        [CCode (cheader_filename = "linux/spi/spidev.h")]
        public const int SPI_NO_CS;
        [CCode (cheader_filename = "linux/spi/spidev.h")]
        public const int SPI_READY;

        /* size */
        public int SPI_MSGSIZE(int N);
        public int SPI_IOC_MESSAGE(int N);

        /* ioctls */
        [CCode (cheader_filename = "linux/spi/spidev.h")]
        public const int SPI_IOC_RD_MODE;
        [CCode (cheader_filename = "linux/spi/spidev.h")]
        public const int SPI_IOC_WR_MODE;

        [CCode (cheader_filename = "linux/spi/spidev.h")]
        public const int SPI_IOC_RD_LSB_FIRST;
        [CCode (cheader_filename = "linux/spi/spidev.h")]
        public const int SPI_IOC_WR_LSB_FIRST;

        [CCode (cheader_filename = "linux/spi/spidev.h")]
        public const int SPI_IOC_RD_BITS_PER_WORD;
        [CCode (cheader_filename = "linux/spi/spidev.h")]
        public const int SPI_IOC_WR_BITS_PER_WORD;
        [CCode (cheader_filename = "linux/spi/spidev.h")]
        public const int SPI_IOC_RD_MAX_SPEED_HZ;
        [CCode (cheader_filename = "linux/spi/spidev.h")]
        public const int SPI_IOC_WR_MAX_SPEED_HZ;
    }

    /*
     * Terminal input/output
     */
    [CCode (cprefix = "", lower_case_cprefix = "")]
    namespace Termios {

        /*
         * non-posix functions
         */
        [CCode (cheader_filename = "stdlib.h")]
        public int ptsname_r (int fd, char[] buf);

        /*
         * non-posix flags
         */
        [CCode (cheader_filename = "termios.h")]
        public const int OLCUC;

        /*
         * non-posix constants
         */

        // flow control
        [CCode (cheader_filename = "termios.h")]
        public const int CRTSCTS;
        // v24 modem lines
        [CCode (cheader_filename = "termios.h")]
        public const int TIOCM_LE;
        [CCode (cheader_filename = "termios.h")]
        public const int TIOCM_DTR;
        [CCode (cheader_filename = "termios.h")]
        public const int TIOCM_RTS;
        [CCode (cheader_filename = "termios.h")]
        public const int TIOCM_ST;
        [CCode (cheader_filename = "termios.h")]
        public const int TIOCM_SR;
        [CCode (cheader_filename = "termios.h")]
        public const int TIOCM_CTS;
        [CCode (cheader_filename = "termios.h")]
        public const int TIOCM_CARM;
        [CCode (cheader_filename = "termios.h")]
        public const int TIOCM_RNG;
        [CCode (cheader_filename = "termios.h")]
        public const int TIOCM_DSR;
        [CCode (cheader_filename = "termios.h")]
        public const int TIOCM_OUT1;
        [CCode (cheader_filename = "termios.h")]
        public const int TIOCM_OUT2;
        [CCode (cheader_filename = "termios.h")]
        public const int TIOCM_LOOP;
        // baud rates
        [CCode (cheader_filename = "termios.h")]
        public const int B460800;
        [CCode (cheader_filename = "termios.h")]
        public const int B500000;
        [CCode (cheader_filename = "termios.h")]
        public const int B576000;
        [CCode (cheader_filename = "termios.h")]
        public const int B921600;
        [CCode (cheader_filename = "termios.h")]
        public const int B1000000;
        [CCode (cheader_filename = "termios.h")]
        public const int B1152000;
        [CCode (cheader_filename = "termios.h")]
        public const int B1500000;
        [CCode (cheader_filename = "termios.h")]
        public const int B2000000;
        [CCode (cheader_filename = "termios.h")]
        public const int B2500000;
        [CCode (cheader_filename = "termios.h")]
        public const int B3000000;
        [CCode (cheader_filename = "termios.h")]
        public const int B3500000;
        [CCode (cheader_filename = "termios.h")]
        public const int B4000000;
        // misc
        [CCode (cheader_filename = "termios.h")]
        public const Posix.tcflag_t CBAUD;
        [CCode (cheader_filename = "termios.h")]
        public const Posix.tcflag_t CBAUDEX;
        [CCode (cheader_filename = "termios.h")]
        public const Posix.tcflag_t ECHOCTL;
        [CCode (cheader_filename = "termios.h")]
        public const Posix.tcflag_t ECHOPRT;
        [CCode (cheader_filename = "termios.h")]
        public const Posix.tcflag_t ECHOKE;

        /*
         * ioctls
         */
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TCGETS;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TCSETS;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TCSETSW;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TCSETSF;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TCGETA;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TCSETA;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TCSETAW;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TCSETAF;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TCSBRK;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TCXONC;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TCFLSH;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCEXCL;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCNXCL;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCSCTTY;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCGPGRP;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCSPGRP;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCOUTQ;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCSTI;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCGWINSZ;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCSWINSZ;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCMGET;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCMBIS;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCMBIC;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCMSET;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCGSOFTCAR;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCSSOFTCAR;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int FIONREAD;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCINQ;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCLINUX;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCCONS;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCGSERIAL;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCSSERIAL;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCPKT;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int FIONBIO;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCNOTTY;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCSETD;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCGETD;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TCSBRKP;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCSBRK;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCCBRK;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCGSID;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TCGETS2;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TCSETS2;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TCSETSW2;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TCSETSF2;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCGRS485;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCSRS485;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCGPTN;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCSPTLCK;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TCGETX;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TCSETX;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TCSETXF;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TCSETXW;

        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int FIONCLEX;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int FIOCLEX;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int FIOASYNC;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCSERCONFIG;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCSERGWILD;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCSERSWILD;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCGLCKTRMIOS;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCSLCKTRMIOS;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCSERGSTRUCT;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCSERGETLSR;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCSERGETMULTI;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCSERSETMULTI;

        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCMIWAIT;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCGICOUNT;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCGHAYESESP;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCSHAYESESP;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int FIOQSIZE;

        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCPKT_DATA;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCPKT_FLUSHREAD;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCPKT_FLUSHWRITE;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCPKT_STOP;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCPKT_START;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCPKT_NOSTOP;
        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCPKT_DOSTOP;

        [CCode (cheader_filename = "sys/ioctl.h")]
        public const int TIOCSER_TEMT;
    }

    /*
     * Userspace Input
     */
    [CCode (cprefix = "", lower_case_cprefix = "")]
    namespace UserspaceInput {
        [CCode (cheader_filename = "linux/uinput.h", cname = "UINPUT_VERSION")]
        public const int VERSION;
        [CCode (cheader_filename = "linux/uinput.h", cname = "UINPUT_MAX_NAME_SIZE")]
        public const int MAX_NAME_SIZE;

        [CCode (cheader_filename = "linux/uinput.h")]
        public const int EV_UINPUT;
        [CCode (cheader_filename = "linux/uinput.h")]
        public const int UI_FF_UPLOAD;
        [CCode (cheader_filename = "linux/uinput.h")]
        public const int UI_FF_ERASE;

        [CCode (cheader_filename = "linux/uinput.h")]
        public const int UI_DEV_CREATE;
        [CCode (cheader_filename = "linux/uinput.h")]
        public const int UI_DEV_DESTROY;
        [CCode (cheader_filename = "linux/uinput.h")]
        public const int UI_SET_EVBIT;
        [CCode (cheader_filename = "linux/uinput.h")]
        public const int UI_SET_KEYBIT;
        [CCode (cheader_filename = "linux/uinput.h")]
        public const int UI_SET_RELBIT;
        [CCode (cheader_filename = "linux/uinput.h")]
        public const int UI_SET_ABSBIT;
        [CCode (cheader_filename = "linux/uinput.h")]
        public const int UI_SET_MSCBIT;
        [CCode (cheader_filename = "linux/uinput.h")]
        public const int UI_SET_LEDBIT;
        [CCode (cheader_filename = "linux/uinput.h")]
        public const int UI_SET_SNDBIT;
        [CCode (cheader_filename = "linux/uinput.h")]
        public const int UI_SET_FFBIT;
        [CCode (cheader_filename = "linux/uinput.h")]
        public const int UI_SET_PHYS;
        [CCode (cheader_filename = "linux/uinput.h")]
        public const int UI_SET_SWBIT;

        [CCode (cname = "struct uinput_user_dev", cheader_filename = "linux/uinput.h")]
        public struct UserDevice {
            public char name[80];
            public Input.Id id;
            public uint32 ff_effects_max;
            public int32 absmax[64];
            public int32 absmin[64];
            public int32 absfuzz[64];
            public int32 absflat[64];
        }

        [CCode (cname = "struct uinput_setup", cheader_filename = "linux/uinput.h")]
        public struct UserSetup {
            public Input.Id id;
            public char name[80];
            public uint32 ff_effects_max;
        }

        [CCode (cheader_filename = "linux/uinput.h")]
        public const int UI_DEV_SETUP;

        [CCode (cname = "struct uinput_abs_setup", cheader_filename = "linux/uinput.h")]
        public struct AbsSetup {
            public uint16 code;
            public Input.AbsInfo absinfo;
        }

        [CCode (cheader_filename = "linux/uinput.h")]
        public const int UI_ABS_SETUP;

        [CCode (cheader_filename = "linux/uinput.h")]
        public static int UI_GET_SYSNAME (int len);
        [CCode (cheader_filename = "linux/uinput.h")]
        public const int UI_GET_VERSION;
    }

    /*
     * Virtual Terminal
     */
    [CCode (cprefix = "", lower_case_cprefix = "")]
    namespace VirtualTerminal {

        /* constants */

        [CCode (cheader_filename = "linux/vt.h")]
        public const int MIN_NR_CONSOLES;
        [CCode (cheader_filename = "linux/vt.h")]
        public const int MAX_NR_CONSOLES;
        [CCode (cheader_filename = "linux/vt.h")]
        public const int MAX_NR_USER_CONSOLES;
        [CCode (cheader_filename = "linux/vt.h")]
        public const int VT_OPENQRY;
        [CCode (cheader_filename = "linux/vt.h")]
        public const int VT_GETMODE;
        [CCode (cheader_filename = "linux/vt.h")]
        public const int VT_SETMODE;
        [CCode (cheader_filename = "linux/vt.h")]
        public const int VT_AUTO;
        [CCode (cheader_filename = "linux/vt.h")]
        public const int VT_PROCESS;
        [CCode (cheader_filename = "linux/vt.h")]
        public const int VT_ACKACQ;
        [CCode (cheader_filename = "linux/vt.h")]
        public const int VT_GETSTATE;
        [CCode (cheader_filename = "linux/vt.h")]
        public const int VT_SENDSIG;
        [CCode (cheader_filename = "linux/vt.h")]
        public const int VT_RELDISP;
        [CCode (cheader_filename = "linux/vt.h")]
        public const int VT_ACTIVATE;
        [CCode (cheader_filename = "linux/vt.h")]
        public const int VT_WAITACTIVE;
        [CCode (cheader_filename = "linux/vt.h")]
        public const int VT_DISALLOCATE;
        [CCode (cheader_filename = "linux/vt.h")]
        public const int VT_RESIZE;
        [CCode (cheader_filename = "linux/vt.h")]
        public const int VT_RESIZEX;
        [CCode (cheader_filename = "linux/vt.h")]
        public const int VT_LOCKSWITCH;
        [CCode (cheader_filename = "linux/vt.h")]
        public const int VT_UNLOCKSWITCH;
        [CCode (cheader_filename = "linux/vt.h")]
        public const int VT_GETHIFONTMASK;

        /* structs */

        [CCode (cname = "struct vt_mode", has_type_id = false, cheader_filename = "linux/vt.h")]
        public struct Mode {
            public char mode;
            public char waitv;
            public int16 relsig;
            public int16 acqsig;
            public int16 frsig;
        }

        [CCode (cname = "struct vt_stat", has_type_id = false, cheader_filename = "linux/vt.h")]
        public struct Stat {
            public uint16 v_active;
            public uint16 v_signal;
            public uint16 v_state;
        }

        [CCode (cname = "struct vt_sizes", has_type_id = false, cheader_filename = "linux/vt.h")]
        public struct Sizes {
            public uint16 v_rows;
            public uint16 v_cols;
            public uint16 v_scrollsize;
        }

        [CCode (cname = "struct vt_consize", has_type_id = false, cheader_filename = "linux/vt.h")]
        public struct Consize {
            public uint16 v_rows;
            public uint16 v_cols;
            public uint16 v_vlin;
            public uint16 v_clin;
            public uint16 v_vcol;
            public uint16 v_ccol;
        }
    }

    /*
     * Wireless Extensions (WEXT) Infrastructure
     */
    [CCode (cprefix = "", lower_case_cprefix = "")]
    namespace WirelessExtensions {

        [CCode (cname = "struct iw_point", has_type_id = false, cheader_filename = "linux/wireless.h", destroy_function = "")]
        public struct IwPoint
        {
            public void *pointer;
            public uint16 length;
            public uint16 flags;
        }

        [CCode (cname = "struct iw_param", has_type_id = false, cheader_filename = "linux/wireless.h", destroy_function = "")]
        public struct IwParam
        {
            public int32 value;
            public uint8 fixed;
            public uint8 disabled;
            public uint16 flags;
        }

        [CCode (cname = "struct iw_freq", has_type_id = false, cheader_filename = "linux/wireless.h", destroy_function = "")]
        public struct IwFreq
        {
            public int32 m;
            public int16 e;
            public uint8 i;
            public uint8 flags;
        }

        [CCode (cname = "struct iw_quality", has_type_id = false, cheader_filename = "linux/wireless.h", destroy_function = "")]
        public struct IwQuality
        {
            public uint8 qual;
            public uint8 level;
            public uint8 noise;
            public uint8 updated;
        }

        [CCode (cname = "struct iwreq_data", has_type_id = false, cheader_filename = "linux/wireless.h", destroy_function = "")]
        public struct IwReqData
        {
            public char name[Network.INTERFACE_NAME_SIZE];
            public IwPoint essid;
            public IwParam nwid;
            public IwFreq freq;
            public IwParam sens;
            public IwParam bitrate;
            public IwParam txpower;
            public IwParam rts;
            public IwParam frag;
            public uint32 mode;
            public IwParam retry;
            public IwPoint encoding;
            public IwParam power;
            public IwQuality qual;
            public Posix.SockAddr ap_addr;
            public Posix.SockAddr addr;
            public IwParam param;
            public IwPoint data;
        }

        [CCode (cname = "struct iwreq", has_type_id = false, cheader_filename = "linux/wireless.h", destroy_function = "")]
        public struct IwReq
        {
            public char ifr_name[Network.INTERFACE_NAME_SIZE];
            public IwReqData u;
        }

        /* constants */
        // TBD

        /* ioctls */
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCSIWCOMMIT;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCGIWNAME;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCSIWNWID;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCGIWNWID;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCSIWFREQ;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCGIWFREQ;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCSIWMODE;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCGIWMODE;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCSIWSENS;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCGIWSENS;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCSIWRANGE;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCGIWRANGE;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCSIWPRIV;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCGIWPRIV;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCSIWSTATS;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCGIWSTATS;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCSIWSPY;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCGIWSPY;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCSIWTHRSPY;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCGIWTHRSPY;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCSIWAP;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCGIWAP;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCGIWAPLIST;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCSIWSCAN;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCGIWSCAN;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCSIWESSID;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCGIWESSID;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCSIWNICKN;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCGIWNICKN;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCSIWRATE;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCGIWRATE;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCSIWRTS;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCGIWRTS;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCSIWFRAG;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCGIWFRAG;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCSIWTXPOW;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCGIWTXPOW;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCSIWRETRY;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCGIWRETRY;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCSIWENCODE;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCGIWENCODE;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCSIWPOWER;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCGIWPOWER;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCSIWGENIE;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCGIWGENIE;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCSIWMLME;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCSIWAUTH;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCGIWAUTH;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCSIWENCODEEXT;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCGIWENCODEEXT;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCSIWPMKSA;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCIWFIRSTPRIV;
        [CCode (cheader_filename = "linux/wireless.h")]
        public const int SIOCIWLASTPRIV;
    }

}