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
/* automatically generated by rust-bindgen 0.58.1 */

pub const ZTS_MAC_ADDRSTRLEN: u32 = 18;
pub const ZTS_INET_ADDRSTRLEN: u32 = 16;
pub const ZTS_INET6_ADDRSTRLEN: u32 = 46;
pub const ZTS_IP_MAX_STR_LEN: u32 = 46;
pub const ZTS_STORE_DATA_LEN: u32 = 4096;
pub const ZTS_MAX_NETWORK_SHORT_NAME_LENGTH: u32 = 127;
pub const ZTS_MAX_NETWORK_ROUTES: u32 = 32;
pub const ZTS_MAX_ASSIGNED_ADDRESSES: u32 = 16;
pub const ZTS_MAX_PEER_NETWORK_PATHS: u32 = 16;
pub const ZTS_MAX_MULTICAST_SUBSCRIPTIONS: u32 = 1024;
pub const ZTS_MAX_ENDPOINT_STR_LEN: u32 = 52;
pub const ZTS_C_API_ONLY: u32 = 1;
pub const ZTS_SOCK_STREAM: u32 = 1;
pub const ZTS_SOCK_DGRAM: u32 = 2;
pub const ZTS_SOCK_RAW: u32 = 3;
pub const ZTS_AF_UNSPEC: u32 = 0;
pub const ZTS_AF_INET: u32 = 2;
pub const ZTS_AF_INET6: u32 = 10;
pub const ZTS_PF_INET: u32 = 2;
pub const ZTS_PF_INET6: u32 = 10;
pub const ZTS_PF_UNSPEC: u32 = 0;
pub const ZTS_IPPROTO_IP: u32 = 0;
pub const ZTS_IPPROTO_ICMP: u32 = 1;
pub const ZTS_IPPROTO_TCP: u32 = 6;
pub const ZTS_IPPROTO_UDP: u32 = 17;
pub const ZTS_IPPROTO_IPV6: u32 = 41;
pub const ZTS_IPPROTO_ICMPV6: u32 = 58;
pub const ZTS_IPPROTO_UDPLITE: u32 = 136;
pub const ZTS_IPPROTO_RAW: u32 = 255;
pub const ZTS_MSG_PEEK: u32 = 1;
pub const ZTS_MSG_WAITALL: u32 = 2;
pub const ZTS_MSG_OOB: u32 = 4;
pub const ZTS_MSG_DONTWAIT: u32 = 8;
pub const ZTS_MSG_MORE: u32 = 16;
pub const ZTS_IOCPARM_MASK: u32 = 127;
pub const ZTS_IOC_VOID: u32 = 536870912;
pub const ZTS_IOC_OUT: u32 = 1073741824;
pub const ZTS_IOC_IN: u32 = 2147483648;
pub const ZTS_IOC_INOUT: u32 = 3221225472;
pub const SIN_ZERO_LEN: u32 = 8;
pub const ZTS_MAX_NUM_ROOTS: u32 = 16;
pub const ZTS_MAX_ENDPOINTS_PER_ROOT: u32 = 32;
pub const ZTS_DISABLE_CENTRAL_API: u32 = 1;
pub const ZTS_ID_STR_BUF_LEN: u32 = 384;
pub const ZTS_SOL_SOCKET: u32 = 4095;
pub const ZTS_SO_DEBUG: u32 = 1;
pub const ZTS_SO_ACCEPTCONN: u32 = 2;
pub const ZTS_SO_REUSEADDR: u32 = 4;
pub const ZTS_SO_KEEPALIVE: u32 = 8;
pub const ZTS_SO_DONTROUTE: u32 = 16;
pub const ZTS_SO_BROADCAST: u32 = 32;
pub const ZTS_SO_USELOOPBACK: u32 = 64;
pub const ZTS_SO_LINGER: u32 = 128;
pub const ZTS_SO_OOBINLINE: u32 = 256;
pub const ZTS_SO_REUSEPORT: u32 = 512;
pub const ZTS_SO_SNDBUF: u32 = 4097;
pub const ZTS_SO_RCVBUF: u32 = 4098;
pub const ZTS_SO_SNDLOWAT: u32 = 4099;
pub const ZTS_SO_RCVLOWAT: u32 = 4100;
pub const ZTS_SO_SNDTIMEO: u32 = 4101;
pub const ZTS_SO_RCVTIMEO: u32 = 4102;
pub const ZTS_SO_ERROR: u32 = 4103;
pub const ZTS_SO_TYPE: u32 = 4104;
pub const ZTS_SO_CONTIMEO: u32 = 4105;
pub const ZTS_SO_NO_CHECK: u32 = 4106;
pub const ZTS_SO_BINDTODEVICE: u32 = 4107;
pub const ZTS_IP_TOS: u32 = 1;
pub const ZTS_IP_TTL: u32 = 2;
pub const ZTS_IP_PKTINFO: u32 = 8;
pub const ZTS_TCP_NODELAY: u32 = 1;
pub const ZTS_TCP_KEEPALIVE: u32 = 2;
pub const ZTS_TCP_KEEPIDLE: u32 = 3;
pub const ZTS_TCP_KEEPINTVL: u32 = 4;
pub const ZTS_TCP_KEEPCNT: u32 = 5;
pub const ZTS_IPV6_CHECKSUM: u32 = 7;
pub const ZTS_IPV6_V6ONLY: u32 = 27;
pub const ZTS_UDPLITE_SEND_CSCOV: u32 = 1;
pub const ZTS_UDPLITE_RECV_CSCOV: u32 = 2;
pub const ZTS_IP_MULTICAST_TTL: u32 = 5;
pub const ZTS_IP_MULTICAST_IF: u32 = 6;
pub const ZTS_IP_MULTICAST_LOOP: u32 = 7;
pub const ZTS_IP_ADD_MEMBERSHIP: u32 = 3;
pub const ZTS_IP_DROP_MEMBERSHIP: u32 = 4;
pub const ZTS_IPV6_JOIN_GROUP: u32 = 12;
pub const ZTS_IPV6_ADD_MEMBERSHIP: u32 = 12;
pub const ZTS_IPV6_LEAVE_GROUP: u32 = 13;
pub const ZTS_IPV6_DROP_MEMBERSHIP: u32 = 13;
pub const ZTS_IPTOS_TOS_MASK: u32 = 30;
pub const ZTS_IPTOS_LOWDELAY: u32 = 16;
pub const ZTS_IPTOS_THROUGHPUT: u32 = 8;
pub const ZTS_IPTOS_RELIABILITY: u32 = 4;
pub const ZTS_IPTOS_LOWCOST: u32 = 2;
pub const ZTS_IPTOS_MINCOST: u32 = 2;
pub const ZTS_IPTOS_PREC_MASK: u32 = 224;
pub const ZTS_IPTOS_PREC_NETCONTROL: u32 = 224;
pub const ZTS_IPTOS_PREC_INTERNETCONTROL: u32 = 192;
pub const ZTS_IPTOS_PREC_CRITIC_ECP: u32 = 160;
pub const ZTS_IPTOS_PREC_FLASHOVERRIDE: u32 = 128;
pub const ZTS_IPTOS_PREC_FLASH: u32 = 96;
pub const ZTS_IPTOS_PREC_IMMEDIATE: u32 = 64;
pub const ZTS_IPTOS_PREC_PRIORITY: u32 = 32;
pub const ZTS_IPTOS_PREC_ROUTINE: u32 = 0;
pub const LWIP_SOCKET_OFFSET: u32 = 0;
pub const MEMP_NUM_NETCONN: u32 = 1024;
pub const ZTS_FD_SETSIZE: u32 = 1024;
pub const ZTS_F_GETFL: u32 = 3;
pub const ZTS_F_SETFL: u32 = 4;
pub const ZTS_O_NONBLOCK: u32 = 1;
pub const ZTS_O_NDELAY: u32 = 1;
pub const ZTS_O_RDONLY: u32 = 2;
pub const ZTS_O_WRONLY: u32 = 4;
pub const ZTS_O_RDWR: u32 = 6;
pub const ZTS_POLLIN: u32 = 1;
pub const ZTS_POLLOUT: u32 = 2;
pub const ZTS_POLLERR: u32 = 4;
pub const ZTS_POLLNVAL: u32 = 8;
pub const ZTS_POLLRDNORM: u32 = 16;
pub const ZTS_POLLRDBAND: u32 = 32;
pub const ZTS_POLLPRI: u32 = 64;
pub const ZTS_POLLWRNORM: u32 = 128;
pub const ZTS_POLLWRBAND: u32 = 256;
pub const ZTS_POLLHUP: u32 = 512;
pub const ZTS_MSG_TRUNC: u32 = 4;
pub const ZTS_MSG_CTRUNC: u32 = 8;
pub const ZTS_SHUT_RD: u32 = 0;
pub const ZTS_SHUT_WR: u32 = 1;
pub const ZTS_SHUT_RDWR: u32 = 2;
#[doc = " No error"]
pub const zts_error_t_ZTS_ERR_OK: zts_error_t = 0;
#[doc = " Socket error, see `zts_errno`"]
pub const zts_error_t_ZTS_ERR_SOCKET: zts_error_t = -1;
#[doc = " This operation is not allowed at this time. Or possibly the node hasn't been started"]
pub const zts_error_t_ZTS_ERR_SERVICE: zts_error_t = -2;
#[doc = " Invalid argument"]
pub const zts_error_t_ZTS_ERR_ARG: zts_error_t = -3;
#[doc = " No result (not necessarily an error)"]
pub const zts_error_t_ZTS_ERR_NO_RESULT: zts_error_t = -4;
#[doc = " Consider filing a bug report"]
pub const zts_error_t_ZTS_ERR_GENERAL: zts_error_t = -5;
#[doc = " Common error return values"]
pub type zts_error_t = ::std::os::raw::c_int;
#[doc = " Node has been initialized"]
#[doc = ""]
#[doc = " This is the first event generated, and is always sent. It may occur"]
#[doc = " before node's constructor returns."]
#[doc = ""]
pub const zts_event_t_ZTS_EVENT_NODE_UP: zts_event_t = 200;
#[doc = " Node is online -- at least one upstream node appears reachable"]
#[doc = ""]
pub const zts_event_t_ZTS_EVENT_NODE_ONLINE: zts_event_t = 201;
#[doc = " Node is offline -- network does not seem to be reachable by any available"]
#[doc = " strategy"]
#[doc = ""]
pub const zts_event_t_ZTS_EVENT_NODE_OFFLINE: zts_event_t = 202;
#[doc = " Node is shutting down"]
#[doc = ""]
#[doc = " This is generated within Node's destructor when it is being shut down."]
#[doc = " It's done for convenience, since cleaning up other state in the event"]
#[doc = " handler may appear more idiomatic."]
#[doc = ""]
pub const zts_event_t_ZTS_EVENT_NODE_DOWN: zts_event_t = 203;
#[doc = " A fatal error has occurred. One possible reason is:"]
#[doc = ""]
#[doc = " Your identity has collided with another node's ZeroTier address"]
#[doc = ""]
#[doc = " This happens if two different public keys both hash (via the algorithm"]
#[doc = " in Identity::generate()) to the same 40-bit ZeroTier address."]
#[doc = ""]
#[doc = " This is something you should \"never\" see, where \"never\" is defined as"]
#[doc = " once per 2^39 new node initializations / identity creations. If you do"]
#[doc = " see it, you're going to see it very soon after a node is first"]
#[doc = " initialized."]
#[doc = ""]
#[doc = " This is reported as an event rather than a return code since it's"]
#[doc = " detected asynchronously via error messages from authoritative nodes."]
#[doc = ""]
#[doc = " If this occurs, you must shut down and delete the node, delete the"]
#[doc = " identity.secret record/file from the data store, and restart to generate"]
#[doc = " a new identity. If you don't do this, you will not be able to communicate"]
#[doc = " with other nodes."]
#[doc = ""]
#[doc = " We'd automate this process, but we don't think silently deleting"]
#[doc = " private keys or changing our address without telling the calling code"]
#[doc = " is good form. It violates the principle of least surprise."]
#[doc = ""]
#[doc = " You can technically get away with not handling this, but we recommend"]
#[doc = " doing so in a mature reliable application. Besides, handling this"]
#[doc = " condition is a good way to make sure it never arises. It's like how"]
#[doc = " umbrellas prevent rain and smoke detectors prevent fires. They do, right?"]
#[doc = ""]
#[doc = " Meta-data: none"]
pub const zts_event_t_ZTS_EVENT_NODE_FATAL_ERROR: zts_event_t = 204;
#[doc = " Network ID does not correspond to a known network"]
pub const zts_event_t_ZTS_EVENT_NETWORK_NOT_FOUND: zts_event_t = 210;
#[doc = " The version of ZeroTier inside libzt is too old"]
pub const zts_event_t_ZTS_EVENT_NETWORK_CLIENT_TOO_OLD: zts_event_t = 211;
#[doc = " The configuration for a network has been requested (no action needed)"]
pub const zts_event_t_ZTS_EVENT_NETWORK_REQ_CONFIG: zts_event_t = 212;
#[doc = " The node joined the network successfully (no action needed)"]
pub const zts_event_t_ZTS_EVENT_NETWORK_OK: zts_event_t = 213;
#[doc = " The node is not allowed to join the network (you must authorize node)"]
pub const zts_event_t_ZTS_EVENT_NETWORK_ACCESS_DENIED: zts_event_t = 214;
#[doc = " The node has received an IPv4 address from the network controller"]
pub const zts_event_t_ZTS_EVENT_NETWORK_READY_IP4: zts_event_t = 215;
#[doc = " The node has received an IPv6 address from the network controller"]
pub const zts_event_t_ZTS_EVENT_NETWORK_READY_IP6: zts_event_t = 216;
#[doc = " Deprecated"]
pub const zts_event_t_ZTS_EVENT_NETWORK_READY_IP4_IP6: zts_event_t = 217;
#[doc = " Network controller is unreachable"]
pub const zts_event_t_ZTS_EVENT_NETWORK_DOWN: zts_event_t = 218;
#[doc = " Network change received from controller"]
pub const zts_event_t_ZTS_EVENT_NETWORK_UPDATE: zts_event_t = 219;
#[doc = " TCP/IP stack (lwIP) is up (for debug purposes)"]
pub const zts_event_t_ZTS_EVENT_STACK_UP: zts_event_t = 220;
#[doc = " TCP/IP stack (lwIP) id down (for debug purposes)"]
pub const zts_event_t_ZTS_EVENT_STACK_DOWN: zts_event_t = 221;
#[doc = " lwIP netif up (for debug purposes)"]
pub const zts_event_t_ZTS_EVENT_NETIF_UP: zts_event_t = 230;
#[doc = " lwIP netif down (for debug purposes)"]
pub const zts_event_t_ZTS_EVENT_NETIF_DOWN: zts_event_t = 231;
#[doc = " lwIP netif removed (for debug purposes)"]
pub const zts_event_t_ZTS_EVENT_NETIF_REMOVED: zts_event_t = 232;
#[doc = " lwIP netif link up (for debug purposes)"]
pub const zts_event_t_ZTS_EVENT_NETIF_LINK_UP: zts_event_t = 233;
#[doc = " lwIP netif link down (for debug purposes)"]
pub const zts_event_t_ZTS_EVENT_NETIF_LINK_DOWN: zts_event_t = 234;
#[doc = " A direct P2P path to peer is known"]
pub const zts_event_t_ZTS_EVENT_PEER_DIRECT: zts_event_t = 240;
#[doc = " A direct P2P path to peer is NOT known. Traffic is now relayed"]
pub const zts_event_t_ZTS_EVENT_PEER_RELAY: zts_event_t = 241;
#[doc = " A peer is unreachable. Check NAT/Firewall settings"]
pub const zts_event_t_ZTS_EVENT_PEER_UNREACHABLE: zts_event_t = 242;
#[doc = " A new path to a peer was discovered"]
pub const zts_event_t_ZTS_EVENT_PEER_PATH_DISCOVERED: zts_event_t = 243;
#[doc = " A known path to a peer is now considered dead"]
pub const zts_event_t_ZTS_EVENT_PEER_PATH_DEAD: zts_event_t = 244;
#[doc = " A new managed network route was added"]
pub const zts_event_t_ZTS_EVENT_ROUTE_ADDED: zts_event_t = 250;
#[doc = " A managed network route was removed"]
pub const zts_event_t_ZTS_EVENT_ROUTE_REMOVED: zts_event_t = 251;
#[doc = " A new managed IPv4 address was assigned to this peer"]
pub const zts_event_t_ZTS_EVENT_ADDR_ADDED_IP4: zts_event_t = 260;
#[doc = " A managed IPv4 address assignment was removed from this peer"]
pub const zts_event_t_ZTS_EVENT_ADDR_REMOVED_IP4: zts_event_t = 261;
#[doc = " A new managed IPv4 address was assigned to this peer"]
pub const zts_event_t_ZTS_EVENT_ADDR_ADDED_IP6: zts_event_t = 262;
#[doc = " A managed IPv6 address assignment was removed from this peer"]
pub const zts_event_t_ZTS_EVENT_ADDR_REMOVED_IP6: zts_event_t = 263;
#[doc = " The node's secret key (identity)"]
pub const zts_event_t_ZTS_EVENT_STORE_IDENTITY_SECRET: zts_event_t = 270;
#[doc = " The node's public key (identity)"]
pub const zts_event_t_ZTS_EVENT_STORE_IDENTITY_PUBLIC: zts_event_t = 271;
#[doc = " The node has received an updated planet config"]
pub const zts_event_t_ZTS_EVENT_STORE_PLANET: zts_event_t = 272;
#[doc = " New reachability hints and peer configuration"]
pub const zts_event_t_ZTS_EVENT_STORE_PEER: zts_event_t = 273;
#[doc = " New network config"]
pub const zts_event_t_ZTS_EVENT_STORE_NETWORK: zts_event_t = 274;
#[doc = " Event codes used by the (optional) callback API"]
pub type zts_event_t = ::std::os::raw::c_int;
extern "C" {
    pub static mut zts_errno: ::std::os::raw::c_int;
}
#[doc = " Operation not permitted"]
pub const zts_errno_t_ZTS_EPERM: zts_errno_t = 1;
#[doc = " No such file or directory"]
pub const zts_errno_t_ZTS_ENOENT: zts_errno_t = 2;
#[doc = " No such process"]
pub const zts_errno_t_ZTS_ESRCH: zts_errno_t = 3;
#[doc = " Interrupted system call"]
pub const zts_errno_t_ZTS_EINTR: zts_errno_t = 4;
#[doc = " I/O error"]
pub const zts_errno_t_ZTS_EIO: zts_errno_t = 5;
#[doc = " No such device or address"]
pub const zts_errno_t_ZTS_ENXIO: zts_errno_t = 6;
#[doc = " Bad file number"]
pub const zts_errno_t_ZTS_EBADF: zts_errno_t = 9;
#[doc = " Try again"]
pub const zts_errno_t_ZTS_EAGAIN: zts_errno_t = 11;
#[doc = " Operation would block"]
pub const zts_errno_t_ZTS_EWOULDBLOCK: zts_errno_t = 11;
#[doc = " Out of memory"]
pub const zts_errno_t_ZTS_ENOMEM: zts_errno_t = 12;
#[doc = " Permission denied"]
pub const zts_errno_t_ZTS_EACCES: zts_errno_t = 13;
#[doc = " Bad address"]
pub const zts_errno_t_ZTS_EFAULT: zts_errno_t = 14;
#[doc = " Device or resource busy"]
pub const zts_errno_t_ZTS_EBUSY: zts_errno_t = 16;
#[doc = " File exists"]
pub const zts_errno_t_ZTS_EEXIST: zts_errno_t = 17;
#[doc = " No such device"]
pub const zts_errno_t_ZTS_ENODEV: zts_errno_t = 19;
#[doc = " Invalid argument"]
pub const zts_errno_t_ZTS_EINVAL: zts_errno_t = 22;
#[doc = " File table overflow"]
pub const zts_errno_t_ZTS_ENFILE: zts_errno_t = 23;
#[doc = " Too many open files"]
pub const zts_errno_t_ZTS_EMFILE: zts_errno_t = 24;
#[doc = " Function not implemented"]
pub const zts_errno_t_ZTS_ENOSYS: zts_errno_t = 38;
#[doc = " Socket operation on non-socket"]
pub const zts_errno_t_ZTS_ENOTSOCK: zts_errno_t = 88;
#[doc = " Destination address required"]
pub const zts_errno_t_ZTS_EDESTADDRREQ: zts_errno_t = 89;
#[doc = " Message too long"]
pub const zts_errno_t_ZTS_EMSGSIZE: zts_errno_t = 90;
#[doc = " Protocol wrong type for socket"]
pub const zts_errno_t_ZTS_EPROTOTYPE: zts_errno_t = 91;
#[doc = " Protocol not available"]
pub const zts_errno_t_ZTS_ENOPROTOOPT: zts_errno_t = 92;
#[doc = " Protocol not supported"]
pub const zts_errno_t_ZTS_EPROTONOSUPPORT: zts_errno_t = 93;
#[doc = " Socket type not supported"]
pub const zts_errno_t_ZTS_ESOCKTNOSUPPORT: zts_errno_t = 94;
#[doc = " Operation not supported on transport endpoint"]
pub const zts_errno_t_ZTS_EOPNOTSUPP: zts_errno_t = 95;
#[doc = " Protocol family not supported"]
pub const zts_errno_t_ZTS_EPFNOSUPPORT: zts_errno_t = 96;
#[doc = " Address family not supported by protocol"]
pub const zts_errno_t_ZTS_EAFNOSUPPORT: zts_errno_t = 97;
#[doc = " Address already in use"]
pub const zts_errno_t_ZTS_EADDRINUSE: zts_errno_t = 98;
#[doc = " Cannot assign requested address"]
pub const zts_errno_t_ZTS_EADDRNOTAVAIL: zts_errno_t = 99;
#[doc = " Network is down"]
pub const zts_errno_t_ZTS_ENETDOWN: zts_errno_t = 100;
#[doc = " Network is unreachable"]
pub const zts_errno_t_ZTS_ENETUNREACH: zts_errno_t = 101;
#[doc = " Software caused connection abort"]
pub const zts_errno_t_ZTS_ECONNABORTED: zts_errno_t = 103;
#[doc = " Connection reset by peer"]
pub const zts_errno_t_ZTS_ECONNRESET: zts_errno_t = 104;
#[doc = " No buffer space available"]
pub const zts_errno_t_ZTS_ENOBUFS: zts_errno_t = 105;
#[doc = " Transport endpoint is already connected"]
pub const zts_errno_t_ZTS_EISCONN: zts_errno_t = 106;
#[doc = " Transport endpoint is not connected"]
pub const zts_errno_t_ZTS_ENOTCONN: zts_errno_t = 107;
#[doc = " Connection timed out"]
pub const zts_errno_t_ZTS_ETIMEDOUT: zts_errno_t = 110;
#[doc = " Connection timed out"]
pub const zts_errno_t_ZTS_ECONNREFUSED: zts_errno_t = 111;
#[doc = " No route to host"]
pub const zts_errno_t_ZTS_EHOSTUNREACH: zts_errno_t = 113;
#[doc = " Operation already in progress"]
pub const zts_errno_t_ZTS_EALREADY: zts_errno_t = 114;
#[doc = " Operation now in progress"]
pub const zts_errno_t_ZTS_EINPROGRESS: zts_errno_t = 115;
pub type zts_errno_t = ::std::os::raw::c_int;
pub type int_least64_t = i64;
pub type uint_least64_t = u64;
pub type int_fast64_t = i64;
pub type uint_fast64_t = u64;
pub type int_least32_t = i32;
pub type uint_least32_t = u32;
pub type int_fast32_t = i32;
pub type uint_fast32_t = u32;
pub type int_least16_t = i16;
pub type uint_least16_t = u16;
pub type int_fast16_t = i16;
pub type uint_fast16_t = u16;
pub type int_least8_t = i8;
pub type uint_least8_t = u8;
pub type int_fast8_t = i8;
pub type uint_fast8_t = u8;
pub type intmax_t = ::std::os::raw::c_longlong;
pub type uintmax_t = ::std::os::raw::c_ulonglong;
pub type ssize_t = ::std::os::raw::c_int;
pub type zts_socklen_t = u32;
pub type zts_in_addr_t = u32;
pub type zts_in_port_t = u16;
pub type zts_sa_family_t = u8;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct zts_in_addr {
    pub S_addr: zts_in_addr_t,
}
#[test]
fn bindgen_test_layout_zts_in_addr() {
    assert_eq!(
        ::std::mem::size_of::<zts_in_addr>(),
        4usize,
        concat!("Size of: ", stringify!(zts_in_addr))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_in_addr>(),
        4usize,
        concat!("Alignment of ", stringify!(zts_in_addr))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_in_addr>())).S_addr as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_in_addr),
            "::",
            stringify!(S_addr)
        )
    );
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct zts_in6_addr {
    pub un: zts_in6_addr_un,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union zts_in6_addr_un {
    pub u32_addr: [u32; 4usize],
    pub u8_addr: [u8; 16usize],
}
#[test]
fn bindgen_test_layout_zts_in6_addr_un() {
    assert_eq!(
        ::std::mem::size_of::<zts_in6_addr_un>(),
        16usize,
        concat!("Size of: ", stringify!(zts_in6_addr_un))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_in6_addr_un>(),
        4usize,
        concat!("Alignment of ", stringify!(zts_in6_addr_un))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_in6_addr_un>())).u32_addr as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_in6_addr_un),
            "::",
            stringify!(u32_addr)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_in6_addr_un>())).u8_addr as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_in6_addr_un),
            "::",
            stringify!(u8_addr)
        )
    );
}
#[test]
fn bindgen_test_layout_zts_in6_addr() {
    assert_eq!(
        ::std::mem::size_of::<zts_in6_addr>(),
        16usize,
        concat!("Size of: ", stringify!(zts_in6_addr))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_in6_addr>(),
        4usize,
        concat!("Alignment of ", stringify!(zts_in6_addr))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_in6_addr>())).un as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_in6_addr),
            "::",
            stringify!(un)
        )
    );
}
#[doc = " Address structure to specify an IPv4 endpoint"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct zts_sockaddr_in {
    pub sin_len: u8,
    pub sin_family: zts_sa_family_t,
    pub sin_port: zts_in_port_t,
    pub sin_addr: zts_in_addr,
    pub sin_zero: [::std::os::raw::c_char; 8usize],
}
#[test]
fn bindgen_test_layout_zts_sockaddr_in() {
    assert_eq!(
        ::std::mem::size_of::<zts_sockaddr_in>(),
        16usize,
        concat!("Size of: ", stringify!(zts_sockaddr_in))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_sockaddr_in>(),
        4usize,
        concat!("Alignment of ", stringify!(zts_sockaddr_in))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_sockaddr_in>())).sin_len as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_sockaddr_in),
            "::",
            stringify!(sin_len)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_sockaddr_in>())).sin_family as *const _ as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_sockaddr_in),
            "::",
            stringify!(sin_family)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_sockaddr_in>())).sin_port as *const _ as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_sockaddr_in),
            "::",
            stringify!(sin_port)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_sockaddr_in>())).sin_addr as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_sockaddr_in),
            "::",
            stringify!(sin_addr)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_sockaddr_in>())).sin_zero as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_sockaddr_in),
            "::",
            stringify!(sin_zero)
        )
    );
}
#[doc = " Address structure to specify an IPv6 endpoint"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct zts_sockaddr_in6 {
    pub sin6_len: u8,
    pub sin6_family: zts_sa_family_t,
    pub sin6_port: zts_in_port_t,
    pub sin6_flowinfo: u32,
    pub sin6_addr: zts_in6_addr,
    pub sin6_scope_id: u32,
}
#[test]
fn bindgen_test_layout_zts_sockaddr_in6() {
    assert_eq!(
        ::std::mem::size_of::<zts_sockaddr_in6>(),
        28usize,
        concat!("Size of: ", stringify!(zts_sockaddr_in6))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_sockaddr_in6>(),
        4usize,
        concat!("Alignment of ", stringify!(zts_sockaddr_in6))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_sockaddr_in6>())).sin6_len as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_sockaddr_in6),
            "::",
            stringify!(sin6_len)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_sockaddr_in6>())).sin6_family as *const _ as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_sockaddr_in6),
            "::",
            stringify!(sin6_family)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_sockaddr_in6>())).sin6_port as *const _ as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_sockaddr_in6),
            "::",
            stringify!(sin6_port)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_sockaddr_in6>())).sin6_flowinfo as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_sockaddr_in6),
            "::",
            stringify!(sin6_flowinfo)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_sockaddr_in6>())).sin6_addr as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_sockaddr_in6),
            "::",
            stringify!(sin6_addr)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_sockaddr_in6>())).sin6_scope_id as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_sockaddr_in6),
            "::",
            stringify!(sin6_scope_id)
        )
    );
}
#[doc = " Pointers to socket address structures are often cast to this type"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct zts_sockaddr {
    pub sa_len: u8,
    pub sa_family: zts_sa_family_t,
    pub sa_data: [::std::os::raw::c_char; 14usize],
}
#[test]
fn bindgen_test_layout_zts_sockaddr() {
    assert_eq!(
        ::std::mem::size_of::<zts_sockaddr>(),
        16usize,
        concat!("Size of: ", stringify!(zts_sockaddr))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_sockaddr>(),
        1usize,
        concat!("Alignment of ", stringify!(zts_sockaddr))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_sockaddr>())).sa_len as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_sockaddr),
            "::",
            stringify!(sa_len)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_sockaddr>())).sa_family as *const _ as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_sockaddr),
            "::",
            stringify!(sa_family)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_sockaddr>())).sa_data as *const _ as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_sockaddr),
            "::",
            stringify!(sa_data)
        )
    );
}
#[doc = " Address structure large enough to hold IPv4 and IPv6 addresses"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct zts_sockaddr_storage {
    pub s2_len: u8,
    pub ss_family: zts_sa_family_t,
    pub s2_data1: [::std::os::raw::c_char; 2usize],
    pub s2_data2: [u32; 3usize],
    pub s2_data3: [u32; 3usize],
}
#[test]
fn bindgen_test_layout_zts_sockaddr_storage() {
    assert_eq!(
        ::std::mem::size_of::<zts_sockaddr_storage>(),
        28usize,
        concat!("Size of: ", stringify!(zts_sockaddr_storage))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_sockaddr_storage>(),
        4usize,
        concat!("Alignment of ", stringify!(zts_sockaddr_storage))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_sockaddr_storage>())).s2_len as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_sockaddr_storage),
            "::",
            stringify!(s2_len)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_sockaddr_storage>())).ss_family as *const _ as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_sockaddr_storage),
            "::",
            stringify!(ss_family)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_sockaddr_storage>())).s2_data1 as *const _ as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_sockaddr_storage),
            "::",
            stringify!(s2_data1)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_sockaddr_storage>())).s2_data2 as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_sockaddr_storage),
            "::",
            stringify!(s2_data2)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_sockaddr_storage>())).s2_data3 as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_sockaddr_storage),
            "::",
            stringify!(s2_data3)
        )
    );
}
#[doc = " Runtime details about the current node"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct zts_node_info_t {
    #[doc = " Node ID"]
    pub node_id: u64,
    #[doc = " Port used by ZeroTier to send and receive traffic"]
    pub port_primary: u16,
    #[doc = " Port used by ZeroTier to send and receive traffic"]
    pub port_secondary: u16,
    #[doc = " Port used by ZeroTier to send and receive traffic"]
    pub port_tertiary: u16,
    #[doc = " ZT Major version"]
    pub ver_major: u8,
    #[doc = " ZT Minor version"]
    pub ver_minor: u8,
    #[doc = " ZT Patch revision"]
    pub ver_rev: u8,
}
#[test]
fn bindgen_test_layout_zts_node_info_t() {
    assert_eq!(
        ::std::mem::size_of::<zts_node_info_t>(),
        24usize,
        concat!("Size of: ", stringify!(zts_node_info_t))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_node_info_t>(),
        8usize,
        concat!("Alignment of ", stringify!(zts_node_info_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_node_info_t>())).node_id as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_node_info_t),
            "::",
            stringify!(node_id)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_node_info_t>())).port_primary as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_node_info_t),
            "::",
            stringify!(port_primary)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_node_info_t>())).port_secondary as *const _ as usize },
        10usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_node_info_t),
            "::",
            stringify!(port_secondary)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_node_info_t>())).port_tertiary as *const _ as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_node_info_t),
            "::",
            stringify!(port_tertiary)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_node_info_t>())).ver_major as *const _ as usize },
        14usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_node_info_t),
            "::",
            stringify!(ver_major)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_node_info_t>())).ver_minor as *const _ as usize },
        15usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_node_info_t),
            "::",
            stringify!(ver_minor)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_node_info_t>())).ver_rev as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_node_info_t),
            "::",
            stringify!(ver_rev)
        )
    );
}
#[doc = " Details about an assigned address that was added or removed"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct zts_addr_info_t {
    pub net_id: u64,
    pub addr: zts_sockaddr_storage,
}
#[test]
fn bindgen_test_layout_zts_addr_info_t() {
    assert_eq!(
        ::std::mem::size_of::<zts_addr_info_t>(),
        40usize,
        concat!("Size of: ", stringify!(zts_addr_info_t))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_addr_info_t>(),
        8usize,
        concat!("Alignment of ", stringify!(zts_addr_info_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_addr_info_t>())).net_id as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_addr_info_t),
            "::",
            stringify!(net_id)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_addr_info_t>())).addr as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_addr_info_t),
            "::",
            stringify!(addr)
        )
    );
}
#[doc = " Waiting for network configuration (also means revision == 0)"]
pub const zts_network_status_t_ZTS_NETWORK_STATUS_REQUESTING_CONFIGURATION: zts_network_status_t =
    0;
