lisette-stdlib 0.1.13

Little language inspired by Rust that compiles to Go
Documentation
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
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
// Generated by Lisette bindgen
// Source: syscall (Go stdlib)
// Go: 1.25.5
// Lisette: 0.1.12

import "go:sync"

pub enum Errno: uintptr {
  E2BIG = 7,
  EACCES = 13,
  EADDRINUSE = 48,
  EADDRNOTAVAIL = 49,
  EAFNOSUPPORT = 47,
  EAGAIN = 35,
  EALREADY = 37,
  EAUTH = 80,
  EBADARCH = 86,
  EBADEXEC = 85,
  EBADF = 9,
  EBADMACHO = 88,
  EBADMSG = 94,
  EBADRPC = 72,
  EBUSY = 16,
  ECANCELED = 89,
  ECHILD = 10,
  ECONNABORTED = 53,
  ECONNREFUSED = 61,
  ECONNRESET = 54,
  EDEADLK = 11,
  EDESTADDRREQ = 39,
  EDEVERR = 83,
  EDOM = 33,
  EDQUOT = 69,
  EEXIST = 17,
  EFAULT = 14,
  EFBIG = 27,
  EFTYPE = 79,
  EHOSTDOWN = 64,
  EHOSTUNREACH = 65,
  EIDRM = 90,
  EILSEQ = 92,
  EINPROGRESS = 36,
  EINTR = 4,
  EINVAL = 22,
  EIO = 5,
  EISCONN = 56,
  EISDIR = 21,
  ELAST = 106,
  ELOOP = 62,
  EMFILE = 24,
  EMLINK = 31,
  EMSGSIZE = 40,
  EMULTIHOP = 95,
  ENAMETOOLONG = 63,
  ENEEDAUTH = 81,
  ENETDOWN = 50,
  ENETRESET = 52,
  ENETUNREACH = 51,
  ENFILE = 23,
  ENOATTR = 93,
  ENOBUFS = 55,
  ENODATA = 96,
  ENODEV = 19,
  ENOENT = 2,
  ENOEXEC = 8,
  ENOLCK = 77,
  ENOLINK = 97,
  ENOMEM = 12,
  ENOMSG = 91,
  ENOPOLICY = 103,
  ENOPROTOOPT = 42,
  ENOSPC = 28,
  ENOSR = 98,
  ENOSTR = 99,
  ENOSYS = 78,
  ENOTBLK = 15,
  ENOTCONN = 57,
  ENOTDIR = 20,
  ENOTEMPTY = 66,
  ENOTRECOVERABLE = 104,
  ENOTSOCK = 38,
  ENOTSUP = 45,
  ENOTTY = 25,
  ENXIO = 6,
  EOPNOTSUPP = 102,
  EOVERFLOW = 84,
  EOWNERDEAD = 105,
  EPERM = 1,
  EPFNOSUPPORT = 46,
  EPIPE = 32,
  EPROCLIM = 67,
  EPROCUNAVAIL = 76,
  EPROGMISMATCH = 75,
  EPROGUNAVAIL = 74,
  EPROTO = 100,
  EPROTONOSUPPORT = 43,
  EPROTOTYPE = 41,
  EPWROFF = 82,
  EQFULL = 106,
  ERANGE = 34,
  EREMOTE = 71,
  EROFS = 30,
  ERPCMISMATCH = 73,
  ESHLIBVERS = 87,
  ESHUTDOWN = 58,
  ESOCKTNOSUPPORT = 44,
  ESPIPE = 29,
  ESRCH = 3,
  ESTALE = 70,
  ETIME = 101,
  ETIMEDOUT = 60,
  ETOOMANYREFS = 59,
  ETXTBSY = 26,
  EUSERS = 68,
  EWOULDBLOCK = 35,
  EXDEV = 18,
}

/// Errors
pub const E2BIG: Errno = 7

/// Errors
pub const EACCES: Errno = 13

/// Errors
pub const EADDRINUSE: Errno = 48

/// Errors
pub const EADDRNOTAVAIL: Errno = 49

/// Errors
pub const EAFNOSUPPORT: Errno = 47

/// Errors
pub const EAGAIN: Errno = 35

/// Errors
pub const EALREADY: Errno = 37

/// Errors
pub const EAUTH: Errno = 80

/// Errors
pub const EBADARCH: Errno = 86

/// Errors
pub const EBADEXEC: Errno = 85

/// Errors
pub const EBADF: Errno = 9

/// Errors
pub const EBADMACHO: Errno = 88

/// Errors
pub const EBADMSG: Errno = 94

/// Errors
pub const EBADRPC: Errno = 72

/// Errors
pub const EBUSY: Errno = 16

/// Errors
pub const ECANCELED: Errno = 89

/// Errors
pub const ECHILD: Errno = 10

/// Errors
pub const ECONNABORTED: Errno = 53

/// Errors
pub const ECONNREFUSED: Errno = 61

/// Errors
pub const ECONNRESET: Errno = 54

/// Errors
pub const EDEADLK: Errno = 11

/// Errors
pub const EDESTADDRREQ: Errno = 39

/// Errors
pub const EDEVERR: Errno = 83

/// Errors
pub const EDOM: Errno = 33

/// Errors
pub const EDQUOT: Errno = 69

/// Errors
pub const EEXIST: Errno = 17

/// Errors
pub const EFAULT: Errno = 14

/// Errors
pub const EFBIG: Errno = 27

/// Errors
pub const EFTYPE: Errno = 79

/// Errors
pub const EHOSTDOWN: Errno = 64

/// Errors
pub const EHOSTUNREACH: Errno = 65

/// Errors
pub const EIDRM: Errno = 90

/// Errors
pub const EILSEQ: Errno = 92

/// Errors
pub const EINPROGRESS: Errno = 36

/// Errors
pub const EINTR: Errno = 4

/// Errors
pub const EINVAL: Errno = 22

/// Errors
pub const EIO: Errno = 5

/// Errors
pub const EISCONN: Errno = 56

/// Errors
pub const EISDIR: Errno = 21

/// Errors
pub const ELAST: Errno = 106

/// Errors
pub const ELOOP: Errno = 62

/// Errors
pub const EMFILE: Errno = 24

/// Errors
pub const EMLINK: Errno = 31

/// Errors
pub const EMSGSIZE: Errno = 40

/// Errors
pub const EMULTIHOP: Errno = 95

/// Errors
pub const ENAMETOOLONG: Errno = 63

/// Errors
pub const ENEEDAUTH: Errno = 81

/// Errors
pub const ENETDOWN: Errno = 50

/// Errors
pub const ENETRESET: Errno = 52

/// Errors
pub const ENETUNREACH: Errno = 51

/// Errors
pub const ENFILE: Errno = 23

/// Errors
pub const ENOATTR: Errno = 93

/// Errors
pub const ENOBUFS: Errno = 55

/// Errors
pub const ENODATA: Errno = 96

/// Errors
pub const ENODEV: Errno = 19

/// Errors
pub const ENOENT: Errno = 2

/// Errors
pub const ENOEXEC: Errno = 8

/// Errors
pub const ENOLCK: Errno = 77

/// Errors
pub const ENOLINK: Errno = 97

/// Errors
pub const ENOMEM: Errno = 12

/// Errors
pub const ENOMSG: Errno = 91

/// Errors
pub const ENOPOLICY: Errno = 103

/// Errors
pub const ENOPROTOOPT: Errno = 42

/// Errors
pub const ENOSPC: Errno = 28

/// Errors
pub const ENOSR: Errno = 98

/// Errors
pub const ENOSTR: Errno = 99

/// Errors
pub const ENOSYS: Errno = 78

/// Errors
pub const ENOTBLK: Errno = 15

/// Errors
pub const ENOTCONN: Errno = 57

/// Errors
pub const ENOTDIR: Errno = 20

/// Errors
pub const ENOTEMPTY: Errno = 66

/// Errors
pub const ENOTRECOVERABLE: Errno = 104

/// Errors
pub const ENOTSOCK: Errno = 38

/// Errors
pub const ENOTSUP: Errno = 45

/// Errors
pub const ENOTTY: Errno = 25

/// Errors
pub const ENXIO: Errno = 6

/// Errors
pub const EOPNOTSUPP: Errno = 102

/// Errors
pub const EOVERFLOW: Errno = 84

/// Errors
pub const EOWNERDEAD: Errno = 105

/// Errors
pub const EPERM: Errno = 1

/// Errors
pub const EPFNOSUPPORT: Errno = 46

/// Errors
pub const EPIPE: Errno = 32

/// Errors
pub const EPROCLIM: Errno = 67

/// Errors
pub const EPROCUNAVAIL: Errno = 76

/// Errors
pub const EPROGMISMATCH: Errno = 75

/// Errors
pub const EPROGUNAVAIL: Errno = 74

/// Errors
pub const EPROTO: Errno = 100

/// Errors
pub const EPROTONOSUPPORT: Errno = 43

/// Errors
pub const EPROTOTYPE: Errno = 41

/// Errors
pub const EPWROFF: Errno = 82

/// Errors
pub const EQFULL: Errno = 106

/// Errors
pub const ERANGE: Errno = 34

/// Errors
pub const EREMOTE: Errno = 71

/// Errors
pub const EROFS: Errno = 30

/// Errors
pub const ERPCMISMATCH: Errno = 73

/// Errors
pub const ESHLIBVERS: Errno = 87

/// Errors
pub const ESHUTDOWN: Errno = 58

/// Errors
pub const ESOCKTNOSUPPORT: Errno = 44

/// Errors
pub const ESPIPE: Errno = 29

/// Errors
pub const ESRCH: Errno = 3

/// Errors
pub const ESTALE: Errno = 70

/// Errors
pub const ETIME: Errno = 101

/// Errors
pub const ETIMEDOUT: Errno = 60

/// Errors
pub const ETOOMANYREFS: Errno = 59

/// Errors
pub const ETXTBSY: Errno = 26

/// Errors
pub const EUSERS: Errno = 68

/// Errors
pub const EWOULDBLOCK: Errno = 35

/// Errors
pub const EXDEV: Errno = 18

pub enum Signal: int {
  SIGABRT = 6,
  SIGALRM = 14,
  SIGBUS = 10,
  SIGCHLD = 20,
  SIGCONT = 19,
  SIGEMT = 7,
  SIGFPE = 8,
  SIGHUP = 1,
  SIGILL = 4,
  SIGINFO = 29,
  SIGINT = 2,
  SIGIO = 23,
  SIGIOT = 6,
  SIGKILL = 9,
  SIGPIPE = 13,
  SIGPROF = 27,
  SIGQUIT = 3,
  SIGSEGV = 11,
  SIGSTOP = 17,
  SIGSYS = 12,
  SIGTERM = 15,
  SIGTRAP = 5,
  SIGTSTP = 18,
  SIGTTIN = 21,
  SIGTTOU = 22,
  SIGURG = 16,
  SIGUSR1 = 30,
  SIGUSR2 = 31,
  SIGVTALRM = 26,
  SIGWINCH = 28,
  SIGXCPU = 24,
  SIGXFSZ = 25,
}

/// Signals
pub const SIGABRT: Signal = 6

/// Signals
pub const SIGALRM: Signal = 14

/// Signals
pub const SIGBUS: Signal = 10

/// Signals
pub const SIGCHLD: Signal = 20

/// Signals
pub const SIGCONT: Signal = 19

/// Signals
pub const SIGEMT: Signal = 7

/// Signals
pub const SIGFPE: Signal = 8

/// Signals
pub const SIGHUP: Signal = 1

/// Signals
pub const SIGILL: Signal = 4

/// Signals
pub const SIGINFO: Signal = 29

/// Signals
pub const SIGINT: Signal = 2

/// Signals
pub const SIGIO: Signal = 23

/// Signals
pub const SIGIOT: Signal = 6

/// Signals
pub const SIGKILL: Signal = 9

/// Signals
pub const SIGPIPE: Signal = 13

/// Signals
pub const SIGPROF: Signal = 27

/// Signals
pub const SIGQUIT: Signal = 3

/// Signals
pub const SIGSEGV: Signal = 11

/// Signals
pub const SIGSTOP: Signal = 17

/// Signals
pub const SIGSYS: Signal = 12

/// Signals
pub const SIGTERM: Signal = 15

/// Signals
pub const SIGTRAP: Signal = 5

/// Signals
pub const SIGTSTP: Signal = 18

/// Signals
pub const SIGTTIN: Signal = 21

/// Signals
pub const SIGTTOU: Signal = 22

/// Signals
pub const SIGURG: Signal = 16

/// Signals
pub const SIGUSR1: Signal = 30

/// Signals
pub const SIGUSR2: Signal = 31

/// Signals
pub const SIGVTALRM: Signal = 26

/// Signals
pub const SIGWINCH: Signal = 28

/// Signals
pub const SIGXCPU: Signal = 24

/// Signals
pub const SIGXFSZ: Signal = 25

pub fn Accept(fd: int) -> Result<(int, Sockaddr), error>

pub fn Access(path: string, mode: uint32) -> Result<(), error>

pub fn Adjtime(delta: Ref<Timeval>, olddelta: Ref<Timeval>) -> Result<(), error>

pub fn Bind(fd: int, sa: Sockaddr) -> Result<(), error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn BpfBuflen(fd: int) -> Result<int, error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn BpfDatalink(fd: int) -> Result<int, error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn BpfHeadercmpl(fd: int) -> Result<int, error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn BpfInterface(fd: int, name: string) -> Result<string, error>

pub fn BpfJump(code: int, k: int, jt: int, jf: int) -> Ref<BpfInsn>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn BpfStats(fd: int) -> Result<Ref<BpfStat>, error>

pub fn BpfStmt(code: int, k: int) -> Ref<BpfInsn>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn BpfTimeout(fd: int) -> Result<Ref<Timeval>, error>

/// BytePtrFromString returns a pointer to a NUL-terminated array of
/// bytes containing the text of s. If s contains a NUL byte at any
/// location, it returns (nil, [EINVAL]).
pub fn BytePtrFromString(s: string) -> Result<Ref<uint8>, error>

/// ByteSliceFromString returns a NUL-terminated slice of bytes
/// containing the text of s. If s contains a NUL byte at any
/// location, it returns (nil, [EINVAL]).
pub fn ByteSliceFromString(s: string) -> Result<Slice<uint8>, error>

pub fn Chdir(path: string) -> Result<(), error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn CheckBpfVersion(fd: int) -> Result<(), error>

pub fn Chflags(path: string, flags: int) -> Result<(), error>

pub fn Chmod(path: string, mode: uint32) -> Result<(), error>

pub fn Chown(path: string, uid: int, gid: int) -> Result<(), error>

pub fn Chroot(path: string) -> Result<(), error>

pub fn Clearenv()

pub fn Close(fd: int) -> Result<(), error>

pub fn CloseOnExec(fd: int)

/// CmsgLen returns the value to store in the Len field of the [Cmsghdr]
/// structure, taking into account any necessary alignment.
pub fn CmsgLen(datalen: int) -> int

/// CmsgSpace returns the number of bytes an ancillary element with
/// payload of the passed data length occupies.
pub fn CmsgSpace(datalen: int) -> int

pub fn Connect(fd: int, sa: Sockaddr) -> Result<(), error>

pub fn Dup(fd: int) -> Result<int, error>

pub fn Dup2(from: int, to: int) -> Result<(), error>

pub fn Environ() -> Slice<string>

pub fn Exchangedata(path1: string, path2: string, options: int) -> Result<(), error>

/// Exec invokes the execve(2) system call.
pub fn Exec(argv0: string, argv: Slice<string>, envv: Slice<string>) -> Result<(), error>

pub fn Exit(code: int)

pub fn Fchdir(fd: int) -> Result<(), error>

pub fn Fchflags(fd: int, flags: int) -> Result<(), error>

pub fn Fchmod(fd: int, mode: uint32) -> Result<(), error>

pub fn Fchown(fd: int, uid: int, gid: int) -> Result<(), error>

/// FcntlFlock performs a fcntl syscall for the [F_GETLK], [F_SETLK] or [F_SETLKW] command.
pub fn FcntlFlock(fd: uint, cmd: int, lk: Ref<Flock_t>) -> Result<(), error>

pub fn Flock(fd: int, how: int) -> Result<(), error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn FlushBpf(fd: int) -> Result<(), error>

/// Combination of fork and exec, careful to be thread safe.
pub fn ForkExec(argv0: string, argv: Slice<string>, attr: Ref<ProcAttr>) -> Result<int, error>

pub fn Fpathconf(fd: int, name: int) -> Result<int, error>

pub fn Fstat(fd: int, stat: Ref<Stat_t>) -> Result<(), error>

pub fn Fstatfs(fd: int, stat: Ref<Statfs_t>) -> Result<(), error>

pub fn Fsync(fd: int) -> Result<(), error>

pub fn Ftruncate(fd: int, length: int64) -> Result<(), error>

pub fn Futimes(fd: int, tv: Slice<Timeval>) -> Result<(), error>

pub fn Getdirentries(fd: int, mut buf: Slice<uint8>, basep: Ref<uint>) -> Result<int, error>

pub fn Getdtablesize() -> int

pub fn Getegid() -> int

pub fn Getenv(key: string) -> Option<string>

pub fn Geteuid() -> int

pub fn Getfsstat(mut buf: Slice<Statfs_t>, flags: int) -> Result<int, error>

pub fn Getgid() -> int

pub fn Getgroups() -> Result<Slice<int>, error>

pub fn Getpagesize() -> int

pub fn Getpeername(fd: int) -> Result<Sockaddr, error>

pub fn Getpgid(pid: int) -> Result<int, error>

pub fn Getpgrp() -> int

pub fn Getpid() -> int

pub fn Getppid() -> int

pub fn Getpriority(which: int, who: int) -> Result<int, error>

pub fn Getrlimit(which: int, lim: Ref<Rlimit>) -> Result<(), error>

pub fn Getrusage(who: int, rusage: Ref<Rusage>) -> Result<(), error>

pub fn Getsid(pid: int) -> Result<int, error>

pub fn Getsockname(fd: int) -> Result<Sockaddr, error>

pub fn GetsockoptByte(fd: int, level: int, opt: int) -> Result<uint8, error>

pub fn GetsockoptICMPv6Filter(fd: int, level: int, opt: int) -> Result<Ref<ICMPv6Filter>, error>

pub fn GetsockoptIPMreq(fd: int, level: int, opt: int) -> Result<Ref<IPMreq>, error>

pub fn GetsockoptIPv6MTUInfo(fd: int, level: int, opt: int) -> Result<Ref<IPv6MTUInfo>, error>

pub fn GetsockoptIPv6Mreq(fd: int, level: int, opt: int) -> Result<Ref<IPv6Mreq>, error>

pub fn GetsockoptInet4Addr(fd: int, level: int, opt: int) -> Result<Slice<uint8>, error>

pub fn GetsockoptInt(fd: int, level: int, opt: int) -> Result<int, error>

pub fn Gettimeofday(tp: Ref<Timeval>) -> Result<(), error>

pub fn Getuid() -> int

pub fn Getwd() -> Result<string, error>

pub fn Issetugid() -> bool

pub fn Kevent(
  kq: int,
  changes: Slice<Kevent_t>,
  events: Slice<Kevent_t>,
  timeout: Ref<Timespec>,
) -> Result<int, error>

pub fn Kill(pid: int, signum: Signal) -> Result<(), error>

pub fn Kqueue() -> Result<int, error>

pub fn Lchown(path: string, uid: int, gid: int) -> Result<(), error>

pub fn Link(path: string, link: string) -> Result<(), error>

pub fn Listen(s: int, backlog: int) -> Result<(), error>

pub fn Lstat(path: string, stat: Ref<Stat_t>) -> Result<(), error>

pub fn Mkdir(path: string, mode: uint32) -> Result<(), error>

pub fn Mkfifo(path: string, mode: uint32) -> Result<(), error>

pub fn Mknod(path: string, mode: uint32, dev: int) -> Result<(), error>

pub fn Mlock(b: Slice<uint8>) -> Result<(), error>

pub fn Mlockall(flags: int) -> Result<(), error>

pub fn Mmap(fd: int, offset: int64, length: int, prot: int, flags: int) -> Result<Slice<uint8>, error>

pub fn Mprotect(b: Slice<uint8>, prot: int) -> Result<(), error>

pub fn Munlock(b: Slice<uint8>) -> Result<(), error>

pub fn Munlockall() -> Result<(), error>

pub fn Munmap(b: Slice<uint8>) -> Result<(), error>

pub fn NsecToTimespec(nsec: int64) -> Timespec

pub fn NsecToTimeval(nsec: int64) -> Timeval

pub fn Open(path: string, mode: int, perm: uint32) -> Result<int, error>

/// ParseDirent parses up to max directory entries in buf,
/// appending the names to names. It returns the number of
/// bytes consumed from buf, the number of entries added
/// to names, and the new names slice.
pub fn ParseDirent(buf: Slice<uint8>, max: int, names: Slice<string>) -> (int, int, Slice<string>)

/// ParseRoutingMessage parses b as routing messages and returns the
/// slice containing the [RoutingMessage] interfaces.
/// 
/// Deprecated: Use golang.org/x/net/route instead.
pub fn ParseRoutingMessage(b: Slice<uint8>) -> Result<Slice<RoutingMessage>, error>

/// ParseRoutingSockaddr parses msg's payload as raw sockaddrs and
/// returns the slice containing the [Sockaddr] interfaces.
/// 
/// Deprecated: Use golang.org/x/net/route instead.
pub fn ParseRoutingSockaddr(msg: RoutingMessage) -> Result<Slice<Sockaddr>, error>

/// ParseSocketControlMessage parses b as an array of socket control
/// messages.
pub fn ParseSocketControlMessage(b: Slice<uint8>) -> Result<Slice<SocketControlMessage>, error>

/// ParseUnixRights decodes a socket control message that contains an
/// integer array of open file descriptors from another process.
pub fn ParseUnixRights(m: Ref<SocketControlMessage>) -> Result<Slice<int>, error>

pub fn Pathconf(path: string, name: int) -> Result<int, error>

pub fn Pipe(mut p: Slice<int>) -> Result<(), error>

pub fn Pread(fd: int, mut p: Slice<uint8>, offset: int64) -> Result<int, error>

pub fn PtraceAttach(pid: int) -> Result<(), error>

pub fn PtraceDetach(pid: int) -> Result<(), error>

pub fn Pwrite(fd: int, p: Slice<uint8>, offset: int64) -> Result<int, error>

pub fn RawSyscall(trap: uint, a1: uint, a2: uint, a3: uint) -> (uint, uint, Errno)

pub fn RawSyscall6(
  trap: uint,
  a1: uint,
  a2: uint,
  a3: uint,
  a4: uint,
  a5: uint,
  a6: uint,
) -> (uint, uint, Errno)

pub fn Read(fd: int, mut p: Slice<uint8>) -> Result<int, error>

pub fn ReadDirent(fd: int, mut buf: Slice<uint8>) -> Result<int, error>

pub fn Readlink(path: string, mut buf: Slice<uint8>) -> Result<int, error>

pub fn Recvfrom(fd: int, mut p: Slice<uint8>, flags: int) -> Result<(int, Sockaddr), error>

pub fn Recvmsg(fd: int, mut p: Slice<uint8>, mut oob: Slice<uint8>, flags: int) -> Result<(int, int, int, Sockaddr), error>

pub fn Rename(from: string, to: string) -> Result<(), error>

pub fn Revoke(path: string) -> Result<(), error>

pub fn Rmdir(path: string) -> Result<(), error>

/// RouteRIB returns routing information base, as known as RIB,
/// which consists of network facility information, states and
/// parameters.
/// 
/// Deprecated: Use golang.org/x/net/route instead.
pub fn RouteRIB(facility: int, param: int) -> Result<Slice<uint8>, error>

pub fn Seek(fd: int, offset: int64, whence: int) -> Result<int64, error>

pub fn Select(
  n: int,
  r: Ref<FdSet>,
  w: Ref<FdSet>,
  e: Ref<FdSet>,
  timeout: Ref<Timeval>,
) -> Result<(), error>

pub fn Sendfile(outfd: int, infd: int, offset: Ref<int64>, count: int) -> Result<int, error>

pub fn Sendmsg(
  fd: int,
  p: Slice<uint8>,
  oob: Slice<uint8>,
  to: Sockaddr,
  flags: int,
) -> Result<(), error>

pub fn SendmsgN(
  fd: int,
  p: Slice<uint8>,
  oob: Slice<uint8>,
  to: Sockaddr,
  flags: int,
) -> Result<int, error>

pub fn Sendto(fd: int, p: Slice<uint8>, flags: int, to: Sockaddr) -> Result<(), error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn SetBpf(fd: int, i: Slice<BpfInsn>) -> Result<(), error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn SetBpfBuflen(fd: int, l: int) -> Result<int, error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn SetBpfDatalink(fd: int, t: int) -> Result<int, error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn SetBpfHeadercmpl(fd: int, f: int) -> Result<(), error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn SetBpfImmediate(fd: int, m: int) -> Result<(), error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn SetBpfInterface(fd: int, name: string) -> Result<(), error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn SetBpfPromisc(fd: int, m: int) -> Result<(), error>

/// Deprecated: Use golang.org/x/net/bpf instead.
pub fn SetBpfTimeout(fd: int, tv: Ref<Timeval>) -> Result<(), error>

pub fn SetKevent(k: Ref<Kevent_t>, fd: int, mode: int, flags: int)

pub fn SetNonblock(fd: int, nonblocking: bool) -> Result<(), error>

pub fn Setegid(egid: int) -> Result<(), error>

pub fn Setenv(key: string, value: string) -> Result<(), error>

pub fn Seteuid(euid: int) -> Result<(), error>

pub fn Setgid(gid: int) -> Result<(), error>

pub fn Setgroups(gids: Slice<int>) -> Result<(), error>

pub fn Setlogin(name: string) -> Result<(), error>

pub fn Setpgid(pid: int, pgid: int) -> Result<(), error>

pub fn Setpriority(which: int, who: int, prio: int) -> Result<(), error>

pub fn Setprivexec(flag: int) -> Result<(), error>

pub fn Setregid(rgid: int, egid: int) -> Result<(), error>

pub fn Setreuid(ruid: int, euid: int) -> Result<(), error>

pub fn Setrlimit(resource: int, rlim: Ref<Rlimit>) -> Result<(), error>

pub fn Setsid() -> Result<int, error>

pub fn SetsockoptByte(fd: int, level: int, opt: int, value: uint8) -> Result<(), error>

pub fn SetsockoptICMPv6Filter(
  fd: int,
  level: int,
  opt: int,
  filter: Ref<ICMPv6Filter>,
) -> Result<(), error>

pub fn SetsockoptIPMreq(fd: int, level: int, opt: int, mreq: Ref<IPMreq>) -> Result<(), error>

pub fn SetsockoptIPv6Mreq(fd: int, level: int, opt: int, mreq: Ref<IPv6Mreq>) -> Result<(), error>

pub fn SetsockoptInet4Addr(fd: int, level: int, opt: int, value: Slice<uint8>) -> Result<(), error>

pub fn SetsockoptInt(fd: int, level: int, opt: int, value: int) -> Result<(), error>

pub fn SetsockoptLinger(fd: int, level: int, opt: int, l: Ref<Linger>) -> Result<(), error>

pub fn SetsockoptString(fd: int, level: int, opt: int, s: string) -> Result<(), error>

pub fn SetsockoptTimeval(fd: int, level: int, opt: int, tv: Ref<Timeval>) -> Result<(), error>

pub fn Settimeofday(tp: Ref<Timeval>) -> Result<(), error>

pub fn Setuid(uid: int) -> Result<(), error>

pub fn Shutdown(s: int, how: int) -> Result<(), error>

/// SlicePtrFromStrings converts a slice of strings to a slice of
/// pointers to NUL-terminated byte arrays. If any string contains
/// a NUL byte, it returns (nil, [EINVAL]).
pub fn SlicePtrFromStrings(ss: Slice<string>) -> Result<Slice<Ref<uint8>>, error>