#[doc = " Configuration received and we are authorized"]
pub const zts_network_status_t_ZTS_NETWORK_STATUS_OK: zts_network_status_t = 1;
#[doc = " Netconf master told us 'nope'"]
pub const zts_network_status_t_ZTS_NETWORK_STATUS_ACCESS_DENIED: zts_network_status_t = 2;
#[doc = " Netconf master exists, but this virtual network does not"]
pub const zts_network_status_t_ZTS_NETWORK_STATUS_NOT_FOUND: zts_network_status_t = 3;
#[doc = " Initialization of network failed or other internal error"]
pub const zts_network_status_t_ZTS_NETWORK_STATUS_PORT_ERROR: zts_network_status_t = 4;
#[doc = " ZeroTier core version too old"]
pub const zts_network_status_t_ZTS_NETWORK_STATUS_CLIENT_TOO_OLD: zts_network_status_t = 5;
#[doc = " Virtual network status codes"]
pub type zts_network_status_t = ::std::os::raw::c_int;
#[doc = " Private networks are authorized via certificates of membership"]
pub const zts_net_info_type_t_ZTS_NETWORK_TYPE_PRIVATE: zts_net_info_type_t = 0;
#[doc = " Public networks have no access control -- they'll always be AUTHORIZED"]
pub const zts_net_info_type_t_ZTS_NETWORK_TYPE_PUBLIC: zts_net_info_type_t = 1;
#[doc = " Virtual network type codes"]
pub type zts_net_info_type_t = ::std::os::raw::c_int;
#[doc = " A route to be pushed on a virtual network"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct zts_route_info_t {
    #[doc = " Target network / netmask bits (in port field) or NULL or 0.0.0.0/0"]
    #[doc = " for default"]
    pub target: zts_sockaddr_storage,
    #[doc = " Gateway IP address (port ignored) or NULL (family == 0) for LAN-local"]
    #[doc = " (no gateway)"]
    pub via: zts_sockaddr_storage,
    #[doc = " Route flags"]
    pub flags: u16,
    #[doc = " Route metric (not currently used)"]
    pub metric: u16,
}
#[test]
fn bindgen_test_layout_zts_route_info_t() {
    assert_eq!(
        ::std::mem::size_of::<zts_route_info_t>(),
        60usize,
        concat!("Size of: ", stringify!(zts_route_info_t))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_route_info_t>(),
        4usize,
        concat!("Alignment of ", stringify!(zts_route_info_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_route_info_t>())).target as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_route_info_t),
            "::",
            stringify!(target)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_route_info_t>())).via as *const _ as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_route_info_t),
            "::",
            stringify!(via)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_route_info_t>())).flags as *const _ as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_route_info_t),
            "::",
            stringify!(flags)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_route_info_t>())).metric as *const _ as usize },
        58usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_route_info_t),
            "::",
            stringify!(metric)
        )
    );
}
#[doc = " An Ethernet multicast group"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct zts_multicast_group_t {
    #[doc = " MAC address (least significant 48 bits)"]
    pub mac: u64,
    #[doc = " Additional distinguishing information (usually zero)"]
    pub adi: ::std::os::raw::c_ulong,
}
#[test]
fn bindgen_test_layout_zts_multicast_group_t() {
    assert_eq!(
        ::std::mem::size_of::<zts_multicast_group_t>(),
        16usize,
        concat!("Size of: ", stringify!(zts_multicast_group_t))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_multicast_group_t>(),
        8usize,
        concat!("Alignment of ", stringify!(zts_multicast_group_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_multicast_group_t>())).mac as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_multicast_group_t),
            "::",
            stringify!(mac)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_multicast_group_t>())).adi as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_multicast_group_t),
            "::",
            stringify!(adi)
        )
    );
}
#[doc = " Ordinary node"]
pub const zts_peer_role_t_ZTS_PEER_ROLE_LEAF: zts_peer_role_t = 0;
#[doc = " Moon root"]
pub const zts_peer_role_t_ZTS_PEER_ROLE_MOON: zts_peer_role_t = 1;
#[doc = " Planetary root"]
pub const zts_peer_role_t_ZTS_PEER_ROLE_PLANET: zts_peer_role_t = 2;
#[doc = " The peer's trust hierarchy role"]
pub type zts_peer_role_t = ::std::os::raw::c_int;
#[doc = " Virtual network configuration"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct zts_net_info_t {
    #[doc = " 64-bit ZeroTier network ID"]
    pub net_id: u64,
    #[doc = " Ethernet MAC (48 bits) that should be assigned to port"]
    pub mac: u64,
    #[doc = " Network name (from network configuration master)"]
    pub name: [::std::os::raw::c_char; 128usize],
    #[doc = " Network configuration request status"]
    pub status: zts_network_status_t,
    #[doc = " Network type"]
    pub type_: zts_net_info_type_t,
    #[doc = " Maximum interface MTU"]
    pub mtu: ::std::os::raw::c_uint,
    #[doc = " If nonzero, the network this port belongs to indicates DHCP availability"]
    #[doc = ""]
    #[doc = " This is a suggestion. The underlying implementation is free to ignore it"]
    #[doc = " for security or other reasons. This is simply a netconf parameter that"]
    #[doc = " means 'DHCP is available on this network.'"]
    pub dhcp: ::std::os::raw::c_int,
    #[doc = " If nonzero, this port is allowed to bridge to other networks"]
    #[doc = ""]
    #[doc = " This is informational. If this is false (0), bridged packets will simply"]
    #[doc = " be dropped and bridging won't work."]
    pub bridge: ::std::os::raw::c_int,
    #[doc = " If nonzero, this network supports and allows broadcast"]
    #[doc = " (ff:ff:ff:ff:ff:ff) traffic"]
    pub broadcast_enabled: ::std::os::raw::c_int,
    #[doc = " If the network is in PORT_ERROR state, this is the (negative) error code"]
    #[doc = " most recently reported"]
    pub port_error: ::std::os::raw::c_int,
    #[doc = " Revision number as reported by controller or 0 if still waiting for"]
    #[doc = " config"]
    pub netconf_rev: ::std::os::raw::c_ulong,
    #[doc = " Number of assigned addresses"]
    pub assigned_addr_count: ::std::os::raw::c_uint,
    #[doc = " ZeroTier-assigned addresses (in sockaddr_storage structures)"]
    #[doc = ""]
    #[doc = " For IP, the port number of the sockaddr_XX structure contains the number"]
    #[doc = " of bits in the address netmask. Only the IP address and port are used."]
    #[doc = " Other fields like interface number can be ignored."]
    #[doc = ""]
    #[doc = " This is only used for ZeroTier-managed address assignments sent by the"]
    #[doc = " virtual network's configuration master."]
    pub assigned_addrs: [zts_sockaddr_storage; 16usize],
    #[doc = " Number of ZT-pushed routes"]
    pub route_count: ::std::os::raw::c_uint,
    #[doc = " Routes (excluding those implied by assigned addresses and their masks)"]
    pub routes: [zts_route_info_t; 32usize],
    #[doc = " Number of multicast groups subscribed"]
    pub multicast_sub_count: ::std::os::raw::c_uint,
    pub multicast_subs: [zts_net_info_t__bindgen_ty_1; 1024usize],
}
#[doc = " Multicast groups to which this network's device is subscribed"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct zts_net_info_t__bindgen_ty_1 {
    pub mac: u64,
    pub adi: u32,
}
#[test]
fn bindgen_test_layout_zts_net_info_t__bindgen_ty_1() {
    assert_eq!(
        ::std::mem::size_of::<zts_net_info_t__bindgen_ty_1>(),
        16usize,
        concat!("Size of: ", stringify!(zts_net_info_t__bindgen_ty_1))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_net_info_t__bindgen_ty_1>(),
        8usize,
        concat!("Alignment of ", stringify!(zts_net_info_t__bindgen_ty_1))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<zts_net_info_t__bindgen_ty_1>())).mac as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_net_info_t__bindgen_ty_1),
            "::",
            stringify!(mac)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<zts_net_info_t__bindgen_ty_1>())).adi as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_net_info_t__bindgen_ty_1),
            "::",
            stringify!(adi)
        )
    );
}
#[test]
fn bindgen_test_layout_zts_net_info_t() {
    assert_eq!(
        ::std::mem::size_of::<zts_net_info_t>(),
        18944usize,
        concat!("Size of: ", stringify!(zts_net_info_t))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_net_info_t>(),
        8usize,
        concat!("Alignment of ", stringify!(zts_net_info_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_net_info_t>())).net_id as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_net_info_t),
            "::",
            stringify!(net_id)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_net_info_t>())).mac as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_net_info_t),
            "::",
            stringify!(mac)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_net_info_t>())).name as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_net_info_t),
            "::",
            stringify!(name)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_net_info_t>())).status as *const _ as usize },
        144usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_net_info_t),
            "::",
            stringify!(status)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_net_info_t>())).type_ as *const _ as usize },
        148usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_net_info_t),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_net_info_t>())).mtu as *const _ as usize },
        152usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_net_info_t),
            "::",
            stringify!(mtu)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_net_info_t>())).dhcp as *const _ as usize },
        156usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_net_info_t),
            "::",
            stringify!(dhcp)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_net_info_t>())).bridge as *const _ as usize },
        160usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_net_info_t),
            "::",
            stringify!(bridge)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<zts_net_info_t>())).broadcast_enabled as *const _ as usize
        },
        164usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_net_info_t),
            "::",
            stringify!(broadcast_enabled)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_net_info_t>())).port_error as *const _ as usize },
        168usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_net_info_t),
            "::",
            stringify!(port_error)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_net_info_t>())).netconf_rev as *const _ as usize },
        172usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_net_info_t),
            "::",
            stringify!(netconf_rev)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<zts_net_info_t>())).assigned_addr_count as *const _ as usize
        },
        176usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_net_info_t),
            "::",
            stringify!(assigned_addr_count)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_net_info_t>())).assigned_addrs as *const _ as usize },
        180usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_net_info_t),
            "::",
            stringify!(assigned_addrs)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_net_info_t>())).route_count as *const _ as usize },
        628usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_net_info_t),
            "::",
            stringify!(route_count)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_net_info_t>())).routes as *const _ as usize },
        632usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_net_info_t),
            "::",
            stringify!(routes)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<zts_net_info_t>())).multicast_sub_count as *const _ as usize
        },
        2552usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_net_info_t),
            "::",
            stringify!(multicast_sub_count)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_net_info_t>())).multicast_subs as *const _ as usize },
        2560usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_net_info_t),
            "::",
            stringify!(multicast_subs)
        )
    );
}
#[doc = " Physical network path to a peer"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct zts_path_t {
    #[doc = " Address of endpoint"]
    pub address: zts_sockaddr_storage,
    #[doc = " Time of last send in milliseconds or 0 for never"]
    pub last_tx: u64,
    #[doc = " Time of last receive in milliseconds or 0 for never"]
    pub last_rx: u64,
    #[doc = " Is this a trusted path? If so this will be its nonzero ID."]
    pub trusted_path_id: u64,
    #[doc = " One-way latency"]
    pub latency: f32,
    pub unused_0: f32,
    pub unused_1: f32,
    pub unused_2: f32,
    pub unused_3: f32,
    pub unused_4: f32,
    pub unused_5: u64,
    pub unused_6: u64,
    pub unused_7: f32,
    #[doc = " Name of physical interface (for monitoring)"]
    pub ifname: *mut ::std::os::raw::c_char,
    #[doc = " Is path expired?"]
    pub expired: ::std::os::raw::c_int,
    #[doc = " Is path preferred?"]
    pub preferred: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_zts_path_t() {
    assert_eq!(
        ::std::mem::size_of::<zts_path_t>(),
        120usize,
        concat!("Size of: ", stringify!(zts_path_t))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_path_t>(),
        8usize,
        concat!("Alignment of ", stringify!(zts_path_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_path_t>())).address as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_path_t),
            "::",
            stringify!(address)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_path_t>())).last_tx as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_path_t),
            "::",
            stringify!(last_tx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_path_t>())).last_rx as *const _ as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_path_t),
            "::",
            stringify!(last_rx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_path_t>())).trusted_path_id as *const _ as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_path_t),
            "::",
            stringify!(trusted_path_id)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_path_t>())).latency as *const _ as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_path_t),
            "::",
            stringify!(latency)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_path_t>())).unused_0 as *const _ as usize },
        60usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_path_t),
            "::",
            stringify!(unused_0)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_path_t>())).unused_1 as *const _ as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_path_t),
            "::",
            stringify!(unused_1)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_path_t>())).unused_2 as *const _ as usize },
        68usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_path_t),
            "::",
            stringify!(unused_2)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_path_t>())).unused_3 as *const _ as usize },
        72usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_path_t),
            "::",
            stringify!(unused_3)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_path_t>())).unused_4 as *const _ as usize },
        76usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_path_t),
            "::",
            stringify!(unused_4)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_path_t>())).unused_5 as *const _ as usize },
        80usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_path_t),
            "::",
            stringify!(unused_5)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_path_t>())).unused_6 as *const _ as usize },
        88usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_path_t),
            "::",
            stringify!(unused_6)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_path_t>())).unused_7 as *const _ as usize },
        96usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_path_t),
            "::",
            stringify!(unused_7)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_path_t>())).ifname as *const _ as usize },
        104usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_path_t),
            "::",
            stringify!(ifname)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_path_t>())).expired as *const _ as usize },
        112usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_path_t),
            "::",
            stringify!(expired)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_path_t>())).preferred as *const _ as usize },
        116usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_path_t),
            "::",
            stringify!(preferred)
        )
    );
}
#[doc = " Peer status result buffer"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct zts_peer_info_t {
    #[doc = " ZeroTier address (40 bits)"]
    pub peer_id: u64,
    #[doc = " Remote major version or -1 if not known"]
    pub ver_major: ::std::os::raw::c_int,
    #[doc = " Remote minor version or -1 if not known"]
    pub ver_minor: ::std::os::raw::c_int,
    #[doc = " Remote revision or -1 if not known"]
    pub ver_rev: ::std::os::raw::c_int,
    #[doc = " Last measured latency in milliseconds or -1 if unknown"]
    pub latency: ::std::os::raw::c_int,
    #[doc = " What trust hierarchy role does this device have?"]
    pub role: zts_peer_role_t,
    #[doc = " Number of paths (size of paths[])"]
    pub path_count: ::std::os::raw::c_uint,
    #[doc = " Whether this peer was ever reachable via an aggregate link"]
    pub unused_0: ::std::os::raw::c_int,
    #[doc = " Known network paths to peer"]
    pub paths: [zts_path_t; 16usize],
}
#[test]
fn bindgen_test_layout_zts_peer_info_t() {
    assert_eq!(
        ::std::mem::size_of::<zts_peer_info_t>(),
        1960usize,
        concat!("Size of: ", stringify!(zts_peer_info_t))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_peer_info_t>(),
        8usize,
        concat!("Alignment of ", stringify!(zts_peer_info_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_peer_info_t>())).peer_id as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_peer_info_t),
            "::",
            stringify!(peer_id)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_peer_info_t>())).ver_major as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_peer_info_t),
            "::",
            stringify!(ver_major)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_peer_info_t>())).ver_minor as *const _ as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_peer_info_t),
            "::",
            stringify!(ver_minor)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_peer_info_t>())).ver_rev as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_peer_info_t),
            "::",
            stringify!(ver_rev)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_peer_info_t>())).latency as *const _ as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_peer_info_t),
            "::",
            stringify!(latency)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_peer_info_t>())).role as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_peer_info_t),
            "::",
            stringify!(role)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_peer_info_t>())).path_count as *const _ as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_peer_info_t),
            "::",
            stringify!(path_count)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_peer_info_t>())).unused_0 as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_peer_info_t),
            "::",
            stringify!(unused_0)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_peer_info_t>())).paths as *const _ as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_peer_info_t),
            "::",
            stringify!(paths)
        )
    );
}
#[doc = " Structure used to specify a root topology (aka a world)"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct zts_root_set_t {
    pub public_id_str: [*mut ::std::os::raw::c_char; 16usize],
    pub endpoint_ip_str: [[*mut ::std::os::raw::c_char; 32usize]; 16usize],
}
#[test]
fn bindgen_test_layout_zts_root_set_t() {
    assert_eq!(
        ::std::mem::size_of::<zts_root_set_t>(),
        4224usize,
        concat!("Size of: ", stringify!(zts_root_set_t))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_root_set_t>(),
        8usize,
        concat!("Alignment of ", stringify!(zts_root_set_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_root_set_t>())).public_id_str as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_root_set_t),
            "::",
            stringify!(public_id_str)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_root_set_t>())).endpoint_ip_str as *const _ as usize },
        128usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_root_set_t),
            "::",
            stringify!(endpoint_ip_str)
        )
    );
}
#[doc = " Structure used to convey information about a virtual network"]
#[doc = " interface (netif) to a user application."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct zts_netif_info_t {
    #[doc = " The virtual network that this interface was created for"]
    pub net_id: u64,
    #[doc = " The hardware address assigned to this interface"]
    pub mac: u64,
    #[doc = " The MTU for this interface"]
    pub mtu: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_zts_netif_info_t() {
    assert_eq!(
        ::std::mem::size_of::<zts_netif_info_t>(),
        24usize,
        concat!("Size of: ", stringify!(zts_netif_info_t))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_netif_info_t>(),
        8usize,
        concat!("Alignment of ", stringify!(zts_netif_info_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_netif_info_t>())).net_id as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_netif_info_t),
            "::",
            stringify!(net_id)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_netif_info_t>())).mac as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_netif_info_t),
            "::",
            stringify!(mac)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_netif_info_t>())).mtu as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_netif_info_t),
            "::",
            stringify!(mtu)
        )
    );
}
#[doc = " Callback message"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct zts_event_msg_t {
    #[doc = " Event identifier"]
    pub event_code: i16,
    #[doc = " Node status"]
    pub node: *mut zts_node_info_t,
    #[doc = " Network information"]
    pub network: *mut zts_net_info_t,
    #[doc = " Netif status"]
    pub netif: *mut zts_netif_info_t,
    #[doc = " Managed routes"]
    pub route: *mut zts_route_info_t,
    #[doc = " Peer info"]
    pub peer: *mut zts_peer_info_t,
    #[doc = " Assigned address"]
    pub addr: *mut zts_addr_info_t,
    #[doc = " Binary data (identities, planets, network configs, peer hints, etc)"]
    pub cache: *mut ::std::os::raw::c_void,
    #[doc = " Length of data message or structure"]
    pub len: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_zts_event_msg_t() {
    assert_eq!(
        ::std::mem::size_of::<zts_event_msg_t>(),
        72usize,
        concat!("Size of: ", stringify!(zts_event_msg_t))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_event_msg_t>(),
        8usize,
        concat!("Alignment of ", stringify!(zts_event_msg_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_event_msg_t>())).event_code as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_event_msg_t),
            "::",
            stringify!(event_code)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_event_msg_t>())).node as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_event_msg_t),
            "::",
            stringify!(node)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_event_msg_t>())).network as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_event_msg_t),
            "::",
            stringify!(network)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_event_msg_t>())).netif as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_event_msg_t),
            "::",
            stringify!(netif)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_event_msg_t>())).route as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_event_msg_t),
            "::",
            stringify!(route)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_event_msg_t>())).peer as *const _ as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_event_msg_t),
            "::",
            stringify!(peer)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_event_msg_t>())).addr as *const _ as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_event_msg_t),
            "::",
            stringify!(addr)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_event_msg_t>())).cache as *const _ as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_event_msg_t),
            "::",
            stringify!(cache)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_event_msg_t>())).len as *const _ as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_event_msg_t),
            "::",
            stringify!(len)
        )
    );
}
extern "C" {
    #[doc = " @brief Generates a node identity (public/secret key-pair) and stores it in a"]
    #[doc = "     user-provided buffer."]
    #[doc = ""]
    #[doc = " @param key User-provided destination buffer"]
    #[doc = " @param key_buf_len Length of user-provided destination buffer. Will be set"]
    #[doc = "     to the number of bytes copied."]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_ARG` if invalid argument."]
    pub fn zts_id_new(
        key: *mut ::std::os::raw::c_char,
        key_buf_len: *mut ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Verifies that a key-pair is valid. Checks formatting and pairing of"]
    #[doc = "    key to address."]
    #[doc = ""]
    #[doc = " @param key Buffer containing key-pair"]
    #[doc = " @param len Length of key-pair buffer"]
    #[doc = " @return `1` if true, `0` if false."]
    pub fn zts_id_pair_is_valid(
        key: *const ::std::os::raw::c_char,
        len: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Instruct ZeroTier to look for node identity files at the given location. This is an"]
    #[doc = " initialization function that can only be called before `zts_node_start()`."]
    #[doc = ""]
    #[doc = " Note that calling this function is not mandatory and if it is not called the node's keys will be"]
    #[doc = " kept in memory and retrievable via `zts_node_get_id_pair()`."]
    #[doc = ""]
    #[doc = " See also: `zts_init_from_memory()`"]
    #[doc = ""]
    #[doc = " @param port Path Null-terminated file-system path string"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument."]
    pub fn zts_init_from_storage(path: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Instruct ZeroTier to use the identity provided in `key`. This is an initialization"]
    #[doc = " function that can only be called before `zts_node_start()`."]
    #[doc = ""]
    #[doc = " Note that calling this function is not mandatory and if it is not called the node's keys will be"]
    #[doc = " kept in memory and retrievable via `zts_node_get_id_pair()`."]
    #[doc = ""]
    #[doc = " See also: `zts_init_from_storage()`"]
    #[doc = ""]
    #[doc = " @param key Path Null-terminated file-system path string"]
    #[doc = " @param len Length of `key` buffer"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument."]
    pub fn zts_init_from_memory(
        key: *const ::std::os::raw::c_char,
        len: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn zts_init_set_event_handler(
        callback: ::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void)>,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Blacklist an interface prefix (or name). This prevents ZeroTier from"]
    #[doc = " sending traffic over matching interfaces. This is an initialization function that can"]
    #[doc = " only be called before `zts_node_start()`."]
    #[doc = ""]
    #[doc = " @param prefix Null-terminated interface prefix string"]
    #[doc = " @param len Length of prefix string"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument."]
    pub fn zts_init_blacklist_if(
        prefix: *const ::std::os::raw::c_char,
        len: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Present a root set definition for ZeroTier to use instead of the default."]
    #[doc = " This is an initialization function that can only be called before `zts_node_start()`."]
    #[doc = ""]
    #[doc = " @param roots_data Array of roots definition data (binary)"]
    #[doc = " @param len Length of binary data"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument."]
    pub fn zts_init_set_roots(
        roots_data: *const ::std::os::raw::c_void,
        len: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Set the port to which the node should bind. This is an initialization function that can"]
    #[doc = " only be called before `zts_node_start()`."]
    #[doc = ""]
    #[doc = " @param port Port number"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument."]
    pub fn zts_init_set_port(port: ::std::os::raw::c_ushort) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Set range that random ports will be selected from. This is an initialization function that can"]
    #[doc = " only be called before `zts_node_start()`."]
    #[doc = ""]
    #[doc = " @param start_port Start of port range"]
    #[doc = " @param end_port End of port range"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument."]
    pub fn zts_init_set_random_port_range(
        start_port: ::std::os::raw::c_ushort,
        end_port: ::std::os::raw::c_ushort,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Allow or disallow ZeroTier from automatically selecting a backup port to help get through"]
    #[doc = " buggy NAT. This is enabled by default. This port is randomly chosen and should be disabled if you"]
    #[doc = " want to control exactly which ports ZeroTier talks on and (iff) you know with absolute certainty"]
    #[doc = " that traffic on your chosen primary port is allowed. This is an initialization function that can"]
    #[doc = " only be called before `zts_node_start()`."]
    #[doc = ""]
    #[doc = " @param port Port number"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument."]
    pub fn zts_init_allow_secondary_port(allowed: ::std::os::raw::c_uint) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Allow or disallow the use of port-mapping. This is enabled by default. This is an"]
    #[doc = " initialization function that can only be called before `zts_node_start()`."]
    #[doc = ""]
    #[doc = " @param port Port number"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument."]
    pub fn zts_init_allow_port_mapping(allowed: ::std::os::raw::c_uint) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Enable or disable whether the node will cache network details"]
    #[doc = " (enabled by default when `zts_init_from_storage()` is used.) Must be called before"]
    #[doc = " `zts_node_start()`."]
    #[doc = ""]
    #[doc = " This can potentially shorten (startup) times between node restarts. This allows the service to"]
    #[doc = " nearly instantly inform the network stack of an address to use for this peer"]
    #[doc = " so that it can create a transport service. This can be disabled for cases where one"]
    #[doc = " may not want network config details to be written to storage. This is"]
    #[doc = " especially useful for situations where address assignments do not change"]
    #[doc = " often."]
    #[doc = ""]
    #[doc = " See also: `zts_init_allow_peer_cache()`"]
    #[doc = ""]
    #[doc = " @param enabled Whether or not this feature is enabled"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument."]
    pub fn zts_init_allow_net_cache(allowed: ::std::os::raw::c_uint) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Enable or disable whether the node will cache peer details (enabled"]
    #[doc = " by default when `zts_init_from_storage()` is used.) Must be called before `zts_node_start()`."]
    #[doc = ""]
    #[doc = " This can potentially shorten (connection) times between node restarts. This allows the service to"]
    #[doc = " re-use previously discovered paths to a peer, this prevents the service from"]
    #[doc = " having to go through the entire transport-triggered link provisioning"]
    #[doc = " process. This is especially useful for situations where paths to peers do not"]
    #[doc = " change often. This is enabled by default and can be disabled for cases where"]
    #[doc = " one may not want peer details to be written to storage."]
    #[doc = ""]
    #[doc = " See also: `zts_init_allow_net_cache()`"]
    #[doc = ""]
    #[doc = " @param enabled Whether or not this feature is enabled"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument."]
    pub fn zts_init_allow_peer_cache(allowed: ::std::os::raw::c_uint) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Enable or disable whether the node will cache root definitions (enabled"]
    #[doc = " by default when `zts_init_from_storage()` is used.) Must be called before `zts_node_start()`."]
    #[doc = ""]
    #[doc = " @param enabled Whether or not this feature is enabled"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument."]
    pub fn zts_init_allow_roots_cache(allowed: ::std::os::raw::c_uint) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Enable or disable whether the node will cache identities (enabled"]
    #[doc = " by default when `zts_init_from_storage()` is used.) Must be called before `zts_node_start()`."]
    #[doc = ""]
    #[doc = " @param enabled Whether or not this feature is enabled"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument."]
    pub fn zts_init_allow_id_cache(allowed: ::std::os::raw::c_uint) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Return whether an address of the given family has been assigned by the network"]
    #[doc = ""]
    #[doc = " @param net_id Network ID"]
    #[doc = " @param family `ZTS_AF_INET`, or `ZTS_AF_INET6`"]
    #[doc = " @return `1` if true, `0` if false."]
    pub fn zts_addr_is_assigned(
        net_id: u64,
        family: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Get the first-assigned IP on the given network."]
    #[doc = ""]
    #[doc = " To get *all* assigned addresses on a given network, use `zts_addr_get_all()`."]
    #[doc = ""]
    #[doc = " @param net_id Network ID"]
    #[doc = " @param family `ZTS_AF_INET`, or `ZTS_AF_INET6`"]
    #[doc = " @param addr Destination buffer to hold address"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument."]
    pub fn zts_addr_get(
        net_id: u64,
        family: ::std::os::raw::c_uint,
        addr: *mut zts_sockaddr_storage,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Get the first-assigned IP on the given network as a null-terminated human-readable string"]
    #[doc = ""]
    #[doc = " To get *all* assigned addresses on a given network, use `zts_addr_get_all()`."]
    #[doc = ""]
    #[doc = " @param net_id Network ID"]
    #[doc = " @param family `ZTS_AF_INET`, or `ZTS_AF_INET6`"]
    #[doc = " @param dst Destination buffer"]
    #[doc = " @param len Length of destination buffer (must be exactly `ZTS_IP_MAX_STR_LEN`)"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument."]
    pub fn zts_addr_get_str(
        net_id: u64,
        family: ::std::os::raw::c_uint,
        dst: *mut ::std::os::raw::c_char,
        len: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Get all IP addresses assigned to this node by the given network"]
    #[doc = ""]
    #[doc = " @param net_id Network ID"]
    #[doc = " @param addr Destination buffer to hold address"]
    #[doc = " @param count Number of addresses returned"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument."]
    pub fn zts_addr_get_all(
        net_id: u64,
        addr: *mut zts_sockaddr_storage,
        count: *mut ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Compute a `6PLANE` IPv6 address for the given Network ID and Node ID"]
    #[doc = ""]
    #[doc = " @param net_id Network ID"]
    #[doc = " @param node_id Node ID"]
    #[doc = " @param addr Destination structure for address"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_ARG` if invalid argument."]
    pub fn zts_addr_compute_6plane(
        net_id: u64,
        node_id: u64,
        addr: *mut zts_sockaddr_storage,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Compute `RFC4193` IPv6 address for the given Network ID and Node ID"]
    #[doc = ""]
    #[doc = " @param net_id Network ID"]
    #[doc = " @param node_id Node ID"]
    #[doc = " @param addr Destination structure for address"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_ARG` if invalid argument."]
    pub fn zts_addr_compute_rfc4193(
        net_id: u64,
        node_id: u64,
        addr: *mut zts_sockaddr_storage,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Compute `RFC4193` IPv6 address for the given Network ID and Node ID and copy its"]
    #[doc = " null-terminated human-readable string representation into destination buffer."]
    #[doc = ""]
    #[doc = " @param net_id Network ID"]
    #[doc = " @param node_id Node ID"]
    #[doc = " @param dst Destination string buffer"]
    #[doc = " @param len Length of destination string buffer (must be exactly `ZTS_IP_MAX_STR_LEN`)"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_ARG` if invalid argument."]
    pub fn zts_addr_compute_rfc4193_str(
        net_id: u64,
        node_id: u64,
        dst: *mut ::std::os::raw::c_char,
        len: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Compute `6PLANE` IPv6 address for the given Network ID and Node ID and copy its"]
    #[doc = " null-terminated human-readable string representation into destination buffer."]
    #[doc = ""]
    #[doc = " @param net_id Network ID"]
    #[doc = " @param node_id Node ID"]
    #[doc = " @param dst Destination string buffer"]
    #[doc = " @param len Length of destination string buffer (must be exactly `ZTS_IP_MAX_STR_LEN`)"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_ARG` if invalid argument."]
    pub fn zts_addr_compute_6plane_str(
        net_id: u64,
        node_id: u64,
        dst: *mut ::std::os::raw::c_char,
        len: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Compute `RFC4193` IPv6 address for the given Network ID and Node ID"]
    #[doc = ""]
    #[doc = " Ad-hoc Network:"]
    #[doc = " ```"]
    #[doc = " ffSSSSEEEE000000"]
    #[doc = " | |   |   |"]
    #[doc = " | |   |   Reserved for future use, must be 0"]
    #[doc = " | |   End of port range (hex)"]
    #[doc = " | Start of port range (hex)"]
    #[doc = " Reserved ZeroTier address prefix indicating a controller-less network."]
    #[doc = " ```"]
    #[doc = " Ad-hoc networks are public (no access control) networks that have no network"]
    #[doc = " controller. Instead their configuration and other credentials are generated"]
    #[doc = " locally. Ad-hoc networks permit only IPv6 UDP and TCP unicast traffic"]
    #[doc = " (no multicast or broadcast) using 6plane format NDP-emulated IPv6 addresses."]
    #[doc = " In addition an ad-hoc network ID encodes an IP port range. UDP packets and"]
    #[doc = " TCP SYN (connection open) packets are only allowed to destination ports"]
    #[doc = " within the encoded range."]
    #[doc = ""]
    #[doc = " For example `ff00160016000000` is an ad-hoc network allowing only SSH,"]
    #[doc = " while `ff0000ffff000000` is an ad-hoc network allowing any UDP or TCP port."]
    #[doc = ""]
    #[doc = " Keep in mind that these networks are public and anyone in the entire world"]
    #[doc = " can join them. Care must be taken to avoid exposing vulnerable services or"]
    #[doc = " sharing unwanted files or other resources."]
    #[doc = ""]
    #[doc = ""]
    #[doc = " @param start_port Start of port allowed port range"]
    #[doc = " @param end_port End of allowed port range"]
    #[doc = " @return An Ad-hoc network ID"]
    pub fn zts_net_compute_adhoc_id(start_port: u16, end_port: u16) -> u64;
}
extern "C" {
    #[doc = " @brief Join a network"]
    #[doc = ""]
    #[doc = " @param net_id Network ID"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument."]
    pub fn zts_net_join(net_id: u64) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Leave a network"]
    #[doc = ""]
    #[doc = " @param net_id Network ID"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument."]
    pub fn zts_net_leave(net_id: u64) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Return whether this network is ready to send and receive traffic."]
    #[doc = ""]
    #[doc = " @return `1` if true, `0` if false."]
    pub fn zts_net_transport_is_ready(net_id: u64) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Get the MAC Address for this node on the given network"]
    #[doc = ""]
    #[doc = " @param net_id Network ID"]
    #[doc = ""]
    #[doc = " @return MAC address in numerical format"]
    pub fn zts_net_get_mac(net_id: u64) -> u64;
}
extern "C" {
    #[doc = " @brief Get the MAC Address for this node on the given network"]
    #[doc = ""]
    #[doc = " @param net_id Network ID"]
    #[doc = " @param dst Destination string buffer"]
    #[doc = " @param len Length of destination string buffer. Must be exactly `ZTS_MAC_ADDRSTRLEN`"]
    #[doc = ""]
    #[doc = " @return MAC address in string format"]
    pub fn zts_net_get_mac_str(
        net_id: u64,
        dst: *mut ::std::os::raw::c_char,
        len: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Return whether broadcast is enabled on this network"]
    #[doc = ""]
    #[doc = " @param net_id Network ID"]
    #[doc = ""]
    #[doc = " @return `1` if true, `0` if false."]
    pub fn zts_net_get_broadcast(net_id: u64) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Get the MTU of the given network"]
    #[doc = ""]
    #[doc = " @param net_id Network ID"]
    #[doc = ""]
    #[doc = " @return MTU"]
    pub fn zts_net_get_mtu(net_id: u64) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Get the nickname of the network"]
    #[doc = ""]
    #[doc = " @param net_id Network ID"]
    #[doc = " @param dst Destination string buffer"]
    #[doc = " @param len Length of destination string buffer"]
    #[doc = ""]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument."]
    pub fn zts_net_get_name(
        net_id: u64,
        dst: *mut ::std::os::raw::c_char,
        len: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Get the status of the network"]
    #[doc = ""]
    #[doc = " @param net_id Network ID"]
    #[doc = ""]
    #[doc = " @return Status"]
    pub fn zts_net_get_status(net_id: u64) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Get the type of network (public or private.)"]
    #[doc = ""]
    #[doc = " @param net_id Network ID"]
    #[doc = ""]
    #[doc = " @return Type"]
    pub fn zts_net_get_type(net_id: u64) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Return whether a managed route of the given address family has been assigned by the"]
    #[doc = " network"]
    #[doc = ""]
    #[doc = " @param net_id Network ID"]
    #[doc = " @param family `ZTS_AF_INET`, or `ZTS_AF_INET6`"]
    #[doc = " @return `1` if true, `0` if false."]
    pub fn zts_route_is_assigned(
        net_id: u64,
        family: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Start the ZeroTier node. Should be called after calling the relevant"]
    #[doc = "    `zts_init_*` functions for your application. To enable storage call"]
    #[doc = "    `zts_init_from_storage()` before this function. To enable event callbacks"]
    #[doc = "     call `zts_init_set_event_handler()` before this function."]
    #[doc = ""]
    #[doc = " Note: If neither `zts_init_from_storage()` or `zts_init_from_memory()` are"]
    #[doc = " called a new identity will be generated and will be retrievable via"]
    #[doc = " `zts_node_get_id_pair()` *after* the node has started."]
    #[doc = ""]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem."]
    pub fn zts_node_start() -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Return whether the node is online (Can reach the Internet)"]
    #[doc = ""]
    #[doc = " @return `1` if true, `0` if false."]
    pub fn zts_node_is_online() -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Get the public node identity (aka `node_id`). Callable only after the node has been"]
    #[doc = " started."]
    #[doc = ""]
    #[doc = " @return Identity in numerical form"]
    pub fn zts_node_get_id() -> u64;
}
extern "C" {
    #[doc = " @brief Copy the current node's public (and secret!) identity into a buffer."]
    #[doc = ""]
    #[doc = " `WARNING`: This function exports your secret key and should be used carefully."]
    #[doc = ""]
    #[doc = " @param key User-provided destination buffer"]
    #[doc = " @param key_dst_len Length of user-provided destination buffer. Will be set to"]
    #[doc = " number of bytes copied."]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument."]
    pub fn zts_node_get_id_pair(
        key: *mut ::std::os::raw::c_char,
        key_dst_len: *mut ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Get the primary port to which the node is bound. Callable only after the node has been"]
    #[doc = " started."]
    #[doc = ""]
    #[doc = " @return Port number"]
    pub fn zts_node_get_port() -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Stop the ZeroTier node and bring down all virtual network"]
    #[doc = "     transport services. Callable only after the node has been started."]
    #[doc = ""]
    #[doc = " While the ZeroTier will stop, the stack driver (with associated"]
    #[doc = " timers) will remain active in case future traffic processing is required."]
    #[doc = " To stop all activity and free all resources use `zts_free()` instead."]
    #[doc = ""]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem."]
    pub fn zts_node_stop() -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Stop all background threads, bring down all transport services, free all"]
    #[doc = "     resources. After calling this function an application restart will be"]
    #[doc = "     required before the library can be used again. Callable only after the node"]
    #[doc = "     has been started."]
    #[doc = ""]
    #[doc = " This should be called at the end of your program or when you do not"]
    #[doc = " anticipate communicating over ZeroTier again."]
    #[doc = ""]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem."]
    pub fn zts_node_free() -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Orbit a given moon (user-defined root server)"]
    #[doc = ""]
    #[doc = " @param moon_roots_id World ID"]
    #[doc = " @param moon_seed Seed ID"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument."]
    pub fn zts_moon_orbit(moon_roots_id: u64, moon_seed: u64) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief De-orbit a given moon (user-defined root server)"]
    #[doc = ""]
    #[doc = " @param moon_roots_id World ID"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument."]
    pub fn zts_moon_deorbit(moon_roots_id: u64) -> ::std::os::raw::c_int;
}
#[doc = " Structure containing counters for various protocol statistics"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct zts_stats_counter_t {
    #[doc = " Number of link packets transmitted"]
    pub link_tx: u32,
    #[doc = " Number of link packets received"]
    pub link_rx: u32,
    #[doc = " Number of link packets dropped"]
    pub link_drop: u32,
    #[doc = " Aggregate number of link-level errors"]
    pub link_err: u32,
    #[doc = " Number of etharp packets transmitted"]
    pub etharp_tx: u32,
    #[doc = " Number of etharp packets received"]
    pub etharp_rx: u32,
    #[doc = " Number of etharp packets dropped"]
    pub etharp_drop: u32,
    #[doc = " Aggregate number of etharp errors"]
    pub etharp_err: u32,
    #[doc = " Number of IPv4 packets transmitted"]
    pub ip4_tx: u32,
    #[doc = " Number of IPv4 packets received"]
    pub ip4_rx: u32,
    #[doc = " Number of IPv4 packets dropped"]
    pub ip4_drop: u32,
    #[doc = " Aggregate number of IPv4 errors"]
    pub ip4_err: u32,
    #[doc = " Number of IPv6 packets transmitted"]
    pub ip6_tx: u32,
    #[doc = " Number of IPv6 packets received"]
    pub ip6_rx: u32,
    #[doc = " Number of IPv6 packets dropped"]
    pub ip6_drop: u32,
    #[doc = " Aggregate number of IPv6 errors"]
    pub ip6_err: u32,
    #[doc = " Number of ICMPv4 packets transmitted"]
    pub icmp4_tx: u32,
    #[doc = " Number of ICMPv4 packets received"]
    pub icmp4_rx: u32,
    #[doc = " Number of ICMPv4 packets dropped"]
    pub icmp4_drop: u32,
    #[doc = " Aggregate number of ICMPv4 errors"]
    pub icmp4_err: u32,
    #[doc = " Number of ICMPv6 packets transmitted"]
    pub icmp6_tx: u32,
    #[doc = " Number of ICMPv6 packets received"]
    pub icmp6_rx: u32,
    #[doc = " Number of ICMPv6 packets dropped"]
    pub icmp6_drop: u32,
    #[doc = " Aggregate number of ICMPv6 errors"]
    pub icmp6_err: u32,
    #[doc = " Number of UDP packets transmitted"]
    pub udp_tx: u32,
    #[doc = " Number of UDP packets received"]
    pub udp_rx: u32,
    #[doc = " Number of UDP packets dropped"]
    pub udp_drop: u32,
    #[doc = " Aggregate number of UDP errors"]
    pub udp_err: u32,
    #[doc = " Number of TCP packets transmitted"]
    pub tcp_tx: u32,
    #[doc = " Number of TCP packets received"]
    pub tcp_rx: u32,
    #[doc = " Number of TCP packets dropped"]
    pub tcp_drop: u32,
    #[doc = " Aggregate number of TCP errors"]
    pub tcp_err: u32,
    #[doc = " Number of ND6 packets transmitted"]
    pub nd6_tx: u32,
    #[doc = " Number of ND6 packets received"]
    pub nd6_rx: u32,
    #[doc = " Number of ND6 packets dropped"]
    pub nd6_drop: u32,
    #[doc = " Aggregate number of ND6 errors"]
    pub nd6_err: u32,
}
#[test]
fn bindgen_test_layout_zts_stats_counter_t() {
    assert_eq!(
        ::std::mem::size_of::<zts_stats_counter_t>(),
        144usize,
        concat!("Size of: ", stringify!(zts_stats_counter_t))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_stats_counter_t>(),
        4usize,
        concat!("Alignment of ", stringify!(zts_stats_counter_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).link_tx as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(link_tx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).link_rx as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(link_rx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).link_drop as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(link_drop)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).link_err as *const _ as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(link_err)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).etharp_tx as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(etharp_tx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).etharp_rx as *const _ as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(etharp_rx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).etharp_drop as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(etharp_drop)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).etharp_err as *const _ as usize },
        28usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(etharp_err)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).ip4_tx as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(ip4_tx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).ip4_rx as *const _ as usize },
        36usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(ip4_rx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).ip4_drop as *const _ as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(ip4_drop)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).ip4_err as *const _ as usize },
        44usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(ip4_err)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).ip6_tx as *const _ as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(ip6_tx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).ip6_rx as *const _ as usize },
        52usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(ip6_rx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).ip6_drop as *const _ as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(ip6_drop)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).ip6_err as *const _ as usize },
        60usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(ip6_err)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).icmp4_tx as *const _ as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(icmp4_tx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).icmp4_rx as *const _ as usize },
        68usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(icmp4_rx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).icmp4_drop as *const _ as usize },
        72usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(icmp4_drop)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).icmp4_err as *const _ as usize },
        76usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(icmp4_err)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).icmp6_tx as *const _ as usize },
        80usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(icmp6_tx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).icmp6_rx as *const _ as usize },
        84usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(icmp6_rx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).icmp6_drop as *const _ as usize },
        88usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(icmp6_drop)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).icmp6_err as *const _ as usize },
        92usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(icmp6_err)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).udp_tx as *const _ as usize },
        96usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(udp_tx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).udp_rx as *const _ as usize },
        100usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(udp_rx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).udp_drop as *const _ as usize },
        104usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(udp_drop)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).udp_err as *const _ as usize },
        108usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(udp_err)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).tcp_tx as *const _ as usize },
        112usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(tcp_tx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).tcp_rx as *const _ as usize },
        116usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(tcp_rx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).tcp_drop as *const _ as usize },
        120usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(tcp_drop)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).tcp_err as *const _ as usize },
        124usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(tcp_err)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).nd6_tx as *const _ as usize },
        128usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(nd6_tx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).nd6_rx as *const _ as usize },
        132usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(nd6_rx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).nd6_drop as *const _ as usize },
        136usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(nd6_drop)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_stats_counter_t>())).nd6_err as *const _ as usize },
        140usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_stats_counter_t),
            "::",
            stringify!(nd6_err)
        )
    );
}
extern "C" {
    #[doc = " @brief Get all statistical counters for all protocols and levels."]
    #[doc = " See also: lwip/stats.h."]
    #[doc = ""]
    #[doc = " This function can only be used in debug builds."]
    #[doc = ""]
    #[doc = " @param dst Pointer to structure that will be populated with statistics"]
    #[doc = ""]
    #[doc = " @return ZTS_ERR_OK on success. ZTS_ERR_ARG or ZTS_ERR_NO_RESULT on failure."]
    pub fn zts_stats_get_all(dst: *mut zts_stats_counter_t) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Create a socket"]
    #[doc = ""]
    #[doc = " @param family `ZTS_AF_INET` or `ZTS_AF_INET6`"]
    #[doc = " @param type `ZTS_SOCK_STREAM` or `ZTS_SOCK_DGRAM`"]
    #[doc = " @param protocol Protocols supported on this socket"]
    #[doc = " @return Numbered file descriptor on success, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_bsd_socket(
        family: ::std::os::raw::c_int,
        type_: ::std::os::raw::c_int,
        protocol: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Connect a socket to a remote host"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param addr Remote host address to connect to"]
    #[doc = " @param addrlen Length of address"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_bsd_connect(
        fd: ::std::os::raw::c_int,
        addr: *const zts_sockaddr,
        addrlen: zts_socklen_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Bind a socket to a local address"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param addr Local interface address to bind to"]
    #[doc = " @param addrlen Length of address"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_bsd_bind(
        fd: ::std::os::raw::c_int,
        addr: *const zts_sockaddr,
        addrlen: zts_socklen_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Listen for incoming connections on socket"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param backlog Number of backlogged connections allowed"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_bsd_listen(
        fd: ::std::os::raw::c_int,
        backlog: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Accept an incoming connection"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param addr Address of remote host for accepted connection"]
    #[doc = " @param addrlen Length of address"]
    #[doc = " @return New file descriptor if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_bsd_accept(
        fd: ::std::os::raw::c_int,
        addr: *mut zts_sockaddr,
        addrlen: *mut zts_socklen_t,
    ) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct zts_linger {
    pub l_onoff: ::std::os::raw::c_int,
    pub l_linger: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_zts_linger() {
    assert_eq!(
        ::std::mem::size_of::<zts_linger>(),
        8usize,
        concat!("Size of: ", stringify!(zts_linger))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_linger>(),
        4usize,
        concat!("Alignment of ", stringify!(zts_linger))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_linger>())).l_onoff as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_linger),
            "::",
            stringify!(l_onoff)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_linger>())).l_linger as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_linger),
            "::",
            stringify!(l_linger)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct zts_ip_mreq {
    pub imr_multiaddr: zts_in_addr,
    pub imr_interface: zts_in_addr,
}
#[test]
fn bindgen_test_layout_zts_ip_mreq() {
    assert_eq!(
        ::std::mem::size_of::<zts_ip_mreq>(),
        8usize,
        concat!("Size of: ", stringify!(zts_ip_mreq))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_ip_mreq>(),
        4usize,
        concat!("Alignment of ", stringify!(zts_ip_mreq))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_ip_mreq>())).imr_multiaddr as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_ip_mreq),
            "::",
            stringify!(imr_multiaddr)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_ip_mreq>())).imr_interface as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_ip_mreq),
            "::",
            stringify!(imr_interface)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct zts_in_pktinfo {
    pub ipi_ifindex: ::std::os::raw::c_uint,
    pub ipi_addr: zts_in_addr,
}
#[test]
fn bindgen_test_layout_zts_in_pktinfo() {
    assert_eq!(
        ::std::mem::size_of::<zts_in_pktinfo>(),
        8usize,
        concat!("Size of: ", stringify!(zts_in_pktinfo))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_in_pktinfo>(),
        4usize,
        concat!("Alignment of ", stringify!(zts_in_pktinfo))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_in_pktinfo>())).ipi_ifindex as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_in_pktinfo),
            "::",
            stringify!(ipi_ifindex)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_in_pktinfo>())).ipi_addr as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_in_pktinfo),
            "::",
            stringify!(ipi_addr)
        )
    );
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct zts_ipv6_mreq {
    pub ipv6mr_multiaddr: zts_in6_addr,
    pub ipv6mr_interface: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout_zts_ipv6_mreq() {
    assert_eq!(
        ::std::mem::size_of::<zts_ipv6_mreq>(),
        20usize,
        concat!("Size of: ", stringify!(zts_ipv6_mreq))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_ipv6_mreq>(),
        4usize,
        concat!("Alignment of ", stringify!(zts_ipv6_mreq))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_ipv6_mreq>())).ipv6mr_multiaddr as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_ipv6_mreq),
            "::",
            stringify!(ipv6mr_multiaddr)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_ipv6_mreq>())).ipv6mr_interface as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_ipv6_mreq),
            "::",
            stringify!(ipv6mr_interface)
        )
    );
}
extern "C" {
    #[doc = " @brief Set socket options."]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param level Protocol level to which option name should apply"]
    #[doc = " @param optname Option name to set"]
    #[doc = " @param optval Source of option value to set"]
    #[doc = " @param optlen Length of option value"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_bsd_setsockopt(
        fd: ::std::os::raw::c_int,
        level: ::std::os::raw::c_int,
        optname: ::std::os::raw::c_int,
        optval: *const ::std::os::raw::c_void,
        optlen: zts_socklen_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Get socket options."]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param level Protocol level to which option name should apply"]
    #[doc = " @param optname Option name to get"]
    #[doc = " @param optval Where option value will be stored"]
    #[doc = " @param optlen Length of value"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_bsd_getsockopt(
        fd: ::std::os::raw::c_int,
        level: ::std::os::raw::c_int,
        optname: ::std::os::raw::c_int,
        optval: *mut ::std::os::raw::c_void,
        optlen: *mut zts_socklen_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Get the name (address) of the local end of the socket"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param addr Name associated with this socket"]
    #[doc = " @param addrlen Length of name"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_bsd_getsockname(
        fd: ::std::os::raw::c_int,
        addr: *mut zts_sockaddr,
        addrlen: *mut zts_socklen_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Get the name (address) of the remote end of the socket"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param addr Name associated with remote end of this socket"]
    #[doc = " @param addrlen Length of name"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_bsd_getpeername(
        fd: ::std::os::raw::c_int,
        addr: *mut zts_sockaddr,
        addrlen: *mut zts_socklen_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Close socket."]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_bsd_close(fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct zts_fd_set {
    pub fd_bits: [::std::os::raw::c_uchar; 128usize],
}
#[test]
fn bindgen_test_layout_zts_fd_set() {
    assert_eq!(
        ::std::mem::size_of::<zts_fd_set>(),
        128usize,
        concat!("Size of: ", stringify!(zts_fd_set))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_fd_set>(),
        1usize,
        concat!("Alignment of ", stringify!(zts_fd_set))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_fd_set>())).fd_bits as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_fd_set),
            "::",
            stringify!(fd_bits)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct zts_timeval {
    pub tv_sec: ::std::os::raw::c_long,
    pub tv_usec: ::std::os::raw::c_long,
}
#[test]
fn bindgen_test_layout_zts_timeval() {
    assert_eq!(
        ::std::mem::size_of::<zts_timeval>(),
        8usize,
        concat!("Size of: ", stringify!(zts_timeval))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_timeval>(),
        4usize,
        concat!("Alignment of ", stringify!(zts_timeval))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_timeval>())).tv_sec as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_timeval),
            "::",
            stringify!(tv_sec)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_timeval>())).tv_usec as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_timeval),
            "::",
            stringify!(tv_usec)
        )
    );
}
extern "C" {
    #[doc = " @brief Monitor multiple file descriptors for \"readiness\""]
    #[doc = ""]
    #[doc = " @param nfds Set to the highest numbered file descriptor in any of the given"]
    #[doc = " sets"]
    #[doc = " @param readfds Set of file descriptors to monitor for READ readiness"]
    #[doc = " @param writefds Set of file descriptors to monitor for WRITE readiness"]
    #[doc = " @param exceptfds Set of file descriptors to monitor for exceptional"]
    #[doc = " conditions"]
    #[doc = " @param timeout How long this call should block"]
    #[doc = " @return Number of ready file descriptors on success. `ZTS_ERR_SOCKET`,"]
    #[doc = " `ZTS_ERR_SERVICE` on failure. Sets `zts_errno`"]
    pub fn zts_bsd_select(
        nfds: ::std::os::raw::c_int,
        readfds: *mut zts_fd_set,
        writefds: *mut zts_fd_set,
        exceptfds: *mut zts_fd_set,
        timeout: *mut zts_timeval,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Issue file control commands on a socket"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param cmd Operation to be performed"]
    #[doc = " @param flags Flags"]
    #[doc = " @return"]
    pub fn zts_bsd_fcntl(
        fd: ::std::os::raw::c_int,
        cmd: ::std::os::raw::c_int,
        flags: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
pub type zts_nfds_t = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct zts_pollfd {
    pub fd: ::std::os::raw::c_int,
    pub events: ::std::os::raw::c_short,
    pub revents: ::std::os::raw::c_short,
}
#[test]
fn bindgen_test_layout_zts_pollfd() {
    assert_eq!(
        ::std::mem::size_of::<zts_pollfd>(),
        8usize,
        concat!("Size of: ", stringify!(zts_pollfd))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_pollfd>(),
        4usize,
        concat!("Alignment of ", stringify!(zts_pollfd))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_pollfd>())).fd as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_pollfd),
            "::",
            stringify!(fd)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_pollfd>())).events as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_pollfd),
            "::",
            stringify!(events)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_pollfd>())).revents as *const _ as usize },
        6usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_pollfd),
            "::",
            stringify!(revents)
        )
    );
}
extern "C" {
    #[doc = " @brief Wait for some event on a file descriptor."]
    #[doc = ""]
    #[doc = " @param fds Set of file descriptors to monitor"]
    #[doc = " @param nfds Number of elements in the fds array"]
    #[doc = " @param timeout How long this call should block"]
    #[doc = " @return Number of ready file descriptors if successful, `ZTS_ERR_SERVICE` if"]
    #[doc = " the node experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets"]
    #[doc = " `zts_errno`"]
    pub fn zts_bsd_poll(
        fds: *mut zts_pollfd,
        nfds: zts_nfds_t,
        timeout: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Control a device"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param request Selects the control function to be performed"]
    #[doc = " @param argp Additional information"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_bsd_ioctl(
        fd: ::std::os::raw::c_int,
        request: ::std::os::raw::c_ulong,
        argp: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Send data to remote host"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param buf Pointer to data buffer"]
    #[doc = " @param len Length of data to write"]
    #[doc = " @param flags (e.g. `ZTS_MSG_DONTWAIT`, `ZTS_MSG_MORE`)"]
    #[doc = " @return Number of bytes sent if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_bsd_send(
        fd: ::std::os::raw::c_int,
        buf: *const ::std::os::raw::c_void,
        len: size_t,
        flags: ::std::os::raw::c_int,
    ) -> ssize_t;
}
extern "C" {
    #[doc = " @brief Send data to remote host"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param buf Pointer to data buffer"]
    #[doc = " @param len Length of data to write"]
    #[doc = " @param flags Specifies type of message transmission"]
    #[doc = " @param addr Destination address"]
    #[doc = " @param addrlen Length of destination address"]
    #[doc = " @return Number of bytes sent if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_bsd_sendto(
        fd: ::std::os::raw::c_int,
        buf: *const ::std::os::raw::c_void,
        len: size_t,
        flags: ::std::os::raw::c_int,
        addr: *const zts_sockaddr,
        addrlen: zts_socklen_t,
    ) -> ssize_t;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct zts_iovec {
    pub iov_base: *mut ::std::os::raw::c_void,
    pub iov_len: size_t,
}
#[test]
fn bindgen_test_layout_zts_iovec() {
    assert_eq!(
        ::std::mem::size_of::<zts_iovec>(),
        16usize,
        concat!("Size of: ", stringify!(zts_iovec))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_iovec>(),
        8usize,
        concat!("Alignment of ", stringify!(zts_iovec))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_iovec>())).iov_base as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_iovec),
            "::",
            stringify!(iov_base)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_iovec>())).iov_len as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_iovec),
            "::",
            stringify!(iov_len)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct zts_msghdr {
    pub msg_name: *mut ::std::os::raw::c_void,
    pub msg_namelen: zts_socklen_t,
    pub msg_iov: *mut zts_iovec,
    pub msg_iovlen: ::std::os::raw::c_int,
    pub msg_control: *mut ::std::os::raw::c_void,
    pub msg_controllen: zts_socklen_t,
    pub msg_flags: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_zts_msghdr() {
    assert_eq!(
        ::std::mem::size_of::<zts_msghdr>(),
        48usize,
        concat!("Size of: ", stringify!(zts_msghdr))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_msghdr>(),
        8usize,
        concat!("Alignment of ", stringify!(zts_msghdr))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_msghdr>())).msg_name as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_msghdr),
            "::",
            stringify!(msg_name)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_msghdr>())).msg_namelen as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_msghdr),
            "::",
            stringify!(msg_namelen)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_msghdr>())).msg_iov as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_msghdr),
            "::",
            stringify!(msg_iov)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_msghdr>())).msg_iovlen as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_msghdr),
            "::",
            stringify!(msg_iovlen)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_msghdr>())).msg_control as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_msghdr),
            "::",
            stringify!(msg_control)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_msghdr>())).msg_controllen as *const _ as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_msghdr),
            "::",
            stringify!(msg_controllen)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_msghdr>())).msg_flags as *const _ as usize },
        44usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_msghdr),
            "::",
            stringify!(msg_flags)
        )
    );
}
extern "C" {
    #[doc = " @brief Send message to remote host"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param msg Message to send"]
    #[doc = " @param flags Specifies type of message transmission"]
    #[doc = " @return Number of bytes sent if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_bsd_sendmsg(
        fd: ::std::os::raw::c_int,
        msg: *const zts_msghdr,
        flags: ::std::os::raw::c_int,
    ) -> ssize_t;
}
extern "C" {
    #[doc = " @brief Receive data from remote host"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param buf Pointer to data buffer"]
    #[doc = " @param len Length of data buffer"]
    #[doc = " @param flags Specifies the type of message receipt"]
    #[doc = " @return Number of bytes received if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_bsd_recv(
        fd: ::std::os::raw::c_int,
        buf: *mut ::std::os::raw::c_void,
        len: size_t,
        flags: ::std::os::raw::c_int,
    ) -> ssize_t;
}
extern "C" {
    #[doc = " @brief Receive data from remote host"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param buf Pointer to data buffer"]
    #[doc = " @param len Length of data buffer"]
    #[doc = " @param flags Specifies the type of message receipt"]
    #[doc = " @param addr Destination address buffer"]
    #[doc = " @param addrlen Length of destination address buffer"]
    #[doc = " @return Number of bytes received if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_bsd_recvfrom(
        fd: ::std::os::raw::c_int,
        buf: *mut ::std::os::raw::c_void,
        len: size_t,
        flags: ::std::os::raw::c_int,
        addr: *mut zts_sockaddr,
        addrlen: *mut zts_socklen_t,
    ) -> ssize_t;
}
extern "C" {
    #[doc = " @brief Receive a message from remote host"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param msg Message that was received"]
    #[doc = " @param flags Specifies the type of message receipt"]
    #[doc = " @return Number of bytes received if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_bsd_recvmsg(
        fd: ::std::os::raw::c_int,
        msg: *mut zts_msghdr,
        flags: ::std::os::raw::c_int,
    ) -> ssize_t;
}
extern "C" {
    #[doc = " @brief Read data from socket onto buffer"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param buf Pointer to data buffer"]
    #[doc = " @param len Length of data buffer to receive data"]
    #[doc = " @return Number of bytes read if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_bsd_read(
        fd: ::std::os::raw::c_int,
        buf: *mut ::std::os::raw::c_void,
        len: size_t,
    ) -> ssize_t;
}
extern "C" {
    #[doc = " @brief Read data from socket into multiple buffers"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param iov Array of destination buffers"]
    #[doc = " @param iovcnt Number of buffers to read into"]
    #[doc = " @return Number of bytes read if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_bsd_readv(
        fd: ::std::os::raw::c_int,
        iov: *const zts_iovec,
        iovcnt: ::std::os::raw::c_int,
    ) -> ssize_t;
}
extern "C" {
    #[doc = " @brief Write data from buffer to socket"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param buf Pointer to data buffer"]
    #[doc = " @param len Length of buffer to write"]
    #[doc = " @return Number of bytes written if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_bsd_write(
        fd: ::std::os::raw::c_int,
        buf: *const ::std::os::raw::c_void,
        len: size_t,
    ) -> ssize_t;
}
extern "C" {
    #[doc = " @brief Write data from multiple buffers to socket."]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param iov Array of source buffers"]
    #[doc = " @param iovcnt Number of buffers to read from"]
    #[doc = " @return Number of bytes written if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_bsd_writev(
        fd: ::std::os::raw::c_int,
        iov: *const zts_iovec,
        iovcnt: ::std::os::raw::c_int,
    ) -> ssize_t;
}
extern "C" {
    #[doc = " @brief Shut down some aspect of a socket"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param how Which aspects of the socket should be shut down. Options are `ZTS_SHUT_RD`,"]
    #[doc = " `ZTS_SHUT_WR`, or `ZTS_SHUT_RDWR`."]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_bsd_shutdown(
        fd: ::std::os::raw::c_int,
        how: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Create a socket"]
    #[doc = ""]
    #[doc = " @param family `ZTS_AF_INET` or `ZTS_AF_INET6`"]
    #[doc = " @param type `ZTS_SOCK_STREAM` or `ZTS_SOCK_DGRAM`"]
    #[doc = " @param protocol Protocols supported on this socket"]
    #[doc = " @return Numbered file descriptor on success, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_socket(
        family: ::std::os::raw::c_int,
        type_: ::std::os::raw::c_int,
        protocol: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Connect a socket to a remote host"]
    #[doc = ""]
    #[doc = " This convenience function exists because ZeroTier uses transport-triggered"]
    #[doc = " links. This means that links between peers do not exist until peers try to"]
    #[doc = " talk to each other. This can be a problem during connection procedures since"]
    #[doc = " some of the initial packets are lost. To alleviate the need to try"]
    #[doc = " `zts_bsd_connect` many times, this function will keep re-trying for you, even if"]
    #[doc = " no known routes exist. However, if the socket is set to `non-blocking` mode"]
    #[doc = " it will behave identically to `zts_bsd_connect` and return immediately upon"]
    #[doc = " failure."]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param ipstr Human-readable IP string"]
    #[doc = " @param port Port"]
    #[doc = " @param timeout_ms (Approximate) amount of time in milliseconds before"]
    #[doc = "     connection attempt is aborted. Will block for `30 seconds` if timeout is"]
    #[doc = "     set to `0`."]
    #[doc = ""]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SOCKET` if the function times"]
    #[doc = "     out with no connection made, `ZTS_ERR_SERVICE` if the node experiences a"]
    #[doc = "     problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_connect(
        fd: ::std::os::raw::c_int,
        ipstr: *const ::std::os::raw::c_char,
        port: ::std::os::raw::c_ushort,
        timeout_ms: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Bind a socket to a local address"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param ipstr Human-readable IP string"]
    #[doc = " @param port Port"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_bind(
        fd: ::std::os::raw::c_int,
        ipstr: *const ::std::os::raw::c_char,
        port: ::std::os::raw::c_ushort,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Listen for incoming connections on socket"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param backlog Number of backlogged connections allowed"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_listen(
        fd: ::std::os::raw::c_int,
        backlog: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Accept an incoming connection"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param remote_addr Buffer that will receive remote host IP string"]
    #[doc = " @param len Size of buffer that will receive remote host IP string"]
    #[doc = "     (must be exactly `ZTS_IP_MAX_STR_LEN`)"]
    #[doc = " @param port Port number of the newly connected remote host (value-result)"]
    #[doc = " @return New file descriptor if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_accept(
        fd: ::std::os::raw::c_int,
        remote_addr: *mut ::std::os::raw::c_char,
        len: ::std::os::raw::c_int,
        port: *mut ::std::os::raw::c_ushort,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Send data to remote host"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param buf Pointer to data buffer"]
    #[doc = " @param len Length of data to write"]
    #[doc = " @param flags (e.g. `ZTS_MSG_DONTWAIT`, `ZTS_MSG_MORE`)"]
    #[doc = " @return Number of bytes sent if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_send(
        fd: ::std::os::raw::c_int,
        buf: *const ::std::os::raw::c_void,
        len: size_t,
        flags: ::std::os::raw::c_int,
    ) -> ssize_t;
}
extern "C" {
    #[doc = " @brief Receive data from remote host"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param buf Pointer to data buffer"]
    #[doc = " @param len Length of data buffer"]
    #[doc = " @param flags Specifies the type of message receipt"]
    #[doc = " @return Number of bytes received if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_recv(
        fd: ::std::os::raw::c_int,
        buf: *mut ::std::os::raw::c_void,
        len: size_t,
        flags: ::std::os::raw::c_int,
    ) -> ssize_t;
}
extern "C" {
    #[doc = " @brief Read data from socket onto buffer"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param buf Pointer to data buffer"]
    #[doc = " @param len Length of data buffer to receive data"]
    #[doc = " @return Number of bytes read if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_read(
        fd: ::std::os::raw::c_int,
        buf: *mut ::std::os::raw::c_void,
        len: size_t,
    ) -> ssize_t;
}
extern "C" {
    #[doc = " @brief Write data from buffer to socket"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param buf Pointer to data buffer"]
    #[doc = " @param len Length of buffer to write"]
    #[doc = " @return Number of bytes written if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_write(
        fd: ::std::os::raw::c_int,
        buf: *const ::std::os::raw::c_void,
        len: size_t,
    ) -> ssize_t;
}
extern "C" {
    #[doc = " @brief Shut down `read` aspect of a socket"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_shutdown_rd(fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Shut down `write` aspect of a socket"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_shutdown_wr(fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Shut down both `read` and `write` aspect of a socket"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_shutdown_rdwr(fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Close socket."]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_close(fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Get the name (address) of the remote end of the socket"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param remote_addr_str Destination buffer to contain name (address) of the remote end of the socket"]
    #[doc = " @param len Length of destination buffer"]
    #[doc = " @param port Value-result parameter that will contain resultant port number"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_getpeername(
        fd: ::std::os::raw::c_int,
        remote_addr_str: *mut ::std::os::raw::c_char,
        len: ::std::os::raw::c_int,
        port: *mut ::std::os::raw::c_ushort,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Get the name (address) of the local end of the socket"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param local_addr_str Destination buffer to contain name (address) of the local end of the socket"]
    #[doc = " @param len Length of destination buffer"]
    #[doc = " @param port Value-result parameter that will contain resultant port number"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_getsockname(
        fd: ::std::os::raw::c_int,
        local_addr_str: *mut ::std::os::raw::c_char,
        len: ::std::os::raw::c_int,
        port: *mut ::std::os::raw::c_ushort,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief A convenience function that takes a remote address IP string and creates"]
    #[doc = " the appropriate type of socket, and uses it to connect to a remote host."]
    #[doc = ""]
    #[doc = " @param remote_ipstr Remote address string. IPv4 or IPv6"]
    #[doc = " @param remote_port Port to"]
    #[doc = ""]
    #[doc = " @return New file descriptor if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_tcp_client(
        remote_ipstr: *const ::std::os::raw::c_char,
        remote_port: ::std::os::raw::c_ushort,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief A convenience function that takes a remote address IP string and creates"]
    #[doc = " the appropriate type of socket, binds, listens, and then accepts on it."]
    #[doc = ""]
    #[doc = " @param local_ipstr Local address to bind"]
    #[doc = " @param local_port Local port to bind"]
    #[doc = " @param remote_ipstr String-format IP address of newly connected remote host"]
    #[doc = " @param len Length of `remote_ipstr`"]
    #[doc = " @param remote_port Port of remote host"]
    #[doc = ""]
    #[doc = " @return New file descriptor if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_tcp_server(
        local_ipstr: *const ::std::os::raw::c_char,
        local_port: ::std::os::raw::c_ushort,
        remote_ipstr: *mut ::std::os::raw::c_char,
        len: ::std::os::raw::c_int,
        remote_port: *mut ::std::os::raw::c_ushort,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief A convenience function that takes a remote address IP string and creates"]
    #[doc = " the appropriate type of socket, and binds to it."]
    #[doc = ""]
    #[doc = " @param local_ipstr Local address to bind"]
    #[doc = " @param local_port Local port to bind"]
    #[doc = ""]
    #[doc = " @return New file descriptor if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_udp_server(
        local_ipstr: *const ::std::os::raw::c_char,
        local_port: ::std::os::raw::c_ushort,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief This function doesn't really do anything other than be a namespace"]
    #[doc = " counterpart to `zts_udp_server`. All this function does is create a"]
    #[doc = " `ZTS_SOCK_DGRAM` socket and return its file descriptor."]
    #[doc = ""]
    #[doc = " @param remote_ipstr Remote address string. IPv4 or IPv6"]
    #[doc = ""]
    #[doc = " @return New file descriptor if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_udp_client(remote_ipstr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Enable or disable `TCP_NODELAY`. Enabling this is equivalent to"]
    #[doc = "     turning off Nagle's algorithm"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param enabled `[0, 1]` integer value"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_set_no_delay(
        fd: ::std::os::raw::c_int,
        enabled: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Get the last error for the given socket"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @return Error number defined in `zts_errno_t`. `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_get_last_socket_error(fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Return amount of data available to read from socket"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @return Number of bytes available to read. `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_get_data_available(fd: ::std::os::raw::c_int) -> size_t;
}
extern "C" {
    #[doc = " @brief Return whether `TCP_NODELAY` is enabled"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @return `1` if enabled, `0` if disabled, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_get_no_delay(fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Enable or disable `SO_LINGER` while also setting its value"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param enabled `[0, 1]` integer value"]
    #[doc = " @param value How long socket should linger"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_set_linger(
        fd: ::std::os::raw::c_int,
        enabled: ::std::os::raw::c_int,
        value: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Return whether `SO_LINGER` is enabled"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @return `1` if enabled, `0` if disabled, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_get_linger_enabled(fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Return the value of `SO_LINGER`"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @return Value of `SO_LINGER` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_get_linger_value(fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Return the number of bytes available to read from the network buffer"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @return Number of bytes to read if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_get_pending_data_size(fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Enable or disable `SO_REUSEADDR`"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param enabled `[0, 1]` integer value"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_set_reuse_addr(
        fd: ::std::os::raw::c_int,
        enabled: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Return whether `SO_REUSEADDR` is enabled"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @return `1` if enabled, `0` if disabled, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_get_reuse_addr(fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Set the value of `SO_RCVTIMEO`"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param seconds Number of seconds for timeout"]
    #[doc = " @param microseconds Number of microseconds for timeout"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_set_recv_timeout(
        fd: ::std::os::raw::c_int,
        seconds: ::std::os::raw::c_int,
        microseconds: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Return the value of `SO_RCVTIMEO`"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @return Value of `SO_RCVTIMEO` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_get_recv_timeout(fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Set the value of `SO_SNDTIMEO`"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param seconds Number of seconds for timeout"]
    #[doc = " @param microseconds Number of microseconds for timeout"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_set_send_timeout(
        fd: ::std::os::raw::c_int,
        seconds: ::std::os::raw::c_int,
        microseconds: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Return the value of `SO_SNDTIMEO`"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @return Value of `SO_SNDTIMEO` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_get_send_timeout(fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Set the value of `SO_SNDBUF`"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param size Size of buffer"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_set_send_buf_size(
        fd: ::std::os::raw::c_int,
        size: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Return the value of `SO_SNDBUF`"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @return Value of `SO_SNDBUF` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_get_send_buf_size(fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Set the value of `SO_RCVBUF`"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param size Size of buffer"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_set_recv_buf_size(
        fd: ::std::os::raw::c_int,
        size: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Return the value of `SO_RCVBUF`"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @return Value of `SO_RCVBUF` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_get_recv_buf_size(fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Set the value of `IP_TTL`"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param ttl Value of `IP_TTL`"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_set_ttl(
        fd: ::std::os::raw::c_int,
        ttl: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Return the value of `IP_TTL`"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @return Value of `IP_TTL` `[0,255]` if successful, `ZTS_ERR_SERVICE` if the"]
    #[doc = " node experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_get_ttl(fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Change blocking behavior `O_NONBLOCK`"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param enabled `[0, 1]` integer value, `1` maintains default behavior,"]
    #[doc = "     `0` sets to non-blocking mode"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_set_blocking(
        fd: ::std::os::raw::c_int,
        enabled: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Return whether blocking mode `O_NONBLOCK` is enabled"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @return `1` if enabled, `0` if disabled, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_get_blocking(fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Enable or disable `SO_KEEPALIVE`"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @param enabled `[0, 1]` integer value"]
    #[doc = " @return `ZTS_ERR_OK` if successful, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_set_keepalive(
        fd: ::std::os::raw::c_int,
        enabled: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Return whether `SO_KEEPALIVE` is enabled"]
    #[doc = ""]
    #[doc = " @param fd Socket file descriptor"]
    #[doc = " @return `1` if enabled, `0` if disabled, `ZTS_ERR_SERVICE` if the node"]
    #[doc = "     experiences a problem, `ZTS_ERR_ARG` if invalid argument. Sets `zts_errno`"]
    pub fn zts_get_keepalive(fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct zts_hostent {
    pub h_name: *mut ::std::os::raw::c_char,
    pub h_aliases: *mut *mut ::std::os::raw::c_char,
    pub h_addrtype: ::std::os::raw::c_int,
    pub h_length: ::std::os::raw::c_int,
    pub h_addr_list: *mut *mut ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_zts_hostent() {
    assert_eq!(
        ::std::mem::size_of::<zts_hostent>(),
        32usize,
        concat!("Size of: ", stringify!(zts_hostent))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_hostent>(),
        8usize,
        concat!("Alignment of ", stringify!(zts_hostent))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_hostent>())).h_name as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_hostent),
            "::",
            stringify!(h_name)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_hostent>())).h_aliases as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_hostent),
            "::",
            stringify!(h_aliases)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_hostent>())).h_addrtype as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_hostent),
            "::",
            stringify!(h_addrtype)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_hostent>())).h_length as *const _ as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_hostent),
            "::",
            stringify!(h_length)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_hostent>())).h_addr_list as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_hostent),
            "::",
            stringify!(h_addr_list)
        )
    );
}
extern "C" {
    #[doc = " @brief Resolve a host-name"]
    #[doc = ""]
    #[doc = " @param name A null-terminated string representing the name of the host"]
    #[doc = " @return Pointer to struct zts_hostent if successful, NULL otherwise"]
    pub fn zts_bsd_gethostbyname(name: *const ::std::os::raw::c_char) -> *mut zts_hostent;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct zts_ip4_addr {
    pub addr: u32,
}
#[test]
fn bindgen_test_layout_zts_ip4_addr() {
    assert_eq!(
        ::std::mem::size_of::<zts_ip4_addr>(),
        4usize,
        concat!("Size of: ", stringify!(zts_ip4_addr))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_ip4_addr>(),
        4usize,
        concat!("Alignment of ", stringify!(zts_ip4_addr))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_ip4_addr>())).addr as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_ip4_addr),
            "::",
            stringify!(addr)
        )
    );
}
#[doc = " This is the aligned version of ip6_addr_t,"]
#[doc = "used as local variable, on the stack, etc."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct zts_ip6_addr {
    pub addr: [u32; 4usize],
}
#[test]
fn bindgen_test_layout_zts_ip6_addr() {
    assert_eq!(
        ::std::mem::size_of::<zts_ip6_addr>(),
        16usize,
        concat!("Size of: ", stringify!(zts_ip6_addr))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_ip6_addr>(),
        4usize,
        concat!("Alignment of ", stringify!(zts_ip6_addr))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_ip6_addr>())).addr as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_ip6_addr),
            "::",
            stringify!(addr)
        )
    );
}
#[doc = " A union struct for both IP version's addresses."]
#[doc = " ATTENTION: watch out for its size when adding IPv6 address scope!"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct zts_ip_addr {
    pub u_addr: zts_ip_addr__bindgen_ty_1,
    pub type_: u8,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union zts_ip_addr__bindgen_ty_1 {
    pub ip6: zts_ip6_addr,
    pub ip4: zts_ip4_addr,
}
#[test]
fn bindgen_test_layout_zts_ip_addr__bindgen_ty_1() {
    assert_eq!(
        ::std::mem::size_of::<zts_ip_addr__bindgen_ty_1>(),
        16usize,
        concat!("Size of: ", stringify!(zts_ip_addr__bindgen_ty_1))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_ip_addr__bindgen_ty_1>(),
        4usize,
        concat!("Alignment of ", stringify!(zts_ip_addr__bindgen_ty_1))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_ip_addr__bindgen_ty_1>())).ip6 as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_ip_addr__bindgen_ty_1),
            "::",
            stringify!(ip6)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_ip_addr__bindgen_ty_1>())).ip4 as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_ip_addr__bindgen_ty_1),
            "::",
            stringify!(ip4)
        )
    );
}
#[test]
fn bindgen_test_layout_zts_ip_addr() {
    assert_eq!(
        ::std::mem::size_of::<zts_ip_addr>(),
        20usize,
        concat!("Size of: ", stringify!(zts_ip_addr))
    );
    assert_eq!(
        ::std::mem::align_of::<zts_ip_addr>(),
        4usize,
        concat!("Alignment of ", stringify!(zts_ip_addr))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_ip_addr>())).u_addr as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_ip_addr),
            "::",
            stringify!(u_addr)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<zts_ip_addr>())).type_ as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(zts_ip_addr),
            "::",
            stringify!(type_)
        )
    );
}
extern "C" {
    #[doc = " Initialize one of the DNS servers."]
    #[doc = ""]
    #[doc = " @param index the index of the DNS server to set must be `< DNS_MAX_SERVERS`"]
    #[doc = " @param addr IP address of the DNS server to set"]
    pub fn zts_dns_set_server(index: u8, addr: *const zts_ip_addr) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Obtain one of the currently configured DNS server."]
    #[doc = ""]
    #[doc = " @param index the index of the DNS server"]
    #[doc = " @return IP address of the indexed DNS server or `ip_addr_any` if the DNS"]
    #[doc = "         server has not been configured."]
    pub fn zts_dns_get_server(index: u8) -> *const zts_ip_addr;
}
extern "C" {
    #[doc = " @brief Lock the core service so that queries about addresses, routes, paths, etc. can be"]
    #[doc = " performed."]
    #[doc = ""]
    #[doc = " Notice: Core locking functions are intended to be used by high-level language wrappers."]
    #[doc = " Only lock the core if you know *exactly* what you are doing."]
    #[doc = ""]
    #[doc = " @return `ZTS_ERR_OK` if successful. `ZTS_ERR_SERVICE` if the core service is unavailable."]
    pub fn zts_core_lock_obtain() -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Lock the core service so that queries about addresses, routes, paths, etc. can be"]
    #[doc = " performed."]
    #[doc = ""]
    #[doc = " Notice: Core locking functions are intended to be used by high-level language wrappers."]
    #[doc = " Only lock the core if you know *exactly* what you are doing."]
    #[doc = ""]
    #[doc = " @return `ZTS_ERR_OK` if successful. `ZTS_ERR_SERVICE` if the core service is unavailable."]
    pub fn zts_core_lock_release() -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Lock the core service so that queries about addresses, routes, paths, etc. can be"]
    #[doc = " performed."]
    #[doc = ""]
    #[doc = " Notice: Core locking functions are intended to be used by high-level language wrappers."]
    #[doc = " Only lock the core if you know *exactly* what you are doing. zts_core_lock_obtain() and"]
    #[doc = " zts_core_lock_release() must be called before and after this function."]
    #[doc = ""]
    #[doc = " @return `ZTS_ERR_OK` if successful. `ZTS_ERR_SERVICE` if the core service is unavailable."]
    pub fn zts_core_query_addr_count(net_id: u64) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Lock the core service so that queries about addresses, routes, paths, etc. can be"]
    #[doc = " performed."]
    #[doc = ""]
    #[doc = " Notice: Core locking functions are intended to be used by high-level language wrappers."]
    #[doc = " Only lock the core if you know *exactly* what you are doing. zts_core_lock_obtain() and"]
    #[doc = " zts_core_lock_release() must be called before and after this function."]
    #[doc = ""]
    #[doc = " @return `ZTS_ERR_OK` if successful. `ZTS_ERR_SERVICE` if the core service is unavailable."]
    pub fn zts_core_query_addr(
        net_id: u64,
        idx: ::std::os::raw::c_uint,
        addr: *mut ::std::os::raw::c_char,
        len: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Lock the core service so that queries about addresses, routes, paths, etc. can be"]
    #[doc = " performed."]
    #[doc = ""]
    #[doc = " Notice: Core locking functions are intended to be used by high-level language wrappers."]
    #[doc = " Only lock the core if you know *exactly* what you are doing. zts_core_lock_obtain() and"]
    #[doc = " zts_core_lock_release() must be called before and after this function."]
    #[doc = ""]
    #[doc = " @return `ZTS_ERR_OK` if successful. `ZTS_ERR_SERVICE` if the core service is unavailable."]
    pub fn zts_core_query_route_count(net_id: u64) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Lock the core service so that queries about addresses, routes, paths, etc. can be"]
    #[doc = " performed."]
    #[doc = ""]
    #[doc = " Notice: Core locking functions are intended to be used by high-level language wrappers."]
    #[doc = " Only lock the core if you know *exactly* what you are doing. zts_core_lock_obtain() and"]
    #[doc = " zts_core_lock_release() must be called before and after this function."]
    #[doc = ""]
    #[doc = " @return `ZTS_ERR_OK` if successful. `ZTS_ERR_SERVICE` if the core service is unavailable."]
    pub fn zts_core_query_route(
        net_id: u64,
        idx: ::std::os::raw::c_uint,
        target: *mut ::std::os::raw::c_char,
        via: *mut ::std::os::raw::c_char,
        len: ::std::os::raw::c_uint,
        flags: *mut u16,
        metric: *mut u16,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Lock the core service so that queries about addresses, routes, paths, etc. can be"]
    #[doc = " performed."]
    #[doc = ""]
    #[doc = " Notice: Core locking functions are intended to be used by high-level language wrappers."]
    #[doc = " Only lock the core if you know *exactly* what you are doing. zts_core_lock_obtain() and"]
    #[doc = " zts_core_lock_release() must be called before and after this function."]
    #[doc = ""]
    #[doc = " @return `ZTS_ERR_OK` if successful. `ZTS_ERR_SERVICE` if the core service is unavailable."]
    pub fn zts_core_query_path_count(peer_id: u64) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Lock the core service so that queries about addresses, routes, paths, etc. can be"]
    #[doc = " performed."]
    #[doc = ""]
    #[doc = " Notice: Core locking functions are intended to be used by high-level language wrappers."]
    #[doc = " Only lock the core if you know *exactly* what you are doing. zts_core_lock_obtain() and"]
    #[doc = " zts_core_lock_release() must be called before and after this function."]
    #[doc = ""]
    #[doc = " @return `ZTS_ERR_OK` if successful. `ZTS_ERR_SERVICE` if the core service is unavailable."]
    pub fn zts_core_query_path(
        peer_id: u64,
        idx: ::std::os::raw::c_uint,
        dst: *mut ::std::os::raw::c_char,
        len: ::std::os::raw::c_uint,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Lock the core service so that queries about addresses, routes, paths, etc. can be"]
    #[doc = " performed."]
    #[doc = ""]
    #[doc = " Notice: Core locking functions are intended to be used by high-level language wrappers."]
    #[doc = " Only lock the core if you know *exactly* what you are doing. zts_core_lock_obtain() and"]
    #[doc = " zts_core_lock_release() must be called before and after this function."]
    #[doc = ""]
    #[doc = " @return `ZTS_ERR_OK` if successful. `ZTS_ERR_SERVICE` if the core service is unavailable."]
    pub fn zts_core_query_mc_count(net_id: u64) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Lock the core service so that queries about addresses, routes, paths, etc. can be"]
    #[doc = " performed."]
    #[doc = ""]
    #[doc = " Notice: Core locking functions are intended to be used by high-level language wrappers."]
    #[doc = " Only lock the core if you know *exactly* what you are doing. zts_core_lock_obtain() and"]
    #[doc = " zts_core_lock_release() must be called before and after this function."]
    #[doc = ""]
    #[doc = " @return `ZTS_ERR_OK` if successful. `ZTS_ERR_SERVICE` if the core service is unavailable."]
    pub fn zts_core_query_mc(
        net_id: u64,
        idx: ::std::os::raw::c_uint,
        mac: *mut u64,
        adi: *mut u32,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Generates a new root set definition"]
    #[doc = ""]
    #[doc = " @param roots_id The desired World ID (arbitrary)"]
    #[doc = " @param ts Timestamp indicating when this generation took place"]
    pub fn zts_util_sign_root_set(
        roots_out: *mut ::std::os::raw::c_char,
        roots_len: *mut ::std::os::raw::c_uint,
        prev_key: *mut ::std::os::raw::c_char,
        prev_key_len: *mut ::std::os::raw::c_uint,
        curr_key: *mut ::std::os::raw::c_char,
        curr_key_len: *mut ::std::os::raw::c_uint,
        id: u64,
        ts: u64,
        roots_spec: *mut zts_root_set_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Platform-agnostic delay"]
    #[doc = ""]
    #[doc = " @param milliseconds How long to delay"]
    pub fn zts_util_delay(milliseconds: ::std::os::raw::c_ulong);
}
extern "C" {
    #[doc = " @brief Return the family type of the IP string"]
    #[doc = ""]
    #[doc = " @param ipstr Either IPv4 or IPv6 string"]
    #[doc = " @return Either `ZTS_AF_INET` or `ZTS_AF_INET6`"]
    pub fn zts_util_get_ip_family(ipstr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Convert human-friendly IP string to `zts_sockaddr_in` or `zts_sockaddr_in6`."]
    #[doc = ""]
    #[doc = " @param src_ipstr Source IP string"]
    #[doc = " @param port Port"]
    #[doc = " @param dstaddr Pointer to destination structure `zts_sockaddr_in` or"]
    #[doc = " `zts_sockaddr_in6`"]
    #[doc = " @param addrlen Size of destination structure. Value-result: Will be set to"]
    #[doc = " actual size of data available"]
    #[doc = " @return return `ZTS_ERR_OK` on success, `ZTS_ERR_ARG` if invalid argument"]
    pub fn zts_util_ipstr_to_saddr(
        src_ipstr: *const ::std::os::raw::c_char,
        port: ::std::os::raw::c_ushort,
        dstaddr: *mut zts_sockaddr,
        addrlen: *mut zts_socklen_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " @brief Similar to `inet_ntop` but determines family automatically and returns"]
    #[doc = " port as a value result parameter."]
    #[doc = ""]
    #[doc = " @param addr Pointer to address structure"]
    #[doc = " @param addrlen Length of address structure"]
    #[doc = " @param dst_str Destination buffer"]
    #[doc = " @param len Length of destination buffer"]
    #[doc = " @param port Value-result parameter that will contain resultant port number"]
    #[doc = ""]
    #[doc = " @return return `ZTS_ERR_OK` on success, `ZTS_ERR_ARG` if invalid argument"]
    pub fn zts_util_ntop(
        addr: *mut zts_sockaddr,
        addrlen: zts_socklen_t,
        dst_str: *mut ::std::os::raw::c_char,
        len: ::std::os::raw::c_int,
        port: *mut ::std::os::raw::c_ushort,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Convert numeric IP address (both versions) into `ASCII` representation."]
    #[doc = " returns ptr to static buffer. Not reentrant."]
    #[doc = ""]
    #[doc = " @param addr IP address in network order to convert"]
    #[doc = " @return Pointer to a global static (!) buffer that holds the `ASCII`"]
    #[doc = "         representation of addr"]
    pub fn zts_ipaddr_ntoa(addr: *const zts_ip_addr) -> *mut ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " Convert IP address string (both versions) to numeric."]
    #[doc = " The version is auto-detected from the string."]
    #[doc = ""]
    #[doc = " @param cp IP address string to convert"]
    #[doc = " @param addr conversion result is stored here"]
    #[doc = " @return `1` on success, `0` on error"]
    pub fn zts_ipaddr_aton(
        cp: *const ::std::os::raw::c_char,
        addr: *mut zts_ip_addr,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Convert IPv4 and IPv6 address structures to human-readable text form."]
    #[doc = ""]
    #[doc = " @param family Address family: `ZTS_AF_INET` or `ZTS_AF_INET6`"]
    #[doc = " @param src Pointer to source address structure"]
    #[doc = " @param dst Pointer to destination character array"]
    #[doc = " @param size Size of the destination buffer"]
    #[doc = " @return On success, returns a non-null pointer to the destination character"]
    #[doc = " array"]
    pub fn zts_inet_ntop(
        family: ::std::os::raw::c_int,
        src: *const ::std::os::raw::c_void,
        dst: *mut ::std::os::raw::c_char,
        size: zts_socklen_t,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " Convert C-string IPv4 and IPv6 addresses to binary form."]
    #[doc = ""]
    #[doc = " @param family Address family: `ZTS_AF_INET` or `ZTS_AF_INET6`"]
    #[doc = " @param src Pointer to source character array"]
    #[doc = " @param dst Pointer to destination address structure"]
    #[doc = " @return return `1` on success. `0` or `-1` on failure. (Does not follow regular"]
    #[doc = " `zts_*` conventions)"]
    pub fn zts_inet_pton(
        family: ::std::os::raw::c_int,
        src: *const ::std::os::raw::c_char,
        dst: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
pub type size_t = ::std::os::raw::c_ulonglong;