pub fn Socket(domain: int, typ: int, proto: int) -> Result<int, error>

pub fn Socketpair(domain: int, typ: int, proto: int) -> Result<Slice<int>, error>

/// StartProcess wraps [ForkExec] for package os.
pub fn StartProcess(argv0: string, argv: Slice<string>, attr: Ref<ProcAttr>) -> Result<(int, uint), error>

pub fn Stat(path: string, stat: Ref<Stat_t>) -> Result<(), error>

pub fn Statfs(path: string, stat: Ref<Statfs_t>) -> Result<(), error>

/// StringBytePtr returns a pointer to a NUL-terminated array of bytes.
/// If s contains a NUL byte this function panics instead of returning
/// an error.
/// 
/// Deprecated: Use [BytePtrFromString] instead.
pub fn StringBytePtr(s: string) -> Ref<uint8>

/// StringByteSlice converts a string to a NUL-terminated []byte,
/// If s contains a NUL byte this function panics instead of
/// returning an error.
/// 
/// Deprecated: Use ByteSliceFromString instead.
pub fn StringByteSlice(s: string) -> Slice<uint8>

/// StringSlicePtr converts a slice of strings to a slice of pointers
/// to NUL-terminated byte arrays. If any string contains a NUL byte
/// this function panics instead of returning an error.
/// 
/// Deprecated: Use [SlicePtrFromStrings] instead.
pub fn StringSlicePtr(ss: Slice<string>) -> Slice<Ref<uint8>>

pub fn Symlink(path: string, link: string) -> Result<(), error>

pub fn Sync() -> Result<(), error>

pub fn Syscall(trap: uint, a1: uint, a2: uint, a3: uint) -> (uint, uint, Errno)

pub fn Syscall6(
  trap: uint,
  a1: uint,
  a2: uint,
  a3: uint,
  a4: uint,
  a5: uint,
  a6: uint,
) -> (uint, uint, Errno)

pub fn Syscall9(
  num: uint,
  a1: uint,
  a2: uint,
  a3: uint,
  a4: uint,
  a5: uint,
  a6: uint,
  a7: uint,
  a8: uint,
  a9: uint,
) -> (uint, uint, Errno)

pub fn Sysctl(name: string) -> Result<string, error>

pub fn SysctlUint32(name: string) -> Result<uint32, error>

/// TimespecToNsec returns the time stored in ts as nanoseconds.
pub fn TimespecToNsec(ts: Timespec) -> int64

/// TimevalToNsec returns the time stored in tv as nanoseconds.
pub fn TimevalToNsec(tv: Timeval) -> int64

pub fn Truncate(path: string, length: int64) -> Result<(), error>

pub fn Umask(newmask: int) -> int

pub fn Undelete(path: string) -> Result<(), error>

/// UnixRights encodes a set of open file descriptors into a socket
/// control message for sending to another process.
pub fn UnixRights(fds: VarArgs<int>) -> Slice<uint8>

pub fn Unlink(path: string) -> Result<(), error>

pub fn Unmount(path: string, flags: int) -> Result<(), error>

pub fn Unsetenv(key: string) -> Result<(), error>

pub fn Utimes(path: string, tv: Slice<Timeval>) -> Result<(), error>

pub fn UtimesNano(path: string, ts: Slice<Timespec>) -> Result<(), error>

pub fn Wait4(
  pid: int,
  wstatus: Ref<WaitStatus>,
  options: int,
  rusage: Ref<Rusage>,
) -> Result<int, error>

pub fn Write(fd: int, p: Slice<uint8>) -> Result<int, error>

pub struct BpfHdr {
  pub Tstamp: Timeval32,
  pub Caplen: uint32,
  pub Datalen: uint32,
  pub Hdrlen: uint16,
  pub Pad_cgo_0: Slice<uint8>,
}

pub struct BpfInsn {
  pub Code: uint16,
  pub Jt: uint8,
  pub Jf: uint8,
  pub K: uint32,
}

pub struct BpfProgram {
  pub Len: uint32,
  pub Pad_cgo_0: Slice<uint8>,
  pub Insns: Option<Ref<BpfInsn>>,
}

pub struct BpfStat {
  pub Recv: uint32,
  pub Drop: uint32,
}

pub struct BpfVersion {
  pub Major: uint16,
  pub Minor: uint16,
}

pub struct Cmsghdr {
  pub Len: uint32,
  pub Level: int32,
  pub Type: int32,
}

/// Conn is implemented by some types in the net and os packages to provide
/// access to the underlying file descriptor or handle.
pub interface Conn {
  fn SyscallConn() -> Result<RawConn, error>
}

/// Credential holds user and group identities to be assumed
/// by a child process started by [StartProcess].
pub struct Credential {
  pub Uid: uint32,
  pub Gid: uint32,
  pub Groups: Slice<uint32>,
  pub NoSetGroups: bool,
}

pub struct Dirent {
  pub Ino: uint64,
  pub Seekoff: uint64,
  pub Reclen: uint16,
  pub Namlen: uint16,
  pub Type: uint8,
  pub Name: Slice<int8>,
  pub Pad_cgo_0: Slice<uint8>,
}

pub struct Fbootstraptransfer_t {
  pub Offset: int64,
  pub Length: uint64,
  pub Buffer: Option<Ref<uint8>>,
}

pub struct FdSet {
  pub Bits: Slice<int32>,
}

pub struct Flock_t {
  pub Start: int64,
  pub Len: int64,
  pub Pid: int32,
  pub Type: int16,
  pub Whence: int16,
}

pub struct Fsid {
  pub Val: Slice<int32>,
}

pub struct Fstore_t {
  pub Flags: uint32,
  pub Posmode: int32,
  pub Offset: int64,
  pub Length: int64,
  pub Bytesalloc: int64,
}

pub struct ICMPv6Filter {
  pub Filt: Slice<uint32>,
}

pub struct IPMreq {
  pub Multiaddr: Slice<uint8>,
  pub Interface: Slice<uint8>,
}

pub struct IPv6MTUInfo {
  pub Addr: RawSockaddrInet6,
  pub Mtu: uint32,
}

pub struct IPv6Mreq {
  pub Multiaddr: Slice<uint8>,
  pub Interface: uint32,
}

pub struct IfData {
  pub Type: uint8,
  pub Typelen: uint8,
  pub Physical: uint8,
  pub Addrlen: uint8,
  pub Hdrlen: uint8,
  pub Recvquota: uint8,
  pub Xmitquota: uint8,
  pub Unused1: uint8,
  pub Mtu: uint32,
  pub Metric: uint32,
  pub Baudrate: uint32,
  pub Ipackets: uint32,
  pub Ierrors: uint32,
  pub Opackets: uint32,
  pub Oerrors: uint32,
  pub Collisions: uint32,
  pub Ibytes: uint32,
  pub Obytes: uint32,
  pub Imcasts: uint32,
  pub Omcasts: uint32,
  pub Iqdrops: uint32,
  pub Noproto: uint32,
  pub Recvtiming: uint32,
  pub Xmittiming: uint32,
  pub Lastchange: Timeval32,
  pub Unused2: uint32,
  pub Hwassist: uint32,
  pub Reserved1: uint32,
  pub Reserved2: uint32,
}

pub struct IfMsghdr {
  pub Msglen: uint16,
  pub Version: uint8,
  pub Type: uint8,
  pub Addrs: int32,
  pub Flags: int32,
  pub Index: uint16,
  pub Pad_cgo_0: Slice<uint8>,
  pub Data: IfData,
}

pub struct IfaMsghdr {
  pub Msglen: uint16,
  pub Version: uint8,
  pub Type: uint8,
  pub Addrs: int32,
  pub Flags: int32,
  pub Index: uint16,
  pub Pad_cgo_0: Slice<uint8>,
  pub Metric: int32,
}

pub struct IfmaMsghdr {
  pub Msglen: uint16,
  pub Version: uint8,
  pub Type: uint8,
  pub Addrs: int32,
  pub Flags: int32,
  pub Index: uint16,
  pub Pad_cgo_0: Slice<uint8>,
}

pub struct IfmaMsghdr2 {
  pub Msglen: uint16,
  pub Version: uint8,
  pub Type: uint8,
  pub Addrs: int32,
  pub Flags: int32,
  pub Index: uint16,
  pub Pad_cgo_0: Slice<uint8>,
  pub Refcount: int32,
}

pub struct Inet4Pktinfo {
  pub Ifindex: uint32,
  pub Spec_dst: Slice<uint8>,
  pub Addr: Slice<uint8>,
}

pub struct Inet6Pktinfo {
  pub Addr: Slice<uint8>,
  pub Ifindex: uint32,
}

/// InterfaceAddrMessage represents a routing message containing
/// network interface address entries.
/// 
/// Deprecated: Use golang.org/x/net/route instead.
pub struct InterfaceAddrMessage {
  pub Header: IfaMsghdr,
  pub Data: Slice<uint8>,
}

/// InterfaceMessage represents a routing message containing
/// network interface entries.
/// 
/// Deprecated: Use golang.org/x/net/route instead.
pub struct InterfaceMessage {
  pub Header: IfMsghdr,
  pub Data: Slice<uint8>,
}

/// InterfaceMulticastAddrMessage represents a routing message
/// containing network interface address entries.
/// 
/// Deprecated: Use golang.org/x/net/route instead.
pub struct InterfaceMulticastAddrMessage {
  pub Header: IfmaMsghdr2,
  pub Data: Slice<uint8>,
}

pub struct Iovec {
  pub Base: Option<Ref<uint8>>,
  pub Len: uint64,
}

pub struct Kevent_t {
  pub Ident: uint64,
  pub Filter: int16,
  pub Flags: uint16,
  pub Fflags: uint32,
  pub Data: int64,
  pub Udata: Option<Ref<uint8>>,
}

pub struct Linger {
  pub Onoff: int32,
  pub Linger: int32,
}

pub struct Log2phys_t {
  pub Flags: uint32,
  pub Contigbytes: int64,
  pub Devoffset: int64,
}

pub struct Msghdr {
  pub Name: Option<Ref<uint8>>,
  pub Namelen: uint32,
  pub Pad_cgo_0: Slice<uint8>,
  pub Iov: Option<Ref<Iovec>>,
  pub Iovlen: int32,
  pub Pad_cgo_1: Slice<uint8>,
  pub Control: Option<Ref<uint8>>,
  pub Controllen: uint32,
  pub Flags: int32,
}

/// ProcAttr holds attributes that will be applied to a new process started
/// by [StartProcess].
pub struct ProcAttr {
  pub Dir: string,
  pub Env: Slice<string>,
  pub Files: Slice<uint>,
  pub Sys: Option<Ref<SysProcAttr>>,
}

pub struct Radvisory_t {
  pub Offset: int64,
  pub Count: int32,
  pub Pad_cgo_0: Slice<uint8>,
}

/// A RawConn is a raw network connection.
pub interface RawConn {
  fn Control(f: fn(uint) -> ()) -> Result<(), error>
  fn Read(f: fn(uint) -> bool) -> Result<(), error>
  fn Write(f: fn(uint) -> bool) -> Result<(), error>
}

pub struct RawSockaddr {
  pub Len: uint8,
  pub Family: uint8,
  pub Data: Slice<int8>,
}

pub struct RawSockaddrAny {
  pub Addr: RawSockaddr,
  pub Pad: Slice<int8>,
}

pub struct RawSockaddrDatalink {
  pub Len: uint8,
  pub Family: uint8,
  pub Index: uint16,
  pub Type: uint8,
  pub Nlen: uint8,
  pub Alen: uint8,
  pub Slen: uint8,
  pub Data: Slice<int8>,
}

pub struct RawSockaddrInet4 {
  pub Len: uint8,
  pub Family: uint8,
  pub Port: uint16,
  pub Addr: Slice<uint8>,
  pub Zero: Slice<int8>,
}

pub struct RawSockaddrInet6 {
  pub Len: uint8,
  pub Family: uint8,
  pub Port: uint16,
  pub Flowinfo: uint32,
  pub Addr: Slice<uint8>,
  pub Scope_id: uint32,
}

pub struct RawSockaddrUnix {
  pub Len: uint8,
  pub Family: uint8,
  pub Path: Slice<int8>,
}

pub struct Rlimit {
  pub Cur: uint64,
  pub Max: uint64,
}

/// RouteMessage represents a routing message containing routing
/// entries.
/// 
/// Deprecated: Use golang.org/x/net/route instead.
pub struct RouteMessage {
  pub Header: RtMsghdr,
  pub Data: Slice<uint8>,
}

/// RoutingMessage represents a routing message.
/// 
/// Deprecated: Use golang.org/x/net/route instead.
pub interface RoutingMessage {}

pub struct RtMetrics {
  pub Locks: uint32,
  pub Mtu: uint32,
  pub Hopcount: uint32,
  pub Expire: int32,
  pub Recvpipe: uint32,
  pub Sendpipe: uint32,
  pub Ssthresh: uint32,
  pub Rtt: uint32,
  pub Rttvar: uint32,
  pub Pksent: uint32,
  pub Filler: Slice<uint32>,
}

pub struct RtMsghdr {
  pub Msglen: uint16,
  pub Version: uint8,
  pub Type: uint8,
  pub Index: uint16,
  pub Pad_cgo_0: Slice<uint8>,
  pub Flags: int32,
  pub Addrs: int32,
  pub Pid: int32,
  pub Seq: int32,
  pub Errno: int32,
  pub Use: int32,
  pub Inits: uint32,
  pub Rmx: RtMetrics,
}

pub struct Rusage {
  pub Utime: Timeval,
  pub Stime: Timeval,
  pub Maxrss: int64,
  pub Ixrss: int64,
  pub Idrss: int64,
  pub Isrss: int64,
  pub Minflt: int64,
  pub Majflt: int64,
  pub Nswap: int64,
  pub Inblock: int64,
  pub Oublock: int64,
  pub Msgsnd: int64,
  pub Msgrcv: int64,
  pub Nsignals: int64,
  pub Nvcsw: int64,
  pub Nivcsw: int64,
}

pub interface Sockaddr {}

pub struct SockaddrDatalink {
  pub Len: uint8,
  pub Family: uint8,
  pub Index: uint16,
  pub Type: uint8,
  pub Nlen: uint8,
  pub Alen: uint8,
  pub Slen: uint8,
  pub Data: Slice<int8>,
}

pub struct SockaddrInet4 {
  pub Port: int,
  pub Addr: Slice<uint8>,
}

pub struct SockaddrInet6 {
  pub Port: int,
  pub ZoneId: uint32,
  pub Addr: Slice<uint8>,
}

pub struct SockaddrUnix {
  pub Name: string,
}

/// SocketControlMessage represents a socket control message.
pub struct SocketControlMessage {
  pub Header: Cmsghdr,
  pub Data: Slice<uint8>,
}

pub struct Stat_t {
  pub Dev: int32,
  pub Mode: uint16,
  pub Nlink: uint16,
  pub Ino: uint64,
  pub Uid: uint32,
  pub Gid: uint32,
  pub Rdev: int32,
  pub Pad_cgo_0: Slice<uint8>,
  pub Atimespec: Timespec,
  pub Mtimespec: Timespec,
  pub Ctimespec: Timespec,
  pub Birthtimespec: Timespec,
  pub Size: int64,
  pub Blocks: int64,
  pub Blksize: int32,
  pub Flags: uint32,
  pub Gen: uint32,
  pub Lspare: int32,
  pub Qspare: Slice<int64>,
}

pub struct Statfs_t {
  pub Bsize: uint32,
  pub Iosize: int32,
  pub Blocks: uint64,
  pub Bfree: uint64,
  pub Bavail: uint64,
  pub Files: uint64,
  pub Ffree: uint64,
  pub Fsid: Fsid,
  pub Owner: uint32,
  pub Type: uint32,
  pub Flags: uint32,
  pub Fssubtype: uint32,
  pub Fstypename: Slice<int8>,
  pub Mntonname: Slice<int8>,
  pub Mntfromname: Slice<int8>,
  pub Reserved: Slice<uint32>,
}

pub struct SysProcAttr {
  pub Chroot: string,
  pub Credential: Option<Ref<Credential>>,
  pub Ptrace: bool,
  pub Setsid: bool,
  pub Setpgid: bool,
  pub Setctty: bool,
  pub Noctty: bool,
  pub Ctty: int,
  pub Foreground: bool,
  pub Pgid: int,
}

pub struct Termios {
  pub Iflag: uint64,
  pub Oflag: uint64,
  pub Cflag: uint64,
  pub Lflag: uint64,
  pub Cc: Slice<uint8>,
  pub Pad_cgo_0: Slice<uint8>,
  pub Ispeed: uint64,
  pub Ospeed: uint64,
}

pub struct Timespec {
  pub Sec: int64,
  pub Nsec: int64,
}

pub struct Timeval {
  pub Sec: int64,
  pub Usec: int32,
  pub Pad_cgo_0: Slice<uint8>,
}

pub struct Timeval32 {
  pub Sec: int32,
  pub Usec: int32,
}

pub struct WaitStatus(uint32)

const AF_APPLETALK = 0x10

const AF_CCITT = 0xa

const AF_CHAOS = 0x5

const AF_CNT = 0x15

const AF_COIP = 0x14

const AF_DATAKIT = 0x9

const AF_DECnet = 0xc

const AF_DLI = 0xd

const AF_E164 = 0x1c

const AF_ECMA = 0x8

const AF_HYLINK = 0xf

const AF_IEEE80211 = 0x25

const AF_IMPLINK = 0x3

const AF_INET = 0x2

const AF_INET6 = 0x1e

const AF_IPX = 0x17

const AF_ISDN = 0x1c

const AF_ISO = 0x7

const AF_LAT = 0xe

const AF_LINK = 0x12

const AF_LOCAL = 0x1

const AF_MAX = 0x28

const AF_NATM = 0x1f

const AF_NDRV = 0x1b

const AF_NETBIOS = 0x21

const AF_NS = 0x6

const AF_OSI = 0x7

const AF_PPP = 0x22

const AF_PUP = 0x4

const AF_RESERVED_36 = 0x24

const AF_ROUTE = 0x11

const AF_SIP = 0x18

const AF_SNA = 0xb

const AF_SYSTEM = 0x20

const AF_UNIX = 0x1

const AF_UNSPEC = 0x0

const AF_UTUN = 0x26

const B0 = 0x0

const B110 = 0x6e

const B115200 = 0x1c200

const B1200 = 0x4b0

const B134 = 0x86

const B14400 = 0x3840

const B150 = 0x96

const B1800 = 0x708

const B19200 = 0x4b00

const B200 = 0xc8

const B230400 = 0x38400

const B2400 = 0x960

const B28800 = 0x7080

const B300 = 0x12c

const B38400 = 0x9600

const B4800 = 0x12c0

const B50 = 0x32

const B57600 = 0xe100

const B600 = 0x258

const B7200 = 0x1c20

const B75 = 0x4b

const B76800 = 0x12c00

const B9600 = 0x2580

const BIOCFLUSH = 0x20004268

const BIOCGBLEN = 0x40044266

const BIOCGDLT = 0x4004426a

const BIOCGDLTLIST = 0xc00c4279

const BIOCGETIF = 0x4020426b

const BIOCGHDRCMPLT = 0x40044274

const BIOCGRSIG = 0x40044272

const BIOCGRTIMEOUT = 0x4010426e

const BIOCGSEESENT = 0x40044276

const BIOCGSTATS = 0x4008426f

const BIOCIMMEDIATE = 0x80044270

const BIOCPROMISC = 0x20004269

const BIOCSBLEN = 0xc0044266

const BIOCSDLT = 0x80044278

const BIOCSETF = 0x80104267

const BIOCSETIF = 0x8020426c

const BIOCSHDRCMPLT = 0x80044275

const BIOCSRSIG = 0x80044273

const BIOCSRTIMEOUT = 0x8010426d

const BIOCSSEESENT = 0x80044277

const BIOCVERSION = 0x40044271

const BPF_A = 0x10

const BPF_ABS = 0x20

const BPF_ADD = 0x0

const BPF_ALIGNMENT = 0x4

const BPF_ALU = 0x4

const BPF_AND = 0x50

const BPF_B = 0x10

const BPF_DIV = 0x30

const BPF_H = 0x8

const BPF_IMM = 0x0

const BPF_IND = 0x40

const BPF_JA = 0x0

const BPF_JEQ = 0x10

const BPF_JGE = 0x30

const BPF_JGT = 0x20

const BPF_JMP = 0x5

const BPF_JSET = 0x40

const BPF_K = 0x0

const BPF_LD = 0x0

const BPF_LDX = 0x1

const BPF_LEN = 0x80

const BPF_LSH = 0x60

const BPF_MAJOR_VERSION = 0x1

const BPF_MAXBUFSIZE = 0x80000

const BPF_MAXINSNS = 0x200

const BPF_MEM = 0x60

const BPF_MEMWORDS = 0x10

const BPF_MINBUFSIZE = 0x20

const BPF_MINOR_VERSION = 0x1

const BPF_MISC = 0x7

const BPF_MSH = 0xa0

const BPF_MUL = 0x20

const BPF_NEG = 0x80

const BPF_OR = 0x40

const BPF_RELEASE = 0x30bb6

const BPF_RET = 0x6

const BPF_RSH = 0x70

const BPF_ST = 0x2

const BPF_STX = 0x3

const BPF_SUB = 0x10

const BPF_TAX = 0x0

const BPF_TXA = 0x80

const BPF_W = 0x0

const BPF_X = 0x8

const BRKINT = 0x2

const CFLUSH = 0xf

const CLOCAL = 0x8000

const CREAD = 0x800

const CS5 = 0x0

const CS6 = 0x100

const CS7 = 0x200

const CS8 = 0x300

const CSIZE = 0x300

const CSTART = 0x11

const CSTATUS = 0x14

const CSTOP = 0x13

const CSTOPB = 0x400

const CSUSP = 0x1a

const CTL_MAXNAME = 0xc

const CTL_NET = 0x4

const DLT_APPLE_IP_OVER_IEEE1394 = 0x8a

const DLT_ARCNET = 0x7

const DLT_ATM_CLIP = 0x13

const DLT_ATM_RFC1483 = 0xb

const DLT_AX25 = 0x3

const DLT_CHAOS = 0x5

const DLT_CHDLC = 0x68

const DLT_C_HDLC = 0x68

const DLT_EN10MB = 0x1

const DLT_EN3MB = 0x2

const DLT_FDDI = 0xa

const DLT_IEEE802 = 0x6

const DLT_IEEE802_11 = 0x69

const DLT_IEEE802_11_RADIO = 0x7f

const DLT_IEEE802_11_RADIO_AVS = 0xa3

const DLT_LINUX_SLL = 0x71

const DLT_LOOP = 0x6c

const DLT_NULL = 0x0

const DLT_PFLOG = 0x75

const DLT_PFSYNC = 0x12

const DLT_PPP = 0x9

const DLT_PPP_BSDOS = 0x10

const DLT_PPP_SERIAL = 0x32

const DLT_PRONET = 0x4

const DLT_RAW = 0xc

const DLT_SLIP = 0x8

const DLT_SLIP_BSDOS = 0xf

const DT_BLK = 0x6

const DT_CHR = 0x2

const DT_DIR = 0x4

const DT_FIFO = 0x1

const DT_LNK = 0xa

const DT_REG = 0x8

const DT_SOCK = 0xc

const DT_UNKNOWN = 0x0

const DT_WHT = 0xe

const ECHO = 0x8

const ECHOCTL = 0x40

const ECHOE = 0x2

const ECHOK = 0x4

const ECHOKE = 0x1

const ECHONL = 0x10

const ECHOPRT = 0x20

const EVFILT_AIO = -0x3

const EVFILT_FS = -0x9

const EVFILT_MACHPORT = -0x8

const EVFILT_PROC = -0x5

const EVFILT_READ = -0x1

const EVFILT_SIGNAL = -0x6

const EVFILT_SYSCOUNT = 0xe

const EVFILT_THREADMARKER = 0xe

const EVFILT_TIMER = -0x7

const EVFILT_USER = -0xa

const EVFILT_VM = -0xc

const EVFILT_VNODE = -0x4

const EVFILT_WRITE = -0x2

const EV_ADD = 0x1

const EV_CLEAR = 0x20

const EV_DELETE = 0x2

const EV_DISABLE = 0x8

const EV_DISPATCH = 0x80

const EV_ENABLE = 0x4

const EV_EOF = 0x8000

const EV_ERROR = 0x4000

const EV_FLAG0 = 0x1000

const EV_FLAG1 = 0x2000

const EV_ONESHOT = 0x10

const EV_OOBAND = 0x2000

const EV_POLL = 0x1000

const EV_RECEIPT = 0x40

const EV_SYSFLAGS = 0xf000

const EXTA = 0x4b00

const EXTB = 0x9600

const EXTPROC = 0x800

const FD_CLOEXEC = 0x1

const FD_SETSIZE = 0x400

const FLUSHO = 0x800000

const F_ADDFILESIGS = 0x3d

const F_ADDSIGS = 0x3b

const F_ALLOCATEALL = 0x4

const F_ALLOCATECONTIG = 0x2

const F_CHKCLEAN = 0x29

const F_DUPFD = 0x0

const F_DUPFD_CLOEXEC = 0x43

const F_FINDSIGS = 0x4e

const F_FLUSH_DATA = 0x28

const F_FREEZE_FS = 0x35

const F_FULLFSYNC = 0x33

const F_GETCODEDIR = 0x48

const F_GETFD = 0x1

const F_GETFL = 0x3

const F_GETLK = 0x7

const F_GETLKPID = 0x42

const F_GETNOSIGPIPE = 0x4a

const F_GETOWN = 0x5

const F_GETPATH = 0x32

const F_GETPATH_MTMINFO = 0x47

const F_GETPROTECTIONCLASS = 0x3f

const F_GETPROTECTIONLEVEL = 0x4d

const F_GLOBAL_NOCACHE = 0x37

const F_LOG2PHYS = 0x31

const F_LOG2PHYS_EXT = 0x41

const F_NOCACHE = 0x30

const F_NODIRECT = 0x3e

const F_OK = 0x0

const F_PATHPKG_CHECK = 0x34

const F_PEOFPOSMODE = 0x3

const F_PREALLOCATE = 0x2a

const F_RDADVISE = 0x2c

const F_RDAHEAD = 0x2d

const F_RDLCK = 0x1

const F_SETBACKINGSTORE = 0x46

const F_SETFD = 0x2

const F_SETFL = 0x4

const F_SETLK = 0x8

const F_SETLKW = 0x9

const F_SETLKWTIMEOUT = 0xa

const F_SETNOSIGPIPE = 0x49

const F_SETOWN = 0x6

const F_SETPROTECTIONCLASS = 0x40

const F_SETSIZE = 0x2b

const F_SINGLE_WRITER = 0x4c

const F_THAW_FS = 0x36

const F_TRANSCODEKEY = 0x4b

const F_UNLCK = 0x2

const F_VOLPOSMODE = 0x4

const F_WRLCK = 0x3

const HUPCL = 0x4000

const ICANON = 0x100

const ICMP6_FILTER = 0x12

const ICRNL = 0x100

const IEXTEN = 0x400

const IFF_ALLMULTI = 0x200

const IFF_ALTPHYS = 0x4000

const IFF_BROADCAST = 0x2

const IFF_DEBUG = 0x4

const IFF_LINK0 = 0x1000

const IFF_LINK1 = 0x2000

const IFF_LINK2 = 0x4000

const IFF_LOOPBACK = 0x8

const IFF_MULTICAST = 0x8000

const IFF_NOARP = 0x80

const IFF_NOTRAILERS = 0x20

const IFF_OACTIVE = 0x400

const IFF_POINTOPOINT = 0x10

const IFF_PROMISC = 0x100

const IFF_RUNNING = 0x40

const IFF_SIMPLEX = 0x800

const IFF_UP = 0x1

const IFNAMSIZ = 0x10

const IFT_1822 = 0x2

const IFT_AAL5 = 0x31

const IFT_ARCNET = 0x23

const IFT_ARCNETPLUS = 0x24

const IFT_ATM = 0x25

const IFT_BRIDGE = 0xd1

const IFT_CARP = 0xf8

const IFT_CELLULAR = 0xff

const IFT_CEPT = 0x13

const IFT_DS3 = 0x1e

const IFT_ENC = 0xf4

const IFT_EON = 0x19

const IFT_ETHER = 0x6

const IFT_FAITH = 0x38

const IFT_FDDI = 0xf

const IFT_FRELAY = 0x20

const IFT_FRELAYDCE = 0x2c

const IFT_GIF = 0x37

const IFT_HDH1822 = 0x3

const IFT_HIPPI = 0x2f

const IFT_HSSI = 0x2e

const IFT_HY = 0xe

const IFT_IEEE1394 = 0x90

const IFT_IEEE8023ADLAG = 0x88

const IFT_ISDNBASIC = 0x14

const IFT_ISDNPRIMARY = 0x15

const IFT_ISO88022LLC = 0x29

const IFT_ISO88023 = 0x7

const IFT_ISO88024 = 0x8

const IFT_ISO88025 = 0x9

const IFT_ISO88026 = 0xa

const IFT_L2VLAN = 0x87

const IFT_LAPB = 0x10

const IFT_LOCALTALK = 0x2a

const IFT_LOOP = 0x18

const IFT_MIOX25 = 0x26

const IFT_MODEM = 0x30

const IFT_NSIP = 0x1b

const IFT_OTHER = 0x1

const IFT_P10 = 0xc

const IFT_P80 = 0xd

const IFT_PARA = 0x22

const IFT_PDP = 0xff

const IFT_PFLOG = 0xf5

const IFT_PFSYNC = 0xf6

const IFT_PPP = 0x17

const IFT_PROPMUX = 0x36

const IFT_PROPVIRTUAL = 0x35

const IFT_PTPSERIAL = 0x16

const IFT_RS232 = 0x21

const IFT_SDLC = 0x11

const IFT_SIP = 0x1f

const IFT_SLIP = 0x1c

const IFT_SMDSDXI = 0x2b

const IFT_SMDSICIP = 0x34

const IFT_SONET = 0x27

const IFT_SONETPATH = 0x32

const IFT_SONETVT = 0x33

const IFT_STARLAN = 0xb

const IFT_STF = 0x39

const IFT_T1 = 0x12

const IFT_ULTRA = 0x1d

const IFT_V35 = 0x2d

const IFT_X25 = 0x5

const IFT_X25DDN = 0x4

const IFT_X25PLE = 0x28

const IFT_XETHER = 0x1a

const IGNBRK = 0x1

const IGNCR = 0x80

const IGNPAR = 0x4

const IMAXBEL = 0x2000

const INLCR = 0x40

const INPCK = 0x10

const IN_CLASSA_HOST = 0xffffff

const IN_CLASSA_MAX = 0x80

const IN_CLASSA_NET = 0xff000000

const IN_CLASSA_NSHIFT = 0x18

const IN_CLASSB_HOST = 0xffff

const IN_CLASSB_MAX = 0x10000

const IN_CLASSB_NET = 0xffff0000

const IN_CLASSB_NSHIFT = 0x10

const IN_CLASSC_HOST = 0xff

const IN_CLASSC_NET = 0xffffff00

const IN_CLASSC_NSHIFT = 0x8

const IN_CLASSD_HOST = 0xfffffff

const IN_CLASSD_NET = 0xf0000000

const IN_CLASSD_NSHIFT = 0x1c

const IN_LINKLOCALNETNUM = 0xa9fe0000

const IN_LOOPBACKNET = 0x7f

const IPPROTO_3PC = 0x22

const IPPROTO_ADFS = 0x44

const IPPROTO_AH = 0x33

const IPPROTO_AHIP = 0x3d

const IPPROTO_APES = 0x63

const IPPROTO_ARGUS = 0xd

const IPPROTO_AX25 = 0x5d

const IPPROTO_BHA = 0x31

const IPPROTO_BLT = 0x1e

const IPPROTO_BRSATMON = 0x4c

const IPPROTO_CFTP = 0x3e

const IPPROTO_CHAOS = 0x10

const IPPROTO_CMTP = 0x26

const IPPROTO_CPHB = 0x49

const IPPROTO_CPNX = 0x48

const IPPROTO_DDP = 0x25

const IPPROTO_DGP = 0x56

const IPPROTO_DIVERT = 0xfe

const IPPROTO_DONE = 0x101

const IPPROTO_DSTOPTS = 0x3c

const IPPROTO_EGP = 0x8

const IPPROTO_EMCON = 0xe

const IPPROTO_ENCAP = 0x62

const IPPROTO_EON = 0x50

const IPPROTO_ESP = 0x32

const IPPROTO_ETHERIP = 0x61

const IPPROTO_FRAGMENT = 0x2c

const IPPROTO_GGP = 0x3

const IPPROTO_GMTP = 0x64

const IPPROTO_GRE = 0x2f

const IPPROTO_HELLO = 0x3f

const IPPROTO_HMP = 0x14

const IPPROTO_HOPOPTS = 0x0

const IPPROTO_ICMP = 0x1

const IPPROTO_ICMPV6 = 0x3a

const IPPROTO_IDP = 0x16

const IPPROTO_IDPR = 0x23

const IPPROTO_IDRP = 0x2d

const IPPROTO_IGMP = 0x2

const IPPROTO_IGP = 0x55

const IPPROTO_IGRP = 0x58

const IPPROTO_IL = 0x28

const IPPROTO_INLSP = 0x34

const IPPROTO_INP = 0x20

const IPPROTO_IP = 0x0

const IPPROTO_IPCOMP = 0x6c

const IPPROTO_IPCV = 0x47

const IPPROTO_IPEIP = 0x5e

const IPPROTO_IPIP = 0x4

const IPPROTO_IPPC = 0x43

const IPPROTO_IPV4 = 0x4

const IPPROTO_IPV6 = 0x29

const IPPROTO_IRTP = 0x1c

const IPPROTO_KRYPTOLAN = 0x41

const IPPROTO_LARP = 0x5b

const IPPROTO_LEAF1 = 0x19

const IPPROTO_LEAF2 = 0x1a

const IPPROTO_MAX = 0x100

const IPPROTO_MAXID = 0x34

const IPPROTO_MEAS = 0x13

const IPPROTO_MHRP = 0x30

const IPPROTO_MICP = 0x5f

const IPPROTO_MTP = 0x5c

const IPPROTO_MUX = 0x12

const IPPROTO_ND = 0x4d

const IPPROTO_NHRP = 0x36

const IPPROTO_NONE = 0x3b

const IPPROTO_NSP = 0x1f

const IPPROTO_NVPII = 0xb

const IPPROTO_OSPFIGP = 0x59

const IPPROTO_PGM = 0x71

const IPPROTO_PIGP = 0x9

const IPPROTO_PIM = 0x67

const IPPROTO_PRM = 0x15

const IPPROTO_PUP = 0xc

const IPPROTO_PVP = 0x4b

const IPPROTO_RAW = 0xff

const IPPROTO_RCCMON = 0xa

const IPPROTO_RDP = 0x1b

const IPPROTO_ROUTING = 0x2b

const IPPROTO_RSVP = 0x2e

const IPPROTO_RVD = 0x42

const IPPROTO_SATEXPAK = 0x40

const IPPROTO_SATMON = 0x45

const IPPROTO_SCCSP = 0x60

const IPPROTO_SCTP = 0x84

const IPPROTO_SDRP = 0x2a

const IPPROTO_SEP = 0x21

const IPPROTO_SRPC = 0x5a

const IPPROTO_ST = 0x7

const IPPROTO_SVMTP = 0x52

const IPPROTO_SWIPE = 0x35

const IPPROTO_TCF = 0x57

const IPPROTO_TCP = 0x6

const IPPROTO_TP = 0x1d

const IPPROTO_TPXX = 0x27

const IPPROTO_TRUNK1 = 0x17

const IPPROTO_TRUNK2 = 0x18

const IPPROTO_TTP = 0x54

const IPPROTO_UDP = 0x11

const IPPROTO_VINES = 0x53

const IPPROTO_VISA = 0x46

const IPPROTO_VMTP = 0x51

const IPPROTO_WBEXPAK = 0x4f

const IPPROTO_WBMON = 0x4e

const IPPROTO_WSN = 0x4a

const IPPROTO_XNET = 0xf

const IPPROTO_XTP = 0x24

const IPV6_2292DSTOPTS = 0x17

const IPV6_2292HOPLIMIT = 0x14

const IPV6_2292HOPOPTS = 0x16

const IPV6_2292NEXTHOP = 0x15

const IPV6_2292PKTINFO = 0x13

const IPV6_2292PKTOPTIONS = 0x19

const IPV6_2292RTHDR = 0x18

const IPV6_BINDV6ONLY = 0x1b

const IPV6_BOUND_IF = 0x7d

const IPV6_CHECKSUM = 0x1a

const IPV6_DEFAULT_MULTICAST_HOPS = 0x1

const IPV6_DEFAULT_MULTICAST_LOOP = 0x1

const IPV6_DEFHLIM = 0x40

const IPV6_FAITH = 0x1d

const IPV6_FLOWINFO_MASK = 0xffffff0f

const IPV6_FLOWLABEL_MASK = 0xffff0f00

const IPV6_FRAGTTL = 0x78

const IPV6_FW_ADD = 0x1e

const IPV6_FW_DEL = 0x1f

const IPV6_FW_FLUSH = 0x20

const IPV6_FW_GET = 0x22

const IPV6_FW_ZERO = 0x21

const IPV6_HLIMDEC = 0x1

const IPV6_IPSEC_POLICY = 0x1c

const IPV6_JOIN_GROUP = 0xc

const IPV6_LEAVE_GROUP = 0xd

const IPV6_MAXHLIM = 0xff

const IPV6_MAXOPTHDR = 0x800

const IPV6_MAXPACKET = 0xffff

const IPV6_MAX_GROUP_SRC_FILTER = 0x200

const IPV6_MAX_MEMBERSHIPS = 0xfff

const IPV6_MAX_SOCK_SRC_FILTER = 0x80

const IPV6_MIN_MEMBERSHIPS = 0x1f

const IPV6_MMTU = 0x500

const IPV6_MULTICAST_HOPS = 0xa

const IPV6_MULTICAST_IF = 0x9

const IPV6_MULTICAST_LOOP = 0xb

const IPV6_PORTRANGE = 0xe

const IPV6_PORTRANGE_DEFAULT = 0x0

const IPV6_PORTRANGE_HIGH = 0x1

const IPV6_PORTRANGE_LOW = 0x2

const IPV6_RECVTCLASS = 0x23

const IPV6_RTHDR_LOOSE = 0x0

const IPV6_RTHDR_STRICT = 0x1

const IPV6_RTHDR_TYPE_0 = 0x0

const IPV6_SOCKOPT_RESERVED1 = 0x3

const IPV6_TCLASS = 0x24

const IPV6_UNICAST_HOPS = 0x4

const IPV6_V6ONLY = 0x1b

const IPV6_VERSION = 0x60

const IPV6_VERSION_MASK = 0xf0

const IP_ADD_MEMBERSHIP = 0xc

const IP_ADD_SOURCE_MEMBERSHIP = 0x46

const IP_BLOCK_SOURCE = 0x48

const IP_BOUND_IF = 0x19

const IP_DEFAULT_MULTICAST_LOOP = 0x1

const IP_DEFAULT_MULTICAST_TTL = 0x1

const IP_DF = 0x4000

const IP_DROP_MEMBERSHIP = 0xd

const IP_DROP_SOURCE_MEMBERSHIP = 0x47

const IP_DUMMYNET_CONFIGURE = 0x3c

const IP_DUMMYNET_DEL = 0x3d

const IP_DUMMYNET_FLUSH = 0x3e

const IP_DUMMYNET_GET = 0x40

const IP_FAITH = 0x16

const IP_FW_ADD = 0x28

const IP_FW_DEL = 0x29

const IP_FW_FLUSH = 0x2a

const IP_FW_GET = 0x2c

const IP_FW_RESETLOG = 0x2d

const IP_FW_ZERO = 0x2b

const IP_HDRINCL = 0x2

const IP_IPSEC_POLICY = 0x15

const IP_MAXPACKET = 0xffff

const IP_MAX_GROUP_SRC_FILTER = 0x200

const IP_MAX_MEMBERSHIPS = 0xfff

const IP_MAX_SOCK_MUTE_FILTER = 0x80

const IP_MAX_SOCK_SRC_FILTER = 0x80

const IP_MF = 0x2000

const IP_MIN_MEMBERSHIPS = 0x1f

const IP_MSFILTER = 0x4a

const IP_MSS = 0x240

const IP_MULTICAST_IF = 0x9

const IP_MULTICAST_IFINDEX = 0x42

const IP_MULTICAST_LOOP = 0xb

const IP_MULTICAST_TTL = 0xa

const IP_MULTICAST_VIF = 0xe

const IP_NAT__XXX = 0x37

const IP_OFFMASK = 0x1fff

const IP_OLD_FW_ADD = 0x32

const IP_OLD_FW_DEL = 0x33

const IP_OLD_FW_FLUSH = 0x34

const IP_OLD_FW_GET = 0x36

const IP_OLD_FW_RESETLOG = 0x38

const IP_OLD_FW_ZERO = 0x35

const IP_OPTIONS = 0x1

const IP_PKTINFO = 0x1a

const IP_PORTRANGE = 0x13

const IP_PORTRANGE_DEFAULT = 0x0

const IP_PORTRANGE_HIGH = 0x1

const IP_PORTRANGE_LOW = 0x2

const IP_RECVDSTADDR = 0x7

const IP_RECVIF = 0x14

const IP_RECVOPTS = 0x5

const IP_RECVPKTINFO = 0x1a

const IP_RECVRETOPTS = 0x6

const IP_RECVTTL = 0x18

const IP_RETOPTS = 0x8

const IP_RF = 0x8000

const IP_RSVP_OFF = 0x10

const IP_RSVP_ON = 0xf

const IP_RSVP_VIF_OFF = 0x12

const IP_RSVP_VIF_ON = 0x11

const IP_STRIPHDR = 0x17

const IP_TOS = 0x3

const IP_TRAFFIC_MGT_BACKGROUND = 0x41

const IP_TTL = 0x4

const IP_UNBLOCK_SOURCE = 0x49

const ISIG = 0x80

const ISTRIP = 0x20

const IUTF8 = 0x4000

const IXANY = 0x800

const IXOFF = 0x400

const IXON = 0x200

const ImplementsGetwd = true

const LOCK_EX = 0x2

const LOCK_NB = 0x4

const LOCK_SH = 0x1

const LOCK_UN = 0x8

const MADV_CAN_REUSE = 0x9

const MADV_DONTNEED = 0x4

const MADV_FREE = 0x5

const MADV_FREE_REUSABLE = 0x7

const MADV_FREE_REUSE = 0x8

const MADV_NORMAL = 0x0

const MADV_RANDOM = 0x1

const MADV_SEQUENTIAL = 0x2

const MADV_WILLNEED = 0x3

const MADV_ZERO_WIRED_PAGES = 0x6

const MAP_ANON = 0x1000

const MAP_COPY = 0x2

const MAP_FILE = 0x0

const MAP_FIXED = 0x10

const MAP_HASSEMAPHORE = 0x200

const MAP_JIT = 0x800

const MAP_NOCACHE = 0x400

const MAP_NOEXTEND = 0x100

const MAP_NORESERVE = 0x40

const MAP_PRIVATE = 0x2

const MAP_RENAME = 0x20

const MAP_RESERVED0080 = 0x80

const MAP_SHARED = 0x1

const MCL_CURRENT = 0x1

const MCL_FUTURE = 0x2

const MSG_CTRUNC = 0x20

const MSG_DONTROUTE = 0x4

const MSG_DONTWAIT = 0x80

const MSG_EOF = 0x100

const MSG_EOR = 0x8

const MSG_FLUSH = 0x400

const MSG_HAVEMORE = 0x2000

const MSG_HOLD = 0x800

const MSG_NEEDSA = 0x10000

const MSG_OOB = 0x1

const MSG_PEEK = 0x2

const MSG_RCVMORE = 0x4000

const MSG_SEND = 0x1000

const MSG_TRUNC = 0x10

const MSG_WAITALL = 0x40

const MSG_WAITSTREAM = 0x200

const MS_ASYNC = 0x1

const MS_DEACTIVATE = 0x8

const MS_INVALIDATE = 0x2

const MS_KILLPAGES = 0x4

const MS_SYNC = 0x10

const NAME_MAX = 0xff

const NET_RT_DUMP = 0x1

const NET_RT_DUMP2 = 0x7

const NET_RT_FLAGS = 0x2

const NET_RT_IFLIST = 0x3

const NET_RT_IFLIST2 = 0x6

const NET_RT_MAXID = 0xa

const NET_RT_STAT = 0x4

const NET_RT_TRASH = 0x5

const NOFLSH = 0x80000000

const NOTE_ABSOLUTE = 0x8

const NOTE_ATTRIB = 0x8

const NOTE_BACKGROUND = 0x40

const NOTE_CHILD = 0x4

const NOTE_CRITICAL = 0x20

const NOTE_DELETE = 0x1

const NOTE_EXEC = 0x20000000

const NOTE_EXIT = 0x80000000

const NOTE_EXITSTATUS = 0x4000000

const NOTE_EXIT_CSERROR = 0x40000

const NOTE_EXIT_DECRYPTFAIL = 0x10000

const NOTE_EXIT_DETAIL = 0x2000000

const NOTE_EXIT_DETAIL_MASK = 0x70000

const NOTE_EXIT_MEMORY = 0x20000

const NOTE_EXIT_REPARENTED = 0x80000

const NOTE_EXTEND = 0x4

const NOTE_FFAND = 0x40000000

const NOTE_FFCOPY = 0xc0000000

const NOTE_FFCTRLMASK = 0xc0000000

const NOTE_FFLAGSMASK = 0xffffff

const NOTE_FFNOP = 0x0

const NOTE_FFOR = 0x80000000

const NOTE_FORK = 0x40000000

const NOTE_LEEWAY = 0x10

const NOTE_LINK = 0x10

const NOTE_LOWAT = 0x1

const NOTE_NONE = 0x80

const NOTE_NSECONDS = 0x4

const NOTE_PCTRLMASK = -0x100000

const NOTE_PDATAMASK = 0xfffff

const NOTE_REAP = 0x10000000

const NOTE_RENAME = 0x20

const NOTE_REVOKE = 0x40

const NOTE_SECONDS = 0x1

const NOTE_SIGNAL = 0x8000000

const NOTE_TRACK = 0x1

const NOTE_TRACKERR = 0x2

const NOTE_TRIGGER = 0x1000000

const NOTE_USECONDS = 0x2

const NOTE_VM_ERROR = 0x10000000

const NOTE_VM_PRESSURE = 0x80000000

const NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000

const NOTE_VM_PRESSURE_TERMINATE = 0x40000000

const NOTE_WRITE = 0x2

const OCRNL = 0x10

const OFDEL = 0x20000

const OFILL = 0x80

const ONLCR = 0x2

const ONLRET = 0x40

const ONOCR = 0x20

const ONOEOT = 0x8

const OPOST = 0x1

const O_ACCMODE = 0x3

const O_ALERT = 0x20000000

const O_APPEND = 0x8

const O_ASYNC = 0x40

const O_CLOEXEC = 0x1000000

const O_CREAT = 0x200

const O_DIRECTORY = 0x100000

const O_DP_GETRAWENCRYPTED = 0x1

const O_DSYNC = 0x400000

const O_EVTONLY = 0x8000

const O_EXCL = 0x800

const O_EXLOCK = 0x20

const O_FSYNC = 0x80

const O_NDELAY = 0x4

const O_NOCTTY = 0x20000

const O_NOFOLLOW = 0x100

const O_NONBLOCK = 0x4

const O_POPUP = 0x80000000

const O_RDONLY = 0x0

const O_RDWR = 0x2

const O_SHLOCK = 0x10

const O_SYMLINK = 0x200000

const O_SYNC = 0x80

const O_TRUNC = 0x400

const O_WRONLY = 0x1

const PARENB = 0x1000

const PARMRK = 0x8

const PARODD = 0x2000

const PENDIN = 0x20000000

const PRIO_PGRP = 0x1

const PRIO_PROCESS = 0x0

const PRIO_USER = 0x2

const PROT_EXEC = 0x4

const PROT_NONE = 0x0

const PROT_READ = 0x1

const PROT_WRITE = 0x2

const PTRACE_CONT = 0x7

const PTRACE_KILL = 0x8

const PTRACE_TRACEME = 0x0

const PT_ATTACH = 0xa

const PT_ATTACHEXC = 0xe

const PT_CONTINUE = 0x7

const PT_DENY_ATTACH = 0x1f

const PT_DETACH = 0xb

const PT_FIRSTMACH = 0x20

const PT_FORCEQUOTA = 0x1e

const PT_KILL = 0x8

const PT_READ_D = 0x2

const PT_READ_I = 0x1

const PT_READ_U = 0x3

const PT_SIGEXC = 0xc

const PT_STEP = 0x9

const PT_THUPDATE = 0xd

const PT_TRACE_ME = 0x0

const PT_WRITE_D = 0x5

const PT_WRITE_I = 0x4

const PT_WRITE_U = 0x6

const RLIMIT_AS = 0x5

const RLIMIT_CORE = 0x4

const RLIMIT_CPU = 0x0

const RLIMIT_CPU_USAGE_MONITOR = 0x2

const RLIMIT_DATA = 0x2

const RLIMIT_FSIZE = 0x1

const RLIMIT_NOFILE = 0x8

const RLIMIT_STACK = 0x3

const RLIM_INFINITY = 0x7fffffffffffffff

const RTAX_AUTHOR = 0x6

const RTAX_BRD = 0x7

const RTAX_DST = 0x0

const RTAX_GATEWAY = 0x1

const RTAX_GENMASK = 0x3

const RTAX_IFA = 0x5

const RTAX_IFP = 0x4

const RTAX_MAX = 0x8

const RTAX_NETMASK = 0x2

const RTA_AUTHOR = 0x40

const RTA_BRD = 0x80

const RTA_DST = 0x1

const RTA_GATEWAY = 0x2

const RTA_GENMASK = 0x8

const RTA_IFA = 0x20

const RTA_IFP = 0x10

const RTA_NETMASK = 0x4

const RTF_BLACKHOLE = 0x1000

const RTF_BROADCAST = 0x400000

const RTF_CLONING = 0x100

const RTF_CONDEMNED = 0x2000000

const RTF_DELCLONE = 0x80

const RTF_DONE = 0x40

const RTF_DYNAMIC = 0x10

const RTF_GATEWAY = 0x2

const RTF_HOST = 0x4

const RTF_IFREF = 0x4000000

const RTF_IFSCOPE = 0x1000000

const RTF_LLINFO = 0x400

const RTF_LOCAL = 0x200000

const RTF_MODIFIED = 0x20

const RTF_MULTICAST = 0x800000

const RTF_PINNED = 0x100000

const RTF_PRCLONING = 0x10000

const RTF_PROTO1 = 0x8000

const RTF_PROTO2 = 0x4000

const RTF_PROTO3 = 0x40000

const RTF_PROXY = 0x8000000

const RTF_REJECT = 0x8

const RTF_ROUTER = 0x10000000

const RTF_STATIC = 0x800

const RTF_UP = 0x1

const RTF_WASCLONED = 0x20000

const RTF_XRESOLVE = 0x200

const RTM_ADD = 0x1

const RTM_CHANGE = 0x3

const RTM_DELADDR = 0xd

const RTM_DELETE = 0x2

const RTM_DELMADDR = 0x10

const RTM_GET = 0x4

const RTM_GET2 = 0x14

const RTM_IFINFO = 0xe

const RTM_IFINFO2 = 0x12

const RTM_LOCK = 0x8

const RTM_LOSING = 0x5

const RTM_MISS = 0x7

const RTM_NEWADDR = 0xc

const RTM_NEWMADDR = 0xf

const RTM_NEWMADDR2 = 0x13

const RTM_OLDADD = 0x9

const RTM_OLDDEL = 0xa

const RTM_REDIRECT = 0x6

const RTM_RESOLVE = 0xb

const RTM_RTTUNIT = 0xf4240

const RTM_VERSION = 0x5

const RTV_EXPIRE = 0x4

const RTV_HOPCOUNT = 0x2

const RTV_MTU = 0x1

const RTV_RPIPE = 0x8

const RTV_RTT = 0x40

const RTV_RTTVAR = 0x80

const RTV_SPIPE = 0x10

const RTV_SSTHRESH = 0x20

const RUSAGE_CHILDREN = -0x1

const RUSAGE_SELF = 0x0

const SCM_CREDS = 0x3

const SCM_RIGHTS = 0x1

const SCM_TIMESTAMP = 0x2

const SCM_TIMESTAMP_MONOTONIC = 0x4

const SHUT_RD = 0x0

const SHUT_RDWR = 0x2

const SHUT_WR = 0x1

const SIOCADDMULTI = 0x80206931

const SIOCAIFADDR = 0x8040691a

const SIOCARPIPLL = 0xc0206928

const SIOCATMARK = 0x40047307

const SIOCAUTOADDR = 0xc0206926

const SIOCAUTONETMASK = 0x80206927

const SIOCDELMULTI = 0x80206932

const SIOCDIFADDR = 0x80206919

const SIOCDIFPHYADDR = 0x80206941

const SIOCGDRVSPEC = 0xc028697b

const SIOCGETVLAN = 0xc020697f

const SIOCGHIWAT = 0x40047301

const SIOCGIFADDR = 0xc0206921

const SIOCGIFALTMTU = 0xc0206948

const SIOCGIFASYNCMAP = 0xc020697c

const SIOCGIFBOND = 0xc0206947

const SIOCGIFBRDADDR = 0xc0206923

const SIOCGIFCAP = 0xc020695b

const SIOCGIFCONF = 0xc00c6924

const SIOCGIFDEVMTU = 0xc0206944

const SIOCGIFDSTADDR = 0xc0206922

const SIOCGIFFLAGS = 0xc0206911

const SIOCGIFGENERIC = 0xc020693a

const SIOCGIFKPI = 0xc0206987

const SIOCGIFMAC = 0xc0206982

const SIOCGIFMEDIA = 0xc02c6938

const SIOCGIFMETRIC = 0xc0206917

const SIOCGIFMTU = 0xc0206933

const SIOCGIFNETMASK = 0xc0206925

const SIOCGIFPDSTADDR = 0xc0206940

const SIOCGIFPHYS = 0xc0206935

const SIOCGIFPSRCADDR = 0xc020693f

const SIOCGIFSTATUS = 0xc331693d

const SIOCGIFVLAN = 0xc020697f

const SIOCGIFWAKEFLAGS = 0xc0206988

const SIOCGLOWAT = 0x40047303

const SIOCGPGRP = 0x40047309

const SIOCIFCREATE = 0xc0206978

const SIOCIFCREATE2 = 0xc020697a

const SIOCIFDESTROY = 0x80206979

const SIOCIFGCLONERS = 0xc0106981

const SIOCRSLVMULTI = 0xc010693b

const SIOCSDRVSPEC = 0x8028697b

const SIOCSETVLAN = 0x8020697e

const SIOCSHIWAT = 0x80047300

const SIOCSIFADDR = 0x8020690c

const SIOCSIFALTMTU = 0x80206945

const SIOCSIFASYNCMAP = 0x8020697d

const SIOCSIFBOND = 0x80206946

const SIOCSIFBRDADDR = 0x80206913

const SIOCSIFCAP = 0x8020695a

const SIOCSIFDSTADDR = 0x8020690e

const SIOCSIFFLAGS = 0x80206910

const SIOCSIFGENERIC = 0x80206939

const SIOCSIFKPI = 0x80206986

const SIOCSIFLLADDR = 0x8020693c

const SIOCSIFMAC = 0x80206983

const SIOCSIFMEDIA = 0xc0206937

const SIOCSIFMETRIC = 0x80206918

const SIOCSIFMTU = 0x80206934

const SIOCSIFNETMASK = 0x80206916

const SIOCSIFPHYADDR = 0x8040693e

const SIOCSIFPHYS = 0x80206936

const SIOCSIFVLAN = 0x8020697e

const SIOCSLOWAT = 0x80047302

const SIOCSPGRP = 0x80047308

const SOCK_DGRAM = 0x2

const SOCK_MAXADDRLEN = 0xff

const SOCK_RAW = 0x3

const SOCK_RDM = 0x4

const SOCK_SEQPACKET = 0x5

const SOCK_STREAM = 0x1

const SOL_SOCKET = 0xffff

const SOMAXCONN = 0x80

const SO_ACCEPTCONN = 0x2

const SO_BROADCAST = 0x20

const SO_DEBUG = 0x1

const SO_DONTROUTE = 0x10

const SO_DONTTRUNC = 0x2000

const SO_ERROR = 0x1007

const SO_KEEPALIVE = 0x8

const SO_LABEL = 0x1010

const SO_LINGER = 0x80

const SO_LINGER_SEC = 0x1080

const SO_NKE = 0x1021

const SO_NOADDRERR = 0x1023

const SO_NOSIGPIPE = 0x1022

const SO_NOTIFYCONFLICT = 0x1026

const SO_NP_EXTENSIONS = 0x1083

const SO_NREAD = 0x1020

const SO_NUMRCVPKT = 0x1112

const SO_NWRITE = 0x1024

const SO_OOBINLINE = 0x100

const SO_PEERLABEL = 0x1011

const SO_RANDOMPORT = 0x1082

const SO_RCVBUF = 0x1002

const SO_RCVLOWAT = 0x1004

const SO_RCVTIMEO = 0x1006

const SO_REUSEADDR = 0x4

const SO_REUSEPORT = 0x200

const SO_REUSESHAREUID = 0x1025

const SO_SNDBUF = 0x1001

const SO_SNDLOWAT = 0x1003

const SO_SNDTIMEO = 0x1005

const SO_TIMESTAMP = 0x400

const SO_TIMESTAMP_MONOTONIC = 0x800

const SO_TYPE = 0x1008

const SO_UPCALLCLOSEWAIT = 0x1027

const SO_USELOOPBACK = 0x40

const SO_WANTMORE = 0x4000

const SO_WANTOOBFLAG = 0x8000

const SYS_ACCEPT = 30

const SYS_ACCEPT_NOCANCEL = 404

const SYS_ACCESS = 33

const SYS_ACCESS_EXTENDED = 284

const SYS_ACCT = 51

const SYS_ADJTIME = 140

const SYS_AIO_CANCEL = 316

const SYS_AIO_ERROR = 317

const SYS_AIO_FSYNC = 313

const SYS_AIO_READ = 318

const SYS_AIO_RETURN = 314

const SYS_AIO_SUSPEND = 315

const SYS_AIO_SUSPEND_NOCANCEL = 421

const SYS_AIO_WRITE = 319

const SYS_ATGETMSG = 207

const SYS_ATPGETREQ = 211

const SYS_ATPGETRSP = 212

const SYS_ATPSNDREQ = 209

const SYS_ATPSNDRSP = 210

const SYS_ATPUTMSG = 208

const SYS_ATSOCKET = 206

const SYS_AUDIT = 350

const SYS_AUDITCTL = 359

const SYS_AUDITON = 351

const SYS_AUDIT_SESSION_JOIN = 429

const SYS_AUDIT_SESSION_PORT = 432

const SYS_AUDIT_SESSION_SELF = 428

const SYS_BIND = 104

const SYS_BSDTHREAD_CREATE = 360

const SYS_BSDTHREAD_REGISTER = 366

const SYS_BSDTHREAD_TERMINATE = 361

const SYS_CHDIR = 12

const SYS_CHFLAGS = 34

const SYS_CHMOD = 15

const SYS_CHMOD_EXTENDED = 282

const SYS_CHOWN = 16

const SYS_CHROOT = 61

const SYS_CHUD = 185

const SYS_CLOSE = 6

const SYS_CLOSE_NOCANCEL = 399

const SYS_CONNECT = 98

const SYS_CONNECT_NOCANCEL = 409

const SYS_COPYFILE = 227

const SYS_CSOPS = 169

const SYS_CSOPS_AUDITTOKEN = 170

const SYS_DELETE = 226

const SYS_DUP = 41

const SYS_DUP2 = 90

const SYS_EXCHANGEDATA = 223

const SYS_EXECVE = 59

const SYS_EXIT = 1

const SYS_FCHDIR = 13

const SYS_FCHFLAGS = 35

const SYS_FCHMOD = 124

const SYS_FCHMOD_EXTENDED = 283

const SYS_FCHOWN = 123

const SYS_FCNTL = 92

const SYS_FCNTL_NOCANCEL = 406

const SYS_FDATASYNC = 187

const SYS_FFSCTL = 245

const SYS_FGETATTRLIST = 228

const SYS_FGETXATTR = 235

const SYS_FHOPEN = 248

const SYS_FILEPORT_MAKEFD = 431

const SYS_FILEPORT_MAKEPORT = 430

const SYS_FLISTXATTR = 241

const SYS_FLOCK = 131

const SYS_FORK = 2

const SYS_FPATHCONF = 192

const SYS_FREMOVEXATTR = 239

const SYS_FSCTL = 242

const SYS_FSETATTRLIST = 229

const SYS_FSETXATTR = 237

const SYS_FSGETPATH = 427

const SYS_FSTAT = 189

const SYS_FSTAT64 = 339

const SYS_FSTAT64_EXTENDED = 343

const SYS_FSTATFS = 158

const SYS_FSTATFS64 = 346

const SYS_FSTAT_EXTENDED = 281

const SYS_FSYNC = 95

const SYS_FSYNC_NOCANCEL = 408

const SYS_FTRUNCATE = 201

const SYS_FUTIMES = 139

const SYS_GETATTRLIST = 220

const SYS_GETAUDIT_ADDR = 357

const SYS_GETAUID = 353

const SYS_GETDIRENTRIES = 196

const SYS_GETDIRENTRIES64 = 344

const SYS_GETDIRENTRIESATTR = 222

const SYS_GETDTABLESIZE = 89

const SYS_GETEGID = 43

const SYS_GETEUID = 25

const SYS_GETFH = 161

const SYS_GETFSSTAT = 18

const SYS_GETFSSTAT64 = 347

const SYS_GETGID = 47

const SYS_GETGROUPS = 79

const SYS_GETHOSTUUID = 142

const SYS_GETITIMER = 86

const SYS_GETLCID = 395

const SYS_GETLOGIN = 49

const SYS_GETPEERNAME = 31

const SYS_GETPGID = 151

const SYS_GETPGRP = 81

const SYS_GETPID = 20

const SYS_GETPPID = 39

const SYS_GETPRIORITY = 100

const SYS_GETRLIMIT = 194

const SYS_GETRUSAGE = 117

const SYS_GETSGROUPS = 288

const SYS_GETSID = 310

const SYS_GETSOCKNAME = 32

const SYS_GETSOCKOPT = 118

const SYS_GETTID = 286

const SYS_GETTIMEOFDAY = 116

const SYS_GETUID = 24

const SYS_GETWGROUPS = 290

const SYS_GETXATTR = 234

const SYS_IDENTITYSVC = 293

const SYS_INITGROUPS = 243

const SYS_IOCTL = 54

const SYS_IOPOLICYSYS = 322

const SYS_ISSETUGID = 327

const SYS_KAS_INFO = 439

const SYS_KDEBUG_TRACE = 180

const SYS_KEVENT = 363

const SYS_KEVENT64 = 369

const SYS_KILL = 37

const SYS_KQUEUE = 362

const SYS_LCHOWN = 364

const SYS_LEDGER = 373

const SYS_LINK = 9

const SYS_LIO_LISTIO = 320

const SYS_LISTEN = 106

const SYS_LISTXATTR = 240

const SYS_LSEEK = 199

const SYS_LSTAT = 190

const SYS_LSTAT64 = 340

const SYS_LSTAT64_EXTENDED = 342

const SYS_LSTAT_EXTENDED = 280

const SYS_MADVISE = 75

const SYS_MAXSYSCALL = 440

const SYS_MINCORE = 78

const SYS_MINHERIT = 250

const SYS_MKDIR = 136

const SYS_MKDIR_EXTENDED = 292

const SYS_MKFIFO = 132

const SYS_MKFIFO_EXTENDED = 291

const SYS_MKNOD = 14

const SYS_MLOCK = 203

const SYS_MLOCKALL = 324

const SYS_MMAP = 197

const SYS_MODWATCH = 233

const SYS_MOUNT = 167

const SYS_MPROTECT = 74

const SYS_MSGCTL = 258

const SYS_MSGGET = 259

const SYS_MSGRCV = 261

const SYS_MSGRCV_NOCANCEL = 419

const SYS_MSGSND = 260

const SYS_MSGSND_NOCANCEL = 418

const SYS_MSGSYS = 252

const SYS_MSYNC = 65

const SYS_MSYNC_NOCANCEL = 405

const SYS_MUNLOCK = 204

const SYS_MUNLOCKALL = 325

const SYS_MUNMAP = 73

const SYS_NFSCLNT = 247

const SYS_NFSSVC = 155

const SYS_OPEN = 5

const SYS_OPEN_DPROTECTED_NP = 216

const SYS_OPEN_EXTENDED = 277

const SYS_OPEN_NOCANCEL = 398

const SYS_PATHCONF = 191

const SYS_PID_HIBERNATE = 435

const SYS_PID_RESUME = 434

const SYS_PID_SHUTDOWN_SOCKETS = 436

const SYS_PID_SUSPEND = 433

const SYS_PIPE = 42

const SYS_POLL = 230

const SYS_POLL_NOCANCEL = 417

const SYS_POSIX_SPAWN = 244

const SYS_PREAD = 153

const SYS_PREAD_NOCANCEL = 414

const SYS_PROCESS_POLICY = 323

const SYS_PROC_INFO = 336

const SYS_PSYNCH_CVBROAD = 303

const SYS_PSYNCH_CVCLRPREPOST = 312

const SYS_PSYNCH_CVSIGNAL = 304

const SYS_PSYNCH_CVWAIT = 305

const SYS_PSYNCH_MUTEXDROP = 302

const SYS_PSYNCH_MUTEXWAIT = 301

const SYS_PSYNCH_RW_DOWNGRADE = 299

const SYS_PSYNCH_RW_LONGRDLOCK = 297

const SYS_PSYNCH_RW_RDLOCK = 306

const SYS_PSYNCH_RW_UNLOCK = 308

const SYS_PSYNCH_RW_UNLOCK2 = 309

const SYS_PSYNCH_RW_UPGRADE = 300

const SYS_PSYNCH_RW_WRLOCK = 307

const SYS_PSYNCH_RW_YIELDWRLOCK = 298

const SYS_PTRACE = 26

const SYS_PWRITE = 154

const SYS_PWRITE_NOCANCEL = 415

const SYS_QUOTACTL = 165

const SYS_READ = 3

const SYS_READLINK = 58

const SYS_READV = 120

const SYS_READV_NOCANCEL = 411

const SYS_READ_NOCANCEL = 396

const SYS_REBOOT = 55

const SYS_RECVFROM = 29

const SYS_RECVFROM_NOCANCEL = 403

const SYS_RECVMSG = 27

const SYS_RECVMSG_NOCANCEL = 401

const SYS_REMOVEXATTR = 238

const SYS_RENAME = 128

const SYS_REVOKE = 56

const SYS_RMDIR = 137

const SYS_SEARCHFS = 225

const SYS_SELECT = 93

const SYS_SELECT_NOCANCEL = 407

const SYS_SEMCTL = 254

const SYS_SEMGET = 255

const SYS_SEMOP = 256

const SYS_SEMSYS = 251

const SYS_SEM_CLOSE = 269

const SYS_SEM_DESTROY = 276

const SYS_SEM_GETVALUE = 274

const SYS_SEM_INIT = 275

const SYS_SEM_OPEN = 268

const SYS_SEM_POST = 273

const SYS_SEM_TRYWAIT = 272

const SYS_SEM_UNLINK = 270

const SYS_SEM_WAIT = 271

const SYS_SEM_WAIT_NOCANCEL = 420

const SYS_SENDFILE = 337

const SYS_SENDMSG = 28

const SYS_SENDMSG_NOCANCEL = 402

const SYS_SENDTO = 133

const SYS_SENDTO_NOCANCEL = 413

const SYS_SETATTRLIST = 221

const SYS_SETAUDIT_ADDR = 358

const SYS_SETAUID = 354

const SYS_SETEGID = 182

const SYS_SETEUID = 183

const SYS_SETGID = 181

const SYS_SETGROUPS = 80

const SYS_SETITIMER = 83

const SYS_SETLCID = 394

const SYS_SETLOGIN = 50

const SYS_SETPGID = 82

const SYS_SETPRIORITY = 96

const SYS_SETPRIVEXEC = 152

const SYS_SETREGID = 127

const SYS_SETREUID = 126

const SYS_SETRLIMIT = 195

const SYS_SETSGROUPS = 287

const SYS_SETSID = 147

const SYS_SETSOCKOPT = 105

const SYS_SETTID = 285

const SYS_SETTID_WITH_PID = 311

const SYS_SETTIMEOFDAY = 122

const SYS_SETUID = 23

const SYS_SETWGROUPS = 289

const SYS_SETXATTR = 236

const SYS_SHARED_REGION_CHECK_NP = 294

const SYS_SHARED_REGION_MAP_AND_SLIDE_NP = 438

const SYS_SHMAT = 262

const SYS_SHMCTL = 263

const SYS_SHMDT = 264

const SYS_SHMGET = 265

const SYS_SHMSYS = 253

const SYS_SHM_OPEN = 266

const SYS_SHM_UNLINK = 267

const SYS_SHUTDOWN = 134

const SYS_SIGACTION = 46

const SYS_SIGALTSTACK = 53

const SYS_SIGPENDING = 52

const SYS_SIGPROCMASK = 48

const SYS_SIGRETURN = 184

const SYS_SIGSUSPEND = 111

const SYS_SIGSUSPEND_NOCANCEL = 410

const SYS_SOCKET = 97

const SYS_SOCKETPAIR = 135

const SYS_STACK_SNAPSHOT = 365

const SYS_STAT = 188

const SYS_STAT64 = 338

const SYS_STAT64_EXTENDED = 341

const SYS_STATFS = 157

const SYS_STATFS64 = 345

const SYS_STAT_EXTENDED = 279

const SYS_SWAPON = 85

const SYS_SYMLINK = 57

const SYS_SYNC = 36

const SYS_SYSCALL = 0

const SYS_THREAD_SELFID = 372

const SYS_TRUNCATE = 200

const SYS_UMASK = 60

const SYS_UMASK_EXTENDED = 278

const SYS_UNDELETE = 205

const SYS_UNLINK = 10

const SYS_UNMOUNT = 159

const SYS_UTIMES = 138

const SYS_VFORK = 66

const SYS_VM_PRESSURE_MONITOR = 296

const SYS_WAIT4 = 7

const SYS_WAIT4_NOCANCEL = 400

const SYS_WAITEVENT = 232

const SYS_WAITID = 173

const SYS_WAITID_NOCANCEL = 416

const SYS_WATCHEVENT = 231

const SYS_WORKQ_KERNRETURN = 368

const SYS_WORKQ_OPEN = 367

const SYS_WRITE = 4

const SYS_WRITEV = 121

const SYS_WRITEV_NOCANCEL = 412

const SYS_WRITE_NOCANCEL = 397

const SYS___DISABLE_THREADSIGNAL = 331

const SYS___MAC_EXECVE = 380

const SYS___MAC_GETFSSTAT = 426

const SYS___MAC_GET_FD = 388

const SYS___MAC_GET_FILE = 382

const SYS___MAC_GET_LCID = 391

const SYS___MAC_GET_LCTX = 392

const SYS___MAC_GET_LINK = 384

const SYS___MAC_GET_MOUNT = 425

const SYS___MAC_GET_PID = 390

const SYS___MAC_GET_PROC = 386

const SYS___MAC_MOUNT = 424

const SYS___MAC_SET_FD = 389

const SYS___MAC_SET_FILE = 383

const SYS___MAC_SET_LCTX = 393

const SYS___MAC_SET_LINK = 385

const SYS___MAC_SET_PROC = 387

const SYS___MAC_SYSCALL = 381

const SYS___OLD_SEMWAIT_SIGNAL = 370

const SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371

const SYS___PTHREAD_CANCELED = 333

const SYS___PTHREAD_CHDIR = 348

const SYS___PTHREAD_FCHDIR = 349

const SYS___PTHREAD_KILL = 328

const SYS___PTHREAD_MARKCANCEL = 332

const SYS___PTHREAD_SIGMASK = 329

const SYS___SEMWAIT_SIGNAL = 334

const SYS___SEMWAIT_SIGNAL_NOCANCEL = 423

const SYS___SIGWAIT = 330

const SYS___SIGWAIT_NOCANCEL = 422

const SYS___SYSCTL = 202

const S_IEXEC = 0x40

const S_IFBLK = 0x6000

const S_IFCHR = 0x2000

const S_IFDIR = 0x4000

const S_IFIFO = 0x1000

const S_IFLNK = 0xa000

const S_IFMT = 0xf000

const S_IFREG = 0x8000

const S_IFSOCK = 0xc000

const S_IFWHT = 0xe000

const S_IREAD = 0x100

const S_IRGRP = 0x20

const S_IROTH = 0x4

const S_IRUSR = 0x100

const S_IRWXG = 0x38

const S_IRWXO = 0x7

const S_IRWXU = 0x1c0

const S_ISGID = 0x400

const S_ISTXT = 0x200

const S_ISUID = 0x800

const S_ISVTX = 0x200

const S_IWGRP = 0x10

const S_IWOTH = 0x2

const S_IWRITE = 0x80

const S_IWUSR = 0x80

const S_IXGRP = 0x8

const S_IXOTH = 0x1

const S_IXUSR = 0x40

const SizeofBpfHdr = 0x14

const SizeofBpfInsn = 0x8

const SizeofBpfProgram = 0x10

const SizeofBpfStat = 0x8

const SizeofBpfVersion = 0x4

const SizeofCmsghdr = 0xc

const SizeofICMPv6Filter = 0x20

const SizeofIPMreq = 0x8

const SizeofIPv6MTUInfo = 0x20

const SizeofIPv6Mreq = 0x14

const SizeofIfData = 0x60

const SizeofIfMsghdr = 0x70

const SizeofIfaMsghdr = 0x14

const SizeofIfmaMsghdr = 0x10

const SizeofIfmaMsghdr2 = 0x14

const SizeofInet4Pktinfo = 0xc

const SizeofInet6Pktinfo = 0x14

const SizeofLinger = 0x8

const SizeofMsghdr = 0x30

const SizeofRtMetrics = 0x38

const SizeofRtMsghdr = 0x5c

const SizeofSockaddrAny = 0x6c

const SizeofSockaddrDatalink = 0x14

const SizeofSockaddrInet4 = 0x10

const SizeofSockaddrInet6 = 0x1c

const SizeofSockaddrUnix = 0x6a

const TCIFLUSH = 0x1

const TCIOFLUSH = 0x3

const TCOFLUSH = 0x2

const TCP_CONNECTIONTIMEOUT = 0x20

const TCP_ENABLE_ECN = 0x104

const TCP_KEEPALIVE = 0x10

const TCP_KEEPCNT = 0x102

const TCP_KEEPINTVL = 0x101

const TCP_MAXHLEN = 0x3c

const TCP_MAXOLEN = 0x28

const TCP_MAXSEG = 0x2

const TCP_MAXWIN = 0xffff

const TCP_MAX_SACK = 0x4

const TCP_MAX_WINSHIFT = 0xe

const TCP_MINMSS = 0xd8

const TCP_MSS = 0x200

const TCP_NODELAY = 0x1

const TCP_NOOPT = 0x8

const TCP_NOPUSH = 0x4

const TCP_NOTSENT_LOWAT = 0x201

const TCP_RXT_CONNDROPTIME = 0x80

const TCP_RXT_FINDROP = 0x100

const TCP_SENDMOREACKS = 0x103

const TCSAFLUSH = 0x2

const TIOCCBRK = 0x2000747a

const TIOCCDTR = 0x20007478

const TIOCCONS = 0x80047462

const TIOCDCDTIMESTAMP = 0x40107458

const TIOCDRAIN = 0x2000745e

const TIOCDSIMICROCODE = 0x20007455

const TIOCEXCL = 0x2000740d

const TIOCEXT = 0x80047460

const TIOCFLUSH = 0x80047410

const TIOCGDRAINWAIT = 0x40047456

const TIOCGETA = 0x40487413

const TIOCGETD = 0x4004741a

const TIOCGPGRP = 0x40047477

const TIOCGWINSZ = 0x40087468

const TIOCIXOFF = 0x20007480

const TIOCIXON = 0x20007481

const TIOCMBIC = 0x8004746b

const TIOCMBIS = 0x8004746c

const TIOCMGDTRWAIT = 0x4004745a

const TIOCMGET = 0x4004746a

const TIOCMODG = 0x40047403

const TIOCMODS = 0x80047404

const TIOCMSDTRWAIT = 0x8004745b

const TIOCMSET = 0x8004746d

const TIOCM_CAR = 0x40

const TIOCM_CD = 0x40

const TIOCM_CTS = 0x20

const TIOCM_DSR = 0x100

const TIOCM_DTR = 0x2

const TIOCM_LE = 0x1

const TIOCM_RI = 0x80

const TIOCM_RNG = 0x80

const TIOCM_RTS = 0x4

const TIOCM_SR = 0x10

const TIOCM_ST = 0x8

const TIOCNOTTY = 0x20007471

const TIOCNXCL = 0x2000740e

const TIOCOUTQ = 0x40047473

const TIOCPKT = 0x80047470

const TIOCPKT_DATA = 0x0

const TIOCPKT_DOSTOP = 0x20

const TIOCPKT_FLUSHREAD = 0x1

const TIOCPKT_FLUSHWRITE = 0x2

const TIOCPKT_IOCTL = 0x40

const TIOCPKT_NOSTOP = 0x10

const TIOCPKT_START = 0x8

const TIOCPKT_STOP = 0x4

const TIOCPTYGNAME = 0x40807453

const TIOCPTYGRANT = 0x20007454

const TIOCPTYUNLK = 0x20007452

const TIOCREMOTE = 0x80047469

const TIOCSBRK = 0x2000747b

const TIOCSCONS = 0x20007463

const TIOCSCTTY = 0x20007461

const TIOCSDRAINWAIT = 0x80047457

const TIOCSDTR = 0x20007479

const TIOCSETA = 0x80487414

const TIOCSETAF = 0x80487416

const TIOCSETAW = 0x80487415

const TIOCSETD = 0x8004741b

const TIOCSIG = 0x2000745f

const TIOCSPGRP = 0x80047476

const TIOCSTART = 0x2000746e

const TIOCSTAT = 0x20007465

const TIOCSTI = 0x80017472

const TIOCSTOP = 0x2000746f

const TIOCSWINSZ = 0x80087467

const TIOCTIMESTAMP = 0x40107459

const TIOCUCNTL = 0x80047466

const TOSTOP = 0x400000

const VDISCARD = 0xf

const VDSUSP = 0xb

const VEOF = 0x0

const VEOL = 0x1

const VEOL2 = 0x2

const VERASE = 0x3

const VINTR = 0x8

const VKILL = 0x5

const VLNEXT = 0xe

const VMIN = 0x10

const VQUIT = 0x9

const VREPRINT = 0x6

const VSTART = 0xc

const VSTATUS = 0x12

const VSTOP = 0xd

const VSUSP = 0xa

const VT0 = 0x0

const VT1 = 0x10000

const VTDLY = 0x10000

const VTIME = 0x11

const VWERASE = 0x4

const WCONTINUED = 0x10

const WCOREFLAG = 0x80

const WEXITED = 0x4

const WNOHANG = 0x1

const WNOWAIT = 0x20

const WORDSIZE = 0x40

const WSTOPPED = 0x8

const WUNTRACED = 0x2

/// ForkLock is used to synchronize creation of new file descriptors
/// with fork.
/// 
/// We want the child in a fork/exec sequence to inherit only the
/// file descriptors we intend. To do that, we mark all file
/// descriptors close-on-exec and then, in the child, explicitly
/// unmark the ones we want the exec'ed program to keep.
/// Unix doesn't make this easy: there is, in general, no way to
/// allocate a new file descriptor close-on-exec. Instead you
/// have to allocate the descriptor and then mark it close-on-exec.
/// If a fork happens between those two events, the child's exec
/// will inherit an unwanted file descriptor.
/// 
/// This lock solves that race: the create new fd/mark close-on-exec
/// operation is done holding ForkLock for reading, and the fork itself
/// is done holding ForkLock for writing. At least, that's the idea.
/// There are some complications.
/// 
/// Some system calls that create new file descriptors can block
/// for arbitrarily long times: open on a hung NFS server or named
/// pipe, accept on a socket, and so on. We can't reasonably grab
/// the lock across those operations.
/// 
/// It is worse to inherit some file descriptors than others.
/// If a non-malicious child accidentally inherits an open ordinary file,
/// that's not a big deal. On the other hand, if a long-lived child
/// accidentally inherits the write end of a pipe, then the reader
/// of that pipe will not see EOF until that child exits, potentially
/// causing the parent program to hang. This is a common problem
/// in threaded C programs that use popen.
/// 
/// Luckily, the file descriptors that are most important not to
/// inherit are not the ones that can take an arbitrarily long time
/// to create: pipe returns instantly, and the net package uses
/// non-blocking I/O to accept on a listening socket.
/// The rules for which file descriptor-creating operations use the
/// ForkLock are as follows:
/// 
///   - [Pipe]. Use pipe2 if available. Otherwise, does not block,
///     so use ForkLock.
///   - [Socket]. Use SOCK_CLOEXEC if available. Otherwise, does not
///     block, so use ForkLock.
///   - [Open]. Use [O_CLOEXEC] if available. Otherwise, may block,
///     so live with the race.
///   - [Dup]. Use [F_DUPFD_CLOEXEC] or dup3 if available. Otherwise,
///     does not block, so use ForkLock.
pub var ForkLock: sync.RWMutex

/// For testing: clients can set this flag to force
/// creation of IPv6 sockets to return [EAFNOSUPPORT].
pub var SocketDisableIPv6: bool

pub var Stderr: int

pub var Stdin: int

pub var Stdout: int

impl Cmsghdr {
  fn SetLen(self: Ref<Cmsghdr>, length: int)
}

impl Errno {
  fn Error(self) -> string

  fn Is(self, target: error) -> bool

  fn Temporary(self) -> bool

  fn Timeout(self) -> bool
}

impl Iovec {
  fn SetLen(self: Ref<Iovec>, length: int)
}

impl Msghdr {
  fn SetControllen(self: Ref<Msghdr>, length: int)
}

impl Signal {
  fn Signal(self)

  fn String(self) -> string
}

impl Timespec {
  /// Nano returns the time stored in ts as nanoseconds.
  fn Nano(self: Ref<Timespec>) -> int64

  /// Unix returns the time stored in ts as seconds plus nanoseconds.
  fn Unix(self: Ref<Timespec>) -> (int64, int64)
}

impl Timeval {
  /// Nano returns the time stored in tv as nanoseconds.
  fn Nano(self: Ref<Timeval>) -> int64

  /// Unix returns the time stored in tv as seconds plus nanoseconds.
  fn Unix(self: Ref<Timeval>) -> (int64, int64)
}

impl WaitStatus {
  fn Continued(self) -> bool

  fn CoreDump(self) -> bool

  fn ExitStatus(self) -> int

  fn Exited(self) -> bool

  fn Signal(self) -> Signal

  fn Signaled(self) -> bool

  fn StopSignal(self) -> Signal

  fn Stopped(self) -> bool

  fn TrapCause(self) -> int
}