rusteron-code-gen 0.1.163

Code generator for Aeron C bindings
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
/* automatically generated by rust-bindgen 0.72.1 */

pub const AERON_NULL_VALUE: i32 = -1;
pub const AERON_CLIENT_ERROR_DRIVER_TIMEOUT: u32 = 1000;
pub const AERON_CLIENT_ERROR_CLIENT_TIMEOUT: u32 = 1001;
pub const AERON_CLIENT_ERROR_CONDUCTOR_SERVICE_TIMEOUT: u32 = 1002;
pub const AERON_CLIENT_ERROR_BUFFER_FULL: u32 = 1003;
pub const AERON_CLIENT_ERROR_DRIVER_BUFFER_FULL: u32 = 1004;
pub const AERON_CLIENT_MAX_LOCAL_ADDRESS_STR_LEN: u32 = 64;
pub const AERON_RESPONSE_ADDRESS_TYPE_IPV4: u32 = 1;
pub const AERON_RESPONSE_ADDRESS_TYPE_IPV6: u32 = 2;
pub const AERON_DIR_ENV_VAR: &[u8; 10] = b"AERON_DIR\0";
pub const AERON_DRIVER_TIMEOUT_ENV_VAR: &[u8; 21] = b"AERON_DRIVER_TIMEOUT\0";
pub const AERON_CLIENT_RESOURCE_LINGER_DURATION_ENV_VAR: &[u8; 38] =
    b"AERON_CLIENT_RESOURCE_LINGER_DURATION\0";
pub const AERON_CLIENT_IDLE_SLEEP_DURATION_ENV_VAR: &[u8; 33] =
    b"AERON_CLIENT_IDLE_SLEEP_DURATION\0";
pub const AERON_CLIENT_PRE_TOUCH_MAPPED_MEMORY_ENV_VAR: &[u8; 37] =
    b"AERON_CLIENT_PRE_TOUCH_MAPPED_MEMORY\0";
pub const AERON_CLIENT_NAME_ENV_VAR: &[u8; 18] = b"AERON_CLIENT_NAME\0";
pub const AERON_AGENT_ON_START_FUNCTION_ENV_VAR: &[u8; 30] = b"AERON_AGENT_ON_START_FUNCTION\0";
pub const AERON_COUNTER_CACHE_LINE_LENGTH: u32 = 64;
pub const AERON_COUNTER_MAX_CLIENT_NAME_LENGTH: u32 = 100;
pub const AERON_COUNTER_RECORD_UNUSED: u32 = 0;
pub const AERON_COUNTER_RECORD_ALLOCATED: u32 = 1;
pub const AERON_COUNTER_RECORD_RECLAIMED: i32 = -1;
pub const AERON_COUNTER_NOT_FREE_TO_REUSE: u64 = 9223372036854775807;
pub const AERON_NULL_COUNTER_ID: i32 = -1;
pub const AERON_PUBLICATION_NOT_CONNECTED: i32 = -1;
pub const AERON_PUBLICATION_BACK_PRESSURED: i32 = -2;
pub const AERON_PUBLICATION_ADMIN_ACTION: i32 = -3;
pub const AERON_PUBLICATION_CLOSED: i32 = -4;
pub const AERON_PUBLICATION_MAX_POSITION_EXCEEDED: i32 = -5;
pub const AERON_PUBLICATION_ERROR: i32 = -6;
pub const AERON_MAX_PATH: u32 = 4096;
pub const AERON_SPY_PREFIX: &[u8; 11] = b"aeron-spy:\0";
pub const AERON_IPC_CHANNEL: &[u8; 10] = b"aeron:ipc\0";
pub const AERON_UDP_CHANNEL_RELIABLE_KEY: &[u8; 9] = b"reliable\0";
pub const AERON_UDP_CHANNEL_TTL_KEY: &[u8; 4] = b"ttl\0";
pub const AERON_UDP_CHANNEL_ENDPOINT_KEY: &[u8; 9] = b"endpoint\0";
pub const AERON_UDP_CHANNEL_INTERFACE_KEY: &[u8; 10] = b"interface\0";
pub const AERON_UDP_CHANNEL_CONTROL_KEY: &[u8; 8] = b"control\0";
pub const AERON_UDP_CHANNEL_CONTROL_MODE_KEY: &[u8; 13] = b"control-mode\0";
pub const AERON_UDP_CHANNEL_CONTROL_MODE_MANUAL_VALUE: &[u8; 7] = b"manual\0";
pub const AERON_UDP_CHANNEL_CONTROL_MODE_DYNAMIC_VALUE: &[u8; 8] = b"dynamic\0";
pub const AERON_UDP_CHANNEL_CONTROL_MODE_RESPONSE_VALUE: &[u8; 9] = b"response\0";
pub const AERON_URI_INITIAL_TERM_ID_KEY: &[u8; 13] = b"init-term-id\0";
pub const AERON_URI_TERM_ID_KEY: &[u8; 8] = b"term-id\0";
pub const AERON_URI_TERM_OFFSET_KEY: &[u8; 12] = b"term-offset\0";
pub const AERON_URI_ALIAS_KEY: &[u8; 6] = b"alias\0";
pub const AERON_URI_TERM_LENGTH_KEY: &[u8; 12] = b"term-length\0";
pub const AERON_URI_LINGER_TIMEOUT_KEY: &[u8; 7] = b"linger\0";
pub const AERON_URI_MTU_LENGTH_KEY: &[u8; 4] = b"mtu\0";
pub const AERON_URI_SPARSE_TERM_KEY: &[u8; 7] = b"sparse\0";
pub const AERON_URI_EOS_KEY: &[u8; 4] = b"eos\0";
pub const AERON_URI_TETHER_KEY: &[u8; 7] = b"tether\0";
pub const AERON_URI_TAGS_KEY: &[u8; 5] = b"tags\0";
pub const AERON_URI_SESSION_ID_KEY: &[u8; 11] = b"session-id\0";
pub const AERON_URI_GROUP_KEY: &[u8; 6] = b"group\0";
pub const AERON_URI_REJOIN_KEY: &[u8; 7] = b"rejoin\0";
pub const AERON_URI_FC_KEY: &[u8; 3] = b"fc\0";
pub const AERON_URI_GTAG_KEY: &[u8; 5] = b"gtag\0";
pub const AERON_URI_CC_KEY: &[u8; 3] = b"cc\0";
pub const AERON_URI_SPIES_SIMULATE_CONNECTION_KEY: &[u8; 4] = b"ssc\0";
pub const AERON_URI_ATS_KEY: &[u8; 4] = b"ats\0";
pub const AERON_URI_SOCKET_SNDBUF_KEY: &[u8; 10] = b"so-sndbuf\0";
pub const AERON_URI_SOCKET_RCVBUF_KEY: &[u8; 10] = b"so-rcvbuf\0";
pub const AERON_URI_RECEIVER_WINDOW_KEY: &[u8; 8] = b"rcv-wnd\0";
pub const AERON_URI_MEDIA_RCV_TIMESTAMP_OFFSET_KEY: &[u8; 20] = b"media-rcv-ts-offset\0";
pub const AERON_URI_CHANNEL_RCV_TIMESTAMP_OFFSET_KEY: &[u8; 22] = b"channel-rcv-ts-offset\0";
pub const AERON_URI_CHANNEL_SND_TIMESTAMP_OFFSET_KEY: &[u8; 22] = b"channel-snd-ts-offset\0";
pub const AERON_URI_TIMESTAMP_OFFSET_RESERVED: &[u8; 9] = b"reserved\0";
pub const AERON_URI_RESPONSE_CORRELATION_ID_PROTOTYPE: &[u8; 10] = b"prototype\0";
pub const AERON_URI_RESPONSE_CORRELATION_ID_KEY: &[u8; 24] = b"response-correlation-id\0";
pub const AERON_URI_NAK_DELAY_KEY: &[u8; 10] = b"nak-delay\0";
pub const AERON_URI_UNTETHERED_WINDOW_LIMIT_TIMEOUT_KEY: &[u8; 32] =
    b"untethered-window-limit-timeout\0";
pub const AERON_URI_UNTETHERED_LINGER_TIMEOUT_KEY: &[u8; 26] = b"untethered-linger-timeout\0";
pub const AERON_URI_UNTETHERED_RESTING_TIMEOUT_KEY: &[u8; 27] = b"untethered-resting-timeout\0";
pub const AERON_URI_MAX_RESEND_KEY: &[u8; 11] = b"max-resend\0";
pub const AERON_URI_STREAM_ID_KEY: &[u8; 10] = b"stream-id\0";
pub const AERON_URI_PUBLICATION_WINDOW_KEY: &[u8; 8] = b"pub-wnd\0";
pub const AERON_URI_INVALID_TAG: i32 = -1;
pub const AERON_URI_MAX_LENGTH: u32 = 4096;
pub const AERON_COMPILER_GCC: u32 = 1;
pub const AERON_COMPILER_LLVM: u32 = 1;
pub const AERON_CPU_ARM: u32 = 1;
pub const AERON_CACHE_LINE_LENGTH: u32 = 64;
pub const AERON_FORMAT_DATE_MAX_LENGTH: u32 = 100;
pub const AERON_FORMAT_NUMBER_TO_LOCALE_STR_LEN: u32 = 32;
pub const AERON_ERROR_MAX_TOTAL_LENGTH: u32 = 8192;
pub const AERON_MAP_DEFAULT_LOAD_FACTOR: f64 = 0.65;
pub const AERON_URI_STRING_BUILDER_PREFIX_KEY: &[u8; 9] = b"__prefix\0";
pub const AERON_URI_STRING_BUILDER_MEDIA_KEY: &[u8; 8] = b"__media\0";
pub const AERON_RES_HEADER_ADDRESS_LENGTH_IP4: u32 = 4;
pub const AERON_RES_HEADER_ADDRESS_LENGTH_IP6: u32 = 16;
pub const AERON_FRAME_HEADER_VERSION: u32 = 0;
pub const AERON_RES_HEADER_TYPE_NAME_TO_IP4_MD: u32 = 1;
pub const AERON_RES_HEADER_TYPE_NAME_TO_IP6_MD: u32 = 2;
pub const AERON_FRAME_MAX_MESSAGE_LENGTH: u32 = 16777216;
pub const AERON_OPT_HDR_ALIGNMENT: u32 = 4;
pub const AERON_ERROR_MAX_TEXT_LENGTH: u32 = 1023;
pub const AERON_ERROR_HAS_GROUP_TAG_FLAG: u32 = 8;
pub const AERON_LOGBUFFER_PARTITION_COUNT: u32 = 3;
pub const AERON_LOGBUFFER_TERM_MIN_LENGTH: u32 = 65536;
pub const AERON_LOGBUFFER_TERM_MAX_LENGTH: u32 = 1073741824;
pub const AERON_LOGBUFFER_DEFAULT_FRAME_HEADER_MAX_LENGTH: u32 = 128;
pub const AERON_MAX_UDP_PAYLOAD_LENGTH: u32 = 65504;
pub const AERON_LOGBUFFER_FRAME_ALIGNMENT: u32 = 32;
pub const AERON_FILEUTIL_ERROR_ENOSPC: u32 = 28;
pub const AERON_PUBLICATIONS_DIR: &[u8; 13] = b"publications\0";
pub const AERON_IMAGES_DIR: &[u8; 7] = b"images\0";
pub const AERON_CNC_FILE: &[u8; 8] = b"cnc.dat\0";
pub const AERON_LOSS_REPORT_FILE: &[u8; 16] = b"loss-report.dat\0";
pub const AERON_LOSS_REPORTER_ENTRY_ALIGNMENT: u32 = 64;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct aeron_context_stct {
    _unused: [u8; 0],
}
pub type aeron_context_t = aeron_context_stct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct aeron_stct {
    _unused: [u8; 0],
}
pub type aeron_t = aeron_stct;
#[doc = " Structure used to hold information for a try_claim function call."]
pub type aeron_buffer_claim_t = aeron_buffer_claim_stct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct aeron_publication_stct {
    _unused: [u8; 0],
}
pub type aeron_publication_t = aeron_publication_stct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct aeron_exclusive_publication_stct {
    _unused: [u8; 0],
}
pub type aeron_exclusive_publication_t = aeron_exclusive_publication_stct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct aeron_header_stct {
    _unused: [u8; 0],
}
pub type aeron_header_t = aeron_header_stct;
#[repr(C, packed(4))]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_header_values_frame_stct {
    pub frame_length: i32,
    pub version: i8,
    pub flags: u8,
    pub type_: i16,
    pub term_offset: i32,
    pub session_id: i32,
    pub stream_id: i32,
    pub term_id: i32,
    pub reserved_value: i64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_header_values_frame_stct"]
        [::std::mem::size_of::<aeron_header_values_frame_stct>() - 32usize];
    ["Alignment of aeron_header_values_frame_stct"]
        [::std::mem::align_of::<aeron_header_values_frame_stct>() - 4usize];
    ["Offset of field: aeron_header_values_frame_stct::frame_length"]
        [::std::mem::offset_of!(aeron_header_values_frame_stct, frame_length) - 0usize];
    ["Offset of field: aeron_header_values_frame_stct::version"]
        [::std::mem::offset_of!(aeron_header_values_frame_stct, version) - 4usize];
    ["Offset of field: aeron_header_values_frame_stct::flags"]
        [::std::mem::offset_of!(aeron_header_values_frame_stct, flags) - 5usize];
    ["Offset of field: aeron_header_values_frame_stct::type_"]
        [::std::mem::offset_of!(aeron_header_values_frame_stct, type_) - 6usize];
    ["Offset of field: aeron_header_values_frame_stct::term_offset"]
        [::std::mem::offset_of!(aeron_header_values_frame_stct, term_offset) - 8usize];
    ["Offset of field: aeron_header_values_frame_stct::session_id"]
        [::std::mem::offset_of!(aeron_header_values_frame_stct, session_id) - 12usize];
    ["Offset of field: aeron_header_values_frame_stct::stream_id"]
        [::std::mem::offset_of!(aeron_header_values_frame_stct, stream_id) - 16usize];
    ["Offset of field: aeron_header_values_frame_stct::term_id"]
        [::std::mem::offset_of!(aeron_header_values_frame_stct, term_id) - 20usize];
    ["Offset of field: aeron_header_values_frame_stct::reserved_value"]
        [::std::mem::offset_of!(aeron_header_values_frame_stct, reserved_value) - 24usize];
};
pub type aeron_header_values_frame_t = aeron_header_values_frame_stct;
#[repr(C, packed(4))]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_header_values_stct {
    pub frame: aeron_header_values_frame_t,
    pub initial_term_id: i32,
    pub position_bits_to_shift: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_header_values_stct"]
        [::std::mem::size_of::<aeron_header_values_stct>() - 44usize];
    ["Alignment of aeron_header_values_stct"]
        [::std::mem::align_of::<aeron_header_values_stct>() - 4usize];
    ["Offset of field: aeron_header_values_stct::frame"]
        [::std::mem::offset_of!(aeron_header_values_stct, frame) - 0usize];
    ["Offset of field: aeron_header_values_stct::initial_term_id"]
        [::std::mem::offset_of!(aeron_header_values_stct, initial_term_id) - 32usize];
    ["Offset of field: aeron_header_values_stct::position_bits_to_shift"]
        [::std::mem::offset_of!(aeron_header_values_stct, position_bits_to_shift) - 36usize];
};
pub type aeron_header_values_t = aeron_header_values_stct;
#[repr(C, packed(4))]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_publication_error_values_stct {
    pub registration_id: i64,
    pub destination_registration_id: i64,
    pub session_id: i32,
    pub stream_id: i32,
    pub receiver_id: i64,
    pub group_tag: i64,
    pub address_type: i16,
    pub source_port: u16,
    pub source_address: [u8; 16usize],
    pub error_code: i32,
    pub error_message_length: i32,
    pub error_message: [u8; 1usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_publication_error_values_stct"]
        [::std::mem::size_of::<aeron_publication_error_values_stct>() - 72usize];
    ["Alignment of aeron_publication_error_values_stct"]
        [::std::mem::align_of::<aeron_publication_error_values_stct>() - 4usize];
    ["Offset of field: aeron_publication_error_values_stct::registration_id"]
        [::std::mem::offset_of!(aeron_publication_error_values_stct, registration_id) - 0usize];
    ["Offset of field: aeron_publication_error_values_stct::destination_registration_id"][::std::mem::offset_of!(
        aeron_publication_error_values_stct,
        destination_registration_id
    )
        - 8usize];
    ["Offset of field: aeron_publication_error_values_stct::session_id"]
        [::std::mem::offset_of!(aeron_publication_error_values_stct, session_id) - 16usize];
    ["Offset of field: aeron_publication_error_values_stct::stream_id"]
        [::std::mem::offset_of!(aeron_publication_error_values_stct, stream_id) - 20usize];
    ["Offset of field: aeron_publication_error_values_stct::receiver_id"]
        [::std::mem::offset_of!(aeron_publication_error_values_stct, receiver_id) - 24usize];
    ["Offset of field: aeron_publication_error_values_stct::group_tag"]
        [::std::mem::offset_of!(aeron_publication_error_values_stct, group_tag) - 32usize];
    ["Offset of field: aeron_publication_error_values_stct::address_type"]
        [::std::mem::offset_of!(aeron_publication_error_values_stct, address_type) - 40usize];
    ["Offset of field: aeron_publication_error_values_stct::source_port"]
        [::std::mem::offset_of!(aeron_publication_error_values_stct, source_port) - 42usize];
    ["Offset of field: aeron_publication_error_values_stct::source_address"]
        [::std::mem::offset_of!(aeron_publication_error_values_stct, source_address) - 44usize];
    ["Offset of field: aeron_publication_error_values_stct::error_code"]
        [::std::mem::offset_of!(aeron_publication_error_values_stct, error_code) - 60usize];
    ["Offset of field: aeron_publication_error_values_stct::error_message_length"][::std::mem::offset_of!(
        aeron_publication_error_values_stct,
        error_message_length
    ) - 64usize];
    ["Offset of field: aeron_publication_error_values_stct::error_message"]
        [::std::mem::offset_of!(aeron_publication_error_values_stct, error_message) - 68usize];
};
pub type aeron_publication_error_values_t = aeron_publication_error_values_stct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct aeron_subscription_stct {
    _unused: [u8; 0],
}
pub type aeron_subscription_t = aeron_subscription_stct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct aeron_image_stct {
    _unused: [u8; 0],
}
pub type aeron_image_t = aeron_image_stct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct aeron_counter_stct {
    _unused: [u8; 0],
}
pub type aeron_counter_t = aeron_counter_stct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct aeron_log_buffer_stct {
    _unused: [u8; 0],
}
pub type aeron_log_buffer_t = aeron_log_buffer_stct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct aeron_counters_reader_stct {
    _unused: [u8; 0],
}
pub type aeron_counters_reader_t = aeron_counters_reader_stct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct aeron_client_registering_resource_stct {
    _unused: [u8; 0],
}
pub type aeron_async_add_publication_t = aeron_client_registering_resource_stct;
pub type aeron_async_add_exclusive_publication_t = aeron_client_registering_resource_stct;
pub type aeron_async_add_subscription_t = aeron_client_registering_resource_stct;
pub type aeron_async_add_counter_t = aeron_client_registering_resource_stct;
pub type aeron_async_destination_t = aeron_client_registering_resource_stct;
pub type aeron_async_destination_by_id_t = aeron_client_registering_resource_stct;
pub type aeron_async_get_next_available_session_id_t = aeron_client_registering_resource_stct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct aeron_image_fragment_assembler_stct {
    _unused: [u8; 0],
}
pub type aeron_image_fragment_assembler_t = aeron_image_fragment_assembler_stct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct aeron_image_controlled_fragment_assembler_stct {
    _unused: [u8; 0],
}
pub type aeron_image_controlled_fragment_assembler_t =
    aeron_image_controlled_fragment_assembler_stct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct aeron_fragment_assembler_stct {
    _unused: [u8; 0],
}
pub type aeron_fragment_assembler_t = aeron_fragment_assembler_stct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct aeron_controlled_fragment_assembler_stct {
    _unused: [u8; 0],
}
pub type aeron_controlled_fragment_assembler_t = aeron_controlled_fragment_assembler_stct;
unsafe extern "C" {
    pub fn aeron_context_set_dir(
        context: *mut aeron_context_t,
        value: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_context_get_dir(context: *mut aeron_context_t) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn aeron_context_set_driver_timeout_ms(
        context: *mut aeron_context_t,
        value: u64,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_context_get_driver_timeout_ms(context: *mut aeron_context_t) -> u64;
}
unsafe extern "C" {
    pub fn aeron_context_set_keepalive_interval_ns(
        context: *mut aeron_context_t,
        value: u64,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_context_get_keepalive_interval_ns(context: *mut aeron_context_t) -> u64;
}
unsafe extern "C" {
    pub fn aeron_context_set_resource_linger_duration_ns(
        context: *mut aeron_context_t,
        value: u64,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_context_get_resource_linger_duration_ns(context: *mut aeron_context_t) -> u64;
}
unsafe extern "C" {
    pub fn aeron_context_set_idle_sleep_duration_ns(
        context: *mut aeron_context_t,
        value: u64,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_context_get_idle_sleep_duration_ns(context: *mut aeron_context_t) -> u64;
}
unsafe extern "C" {
    pub fn aeron_context_set_idle_strategy_init_args(
        context: *mut aeron_context_t,
        value: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_context_get_idle_strategy_init_args(
        context: *mut aeron_context_t,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn aeron_context_set_idle_strategy(
        context: *mut aeron_context_t,
        value: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_context_get_idle_strategy(
        context: *mut aeron_context_t,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn aeron_context_set_pre_touch_mapped_memory(
        context: *mut aeron_context_t,
        value: bool,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_context_get_pre_touch_mapped_memory(context: *mut aeron_context_t) -> bool;
}
unsafe extern "C" {
    pub fn aeron_context_set_client_name(
        context: *mut aeron_context_t,
        value: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_context_get_client_name(
        context: *mut aeron_context_t,
    ) -> *const ::std::os::raw::c_char;
}
#[doc = " The error handler to be called when an error occurs."]
pub type aeron_error_handler_t = ::std::option::Option<
    unsafe extern "C" fn(
        clientd: *mut ::std::os::raw::c_void,
        errcode: ::std::os::raw::c_int,
        message: *const ::std::os::raw::c_char,
    ),
>;
#[doc = " The error frame handler to be called when the driver notifies the client about an error frame being received.\n The data passed to this callback will only be valid for the lifetime of the callback. The user should use\n <code>aeron_publication_error_values_copy</code> if they require the data to live longer than that."]
pub type aeron_publication_error_frame_handler_t = ::std::option::Option<
    unsafe extern "C" fn(
        clientd: *mut ::std::os::raw::c_void,
        error_frame: *mut aeron_publication_error_values_t,
    ),
>;
unsafe extern "C" {
    #[doc = " Copy an existing aeron_publication_error_values_t to the supplied pointer. The caller is responsible for freeing the\n allocated memory using aeron_publication_error_values_delete when the copy is not longer required.\n\n @param dst to copy the values to.\n @param src to copy the values from.\n @return 0 if this is successful, -1 otherwise. Will set aeron_errcode() and aeron_errmsg() on failure."]
    pub fn aeron_publication_error_values_copy(
        dst: *mut *mut aeron_publication_error_values_t,
        src: *mut aeron_publication_error_values_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Delete a instance of aeron_publication_error_values_t that was created when making a copy\n (aeron_publication_error_values_copy). This should not be use on the pointer received via the aeron_frame_handler_t.\n @param to_delete to be deleted."]
    pub fn aeron_publication_error_values_delete(to_delete: *mut aeron_publication_error_values_t);
}
#[doc = " Generalised notification callback."]
pub type aeron_notification_t =
    ::std::option::Option<unsafe extern "C" fn(clientd: *mut ::std::os::raw::c_void)>;
unsafe extern "C" {
    pub fn aeron_context_set_error_handler(
        context: *mut aeron_context_t,
        handler: aeron_error_handler_t,
        clientd: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_context_get_error_handler(context: *mut aeron_context_t) -> aeron_error_handler_t;
}
unsafe extern "C" {
    pub fn aeron_context_get_error_handler_clientd(
        context: *mut aeron_context_t,
    ) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    pub fn aeron_context_set_publication_error_frame_handler(
        context: *mut aeron_context_t,
        handler: aeron_publication_error_frame_handler_t,
        clientd: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_context_get_publication_error_frame_handler(
        context: *mut aeron_context_t,
    ) -> aeron_publication_error_frame_handler_t;
}
unsafe extern "C" {
    pub fn aeron_context_get_publication_error_frame_handler_clientd(
        context: *mut aeron_context_t,
    ) -> *mut ::std::os::raw::c_void;
}
#[doc = " Function called by aeron_client_t to deliver notification that the media driver has added an aeron_publication_t\n or aeron_exclusive_publication_t successfully.\n\n Implementations should do the minimum work for passing off state to another thread for later processing.\n\n @param clientd to be returned in the call\n @param channel of the publication\n @param stream_id within the channel of the publication\n @param session_id of the publication\n @param correlation_id used by the publication"]
pub type aeron_on_new_publication_t = ::std::option::Option<
    unsafe extern "C" fn(
        clientd: *mut ::std::os::raw::c_void,
        channel: *const ::std::os::raw::c_char,
        stream_id: i32,
        session_id: i32,
        correlation_id: i64,
    ),
>;
unsafe extern "C" {
    pub fn aeron_context_set_on_new_publication(
        context: *mut aeron_context_t,
        handler: aeron_on_new_publication_t,
        clientd: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_context_get_on_new_publication(
        context: *mut aeron_context_t,
    ) -> aeron_on_new_publication_t;
}
unsafe extern "C" {
    pub fn aeron_context_get_on_new_publication_clientd(
        context: *mut aeron_context_t,
    ) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    pub fn aeron_context_set_on_new_exclusive_publication(
        context: *mut aeron_context_t,
        handler: aeron_on_new_publication_t,
        clientd: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_context_get_on_new_exclusive_publication(
        context: *mut aeron_context_t,
    ) -> aeron_on_new_publication_t;
}
unsafe extern "C" {
    pub fn aeron_context_get_on_new_exclusive_publication_clientd(
        context: *mut aeron_context_t,
    ) -> *mut ::std::os::raw::c_void;
}
#[doc = " Function called by aeron_client_t to deliver notification that the media driver has added an aeron_subscription_t\n successfully.\n\n Implementations should do the minimum work for handing off state to another thread for later processing.\n\n @param clientd to be returned in the call\n @param channel of the subscription\n @param stream_id within the channel of the subscription\n @param session_id of the subscription\n @param correlation_id used by the subscription"]
pub type aeron_on_new_subscription_t = ::std::option::Option<
    unsafe extern "C" fn(
        clientd: *mut ::std::os::raw::c_void,
        channel: *const ::std::os::raw::c_char,
        stream_id: i32,
        correlation_id: i64,
    ),
>;
unsafe extern "C" {
    pub fn aeron_context_set_on_new_subscription(
        context: *mut aeron_context_t,
        handler: aeron_on_new_subscription_t,
        clientd: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_context_get_on_new_subscription(
        context: *mut aeron_context_t,
    ) -> aeron_on_new_subscription_t;
}
unsafe extern "C" {
    pub fn aeron_context_get_on_new_subscription_clientd(
        context: *mut aeron_context_t,
    ) -> *mut ::std::os::raw::c_void;
}
#[doc = " Function called by aeron_client_t to deliver notifications that an aeron_image_t was added.\n\n @param clientd to be returned in the call.\n @param subscription that image is part of.\n @param image that has become available."]
pub type aeron_on_available_image_t = ::std::option::Option<
    unsafe extern "C" fn(
        clientd: *mut ::std::os::raw::c_void,
        subscription: *mut aeron_subscription_t,
        image: *mut aeron_image_t,
    ),
>;
#[doc = " Function called by aeron_client_t to deliver notifications that an aeron_image_t has been removed from use and\n should not be used any longer.\n\n @param clientd to be returned in the call.\n @param subscription that image is part of.\n @param image that has become unavailable."]
pub type aeron_on_unavailable_image_t = ::std::option::Option<
    unsafe extern "C" fn(
        clientd: *mut ::std::os::raw::c_void,
        subscription: *mut aeron_subscription_t,
        image: *mut aeron_image_t,
    ),
>;
#[doc = " Function called by aeron_client_t to deliver notifications that a counter has been added to the driver.\n\n @param clientd to be returned in the call.\n @param counters_reader that holds the counter.\n @param registration_id of the counter.\n @param counter_id of the counter."]
pub type aeron_on_available_counter_t = ::std::option::Option<
    unsafe extern "C" fn(
        clientd: *mut ::std::os::raw::c_void,
        counters_reader: *mut aeron_counters_reader_t,
        registration_id: i64,
        counter_id: i32,
    ),
>;
unsafe extern "C" {
    pub fn aeron_context_set_on_available_counter(
        context: *mut aeron_context_t,
        handler: aeron_on_available_counter_t,
        clientd: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_context_get_on_available_counter(
        context: *mut aeron_context_t,
    ) -> aeron_on_available_counter_t;
}
unsafe extern "C" {
    pub fn aeron_context_get_on_available_counter_clientd(
        context: *mut aeron_context_t,
    ) -> *mut ::std::os::raw::c_void;
}
#[doc = " Function called by aeron_client_t to deliver notifications that a counter has been removed from the driver.\n\n @param clientd to be returned in the call.\n @param counters_reader that holds the counter.\n @param registration_id of the counter.\n @param counter_id of the counter."]
pub type aeron_on_unavailable_counter_t = ::std::option::Option<
    unsafe extern "C" fn(
        clientd: *mut ::std::os::raw::c_void,
        counters_reader: *mut aeron_counters_reader_t,
        registration_id: i64,
        counter_id: i32,
    ),
>;
unsafe extern "C" {
    pub fn aeron_context_set_on_unavailable_counter(
        context: *mut aeron_context_t,
        handler: aeron_on_unavailable_counter_t,
        clientd: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_context_get_on_unavailable_counter(
        context: *mut aeron_context_t,
    ) -> aeron_on_unavailable_counter_t;
}
unsafe extern "C" {
    pub fn aeron_context_get_on_unavailable_counter_clientd(
        context: *mut aeron_context_t,
    ) -> *mut ::std::os::raw::c_void;
}
#[doc = " Function called by aeron_client_t to deliver notifications that the client is closing.\n\n @param clientd to be returned in the call."]
pub type aeron_on_close_client_t =
    ::std::option::Option<unsafe extern "C" fn(clientd: *mut ::std::os::raw::c_void)>;
unsafe extern "C" {
    pub fn aeron_context_set_on_close_client(
        context: *mut aeron_context_t,
        handler: aeron_on_close_client_t,
        clientd: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_context_get_on_close_client(
        context: *mut aeron_context_t,
    ) -> aeron_on_close_client_t;
}
unsafe extern "C" {
    pub fn aeron_context_get_on_close_client_clientd(
        context: *mut aeron_context_t,
    ) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    #[doc = " Whether to use an invoker to control the conductor agent or spawn a thread."]
    pub fn aeron_context_set_use_conductor_agent_invoker(
        context: *mut aeron_context_t,
        value: bool,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_context_get_use_conductor_agent_invoker(context: *mut aeron_context_t) -> bool;
}
pub type aeron_agent_on_start_func_t = ::std::option::Option<
    unsafe extern "C" fn(
        state: *mut ::std::os::raw::c_void,
        role_name: *const ::std::os::raw::c_char,
    ),
>;
unsafe extern "C" {
    pub fn aeron_context_set_agent_on_start_function(
        context: *mut aeron_context_t,
        value: aeron_agent_on_start_func_t,
        state: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_context_get_agent_on_start_function(
        context: *mut aeron_context_t,
    ) -> aeron_agent_on_start_func_t;
}
unsafe extern "C" {
    pub fn aeron_context_get_agent_on_start_state(
        context: *mut aeron_context_t,
    ) -> *mut ::std::os::raw::c_void;
}
unsafe extern "C" {
    #[doc = " Create a aeron_context_t struct and initialize with default values.\n\n @param context to create and initialize\n @return 0 for success and -1 for error."]
    pub fn aeron_context_init(context: *mut *mut aeron_context_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Close and delete aeron_context_t struct.\n\n @param context to close and delete\n @return 0 for success and -1 for error."]
    pub fn aeron_context_close(context: *mut aeron_context_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Create a aeron_t client struct and initialize from the aeron_context_t struct.\n\n The given aeron_context_t struct will be used exclusively by the client. Do not reuse between clients.\n\n @param aeron  client to create and initialize.\n @param context to use for initialization.\n @return 0 for success and -1 for error."]
    pub fn aeron_init(
        client: *mut *mut aeron_t,
        context: *mut aeron_context_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Start an aeron_t. This may spawn a thread for the Client Conductor.\n\n @param client to start.\n @return 0 for success and -1 for error."]
    pub fn aeron_start(client: *mut aeron_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Call the Conductor main do_work duty cycle once.\n\n Client must have been created with use conductor invoker set to true.\n\n @param client to call do_work duty cycle on.\n @return 0 for success and -1 for error."]
    pub fn aeron_main_do_work(client: *mut aeron_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Call the Conductor Idle Strategy.\n\n @param client to idle.\n @param work_count to pass to idle strategy."]
    pub fn aeron_main_idle_strategy(client: *mut aeron_t, work_count: ::std::os::raw::c_int);
}
unsafe extern "C" {
    #[doc = " Close and delete aeron_t struct.\n\n @param client to close and delete\n @return 0 for success and -1 for error."]
    pub fn aeron_close(client: *mut aeron_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Determines if the client has been closed, e.g. via a driver timeout. Don't call this method after calling\n aeron_close as that will have already freed the associated memory.\n\n @param client to check if closed.\n @return true if it has been closed, false otherwise."]
    pub fn aeron_is_closed(client: *mut aeron_t) -> bool;
}
unsafe extern "C" {
    #[doc = " Call stream_out to print the counter labels and values.\n\n @param client to get the counters from.\n @param stream_out to call for each label and value."]
    pub fn aeron_print_counters(
        client: *mut aeron_t,
        stream_out: ::std::option::Option<
            unsafe extern "C" fn(arg1: *const ::std::os::raw::c_char),
        >,
    );
}
unsafe extern "C" {
    #[doc = " Return the aeron_context_t that is in use by the given client.\n\n @param client to return the aeron_context_t for.\n @return the aeron_context_t for the given client or NULL for an error."]
    pub fn aeron_context(client: *mut aeron_t) -> *mut aeron_context_t;
}
unsafe extern "C" {
    #[doc = " Return the client id in use by the client.\n\n @param client to return the client id for.\n @return id value or -1 for an error."]
    pub fn aeron_client_id(client: *mut aeron_t) -> i64;
}
unsafe extern "C" {
    #[doc = " Return a unique correlation id from the driver.\n\n @param client to use to get the id.\n @return unique correlation id or -1 for an error."]
    pub fn aeron_next_correlation_id(client: *mut aeron_t) -> i64;
}
unsafe extern "C" {
    #[doc = " Asynchronously request next available session from the media driver. The session id will be unique for the\n connected media driver and given {@code stream_id}.\n\n @param async object to use for polling completion.\n @param client connected to the media driver.\n @param stream_id for which a new session id is requested. Media driver only checks for session clashes at the\n                 stream level.\n @return 0 for success or -1 for an error."]
    pub fn aeron_async_next_session_id(
        async_: *mut *mut aeron_async_get_next_available_session_id_t,
        client: *mut aeron_t,
        stream_id: i32,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Poll the completion of the aeron_async_next_session_id call.\n\n @param next_session_id to set if completed successfully.\n @param async to check for completion.\n @return 0 for not complete (try again), 1 for completed successfully, or -1 for an error."]
    pub fn aeron_async_next_session_id_poll(
        next_session_id: *mut i32,
        async_: *mut aeron_async_get_next_available_session_id_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Asynchronously add a publication using the given client and return an object to use to determine when the\n publication is available.\n\n @param async object to use for polling completion.\n @param client to add the publication to.\n @param uri for the channel of the publication.\n @param stream_id for the publication.\n @return 0 for success or -1 for an error."]
    pub fn aeron_async_add_publication(
        async_: *mut *mut aeron_async_add_publication_t,
        client: *mut aeron_t,
        uri: *const ::std::os::raw::c_char,
        stream_id: i32,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Poll the completion of the aeron_async_add_publication call.\n\n @param publication to set if completed successfully.\n @param async to check for completion.\n @return 0 for not complete (try again), 1 for completed successfully, or -1 for an error."]
    pub fn aeron_async_add_publication_poll(
        publication: *mut *mut aeron_publication_t,
        async_: *mut aeron_async_add_publication_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Cancel an in-progress <code>aeron_async_add_publication</code> operation.\n\n <p>\n Will eventually free the given <code>aeron_async_add_publication_t</code> instance. If a publication gets created by\n the time cancellation happens, it will get removed.\n\n <p>\n <em>Note:</em> The above guarantees only apply when a call to this method succeeds, i.e. return value is zero. If a\n return value is non-zero the operation won't be canceled and the <code>aeron_async_add_publication_t</code> instance\n won't be freed.\n\n @param client which the publication is being added to.\n @param async operation to be canceled. Must not be accessed after this call succeeds.\n @return 0 for success or -1 for error."]
    pub fn aeron_async_add_publication_cancel(
        client: *mut aeron_t,
        async_: *mut aeron_async_add_publication_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Asynchronously remove a publication.\n If there is an aeron_publication_t object for that publication, it will get closed and freed.\n\n @param registration_id of the publication to be removed.\n @param client which owns the publication.\n @param on_complete optional callback to execute once the publication has been removed. This may happen on a separate\n thread, so the caller should ensure that clientd has the appropriate lifetime. Use NULL if not needed.\n @param on_complete_clientd parameter to pass to the on_complete callback.\n @return 0 for success or -1 for error."]
    pub fn aeron_async_remove_publication(
        registration_id: i64,
        client: *mut aeron_t,
        on_complete: aeron_notification_t,
        on_complete_clientd: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Asynchronously add an exclusive publication using the given client and return an object to use to determine when the\n publication is available.\n\n @param async object to use for polling completion.\n @param client to add the publication to.\n @param uri for the channel of the publication.\n @param stream_id for the publication.\n @return 0 for success or -1 for an error."]
    pub fn aeron_async_add_exclusive_publication(
        async_: *mut *mut aeron_async_add_exclusive_publication_t,
        client: *mut aeron_t,
        uri: *const ::std::os::raw::c_char,
        stream_id: i32,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Poll the completion of the aeron_async_add_exclusive_publication call.\n\n @param publication to set if completed successfully.\n @param async to check for completion.\n @return 0 for not complete (try again), 1 for completed successfully, or -1 for an error."]
    pub fn aeron_async_add_exclusive_publication_poll(
        publication: *mut *mut aeron_exclusive_publication_t,
        async_: *mut aeron_async_add_exclusive_publication_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Cancel an in-progress <code>aeron_async_add_exclusive_publication</code> operation.\n\n <p>\n Will eventually free the given <code>aeron_async_add_exclusive_publication_t</code> instance. If a publication gets\n created by the time cancellation happens, it will get removed.\n\n <p>\n <em>Note:</em> The above guarantees only apply when a call to this method succeeds, i.e. return value is zero. If a\n return value is non-zero the operation won't be canceled and the <code>aeron_async_add_exclusive_publication_t</code>\n instance won't be freed.\n\n @param client which the exclusive publication is being added to.\n @param async operation to be canceled. Must not be accessed after this call succeeds.\n @return 0 for success or -1 for error."]
    pub fn aeron_async_add_exclusive_publication_cancel(
        client: *mut aeron_t,
        async_: *mut aeron_async_add_exclusive_publication_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Asynchronously remove an exclusive publication.\n If there is an aeron_exclusive_publication_t object for that publication, it will get closed and freed.\n\n @param registration_id of the exclusive publication to be removed.\n @param client which owns the exclusive publication.\n @param on_complete optional callback to execute once the exclusive publication has been removed. This may happen on\n a separate thread, so the caller should ensure that clientd has the appropriate lifetime. Use NULL if not needed.\n @param on_complete_clientd parameter to pass to the on_complete callback.\n @return 0 for success or -1 for error."]
    pub fn aeron_async_remove_exclusive_publication(
        registration_id: i64,
        client: *mut aeron_t,
        on_complete: aeron_notification_t,
        on_complete_clientd: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Asynchronously add a subscription using the given client and return an object to use to determine when the\n subscription is available.\n\n @param async object to use for polling completion.\n @param client to add the subscription to.\n @param uri for the channel of the subscription.\n @param stream_id for the subscription.\n @param on_available_image_handler to be called when images become available on the subscription.\n @param on_available_image_clientd to be passed when images become available on the subscription.\n @param on_unavailable_image_handler to be called when images go unavailable on the subscription.\n @param on_unavailable_image_clientd to be passed when images go unavailable on the subscription.\n @return 0 for success or -1 for an error."]
    pub fn aeron_async_add_subscription(
        async_: *mut *mut aeron_async_add_subscription_t,
        client: *mut aeron_t,
        uri: *const ::std::os::raw::c_char,
        stream_id: i32,
        on_available_image_handler: aeron_on_available_image_t,
        on_available_image_clientd: *mut ::std::os::raw::c_void,
        on_unavailable_image_handler: aeron_on_unavailable_image_t,
        on_unavailable_image_clientd: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Poll the completion of the aeron_async_add_subscription call.\n\n @param subscription to set if completed successfully.\n @param async to check for completion.\n @return 0 for not complete (try again), 1 for completed successfully, or -1 for an error."]
    pub fn aeron_async_add_subscription_poll(
        subscription: *mut *mut aeron_subscription_t,
        async_: *mut aeron_async_add_subscription_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Cancel an in-progress aeron_async_add_subscription operation.\n\n <p>\n Will eventually free the given <code>aeron_async_add_subscription_t</code> instance. If a subscription gets created\n by the time cancellation happens, it will get removed.\n\n <p>\n <em>Note:</em> The above guarantees only apply when a call to this method succeeds, i.e. return value is zero. If a\n return value is non-zero the operation won't be canceled and the <code>aeron_async_add_subscription_t</code> instance\n won't be freed.\n\n @param client which the subscription is being added to.\n @param async operation to be canceled. Must not be accessed after this call succeeds.\n @return 0 for success or -1 for error."]
    pub fn aeron_async_add_subscription_cancel(
        client: *mut aeron_t,
        async_: *mut aeron_async_add_subscription_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Asynchronously remove a subscription.\n If there is an aeron_subscription_t object for that subscription, it will get closed and freed.\n\n @param registration_id of the subscription to be removed.\n @param client which owns the subscription.\n @param on_complete optional callback to execute once the subscription has been removed. This may happen on a separate\n thread, so the caller should ensure that clientd has the appropriate lifetime. Use NULL if not needed.\n @param on_complete_clientd parameter to pass to the on_complete callback.\n @return 0 for success or -1 for error."]
    pub fn aeron_async_remove_subscription(
        registration_id: i64,
        client: *mut aeron_t,
        on_complete: aeron_notification_t,
        on_complete_clientd: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Return a reference to the counters reader of the given client.\n\n The aeron_counters_reader_t is maintained by the client. And should not be freed.\n\n @param client that contains the counters reader.\n @return aeron_counters_reader_t or NULL for error."]
    pub fn aeron_counters_reader(client: *mut aeron_t) -> *mut aeron_counters_reader_t;
}
unsafe extern "C" {
    #[doc = " Asynchronously add a counter using the given client and return an object to use to determine when the\n counter is available.\n\n @param async object to use for polling completion.\n @param client to add the counter to.\n @param type_id for the counter.\n @param key_buffer for the counter.\n @param key_buffer_length for the counter.\n @param label_buffer for the counter.\n @param label_buffer_length for the counter.\n @return 0 for success or -1 for an error."]
    pub fn aeron_async_add_counter(
        async_: *mut *mut aeron_async_add_counter_t,
        client: *mut aeron_t,
        type_id: i32,
        key_buffer: *const u8,
        key_buffer_length: usize,
        label_buffer: *const ::std::os::raw::c_char,
        label_buffer_length: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Poll the completion of the <code>aeron_async_add_counter</code> or <code>aeron_async_add_static_counter</code> calls.\n\n @param counter to set if completed successfully.\n @param async to check for completion.\n @return 0 for not complete (try again), 1 for completed successfully, or -1 for an error."]
    pub fn aeron_async_add_counter_poll(
        counter: *mut *mut aeron_counter_t,
        async_: *mut aeron_async_add_counter_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Cancel an in-progress <code>aeron_async_add_counter</code> operation. Not applicable to\n <code>aeron_async_add_static_counter</code>, i.e. attempt to cancel static counter will fail with an error.\n\n <p>\n Will eventually free the given <code>aeron_async_add_counter_t</code> instance. If a counter gets created by the time\n cancellation happens, it will get removed.\n\n <p>\n <em>Note:</em> The above guarantees only apply when a call to this method succeeds, i.e. return value is zero. If a\n return value is non-zero the operation won't be canceled and the <code>aeron_async_add_counter_t</code> instance\n won't be freed.\n\n @param client which the counter is being added to.\n @param async operation to be canceled. Must not be accessed after this call succeeds.\n @return 0 for success or -1 for error."]
    pub fn aeron_async_add_counter_cancel(
        client: *mut aeron_t,
        async_: *mut aeron_async_add_counter_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Asynchronously remove a counter. Not applicable to static counters.\n If there is an aeron_counter_t object for that counter, it will get closed and freed.\n\n @param registration_id of the counter to be removed.\n @param client which owns the counter.\n @param on_complete optional callback to execute once the counter has been removed. This may happen on a separate\n thread, so the caller should ensure that clientd has the appropriate lifetime. Use NULL if not needed.\n @param on_complete_clientd parameter to pass to the on_complete callback.\n @return 0 for success or -1 for error."]
    pub fn aeron_async_remove_counter(
        registration_id: i64,
        client: *mut aeron_t,
        on_complete: aeron_notification_t,
        on_complete_clientd: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Asynchronously allocates or returns an existing static counter instance using specified <code>type_id</code> and\n <code>registration_id</code>. Such counter cannot be deleted and its lifecycle is decoupled from the client that created it.\n Returns an object to use to determine when the counter is available.\n\n @param async object to use for polling completion.\n @param client to add the counter to.\n @param type_id for the counter.\n @param key_buffer for the counter.\n @param key_buffer_length for the counter.\n @param label_buffer for the counter.\n @param label_buffer_length for the counter.\n @param registration_id that uniquely identifies the counter.\n @return 0 for success or -1 for an error."]
    pub fn aeron_async_add_static_counter(
        async_: *mut *mut aeron_async_add_counter_t,
        client: *mut aeron_t,
        type_id: i32,
        key_buffer: *const u8,
        key_buffer_length: usize,
        label_buffer: *const ::std::os::raw::c_char,
        label_buffer_length: usize,
        registration_id: i64,
    ) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_on_available_counter_pair_stct {
    pub handler: aeron_on_available_counter_t,
    pub clientd: *mut ::std::os::raw::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_on_available_counter_pair_stct"]
        [::std::mem::size_of::<aeron_on_available_counter_pair_stct>() - 16usize];
    ["Alignment of aeron_on_available_counter_pair_stct"]
        [::std::mem::align_of::<aeron_on_available_counter_pair_stct>() - 8usize];
    ["Offset of field: aeron_on_available_counter_pair_stct::handler"]
        [::std::mem::offset_of!(aeron_on_available_counter_pair_stct, handler) - 0usize];
    ["Offset of field: aeron_on_available_counter_pair_stct::clientd"]
        [::std::mem::offset_of!(aeron_on_available_counter_pair_stct, clientd) - 8usize];
};
impl Default for aeron_on_available_counter_pair_stct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type aeron_on_available_counter_pair_t = aeron_on_available_counter_pair_stct;
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_on_unavailable_counter_pair_stct {
    pub handler: aeron_on_unavailable_counter_t,
    pub clientd: *mut ::std::os::raw::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_on_unavailable_counter_pair_stct"]
        [::std::mem::size_of::<aeron_on_unavailable_counter_pair_stct>() - 16usize];
    ["Alignment of aeron_on_unavailable_counter_pair_stct"]
        [::std::mem::align_of::<aeron_on_unavailable_counter_pair_stct>() - 8usize];
    ["Offset of field: aeron_on_unavailable_counter_pair_stct::handler"]
        [::std::mem::offset_of!(aeron_on_unavailable_counter_pair_stct, handler) - 0usize];
    ["Offset of field: aeron_on_unavailable_counter_pair_stct::clientd"]
        [::std::mem::offset_of!(aeron_on_unavailable_counter_pair_stct, clientd) - 8usize];
};
impl Default for aeron_on_unavailable_counter_pair_stct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type aeron_on_unavailable_counter_pair_t = aeron_on_unavailable_counter_pair_stct;
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_on_close_client_pair_stct {
    pub handler: aeron_on_close_client_t,
    pub clientd: *mut ::std::os::raw::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_on_close_client_pair_stct"]
        [::std::mem::size_of::<aeron_on_close_client_pair_stct>() - 16usize];
    ["Alignment of aeron_on_close_client_pair_stct"]
        [::std::mem::align_of::<aeron_on_close_client_pair_stct>() - 8usize];
    ["Offset of field: aeron_on_close_client_pair_stct::handler"]
        [::std::mem::offset_of!(aeron_on_close_client_pair_stct, handler) - 0usize];
    ["Offset of field: aeron_on_close_client_pair_stct::clientd"]
        [::std::mem::offset_of!(aeron_on_close_client_pair_stct, clientd) - 8usize];
};
impl Default for aeron_on_close_client_pair_stct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type aeron_on_close_client_pair_t = aeron_on_close_client_pair_stct;
unsafe extern "C" {
    #[doc = " Add a handler to be called when a new counter becomes available.\n\n NOTE: This function blocks until the handler is added by the client conductor thread.\n\n @param client for the counter\n @param pair holding the handler to call and a clientd to pass when called.\n @return 0 for success and -1 for error"]
    pub fn aeron_add_available_counter_handler(
        client: *mut aeron_t,
        pair: *mut aeron_on_available_counter_pair_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Remove a previously added handler to be called when a new counter becomes available.\n\n NOTE: This function blocks until the handler is removed by the client conductor thread.\n\n @param client for the counter\n @param pair holding the handler to call and a clientd to pass when called.\n @return 0 for success and -1 for error"]
    pub fn aeron_remove_available_counter_handler(
        client: *mut aeron_t,
        pair: *mut aeron_on_available_counter_pair_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Add a handler to be called when a new counter becomes unavailable or goes away.\n\n NOTE: This function blocks until the handler is added by the client conductor thread.\n\n @param client for the counter\n @param pair holding the handler to call and a clientd to pass when called.\n @return 0 for success and -1 for error"]
    pub fn aeron_add_unavailable_counter_handler(
        client: *mut aeron_t,
        pair: *mut aeron_on_unavailable_counter_pair_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Remove a previously added handler to be called when a new counter becomes unavailable or goes away.\n\n NOTE: This function blocks until the handler is removed by the client conductor thread.\n\n @param client for the counter\n @param pair holding the handler to call and a clientd to pass when called.\n @return 0 for success and -1 for error"]
    pub fn aeron_remove_unavailable_counter_handler(
        client: *mut aeron_t,
        pair: *mut aeron_on_unavailable_counter_pair_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Add a handler to be called when client is closed.\n\n NOTE: This function blocks until the handler is added by the client conductor thread.\n\n @param client for the counter\n @param pair holding the handler to call and a clientd to pass when called.\n @return 0 for success and -1 for error"]
    pub fn aeron_add_close_handler(
        client: *mut aeron_t,
        pair: *mut aeron_on_close_client_pair_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Remove a previously added handler to be called when client is closed.\n\n NOTE: This function blocks until the handler is removed by the client conductor thread.\n\n @param client for the counter\n @param pair holding the handler to call and a clientd to pass when called.\n @return 0 for success and -1 for error"]
    pub fn aeron_remove_close_handler(
        client: *mut aeron_t,
        pair: *mut aeron_on_close_client_pair_t,
    ) -> ::std::os::raw::c_int;
}
#[repr(C, packed(4))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_counter_value_descriptor_stct {
    pub counter_value: i64,
    pub registration_id: i64,
    pub owner_id: i64,
    pub reference_id: i64,
    pub pad1: [u8; 96usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_counter_value_descriptor_stct"]
        [::std::mem::size_of::<aeron_counter_value_descriptor_stct>() - 128usize];
    ["Alignment of aeron_counter_value_descriptor_stct"]
        [::std::mem::align_of::<aeron_counter_value_descriptor_stct>() - 4usize];
    ["Offset of field: aeron_counter_value_descriptor_stct::counter_value"]
        [::std::mem::offset_of!(aeron_counter_value_descriptor_stct, counter_value) - 0usize];
    ["Offset of field: aeron_counter_value_descriptor_stct::registration_id"]
        [::std::mem::offset_of!(aeron_counter_value_descriptor_stct, registration_id) - 8usize];
    ["Offset of field: aeron_counter_value_descriptor_stct::owner_id"]
        [::std::mem::offset_of!(aeron_counter_value_descriptor_stct, owner_id) - 16usize];
    ["Offset of field: aeron_counter_value_descriptor_stct::reference_id"]
        [::std::mem::offset_of!(aeron_counter_value_descriptor_stct, reference_id) - 24usize];
    ["Offset of field: aeron_counter_value_descriptor_stct::pad1"]
        [::std::mem::offset_of!(aeron_counter_value_descriptor_stct, pad1) - 32usize];
};
impl Default for aeron_counter_value_descriptor_stct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type aeron_counter_value_descriptor_t = aeron_counter_value_descriptor_stct;
#[repr(C, packed(4))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_counter_metadata_descriptor_stct {
    pub state: i32,
    pub type_id: i32,
    pub free_for_reuse_deadline_ms: i64,
    pub key: [u8; 112usize],
    pub label_length: i32,
    pub label: [u8; 380usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_counter_metadata_descriptor_stct"]
        [::std::mem::size_of::<aeron_counter_metadata_descriptor_stct>() - 512usize];
    ["Alignment of aeron_counter_metadata_descriptor_stct"]
        [::std::mem::align_of::<aeron_counter_metadata_descriptor_stct>() - 4usize];
    ["Offset of field: aeron_counter_metadata_descriptor_stct::state"]
        [::std::mem::offset_of!(aeron_counter_metadata_descriptor_stct, state) - 0usize];
    ["Offset of field: aeron_counter_metadata_descriptor_stct::type_id"]
        [::std::mem::offset_of!(aeron_counter_metadata_descriptor_stct, type_id) - 4usize];
    ["Offset of field: aeron_counter_metadata_descriptor_stct::free_for_reuse_deadline_ms"][::std::mem::offset_of!(
        aeron_counter_metadata_descriptor_stct,
        free_for_reuse_deadline_ms
    )
        - 8usize];
    ["Offset of field: aeron_counter_metadata_descriptor_stct::key"]
        [::std::mem::offset_of!(aeron_counter_metadata_descriptor_stct, key) - 16usize];
    ["Offset of field: aeron_counter_metadata_descriptor_stct::label_length"]
        [::std::mem::offset_of!(aeron_counter_metadata_descriptor_stct, label_length) - 128usize];
    ["Offset of field: aeron_counter_metadata_descriptor_stct::label"]
        [::std::mem::offset_of!(aeron_counter_metadata_descriptor_stct, label) - 132usize];
};
impl Default for aeron_counter_metadata_descriptor_stct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type aeron_counter_metadata_descriptor_t = aeron_counter_metadata_descriptor_stct;
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_counters_reader_buffers_stct {
    pub values: *mut u8,
    pub metadata: *mut u8,
    pub values_length: usize,
    pub metadata_length: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_counters_reader_buffers_stct"]
        [::std::mem::size_of::<aeron_counters_reader_buffers_stct>() - 32usize];
    ["Alignment of aeron_counters_reader_buffers_stct"]
        [::std::mem::align_of::<aeron_counters_reader_buffers_stct>() - 8usize];
    ["Offset of field: aeron_counters_reader_buffers_stct::values"]
        [::std::mem::offset_of!(aeron_counters_reader_buffers_stct, values) - 0usize];
    ["Offset of field: aeron_counters_reader_buffers_stct::metadata"]
        [::std::mem::offset_of!(aeron_counters_reader_buffers_stct, metadata) - 8usize];
    ["Offset of field: aeron_counters_reader_buffers_stct::values_length"]
        [::std::mem::offset_of!(aeron_counters_reader_buffers_stct, values_length) - 16usize];
    ["Offset of field: aeron_counters_reader_buffers_stct::metadata_length"]
        [::std::mem::offset_of!(aeron_counters_reader_buffers_stct, metadata_length) - 24usize];
};
impl Default for aeron_counters_reader_buffers_stct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type aeron_counters_reader_buffers_t = aeron_counters_reader_buffers_stct;
unsafe extern "C" {
    #[doc = " Get buffer pointers and lengths for the counters reader.\n\n @param reader reader containing the buffers.\n @param buffers output structure to return the buffers.\n @return -1 on failure, 0 on success."]
    pub fn aeron_counters_reader_get_buffers(
        reader: *mut aeron_counters_reader_t,
        buffers: *mut aeron_counters_reader_buffers_t,
    ) -> ::std::os::raw::c_int;
}
#[doc = " Function called by aeron_counters_reader_foreach_counter for each counter in the aeron_counters_reader_t.\n\n @param value of the counter.\n @param id of the counter.\n @param label for the counter.\n @param label_length for the counter.\n @param clientd to be returned in the call"]
pub type aeron_counters_reader_foreach_counter_func_t = ::std::option::Option<
    unsafe extern "C" fn(
        value: i64,
        id: i32,
        type_id: i32,
        key: *const u8,
        key_length: usize,
        label: *const ::std::os::raw::c_char,
        label_length: usize,
        clientd: *mut ::std::os::raw::c_void,
    ),
>;
unsafe extern "C" {
    #[doc = " Iterate over the counters in the counters_reader and call the given function for each counter.\n\n @param counters_reader to iterate over.\n @param func to call for each counter.\n @param clientd to pass for each call to func."]
    pub fn aeron_counters_reader_foreach_counter(
        counters_reader: *mut aeron_counters_reader_t,
        func: aeron_counters_reader_foreach_counter_func_t,
        clientd: *mut ::std::os::raw::c_void,
    );
}
unsafe extern "C" {
    #[doc = " Iterate over allocated counters and find the first matching a given type id and registration id.\n\n @param counters_reader\n @param type_id to find.\n @param registration_id to find.\n @return the counter id if found otherwise AERON_NULL_COUNTER_ID."]
    pub fn aeron_counters_reader_find_by_type_id_and_registration_id(
        counters_reader: *mut aeron_counters_reader_t,
        type_id: i32,
        registration_id: i64,
    ) -> i32;
}
unsafe extern "C" {
    #[doc = " Get the current max counter id.\n\n @param reader to query\n @return -1 on failure, max counter id on success."]
    pub fn aeron_counters_reader_max_counter_id(reader: *mut aeron_counters_reader_t) -> i32;
}
unsafe extern "C" {
    #[doc = " Get the address for a counter.\n\n @param counters_reader that contains the counter\n @param counter_id to find\n @return address of the counter value"]
    pub fn aeron_counters_reader_addr(
        counters_reader: *mut aeron_counters_reader_t,
        counter_id: i32,
    ) -> *mut i64;
}
unsafe extern "C" {
    #[doc = " Get the registration id assigned to a counter.\n\n @param counters_reader representing the this pointer.\n @param counter_id      for which the registration id is requested.\n @param registration_id pointer for value to be set on success.\n @return -1 on failure, 0 on success."]
    pub fn aeron_counters_reader_counter_registration_id(
        counters_reader: *mut aeron_counters_reader_t,
        counter_id: i32,
        registration_id: *mut i64,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get the owner id assigned to a counter which will typically be the client id.\n\n @param counters_reader representing the this pointer.\n @param counter_id      for which the owner id is requested.\n @param owner_id        pointer for value to be set on success.\n @return -1 on failure, 0 on success."]
    pub fn aeron_counters_reader_counter_owner_id(
        counters_reader: *mut aeron_counters_reader_t,
        counter_id: i32,
        owner_id: *mut i64,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get the reference id assigned to a counter which will typically be the registration id of an associated Image,\n Subscription, Publication, etc.\n\n @param counters_reader representing the this pointer.\n @param counter_id      for which the reference id is requested.\n @param reference_id    pointer for value to be set on success.\n @return -1 on failure, 0 on success."]
    pub fn aeron_counters_reader_counter_reference_id(
        counters_reader: *mut aeron_counters_reader_t,
        counter_id: i32,
        reference_id: *mut i64,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get the state for a counter.\n\n @param counters_reader that contains the counter\n @param counter_id to find\n @param state out pointer for the current state to be stored in.\n @return -1 on failure, 0 on success."]
    pub fn aeron_counters_reader_counter_state(
        counters_reader: *mut aeron_counters_reader_t,
        counter_id: i32,
        state: *mut i32,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get the type id for a counter.\n\n @param counters_reader that contains the counter\n @param counter_id to find\n @param type id out pointer for the current state to be stored in.\n @return -1 on failure, 0 on success."]
    pub fn aeron_counters_reader_counter_type_id(
        counters_reader: *mut aeron_counters_reader_t,
        counter_id: i32,
        type_id: *mut i32,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get a pointer to the key of a counter's metadata\n\n @param counters_reader that contains the counter\n @param counter_id to find\n @param key_p out pointer set to location of metadata key\n @return -1 on failure, 0 on success."]
    pub fn aeron_counters_reader_metadata_key(
        counters_reader: *mut aeron_counters_reader_t,
        counter_id: i32,
        key_p: *mut *mut u8,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get the label for a counter.\n\n @param counters_reader that contains the counter\n @param counter_id to find\n @param buffer to store the counter in.\n @param buffer_length length of the output buffer\n @return -1 on failure, number of characters copied to buffer on success."]
    pub fn aeron_counters_reader_counter_label(
        counters_reader: *mut aeron_counters_reader_t,
        counter_id: i32,
        buffer: *mut ::std::os::raw::c_char,
        buffer_length: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get the free for reuse deadline (ms) for a counter.\n\n @param counters_reader that contains the counter.\n @param counter_id to find.\n @param deadline_ms output value to store the deadline.\n @return -1 on failure, 0 on success."]
    pub fn aeron_counters_reader_free_for_reuse_deadline_ms(
        counters_reader: *mut aeron_counters_reader_t,
        counter_id: i32,
        deadline_ms: *mut i64,
    ) -> ::std::os::raw::c_int;
}
#[doc = " Function called when filling in the reserved value field of a message.\n\n @param clientd passed to the offer function.\n @param buffer of the entire frame, including Aeron data header.\n @param frame_length of the entire frame."]
pub type aeron_reserved_value_supplier_t = ::std::option::Option<
    unsafe extern "C" fn(
        clientd: *mut ::std::os::raw::c_void,
        buffer: *mut u8,
        frame_length: usize,
    ) -> i64,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_iovec_stct {
    pub iov_base: *mut u8,
    pub iov_len: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_iovec_stct"][::std::mem::size_of::<aeron_iovec_stct>() - 16usize];
    ["Alignment of aeron_iovec_stct"][::std::mem::align_of::<aeron_iovec_stct>() - 8usize];
    ["Offset of field: aeron_iovec_stct::iov_base"]
        [::std::mem::offset_of!(aeron_iovec_stct, iov_base) - 0usize];
    ["Offset of field: aeron_iovec_stct::iov_len"]
        [::std::mem::offset_of!(aeron_iovec_stct, iov_len) - 8usize];
};
impl Default for aeron_iovec_stct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type aeron_iovec_t = aeron_iovec_stct;
#[doc = " Structure used to hold information for a try_claim function call."]
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_buffer_claim_stct {
    pub frame_header: *mut u8,
    pub data: *mut u8,
    pub length: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_buffer_claim_stct"][::std::mem::size_of::<aeron_buffer_claim_stct>() - 24usize];
    ["Alignment of aeron_buffer_claim_stct"]
        [::std::mem::align_of::<aeron_buffer_claim_stct>() - 8usize];
    ["Offset of field: aeron_buffer_claim_stct::frame_header"]
        [::std::mem::offset_of!(aeron_buffer_claim_stct, frame_header) - 0usize];
    ["Offset of field: aeron_buffer_claim_stct::data"]
        [::std::mem::offset_of!(aeron_buffer_claim_stct, data) - 8usize];
    ["Offset of field: aeron_buffer_claim_stct::length"]
        [::std::mem::offset_of!(aeron_buffer_claim_stct, length) - 16usize];
};
impl Default for aeron_buffer_claim_stct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
unsafe extern "C" {
    #[doc = " Commit the given buffer_claim as a complete message available for consumption.\n\n @param buffer_claim to commit.\n @return 0 for success or -1 for error."]
    pub fn aeron_buffer_claim_commit(
        buffer_claim: *mut aeron_buffer_claim_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Abort the given buffer_claim and assign its position as padding.\n\n @param buffer_claim to abort.\n @return 0 for success or -1 for error."]
    pub fn aeron_buffer_claim_abort(
        buffer_claim: *mut aeron_buffer_claim_t,
    ) -> ::std::os::raw::c_int;
}
#[doc = " Configuration for a publication that does not change during it's lifetime."]
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_publication_constants_stct {
    #[doc = " Media address for delivery to the channel.\n\n This returns a pointer only valid for the lifetime of the publication."]
    pub channel: *const ::std::os::raw::c_char,
    #[doc = " The registration used to register this Publication with the media driver by the first publisher."]
    pub original_registration_id: i64,
    #[doc = " Get the registration id used to register this Publication with the media driver.\n\n If this value is different from the original_registration_id then a previous active registration exists."]
    pub registration_id: i64,
    #[doc = " The maximum possible position this stream can reach due to its term buffer length.\n\n Maximum possible position is term-length times 2^31 in bytes."]
    pub max_possible_position: i64,
    #[doc = " Number of bits to right shift a position to get a term count for how far the stream has progressed."]
    pub position_bits_to_shift: usize,
    #[doc = " Get the length in bytes for each term partition in the log buffer."]
    pub term_buffer_length: usize,
    #[doc = " Maximum message length supported in bytes. Messages may be made of multiple fragments if greater than\n MTU length."]
    pub max_message_length: usize,
    #[doc = " Maximum length of a message payload that fits within a message fragment.\n\n This is the MTU length minus the message fragment header length."]
    pub max_payload_length: usize,
    #[doc = " Stream id of the publication."]
    pub stream_id: i32,
    #[doc = " Session id of the publication."]
    pub session_id: i32,
    #[doc = " The initial term id assigned when this publication was created. This can be used to determine how many\n terms have passed since creation."]
    pub initial_term_id: i32,
    #[doc = " Counter id for the publication limit."]
    pub publication_limit_counter_id: i32,
    #[doc = " Counter id for the channel status indicator"]
    pub channel_status_indicator_id: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_publication_constants_stct"]
        [::std::mem::size_of::<aeron_publication_constants_stct>() - 88usize];
    ["Alignment of aeron_publication_constants_stct"]
        [::std::mem::align_of::<aeron_publication_constants_stct>() - 8usize];
    ["Offset of field: aeron_publication_constants_stct::channel"]
        [::std::mem::offset_of!(aeron_publication_constants_stct, channel) - 0usize];
    ["Offset of field: aeron_publication_constants_stct::original_registration_id"][::std::mem::offset_of!(
        aeron_publication_constants_stct,
        original_registration_id
    ) - 8usize];
    ["Offset of field: aeron_publication_constants_stct::registration_id"]
        [::std::mem::offset_of!(aeron_publication_constants_stct, registration_id) - 16usize];
    ["Offset of field: aeron_publication_constants_stct::max_possible_position"]
        [::std::mem::offset_of!(aeron_publication_constants_stct, max_possible_position) - 24usize];
    ["Offset of field: aeron_publication_constants_stct::position_bits_to_shift"][::std::mem::offset_of!(
        aeron_publication_constants_stct,
        position_bits_to_shift
    ) - 32usize];
    ["Offset of field: aeron_publication_constants_stct::term_buffer_length"]
        [::std::mem::offset_of!(aeron_publication_constants_stct, term_buffer_length) - 40usize];
    ["Offset of field: aeron_publication_constants_stct::max_message_length"]
        [::std::mem::offset_of!(aeron_publication_constants_stct, max_message_length) - 48usize];
    ["Offset of field: aeron_publication_constants_stct::max_payload_length"]
        [::std::mem::offset_of!(aeron_publication_constants_stct, max_payload_length) - 56usize];
    ["Offset of field: aeron_publication_constants_stct::stream_id"]
        [::std::mem::offset_of!(aeron_publication_constants_stct, stream_id) - 64usize];
    ["Offset of field: aeron_publication_constants_stct::session_id"]
        [::std::mem::offset_of!(aeron_publication_constants_stct, session_id) - 68usize];
    ["Offset of field: aeron_publication_constants_stct::initial_term_id"]
        [::std::mem::offset_of!(aeron_publication_constants_stct, initial_term_id) - 72usize];
    ["Offset of field: aeron_publication_constants_stct::publication_limit_counter_id"][::std::mem::offset_of!(
        aeron_publication_constants_stct,
        publication_limit_counter_id
    )
        - 76usize];
    ["Offset of field: aeron_publication_constants_stct::channel_status_indicator_id"][::std::mem::offset_of!(
        aeron_publication_constants_stct,
        channel_status_indicator_id
    ) - 80usize];
};
impl Default for aeron_publication_constants_stct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Configuration for a publication that does not change during it's lifetime."]
pub type aeron_publication_constants_t = aeron_publication_constants_stct;
unsafe extern "C" {
    #[doc = " Non-blocking publish of a buffer containing a message.\n\n @param publication to publish on.\n @param buffer to publish.\n @param length of the buffer.\n @param reserved_value_supplier to use for setting the reserved value field or NULL.\n @param clientd to pass to the reserved_value_supplier.\n @return the new stream position otherwise a negative error value."]
    pub fn aeron_publication_offer(
        publication: *mut aeron_publication_t,
        buffer: *const u8,
        length: usize,
        reserved_value_supplier: aeron_reserved_value_supplier_t,
        clientd: *mut ::std::os::raw::c_void,
    ) -> i64;
}
unsafe extern "C" {
    #[doc = " Non-blocking publish by gathering buffer vectors into a message.\n\n @param publication to publish on.\n @param iov array for the vectors\n @param iovcnt of the number of vectors\n @param reserved_value_supplier to use for setting the reserved value field or NULL.\n @param clientd to pass to the reserved_value_supplier.\n @return the new stream position otherwise a negative error value."]
    pub fn aeron_publication_offerv(
        publication: *mut aeron_publication_t,
        iov: *mut aeron_iovec_t,
        iovcnt: usize,
        reserved_value_supplier: aeron_reserved_value_supplier_t,
        clientd: *mut ::std::os::raw::c_void,
    ) -> i64;
}
unsafe extern "C" {
    #[doc = " Try to claim a range in the publication log into which a message can be written with zero copy semantics.\n Once the message has been written then aeron_buffer_claim_commit should be called thus making it available.\n A claim length cannot be greater than max payload length.\n <p>\n <b>Note:</b> This method can only be used for message lengths less than MTU length minus header.\n If the claim is held for more than the aeron.publication.unblock.timeout system property then the driver will\n assume the publication thread is dead and will unblock the claim thus allowing other threads to make progress\n and other claims to be sent to reach end-of-stream (EOS).\n\n @code\n aeron_buffer_claim_t buffer_claim;\n\n if (aeron_publication_try_claim(publication, length, &buffer_claim) > 0L)\n {\n     // work with buffer_claim->data directly.\n     aeron_buffer_claim_commit(&buffer_claim);\n }\n @endcode\n\n @param publication to publish to.\n @param length of the message.\n @param buffer_claim to be populated if the claim succeeds.\n @return the new stream position otherwise a negative error value."]
    pub fn aeron_publication_try_claim(
        publication: *mut aeron_publication_t,
        length: usize,
        buffer_claim: *mut aeron_buffer_claim_t,
    ) -> i64;
}
unsafe extern "C" {
    #[doc = " Get the status of the media channel for this publication.\n <p>\n The status will be ERRORED (-1) if a socket exception occurs on setup and ACTIVE (1) if all is well.\n\n @param publication to check status of.\n @return 1 for ACTIVE, -1 for ERRORED"]
    pub fn aeron_publication_channel_status(publication: *mut aeron_publication_t) -> i64;
}
unsafe extern "C" {
    #[doc = " Has the publication closed?\n\n @param publication to check\n @return true if this publication is closed."]
    pub fn aeron_publication_is_closed(publication: *mut aeron_publication_t) -> bool;
}
unsafe extern "C" {
    #[doc = " Has the publication seen an active Subscriber recently?\n\n @param publication to check.\n @return true if this publication has recently seen an active subscriber otherwise false."]
    pub fn aeron_publication_is_connected(publication: *mut aeron_publication_t) -> bool;
}
unsafe extern "C" {
    #[doc = " Fill in a structure with the constants in use by a publication.\n\n @param publication to get the constants for.\n @param constants structure to fill in with the constants\n @return 0 for success and -1 for error."]
    pub fn aeron_publication_constants(
        publication: *mut aeron_publication_t,
        constants: *mut aeron_publication_constants_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get the current position to which the publication has advanced for this stream.\n\n @param publication to query.\n @return the current position to which the publication has advanced for this stream or a negative error value."]
    pub fn aeron_publication_position(publication: *mut aeron_publication_t) -> i64;
}
unsafe extern "C" {
    #[doc = " Get the position limit beyond which this publication will be back pressured.\n\n This should only be used as a guide to determine when back pressure is likely to be applied.\n\n @param publication to query.\n @return the position limit beyond which this publication will be back pressured or a negative error value."]
    pub fn aeron_publication_position_limit(publication: *mut aeron_publication_t) -> i64;
}
unsafe extern "C" {
    #[doc = " Add a destination manually to a multi-destination-cast publication.\n\n @param async object to use for polling completion.\n @param publication to add destination to.\n @param uri for the destination to add.\n @return 0 for success and -1 for error."]
    pub fn aeron_publication_async_add_destination(
        async_: *mut *mut aeron_async_destination_t,
        client: *mut aeron_t,
        publication: *mut aeron_publication_t,
        uri: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Remove a destination manually from a multi-destination-cast publication.\n\n @param async object to use for polling completion.\n @param publication to remove destination from.\n @param uri for the destination to remove.\n @return 0 for success and -1 for error."]
    pub fn aeron_publication_async_remove_destination(
        async_: *mut *mut aeron_async_destination_t,
        client: *mut aeron_t,
        publication: *mut aeron_publication_t,
        uri: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Remove a destination manually from a multi-destination-cast publication.\n\n @param async object to use for polling completion.\n @param publication to remove destination from.\n @param destination_registration_id for the destination to remove.\n @return 0 for success and -1 for error."]
    pub fn aeron_publication_async_remove_destination_by_id(
        async_: *mut *mut aeron_async_destination_t,
        client: *mut aeron_t,
        publication: *mut aeron_publication_t,
        destination_registration_id: i64,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Poll the completion of the add/remove of a destination to/from a publication.\n\n @param async to check for completion.\n @return 0 for not complete (try again), 1 for completed successfully, or -1 for an error."]
    pub fn aeron_publication_async_destination_poll(
        async_: *mut aeron_async_destination_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Add a destination manually to a multi-destination-cast exclusive publication.\n\n @param async object to use for polling completion.\n @param publication to add destination to.\n @param uri for the destination to add.\n @return 0 for success and -1 for error."]
    pub fn aeron_exclusive_publication_async_add_destination(
        async_: *mut *mut aeron_async_destination_t,
        client: *mut aeron_t,
        publication: *mut aeron_exclusive_publication_t,
        uri: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Remove a destination manually from a multi-destination-cast exclusive publication.\n\n @param async object to use for polling completion.\n @param publication to remove destination from.\n @param uri for the destination to remove.\n @return 0 for success and -1 for error."]
    pub fn aeron_exclusive_publication_async_remove_destination(
        async_: *mut *mut aeron_async_destination_t,
        client: *mut aeron_t,
        publication: *mut aeron_exclusive_publication_t,
        uri: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Remove a destination manually from a multi-destination-cast publication.\n\n @param async object to use for polling completion.\n @param publication to remove destination from.\n @param destination_registration_id for the destination to remove.\n @return 0 for success and -1 for error."]
    pub fn aeron_exclusive_publication_async_remove_destination_by_id(
        async_: *mut *mut aeron_async_destination_t,
        client: *mut aeron_t,
        publication: *mut aeron_exclusive_publication_t,
        destination_registration_id: i64,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Poll the completion of the add/remove of a destination to/from an exclusive publication.\n\n @param async to check for completion.\n @return 0 for not complete (try again), 1 for completed successfully, or -1 for an error."]
    pub fn aeron_exclusive_publication_async_destination_poll(
        async_: *mut aeron_async_destination_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Asynchronously close the publication. Will callback on the on_complete notification when the publication is closed.\n The callback is optional, use NULL for the on_complete callback if not required.\n\n @param publication to close\n @param on_close_complete optional callback to execute once the publication has been closed and freed. This may\n happen on a separate thread, so the caller should ensure that clientd has the appropriate lifetime.\n @param on_close_complete_clientd parameter to pass to the on_complete callback.\n @return 0 for success or -1 for error."]
    pub fn aeron_publication_close(
        publication: *mut aeron_publication_t,
        on_close_complete: aeron_notification_t,
        on_close_complete_clientd: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get the publication's channel\n\n @param publication this\n @return channel uri string"]
    pub fn aeron_publication_channel(
        publication: *mut aeron_publication_t,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " Get the publication's stream id\n\n @param publication this\n @return stream id"]
    pub fn aeron_publication_stream_id(publication: *mut aeron_publication_t) -> i32;
}
unsafe extern "C" {
    #[doc = " Get the publication's session id\n @param publication this\n @return session id"]
    pub fn aeron_publication_session_id(publication: *mut aeron_publication_t) -> i32;
}
unsafe extern "C" {
    #[doc = " Get all of the local socket addresses for this publication. Typically only one representing the control address.\n\n @param subscription to query\n @param address_vec to hold the received addresses\n @param address_vec_len available length of the vector to hold the addresses\n @return number of addresses found or -1 if there is an error.\n @see aeron_subscription_local_sockaddrs"]
    pub fn aeron_publication_local_sockaddrs(
        publication: *mut aeron_publication_t,
        address_vec: *mut aeron_iovec_t,
        address_vec_len: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Non-blocking publish of a buffer containing a message.\n\n @param publication to publish on.\n @param buffer to publish.\n @param length of the buffer.\n @param reserved_value_supplier to use for setting the reserved value field or NULL.\n @param clientd to pass to the reserved_value_supplier.\n @return the new stream position otherwise a negative error value."]
    pub fn aeron_exclusive_publication_offer(
        publication: *mut aeron_exclusive_publication_t,
        buffer: *const u8,
        length: usize,
        reserved_value_supplier: aeron_reserved_value_supplier_t,
        clientd: *mut ::std::os::raw::c_void,
    ) -> i64;
}
unsafe extern "C" {
    #[doc = " Non-blocking publish by gathering buffer vectors into a message.\n\n @param publication to publish on.\n @param iov array for the vectors\n @param iovcnt of the number of vectors\n @param reserved_value_supplier to use for setting the reserved value field or NULL.\n @param clientd to pass to the reserved_value_supplier.\n @return the new stream position otherwise a negative error value."]
    pub fn aeron_exclusive_publication_offerv(
        publication: *mut aeron_exclusive_publication_t,
        iov: *mut aeron_iovec_t,
        iovcnt: usize,
        reserved_value_supplier: aeron_reserved_value_supplier_t,
        clientd: *mut ::std::os::raw::c_void,
    ) -> i64;
}
unsafe extern "C" {
    #[doc = " Try to claim a range in the publication log into which a message can be written with zero copy semantics.\n Once the message has been written then aeron_buffer_claim_commit should be called thus making it available.\n A claim length cannot be greater than max payload length.\n <p>\n <b>Note:</b> This method can only be used for message lengths less than MTU length minus header.\n\n @code\n aeron_buffer_claim_t buffer_claim;\n\n if (aeron_exclusive_publication_try_claim(publication, length, &buffer_claim) > 0L)\n {\n     // work with buffer_claim->data directly.\n     aeron_buffer_claim_commit(&buffer_claim);\n }\n @endcode\n\n @param publication to publish to.\n @param length of the message.\n @param buffer_claim to be populated if the claim succeeds.\n @return the new stream position otherwise a negative error value."]
    pub fn aeron_exclusive_publication_try_claim(
        publication: *mut aeron_exclusive_publication_t,
        length: usize,
        buffer_claim: *mut aeron_buffer_claim_t,
    ) -> i64;
}
unsafe extern "C" {
    #[doc = " Append a padding record log of a given length to make up the log to a position.\n\n @param length of the range to claim, in bytes.\n @return the new stream position otherwise a negative error value."]
    pub fn aeron_exclusive_publication_append_padding(
        publication: *mut aeron_exclusive_publication_t,
        length: usize,
    ) -> i64;
}
unsafe extern "C" {
    #[doc = " Offer a block of pre-formatted message fragments directly into the current term.\n\n @param buffer containing the pre-formatted block of message fragments.\n @param offset offset in the buffer at which the first fragment begins.\n @param length in bytes of the encoded block.\n @return the new stream position otherwise a negative error value."]
    pub fn aeron_exclusive_publication_offer_block(
        publication: *mut aeron_exclusive_publication_t,
        buffer: *const u8,
        length: usize,
    ) -> i64;
}
unsafe extern "C" {
    #[doc = " Get the status of the media channel for this publication.\n <p>\n The status will be ERRORED (-1) if a socket exception occurs on setup and ACTIVE (1) if all is well.\n\n @param publication to check status of.\n @return 1 for ACTIVE, -1 for ERRORED"]
    pub fn aeron_exclusive_publication_channel_status(
        publication: *mut aeron_exclusive_publication_t,
    ) -> i64;
}
unsafe extern "C" {
    #[doc = " Fill in a structure with the constants in use by a publication.\n\n @param publication to get the constants for.\n @param constants structure to fill in with the constants\n @return 0 for success and -1 for error."]
    pub fn aeron_exclusive_publication_constants(
        publication: *mut aeron_exclusive_publication_t,
        constants: *mut aeron_publication_constants_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get the current position to which the publication has advanced for this stream.\n\n @param publication to query.\n @return the current position to which the publication has advanced for this stream or a negative error value."]
    pub fn aeron_exclusive_publication_position(
        publication: *mut aeron_exclusive_publication_t,
    ) -> i64;
}
unsafe extern "C" {
    #[doc = " Get the position limit beyond which this publication will be back pressured.\n\n This should only be used as a guide to determine when back pressure is likely to be applied.\n\n @param publication to query.\n @return the position limit beyond which this publication will be back pressured or a negative error value."]
    pub fn aeron_exclusive_publication_position_limit(
        publication: *mut aeron_exclusive_publication_t,
    ) -> i64;
}
unsafe extern "C" {
    #[doc = " Asynchronously close the publication.\n\n @param publication to close\n @return 0 for success or -1 for error."]
    pub fn aeron_exclusive_publication_close(
        publication: *mut aeron_exclusive_publication_t,
        on_close_complete: aeron_notification_t,
        on_close_complete_clientd: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Revoke this publication when it's closed.\n\n @param publication to revoke on close"]
    pub fn aeron_exclusive_publication_revoke_on_close(
        publication: *mut aeron_exclusive_publication_t,
    );
}
unsafe extern "C" {
    #[doc = " Asynchronously revoke and close the publication. Will callback on the on_complete notification when the publicaiton is closed.\n The callback is optional, use NULL for the on_complete callback if not required.\n\n @param publication to revoke and close\n @param on_close_complete optional callback to execute once the publication has been revoked, closed and freed. This may\n happen on a separate thread, so the caller should ensure that clientd has the appropriate lifetime.\n @param on_close_complete_clientd parameter to pass to the on_complete callback.\n @return 0 for success or -1 for error."]
    pub fn aeron_exclusive_publication_revoke(
        publication: *mut aeron_exclusive_publication_t,
        on_close_complete: aeron_notification_t,
        on_close_complete_clientd: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Has the exclusive publication closed?\n\n @param publication to check\n @return true if this publication is closed."]
    pub fn aeron_exclusive_publication_is_closed(
        publication: *mut aeron_exclusive_publication_t,
    ) -> bool;
}
unsafe extern "C" {
    #[doc = " Has the exclusive publication seen an active Subscriber recently?\n\n @param publication to check.\n @return true if this publication has recently seen an active subscriber otherwise false."]
    pub fn aeron_exclusive_publication_is_connected(
        publication: *mut aeron_exclusive_publication_t,
    ) -> bool;
}
unsafe extern "C" {
    #[doc = " Get all of the local socket addresses for this exclusive publication. Typically only one representing the control\n address.\n\n @see aeron_subscription_local_sockaddrs\n @param subscription to query\n @param address_vec to hold the received addresses\n @param address_vec_len available length of the vector to hold the addresses\n @return number of addresses found or -1 if there is an error."]
    pub fn aeron_exclusive_publication_local_sockaddrs(
        publication: *mut aeron_exclusive_publication_t,
        address_vec: *mut aeron_iovec_t,
        address_vec_len: usize,
    ) -> ::std::os::raw::c_int;
}
#[doc = " Callback for handling fragments of data being read from a log.\n\n The frame will either contain a whole message or a fragment of a message to be reassembled. Messages are fragmented\n if greater than the frame for MTU in length.\n\n @param clientd passed to the poll function.\n @param buffer containing the data.\n @param length of the data in bytes.\n @param header representing the meta data for the data."]
pub type aeron_fragment_handler_t = ::std::option::Option<
    unsafe extern "C" fn(
        clientd: *mut ::std::os::raw::c_void,
        buffer: *const u8,
        length: usize,
        header: *mut aeron_header_t,
    ),
>;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum aeron_controlled_fragment_handler_action_en {
    #[doc = " Abort the current polling operation and do not advance the position for this fragment."]
    AERON_ACTION_ABORT = 1,
    #[doc = " Break from the current polling operation and commit the position as of the end of the current fragment\n being handled."]
    AERON_ACTION_BREAK = 2,
    #[doc = " Continue processing but commit the position as of the end of the current fragment so that\n flow control is applied to this point."]
    AERON_ACTION_COMMIT = 3,
    #[doc = " Continue processing until fragment limit or no fragments with position commit at end of poll as in\n aeron_fragment_handler_t."]
    AERON_ACTION_CONTINUE = 4,
}
pub use self::aeron_controlled_fragment_handler_action_en as aeron_controlled_fragment_handler_action_t;
#[doc = " Callback for handling fragments of data being read from a log.\n\n Handler for reading data that is coming from a log buffer. The frame will either contain a whole message\n or a fragment of a message to be reassembled. Messages are fragmented if greater than the frame for MTU in length.\n\n @param clientd passed to the controlled poll function.\n @param buffer containing the data.\n @param length of the data in bytes.\n @param header representing the meta data for the data.\n @return The action to be taken with regard to the stream position after the callback."]
pub type aeron_controlled_fragment_handler_t = ::std::option::Option<
    unsafe extern "C" fn(
        clientd: *mut ::std::os::raw::c_void,
        buffer: *const u8,
        length: usize,
        header: *mut aeron_header_t,
    ) -> aeron_controlled_fragment_handler_action_t,
>;
#[doc = " Callback for handling a block of messages being read from a log.\n\n @param clientd passed to the block poll function.\n @param buffer containing the block of message fragments.\n @param offset at which the block begins, including any frame headers.\n @param length of the block in bytes, including any frame headers that is aligned.\n @param session_id of the stream containing this block of message fragments.\n @param term_id of the stream containing this block of message fragments."]
pub type aeron_block_handler_t = ::std::option::Option<
    unsafe extern "C" fn(
        clientd: *mut ::std::os::raw::c_void,
        buffer: *const u8,
        length: usize,
        session_id: i32,
        term_id: i32,
    ),
>;
unsafe extern "C" {
    #[doc = " Get all of the field values from the header. This will do a memcpy into the supplied header_values_t pointer.\n\n @param header to read values from.\n @param values to copy values to, must not be null.\n @return 0 on success, -1 on failure."]
    pub fn aeron_header_values(
        header: *mut aeron_header_t,
        values: *mut aeron_header_values_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get the current position to which the Image has advanced on reading this message.\n\n @param header the current header message\n @return the current position to which the Image has advanced on reading this message."]
    pub fn aeron_header_position(header: *mut aeron_header_t) -> i64;
}
unsafe extern "C" {
    #[doc = " Get the number of times to left shift the term count to multiply by term length.\n\n @return number of times to left shift the term count to multiply by term length."]
    pub fn aeron_header_position_bits_to_shift(header: *mut aeron_header_t) -> usize;
}
unsafe extern "C" {
    #[doc = " Calculates the offset of the frame immediately after this one.\n\n @return the offset of the next frame."]
    pub fn aeron_header_next_term_offset(header: *mut aeron_header_t) -> i32;
}
unsafe extern "C" {
    #[doc = " Get a pointer to the context associated with this message. Only valid during poll handling. Is normally a\n pointer to an Image instance.\n\n @return a pointer to the context associated with this message."]
    pub fn aeron_header_context(header: *mut aeron_header_t) -> *mut ::std::os::raw::c_void;
}
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_subscription_constants_stct {
    #[doc = " Media address for delivery to the channel.\n\n This returns a pointer only valid for the lifetime of the subscription."]
    pub channel: *const ::std::os::raw::c_char,
    #[doc = " Callback used to indicate when an Image becomes available under this Subscription."]
    pub on_available_image: aeron_on_available_image_t,
    #[doc = " Callback used to indicate when an Image goes unavailable under this Subscription."]
    pub on_unavailable_image: aeron_on_unavailable_image_t,
    #[doc = " Return the registration id used to register this Subscription with the media driver."]
    pub registration_id: i64,
    #[doc = " Stream identity for scoping within the channel media address."]
    pub stream_id: i32,
    #[doc = " Counter id for the channel status indicator"]
    pub channel_status_indicator_id: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_subscription_constants_stct"]
        [::std::mem::size_of::<aeron_subscription_constants_stct>() - 40usize];
    ["Alignment of aeron_subscription_constants_stct"]
        [::std::mem::align_of::<aeron_subscription_constants_stct>() - 8usize];
    ["Offset of field: aeron_subscription_constants_stct::channel"]
        [::std::mem::offset_of!(aeron_subscription_constants_stct, channel) - 0usize];
    ["Offset of field: aeron_subscription_constants_stct::on_available_image"]
        [::std::mem::offset_of!(aeron_subscription_constants_stct, on_available_image) - 8usize];
    ["Offset of field: aeron_subscription_constants_stct::on_unavailable_image"]
        [::std::mem::offset_of!(aeron_subscription_constants_stct, on_unavailable_image) - 16usize];
    ["Offset of field: aeron_subscription_constants_stct::registration_id"]
        [::std::mem::offset_of!(aeron_subscription_constants_stct, registration_id) - 24usize];
    ["Offset of field: aeron_subscription_constants_stct::stream_id"]
        [::std::mem::offset_of!(aeron_subscription_constants_stct, stream_id) - 32usize];
    ["Offset of field: aeron_subscription_constants_stct::channel_status_indicator_id"][::std::mem::offset_of!(
        aeron_subscription_constants_stct,
        channel_status_indicator_id
    )
        - 36usize];
};
impl Default for aeron_subscription_constants_stct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type aeron_subscription_constants_t = aeron_subscription_constants_stct;
unsafe extern "C" {
    #[doc = " Poll the images under the subscription for available message fragments.\n <p>\n Each fragment read will be a whole message if it is under MTU length. If larger than MTU then it will come\n as a series of fragments ordered within a session.\n <p>\n To assemble messages that span multiple fragments then use aeron_fragment_assembler_t.\n\n @param subscription to poll.\n @param handler for handling each message fragment as it is read.\n @param fragment_limit number of message fragments to limit when polling across multiple images.\n @return the number of fragments received or -1 for error."]
    pub fn aeron_subscription_poll(
        subscription: *mut aeron_subscription_t,
        handler: aeron_fragment_handler_t,
        clientd: *mut ::std::os::raw::c_void,
        fragment_limit: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Poll in a controlled manner the images under the subscription for available message fragments.\n Control is applied to fragments in the stream. If more fragments can be read on another stream\n they will even if BREAK or ABORT is returned from the fragment handler.\n <p>\n Each fragment read will be a whole message if it is under MTU length. If larger than MTU then it will come\n as a series of fragments ordered within a session.\n <p>\n To assemble messages that span multiple fragments then use aeron_controlled_fragment_assembler_t.\n\n @param subscription to poll.\n @param handler for handling each message fragment as it is read.\n @param fragment_limit number of message fragments to limit when polling across multiple images.\n @return the number of fragments received or -1 for error."]
    pub fn aeron_subscription_controlled_poll(
        subscription: *mut aeron_subscription_t,
        handler: aeron_controlled_fragment_handler_t,
        clientd: *mut ::std::os::raw::c_void,
        fragment_limit: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Poll the images under the subscription for available message fragments in blocks.\n <p>\n This method is useful for operations like bulk archiving and messaging indexing.\n\n @param subscription to poll.\n @param handler to receive a block of fragments from each image.\n @param block_length_limit for each image polled.\n @return the number of bytes consumed or -1 for error."]
    pub fn aeron_subscription_block_poll(
        subscription: *mut aeron_subscription_t,
        handler: aeron_block_handler_t,
        clientd: *mut ::std::os::raw::c_void,
        block_length_limit: usize,
    ) -> ::std::os::raw::c_long;
}
unsafe extern "C" {
    #[doc = " Is this subscription connected by having at least one open publication image.\n\n @param subscription to check.\n @return true if this subscription connected by having at least one open publication image."]
    pub fn aeron_subscription_is_connected(subscription: *mut aeron_subscription_t) -> bool;
}
unsafe extern "C" {
    #[doc = " Fill in a structure with the constants in use by a subscription.\n\n @param subscription to get the constants for.\n @param constants structure to fill in with the constants\n @return 0 for success and -1 for error."]
    pub fn aeron_subscription_constants(
        subscription: *mut aeron_subscription_t,
        constants: *mut aeron_subscription_constants_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Count of images associated to this subscription.\n\n @param subscription to count images for.\n @return count of count associated to this subscription or -1 for error."]
    pub fn aeron_subscription_image_count(
        subscription: *mut aeron_subscription_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Return the image associated with the given session_id under the given subscription.\n\n Note: the returned image is considered retained by the application and thus must be released via\n aeron_image_release when finished or if the image becomes unavailable.\n\n @param subscription to search.\n @param session_id associated with the image.\n @return image associated with the given session_id or NULL if no image exists."]
    pub fn aeron_subscription_image_by_session_id(
        subscription: *mut aeron_subscription_t,
        session_id: i32,
    ) -> *mut aeron_image_t;
}
unsafe extern "C" {
    #[doc = " Return the image at the given index.\n\n Note: the returned image is considered retained by the application and thus must be released via\n aeron_image_release when finished or if the image becomes unavailable.\n\n @param subscription to search.\n @param index for the image.\n @return image at the given index or NULL if no image exists."]
    pub fn aeron_subscription_image_at_index(
        subscription: *mut aeron_subscription_t,
        index: usize,
    ) -> *mut aeron_image_t;
}
unsafe extern "C" {
    #[doc = " Iterate over the images for this subscription calling the given function.\n\n @param subscription to iterate over.\n @param handler to be called for each image.\n @param clientd to be passed to the handler."]
    pub fn aeron_subscription_for_each_image(
        subscription: *mut aeron_subscription_t,
        handler: ::std::option::Option<
            unsafe extern "C" fn(image: *mut aeron_image_t, clientd: *mut ::std::os::raw::c_void),
        >,
        clientd: *mut ::std::os::raw::c_void,
    );
}
unsafe extern "C" {
    #[doc = " Retain the given image for access in the application.\n\n Note: A retain call must have a corresponding release call.\n Note: Subscriptions are not threadsafe and should not be shared between subscribers.\n\n @param subscription that image is part of.\n @param image to retain\n @return 0 for success and -1 for error."]
    pub fn aeron_subscription_image_retain(
        subscription: *mut aeron_subscription_t,
        image: *mut aeron_image_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Release the given image and relinquish desire to use the image directly.\n\n Note: Subscriptions are not threadsafe and should not be shared between subscribers.\n\n @param subscription that image is part of.\n @param image to release\n @return 0 for success and -1 for error."]
    pub fn aeron_subscription_image_release(
        subscription: *mut aeron_subscription_t,
        image: *mut aeron_image_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Release an image that was retained by aeron_subscription_image_by_session_id or\n aeron_subscription_image_at_index.\n\n Unlike aeron_subscription_image_release, this function unconditionally decrements the reference\n count and is safe to call after the image has become unavailable (i.e. after it has been removed\n from the subscription's image list).\n\n @param image to release\n @return 0 for success and -1 for error."]
    pub fn aeron_image_release(image: *mut aeron_image_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Is the subscription closed.\n\n @param subscription to be checked.\n @return true if it has been closed otherwise false."]
    pub fn aeron_subscription_is_closed(subscription: *mut aeron_subscription_t) -> bool;
}
unsafe extern "C" {
    #[doc = " Get the status of the media channel for this subscription.\n <p>\n The status will be ERRORED (-1) if a socket exception occurs on setup and ACTIVE (1) if all is well.\n\n @param subscription to check status of.\n @return 1 for ACTIVE, -1 for ERRORED"]
    pub fn aeron_subscription_channel_status(subscription: *mut aeron_subscription_t) -> i64;
}
unsafe extern "C" {
    #[doc = " Add a destination manually to a multi-destination-subscription.\n\n @param async object to use for polling completion.\n @param subscription to add destination to.\n @param uri for the destination to add.\n @return 0 for success and -1 for error."]
    pub fn aeron_subscription_async_add_destination(
        async_: *mut *mut aeron_async_destination_t,
        client: *mut aeron_t,
        subscription: *mut aeron_subscription_t,
        uri: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Remove a destination manually from a multi-destination-subscription.\n\n @param async object to use for polling completion.\n @param subscription to remove destination from.\n @param uri for the destination to remove.\n @return 0 for success and -1 for error."]
    pub fn aeron_subscription_async_remove_destination(
        async_: *mut *mut aeron_async_destination_t,
        client: *mut aeron_t,
        subscription: *mut aeron_subscription_t,
        uri: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Poll the completion of add/remove of a destination to/from a subscription.\n\n @param async to check for completion.\n @return 0 for not complete (try again), 1 for completed successfully, or -1 for an error."]
    pub fn aeron_subscription_async_destination_poll(
        async_: *mut aeron_async_destination_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Asynchronously close the subscription. Will callback on the on_complete notification when the subscription is\n closed. The callback is optional, use NULL for the on_complete callback if not required.\n\n @param subscription to close\n @param on_close_complete optional callback to execute once the subscription has been closed and freed. This may\n happen on a separate thread, so the caller should ensure that clientd has the appropriate lifetime.\n @param on_close_complete_clientd parameter to pass to the on_complete callback.\n @return 0 for success or -1 for error."]
    pub fn aeron_subscription_close(
        subscription: *mut aeron_subscription_t,
        on_close_complete: aeron_notification_t,
        on_close_complete_clientd: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get all of the local socket addresses for this subscription. Multiple addresses can occur if this is a\n multi-destination subscription. Addresses will a string representation in numeric form. IPv6 addresses will be\n surrounded by '[' and ']' so that the ':' that separate the parts are distinguishable from the port delimiter.\n E.g. [fe80::7552:c06e:6bf4:4160]:12345. As of writing the maximum length for a formatted address is 54 bytes\n including the NULL terminator. AERON_CLIENT_MAX_LOCAL_ADDRESS_STR_LEN is defined to provide enough space to fit the\n returned string. Returned strings will be NULL terminated. If the buffer to hold the address can not hold enough\n of the message it will be truncated and the last character will be null.\n\n If the address_vec_len is less the total number of addresses available then the first addresses found up to that\n length will be placed into the address_vec. However the function will return the total number of addresses available\n so if if that is larger than the input array then the client code may wish to re-query with a larger array to get\n them all.\n\n @param subscription to query\n @param address_vec to hold the received addresses\n @param address_vec_len available length of the vector to hold the addresses\n @return number of addresses found or -1 if there is an error."]
    pub fn aeron_subscription_local_sockaddrs(
        subscription: *mut aeron_subscription_t,
        address_vec: *mut aeron_iovec_t,
        address_vec_len: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Retrieves the first local socket address for this subscription. If this is not MDS then it will be the one\n representing endpoint for this subscription.\n\n @see aeron_subscription_local_sockaddrs\n @param subscription to query\n @param address for the received address\n @param address_len available length for the copied address.\n @return -1 on error, 0 if address not found, 1 if address is found."]
    pub fn aeron_subscription_resolved_endpoint(
        subscription: *mut aeron_subscription_t,
        address: *const ::std::os::raw::c_char,
        address_len: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Retrieves the channel URI for this subscription with any wildcard ports filled in. If the channel is not UDP or\n does not have a wildcard port (<code>0</code>), then it will return the original URI.\n\n @param subscription to query\n @param uri buffer to hold the resolved uri\n @param uri_len length of the buffer\n @return -1 on failure or the number of bytes written to the buffer (excluding the NULL terminator). Writing is done\n on a per key basis, so if the buffer was truncated before writing completed, it will only include the byte count up\n to the key that overflowed. However, the invariant that if the number returned >= uri_len, then output will have been\n truncated."]
    pub fn aeron_subscription_try_resolve_channel_endpoint_port(
        subscription: *mut aeron_subscription_t,
        uri: *mut ::std::os::raw::c_char,
        uri_len: usize,
    ) -> ::std::os::raw::c_int;
}
#[doc = " Configuration for an image that does not change during it's lifetime."]
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_image_constants_stct {
    #[doc = " The subscription to which this image belongs."]
    pub subscription: *mut aeron_subscription_t,
    #[doc = " The source identity of the sending publisher as an abstract concept appropriate for the media."]
    pub source_identity: *const ::std::os::raw::c_char,
    #[doc = " The correlationId for identification of the image with the media driver."]
    pub correlation_id: i64,
    #[doc = " Get the position the subscriber joined this stream at."]
    pub join_position: i64,
    #[doc = " Number of bits to right shift a position to get a term count for how far the stream has progressed."]
    pub position_bits_to_shift: usize,
    #[doc = " Get the length in bytes for each term partition in the log buffer."]
    pub term_buffer_length: usize,
    #[doc = " The length in bytes of the MTU (Maximum Transmission Unit) the Sender used for the datagram."]
    pub mtu_length: usize,
    #[doc = " The sessionId for the steam of messages. Sessions are unique within a subscription and unique across\n all publications from a source identity."]
    pub session_id: i32,
    #[doc = " The initial term at which the stream started for this session."]
    pub initial_term_id: i32,
    #[doc = " Counter id that refers to the subscriber position for this image."]
    pub subscriber_position_id: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_image_constants_stct"]
        [::std::mem::size_of::<aeron_image_constants_stct>() - 72usize];
    ["Alignment of aeron_image_constants_stct"]
        [::std::mem::align_of::<aeron_image_constants_stct>() - 8usize];
    ["Offset of field: aeron_image_constants_stct::subscription"]
        [::std::mem::offset_of!(aeron_image_constants_stct, subscription) - 0usize];
    ["Offset of field: aeron_image_constants_stct::source_identity"]
        [::std::mem::offset_of!(aeron_image_constants_stct, source_identity) - 8usize];
    ["Offset of field: aeron_image_constants_stct::correlation_id"]
        [::std::mem::offset_of!(aeron_image_constants_stct, correlation_id) - 16usize];
    ["Offset of field: aeron_image_constants_stct::join_position"]
        [::std::mem::offset_of!(aeron_image_constants_stct, join_position) - 24usize];
    ["Offset of field: aeron_image_constants_stct::position_bits_to_shift"]
        [::std::mem::offset_of!(aeron_image_constants_stct, position_bits_to_shift) - 32usize];
    ["Offset of field: aeron_image_constants_stct::term_buffer_length"]
        [::std::mem::offset_of!(aeron_image_constants_stct, term_buffer_length) - 40usize];
    ["Offset of field: aeron_image_constants_stct::mtu_length"]
        [::std::mem::offset_of!(aeron_image_constants_stct, mtu_length) - 48usize];
    ["Offset of field: aeron_image_constants_stct::session_id"]
        [::std::mem::offset_of!(aeron_image_constants_stct, session_id) - 56usize];
    ["Offset of field: aeron_image_constants_stct::initial_term_id"]
        [::std::mem::offset_of!(aeron_image_constants_stct, initial_term_id) - 60usize];
    ["Offset of field: aeron_image_constants_stct::subscriber_position_id"]
        [::std::mem::offset_of!(aeron_image_constants_stct, subscriber_position_id) - 64usize];
};
impl Default for aeron_image_constants_stct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " Configuration for an image that does not change during it's lifetime."]
pub type aeron_image_constants_t = aeron_image_constants_stct;
unsafe extern "C" {
    #[doc = " Fill in a structure with the constants in use by a image.\n\n @param image to get the constants for.\n @param constants structure to fill in with the constants\n @return 0 for success and -1 for error."]
    pub fn aeron_image_constants(
        image: *mut aeron_image_t,
        constants: *mut aeron_image_constants_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " The position this image has been consumed to by the subscriber.\n\n @param image to query position of.\n @return the position this image has been consumed to by the subscriber."]
    pub fn aeron_image_position(image: *mut aeron_image_t) -> i64;
}
unsafe extern "C" {
    #[doc = " Set the subscriber position for this image to indicate where it has been consumed to.\n\n @param image to set the position of.\n @param new_position for the consumption point."]
    pub fn aeron_image_set_position(
        image: *mut aeron_image_t,
        position: i64,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Is the current consumed position at the end of the stream?\n\n @param image to check.\n @return true if at the end of the stream or false if not."]
    pub fn aeron_image_is_end_of_stream(image: *mut aeron_image_t) -> bool;
}
unsafe extern "C" {
    #[doc = " The position the stream reached when EOS was received from the publisher. The position will be\n INT64_MAX until the stream ends and EOS is set.\n\n @param image to check.\n @return position the stream reached when EOS was received from the publisher."]
    pub fn aeron_image_end_of_stream_position(image: *mut aeron_image_t) -> i64;
}
unsafe extern "C" {
    #[doc = " Count of observed active transports within the image liveness timeout.\n\n If the image is closed, then this is 0. This may also be 0 if no actual datagrams have arrived. IPC\n Images also will be 0.\n\n @param image to check.\n @return count of active transports - 0 if Image is closed, no datagrams yet, or IPC. Or -1 for error."]
    pub fn aeron_image_active_transport_count(image: *mut aeron_image_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Was the associated publication revoked?\n\n @param image to check\n @return true if the associated publication was revoked."]
    pub fn aeron_image_is_publication_revoked(image: *mut aeron_image_t) -> bool;
}
unsafe extern "C" {
    #[doc = " Poll for new messages in a stream. If new messages are found beyond the last consumed position then they\n will be delivered to the handler up to a limited number of fragments as specified.\n <p>\n Use a fragment assembler to assemble messages which span multiple fragments.\n\n @param image to poll.\n @param handler to which message fragments are delivered.\n @param clientd to pass to the handler.\n @param fragment_limit for the number of fragments to be consumed during one polling operation.\n @return the number of fragments that have been consumed or -1 for error."]
    pub fn aeron_image_poll(
        image: *mut aeron_image_t,
        handler: aeron_fragment_handler_t,
        clientd: *mut ::std::os::raw::c_void,
        fragment_limit: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Poll for new messages in a stream. If new messages are found beyond the last consumed position then they\n will be delivered to the handler up to a limited number of fragments as specified.\n <p>\n Use a controlled fragment assembler to assemble messages which span multiple fragments.\n\n @param image to poll.\n @param handler to which message fragments are delivered.\n @param clientd to pass to the handler.\n @param fragment_limit for the number of fragments to be consumed during one polling operation.\n @return the number of fragments that have been consumed or -1 for error."]
    pub fn aeron_image_controlled_poll(
        image: *mut aeron_image_t,
        handler: aeron_controlled_fragment_handler_t,
        clientd: *mut ::std::os::raw::c_void,
        fragment_limit: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Poll for new messages in a stream. If new messages are found beyond the last consumed position then they\n will be delivered to the handler up to a limited number of fragments as specified or the maximum position specified.\n <p>\n Use a fragment assembler to assemble messages which span multiple fragments.\n\n @param image to poll.\n @param handler to which message fragments are delivered.\n @param clientd to pass to the handler.\n @param limit_position to consume messages up to.\n @param fragment_limit for the number of fragments to be consumed during one polling operation.\n @return the number of fragments that have been consumed or -1 for error."]
    pub fn aeron_image_bounded_poll(
        image: *mut aeron_image_t,
        handler: aeron_fragment_handler_t,
        clientd: *mut ::std::os::raw::c_void,
        limit_position: i64,
        fragment_limit: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Poll for new messages in a stream. If new messages are found beyond the last consumed position then they\n will be delivered to the handler up to a limited number of fragments as specified or the maximum position specified.\n <p>\n Use a controlled fragment assembler to assemble messages which span multiple fragments.\n\n @param image to poll.\n @param handler to which message fragments are delivered.\n @param clientd to pass to the handler.\n @param limit_position to consume messages up to.\n @param fragment_limit for the number of fragments to be consumed during one polling operation.\n @return the number of fragments that have been consumed or -1 for error."]
    pub fn aeron_image_bounded_controlled_poll(
        image: *mut aeron_image_t,
        handler: aeron_controlled_fragment_handler_t,
        clientd: *mut ::std::os::raw::c_void,
        limit_position: i64,
        fragment_limit: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Peek for new messages in a stream by scanning forward from an initial position. If new messages are found then\n they will be delivered to the handler up to a limited position.\n <p>\n Use a controlled fragment assembler to assemble messages which span multiple fragments. Scans must also\n start at the beginning of a message so that the assembler is reset.\n\n @param image to peek.\n @param initial_position from which to peek forward.\n @param handler to which message fragments are delivered.\n @param clientd to pass to the handler.\n @param limit_position up to which can be scanned.\n @return the resulting position after the scan terminates which is a complete message or -1 for error."]
    pub fn aeron_image_controlled_peek(
        image: *mut aeron_image_t,
        initial_position: i64,
        handler: aeron_controlled_fragment_handler_t,
        clientd: *mut ::std::os::raw::c_void,
        limit_position: i64,
    ) -> i64;
}
unsafe extern "C" {
    #[doc = " Poll for new messages in a stream. If new messages are found beyond the last consumed position then they\n will be delivered to the handler up to a limited number of bytes.\n <p>\n A scan will terminate if a padding frame is encountered. If first frame in a scan is padding then a block\n for the padding is notified. If the padding comes after the first frame in a scan then the scan terminates\n at the offset the padding frame begins. Padding frames are delivered singularly in a block.\n <p>\n Padding frames may be for a greater range than the limit offset but only the header needs to be valid so\n relevant length of the frame is data header length.\n\n @param image to poll.\n @param handler to which block is delivered.\n @param clientd to pass to the handler.\n @param block_length_limit up to which a block may be in length.\n @return the number of bytes that have been consumed or -1 for error."]
    pub fn aeron_image_block_poll(
        image: *mut aeron_image_t,
        handler: aeron_block_handler_t,
        clientd: *mut ::std::os::raw::c_void,
        block_length_limit: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_image_is_closed(image: *mut aeron_image_t) -> bool;
}
unsafe extern "C" {
    pub fn aeron_image_reject(
        image: *mut aeron_image_t,
        reason: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Create an image fragment assembler for use with a single image.\n\n @param assembler to be set when created successfully.\n @param delegate to call on completed.\n @param delegate_clientd to pass to delegate handler.\n @return 0 for success and -1 for error."]
    pub fn aeron_image_fragment_assembler_create(
        assembler: *mut *mut aeron_image_fragment_assembler_t,
        delegate: aeron_fragment_handler_t,
        delegate_clientd: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Delete an image fragment assembler.\n\n @param assembler to delete.\n @return 0 for success or -1 for error."]
    pub fn aeron_image_fragment_assembler_delete(
        assembler: *mut aeron_image_fragment_assembler_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Handler function to be passed for handling fragment assembly.\n\n @param clientd passed in the poll call (must be a aeron_image_fragment_assembler_t)\n @param buffer containing the data.\n @param length of the data in bytes.\n @param header representing the meta data for the data."]
    pub fn aeron_image_fragment_assembler_handler(
        clientd: *mut ::std::os::raw::c_void,
        buffer: *const u8,
        length: usize,
        header: *mut aeron_header_t,
    );
}
unsafe extern "C" {
    #[doc = " Create an image controlled fragment assembler for use with a single image.\n\n @param assembler to be set when created successfully.\n @param delegate to call on completed\n @param delegate_clientd to pass to delegate handler.\n @return 0 for success and -1 for error."]
    pub fn aeron_image_controlled_fragment_assembler_create(
        assembler: *mut *mut aeron_image_controlled_fragment_assembler_t,
        delegate: aeron_controlled_fragment_handler_t,
        delegate_clientd: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Delete an image controlled fragment assembler.\n\n @param assembler to delete.\n @return 0 for success or -1 for error."]
    pub fn aeron_image_controlled_fragment_assembler_delete(
        assembler: *mut aeron_image_controlled_fragment_assembler_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Handler function to be passed for handling fragment assembly.\n\n @param clientd passed in the poll call (must be a aeron_image_controlled_fragment_assembler_t)\n @param buffer containing the data.\n @param length of the data in bytes.\n @param header representing the meta data for the data.\n @return The action to be taken with regard to the stream position after the callback."]
    pub fn aeron_image_controlled_fragment_assembler_handler(
        clientd: *mut ::std::os::raw::c_void,
        buffer: *const u8,
        length: usize,
        header: *mut aeron_header_t,
    ) -> aeron_controlled_fragment_handler_action_t;
}
unsafe extern "C" {
    #[doc = " Create a fragment assembler for use with a subscription.\n\n @param assembler to be set when created successfully.\n @param delegate to call on completed\n @param delegate_clientd to pass to delegate handler.\n @return 0 for success and -1 for error."]
    pub fn aeron_fragment_assembler_create(
        assembler: *mut *mut aeron_fragment_assembler_t,
        delegate: aeron_fragment_handler_t,
        delegate_clientd: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Delete a fragment assembler.\n\n @param assembler to delete.\n @return 0 for success or -1 for error."]
    pub fn aeron_fragment_assembler_delete(
        assembler: *mut aeron_fragment_assembler_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Handler function to be passed for handling fragment assembly.\n\n @param clientd passed in the poll call (must be a aeron_fragment_assembler_t)\n @param buffer containing the data.\n @param length of the data in bytes.\n @param header representing the meta data for the data."]
    pub fn aeron_fragment_assembler_handler(
        clientd: *mut ::std::os::raw::c_void,
        buffer: *const u8,
        length: usize,
        header: *mut aeron_header_t,
    );
}
unsafe extern "C" {
    #[doc = " Create a controlled fragment assembler for use with a subscription.\n\n @param assembler to be set when created successfully.\n @param delegate to call on completed\n @param delegate_clientd to pass to delegate handler.\n @return 0 for success and -1 for error."]
    pub fn aeron_controlled_fragment_assembler_create(
        assembler: *mut *mut aeron_controlled_fragment_assembler_t,
        delegate: aeron_controlled_fragment_handler_t,
        delegate_clientd: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Delete a controlled fragment assembler.\n\n @param assembler to delete.\n @return 0 for success or -1 for error."]
    pub fn aeron_controlled_fragment_assembler_delete(
        assembler: *mut aeron_controlled_fragment_assembler_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Handler function to be passed for handling fragment assembly.\n\n @param clientd passed in the poll call (must be a aeron_controlled_fragment_assembler_t)\n @param buffer containing the data.\n @param length of the data in bytes.\n @param header representing the meta data for the data.\n @return The action to be taken with regard to the stream position after the callback."]
    pub fn aeron_controlled_fragment_assembler_handler(
        clientd: *mut ::std::os::raw::c_void,
        buffer: *const u8,
        length: usize,
        header: *mut aeron_header_t,
    ) -> aeron_controlled_fragment_handler_action_t;
}
unsafe extern "C" {
    #[doc = " Return a pointer to the counter value.\n\n @param counter to pointer to.\n @return pointer to the counter value."]
    pub fn aeron_counter_addr(counter: *mut aeron_counter_t) -> *mut i64;
}
#[doc = " Configuration for a counter that does not change during its lifetime."]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_counter_constants_stct {
    #[doc = " Return the correlation id of the counter creation request that was sent to the media driver. Correlation id is\n unique across all requests sent to the media driver."]
    pub correlation_id: i64,
    #[doc = " Return the registration id used to register this counter with the media driver.\n <p>\n For non-static counters this value is the same as <code>correlation_id</code. For static counters this is the\n value that was explicitly assigned. by the caller, i.e. passed as <code>registration_id</code> parameter into\n <code>aeron_async_add_static_counter</code> call."]
    pub registration_id: i64,
    #[doc = " Identity for the counter within the counters reader and counters manager."]
    pub counter_id: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_counter_constants_stct"]
        [::std::mem::size_of::<aeron_counter_constants_stct>() - 24usize];
    ["Alignment of aeron_counter_constants_stct"]
        [::std::mem::align_of::<aeron_counter_constants_stct>() - 8usize];
    ["Offset of field: aeron_counter_constants_stct::correlation_id"]
        [::std::mem::offset_of!(aeron_counter_constants_stct, correlation_id) - 0usize];
    ["Offset of field: aeron_counter_constants_stct::registration_id"]
        [::std::mem::offset_of!(aeron_counter_constants_stct, registration_id) - 8usize];
    ["Offset of field: aeron_counter_constants_stct::counter_id"]
        [::std::mem::offset_of!(aeron_counter_constants_stct, counter_id) - 16usize];
};
#[doc = " Configuration for a counter that does not change during its lifetime."]
pub type aeron_counter_constants_t = aeron_counter_constants_stct;
unsafe extern "C" {
    #[doc = " Fill in a structure with the constants in use by a counter.\n\n @param counter to get the constants for.\n @param constants structure to fill in with the constants.\n @return 0 for success and -1 for error."]
    pub fn aeron_counter_constants(
        counter: *mut aeron_counter_t,
        constants: *mut aeron_counter_constants_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Asynchronously close the counter.\n\n @param counter to close.\n @return 0 for success or -1 for error."]
    pub fn aeron_counter_close(
        counter: *mut aeron_counter_t,
        on_close_complete: aeron_notification_t,
        on_close_complete_clientd: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Check if the counter is closed\n @param counter to check\n @return true if closed, false otherwise."]
    pub fn aeron_counter_is_closed(counter: *mut aeron_counter_t) -> bool;
}
unsafe extern "C" {
    #[doc = " Return full version and build string.\n\n @return full version and build string."]
    pub fn aeron_version_full() -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " Return version text.\n\n @return version text."]
    pub fn aeron_version_text() -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " Return major version number.\n\n @return major version number."]
    pub fn aeron_version_major() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Return minor version number.\n\n @return minor version number."]
    pub fn aeron_version_minor() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Return patch version number.\n\n @return patch version number."]
    pub fn aeron_version_patch() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Return the git sha for the current build.\n\n @return git version"]
    pub fn aeron_version_gitsha() -> *const ::std::os::raw::c_char;
}
#[doc = " Clock function used by aeron."]
pub type aeron_clock_func_t = ::std::option::Option<unsafe extern "C" fn() -> i64>;
unsafe extern "C" {
    #[doc = " Return time in nanoseconds for machine. Is not wall clock time.\n\n @return nanoseconds since epoch for machine."]
    pub fn aeron_nano_clock() -> i64;
}
unsafe extern "C" {
    #[doc = " Return time in milliseconds since epoch. Is wall clock time.\n\n @return milliseconds since epoch."]
    pub fn aeron_epoch_clock() -> i64;
}
#[doc = " Function to return logging information."]
pub type aeron_log_func_t =
    ::std::option::Option<unsafe extern "C" fn(arg1: *const ::std::os::raw::c_char)>;
unsafe extern "C" {
    #[doc = " Determine if an aeron driver is using a given aeron directory.\n\n @param dirname  for aeron directory\n @param timeout_ms  to use to determine activity for aeron directory\n @param log_func to call during activity check to log diagnostic information.\n @return true for active driver or false for no active driver."]
    pub fn aeron_is_driver_active(
        dirname: *const ::std::os::raw::c_char,
        timeout_ms: i64,
        log_func: aeron_log_func_t,
    ) -> bool;
}
unsafe extern "C" {
    #[doc = " Load properties from a string containing name=value pairs and set appropriate environment variables for the\n process so that subsequent calls to aeron_driver_context_init will use those values.\n\n @param buffer containing properties and values.\n @return 0 for success and -1 for error."]
    pub fn aeron_properties_buffer_load(
        buffer: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Load properties file and set appropriate environment variables for the process so that subsequent\n calls to aeron_driver_context_init will use those values.\n\n @param filename to load.\n @return 0 for success and -1 for error."]
    pub fn aeron_properties_file_load(
        filename: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Load properties from HTTP URL and set environment variables for the process so that subsequent\n calls to aeron_driver_context_init will use those values.\n\n @param url to attempt to retrieve and load.\n @return 0 for success and -1 for error."]
    pub fn aeron_properties_http_load(url: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Load properties based on URL or filename. If string contains file or http URL, it will attempt\n to load properties from a file or http as indicated. If not a URL, then it will try to load the string\n as a filename.\n\n @param url_or_filename to load properties from.\n @return 0 for success and -1 for error."]
    pub fn aeron_properties_load(
        url_or_filename: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Return current aeron error code (errno) for calling thread.\n\n @return aeron error code for calling thread."]
    pub fn aeron_errcode() -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Return the current aeron error message for calling thread.\n\n @return aeron error message for calling thread."]
    pub fn aeron_errmsg() -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " Get the default path used by the Aeron media driver.\n\n @param path buffer to store the path.\n @param path_length space available in the buffer\n @return -1 if there is an issue or the number of bytes written to path excluding the terminator <code>\\0</code>. If this\n is equal to or greater than the path_length then the path has been truncated."]
    pub fn aeron_default_path(
        path: *mut ::std::os::raw::c_char,
        path_length: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Gets the registration id for addition of the counter. Note that using this after a call to poll the succeeds or\n errors is undefined behaviour. As the async_add_counter_t may have been freed.\n\n @param add_counter used to check for completion.\n @return registration id for the counter."]
    pub fn aeron_async_add_counter_get_registration_id(
        add_counter: *mut aeron_async_add_counter_t,
    ) -> i64;
}
unsafe extern "C" {
    #[doc = " Gets the registration id for addition of the publication. Note that using this after a call to poll the succeeds or\n errors is undefined behaviour. As the async_add_publication_t may have been freed.\n\n @param add_publication used to check for completion.\n @return registration id for the publication."]
    pub fn aeron_async_add_publication_get_registration_id(
        add_publication: *mut aeron_async_add_publication_t,
    ) -> i64;
}
unsafe extern "C" {
    #[doc = " Gets the registration id for addition of the exclusive_publication. Note that using this after a call to poll the\n succeeds or errors is undefined behaviour. As the async_add_exclusive_publication_t may have been freed.\n\n @param add_exclusive_publication used to check for completion.\n @return registration id for the exclusive_publication.\n @deprecated Use aeron_async_add_exclusive_publication_get_registration_id instead."]
    pub fn aeron_async_add_exclusive_exclusive_publication_get_registration_id(
        add_exclusive_publication: *mut aeron_async_add_exclusive_publication_t,
    ) -> i64;
}
unsafe extern "C" {
    #[doc = " Gets the registration id for addition of the exclusive_publication. Note that using this after a call to poll the\n succeeds or errors is undefined behaviour. As the async_add_exclusive_publication_t may have been freed.\n\n @param add_exclusive_publication used to check for completion.\n @return registration id for the exclusive_publication."]
    pub fn aeron_async_add_exclusive_publication_get_registration_id(
        add_exclusive_publication: *mut aeron_async_add_exclusive_publication_t,
    ) -> i64;
}
unsafe extern "C" {
    #[doc = " Gets the registration id for addition of the subscription. Note that using this after a call to poll the succeeds or\n errors is undefined behaviour. As the async_add_subscription_t may have been freed.\n\n @param add_subscription used to check for completion.\n @return registration id for the subscription."]
    pub fn aeron_async_add_subscription_get_registration_id(
        add_subscription: *mut aeron_async_add_subscription_t,
    ) -> i64;
}
unsafe extern "C" {
    #[doc = " Gets the registration_id for the destination command supplied. Note that this is the correlation_id used for\n the specified destination command, not the registration_id for the original parent resource (publication,\n subscription).\n\n @param async_destination tracking the current destination command.\n @return correlation_id sent to driver."]
    pub fn aeron_async_destination_get_registration_id(
        async_destination: *mut aeron_async_destination_t,
    ) -> i64;
}
unsafe extern "C" {
    #[doc = " Request the media driver terminates operation and closes all resources.\n\n @param directory    in which the media driver is running.\n @param token_buffer containing the authentication token confirming the client is allowed to terminate the driver.\n @param token_length of the token in the buffer.\n @return"]
    pub fn aeron_context_request_driver_termination(
        directory: *const ::std::os::raw::c_char,
        token_buffer: *const u8,
        token_length: usize,
    ) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct aeron_cnc_stct {
    _unused: [u8; 0],
}
pub type aeron_cnc_t = aeron_cnc_stct;
#[repr(C, packed(4))]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_cnc_constants_stct {
    pub cnc_version: i32,
    pub to_driver_buffer_length: i32,
    pub to_clients_buffer_length: i32,
    pub counter_metadata_buffer_length: i32,
    pub counter_values_buffer_length: i32,
    pub error_log_buffer_length: i32,
    pub client_liveness_timeout: i64,
    pub start_timestamp: i64,
    pub pid: i64,
    pub file_page_size: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_cnc_constants_stct"]
        [::std::mem::size_of::<aeron_cnc_constants_stct>() - 52usize];
    ["Alignment of aeron_cnc_constants_stct"]
        [::std::mem::align_of::<aeron_cnc_constants_stct>() - 4usize];
    ["Offset of field: aeron_cnc_constants_stct::cnc_version"]
        [::std::mem::offset_of!(aeron_cnc_constants_stct, cnc_version) - 0usize];
    ["Offset of field: aeron_cnc_constants_stct::to_driver_buffer_length"]
        [::std::mem::offset_of!(aeron_cnc_constants_stct, to_driver_buffer_length) - 4usize];
    ["Offset of field: aeron_cnc_constants_stct::to_clients_buffer_length"]
        [::std::mem::offset_of!(aeron_cnc_constants_stct, to_clients_buffer_length) - 8usize];
    ["Offset of field: aeron_cnc_constants_stct::counter_metadata_buffer_length"][::std::mem::offset_of!(
        aeron_cnc_constants_stct,
        counter_metadata_buffer_length
    ) - 12usize];
    ["Offset of field: aeron_cnc_constants_stct::counter_values_buffer_length"]
        [::std::mem::offset_of!(aeron_cnc_constants_stct, counter_values_buffer_length) - 16usize];
    ["Offset of field: aeron_cnc_constants_stct::error_log_buffer_length"]
        [::std::mem::offset_of!(aeron_cnc_constants_stct, error_log_buffer_length) - 20usize];
    ["Offset of field: aeron_cnc_constants_stct::client_liveness_timeout"]
        [::std::mem::offset_of!(aeron_cnc_constants_stct, client_liveness_timeout) - 24usize];
    ["Offset of field: aeron_cnc_constants_stct::start_timestamp"]
        [::std::mem::offset_of!(aeron_cnc_constants_stct, start_timestamp) - 32usize];
    ["Offset of field: aeron_cnc_constants_stct::pid"]
        [::std::mem::offset_of!(aeron_cnc_constants_stct, pid) - 40usize];
    ["Offset of field: aeron_cnc_constants_stct::file_page_size"]
        [::std::mem::offset_of!(aeron_cnc_constants_stct, file_page_size) - 48usize];
};
pub type aeron_cnc_constants_t = aeron_cnc_constants_stct;
unsafe extern "C" {
    #[doc = " Initialise an aeron_cnc, which gives user level access to the command and control file used to communicate\n with the media driver. Will wait until the media driver has loaded and the cnc file is created, up to timeout_ms.\n Use a value of 0 for a non-blocking initialisation.\n\n @param aeron_cnc to hold the loaded aeron_cnc\n @param base_path media driver's base path\n @param timeout_ms Number of milliseconds to wait before timing out.\n @return 0 on success, -1 on failure."]
    pub fn aeron_cnc_init(
        aeron_cnc: *mut *mut aeron_cnc_t,
        base_path: *const ::std::os::raw::c_char,
        timeout_ms: i64,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Fetch the sets of constant values associated with this command and control file.\n\n @param aeron_cnc to query\n @param constants user supplied structure to hold return values.\n @return 0 on success, -1 on failure."]
    pub fn aeron_cnc_constants(
        aeron_cnc: *mut aeron_cnc_t,
        constants: *mut aeron_cnc_constants_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Get the current file name of the cnc file.\n\n @param aeron_cnc to query\n @return name of the cnc file"]
    pub fn aeron_cnc_filename(aeron_cnc: *mut aeron_cnc_t) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    #[doc = " Gets the timestamp of the last heartbeat sent to the media driver from any client.\n\n @param aeron_cnc to query\n @return last heartbeat timestamp in ms."]
    pub fn aeron_cnc_to_driver_heartbeat(aeron_cnc: *mut aeron_cnc_t) -> i64;
}
pub type aeron_error_log_reader_func_t = ::std::option::Option<
    unsafe extern "C" fn(
        observation_count: i32,
        first_observation_timestamp: i64,
        last_observation_timestamp: i64,
        error: *const ::std::os::raw::c_char,
        error_length: usize,
        clientd: *mut ::std::os::raw::c_void,
    ),
>;
unsafe extern "C" {
    #[doc = " Reads the current error log for this driver.\n\n @param aeron_cnc to query\n @param callback called for every distinct error observation\n @param clientd client data to be passed to the callback\n @param since_timestamp only return errors after this timestamp (0 returns all)\n @return the number of distinct errors seen"]
    pub fn aeron_cnc_error_log_read(
        aeron_cnc: *mut aeron_cnc_t,
        callback: aeron_error_log_reader_func_t,
        clientd: *mut ::std::os::raw::c_void,
        since_timestamp: i64,
    ) -> usize;
}
unsafe extern "C" {
    #[doc = " Gets a counters reader for this command and control file. This does not need to be closed manually, resources\n are tied to the instance of aeron_cnc.\n\n @param aeron_cnc to query\n @return pointer to a counters reader."]
    pub fn aeron_cnc_counters_reader(aeron_cnc: *mut aeron_cnc_t) -> *mut aeron_counters_reader_t;
}
pub type aeron_loss_reporter_read_entry_func_t = ::std::option::Option<
    unsafe extern "C" fn(
        clientd: *mut ::std::os::raw::c_void,
        observation_count: i64,
        total_bytes_lost: i64,
        first_observation_timestamp: i64,
        last_observation_timestamp: i64,
        session_id: i32,
        stream_id: i32,
        channel: *const ::std::os::raw::c_char,
        channel_length: i32,
        source: *const ::std::os::raw::c_char,
        source_length: i32,
    ),
>;
unsafe extern "C" {
    #[doc = " Read all of the data loss observations from the report in the same media driver instances as the cnc file.\n\n @param aeron_cnc to query\n @param entry_func callback for each observation found\n @param clientd client data to be passed to the callback.\n @return -1 on failure, number of observations on success (could be 0)."]
    pub fn aeron_cnc_loss_reporter_read(
        aeron_cnc: *mut aeron_cnc_t,
        entry_func: aeron_loss_reporter_read_entry_func_t,
        clientd: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    #[doc = " Closes the instance of the aeron cnc and frees its resources.\n\n @param aeron_cnc to close"]
    pub fn aeron_cnc_close(aeron_cnc: *mut aeron_cnc_t);
}
pub type aeron_idle_strategy_func_t = ::std::option::Option<
    unsafe extern "C" fn(state: *mut ::std::os::raw::c_void, work_count: ::std::os::raw::c_int),
>;
pub type aeron_idle_strategy_init_func_t = ::std::option::Option<
    unsafe extern "C" fn(
        state: *mut *mut ::std::os::raw::c_void,
        env_var: *const ::std::os::raw::c_char,
        init_args: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int,
>;
unsafe extern "C" {
    pub fn aeron_semantic_version_compose(major: u8, minor: u8, patch: u8) -> i32;
}
unsafe extern "C" {
    pub fn aeron_semantic_version_major(version: i32) -> u8;
}
unsafe extern "C" {
    pub fn aeron_semantic_version_minor(version: i32) -> u8;
}
unsafe extern "C" {
    pub fn aeron_semantic_version_patch(version: i32) -> u8;
}
pub type aeron_fptr_t = ::std::option::Option<unsafe extern "C" fn()>;
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_uri_param_stct {
    pub key: *const ::std::os::raw::c_char,
    pub value: *const ::std::os::raw::c_char,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_uri_param_stct"][::std::mem::size_of::<aeron_uri_param_stct>() - 16usize];
    ["Alignment of aeron_uri_param_stct"][::std::mem::align_of::<aeron_uri_param_stct>() - 8usize];
    ["Offset of field: aeron_uri_param_stct::key"]
        [::std::mem::offset_of!(aeron_uri_param_stct, key) - 0usize];
    ["Offset of field: aeron_uri_param_stct::value"]
        [::std::mem::offset_of!(aeron_uri_param_stct, value) - 8usize];
};
impl Default for aeron_uri_param_stct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type aeron_uri_param_t = aeron_uri_param_stct;
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_uri_params_stct {
    pub length: usize,
    pub array: *mut aeron_uri_param_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_uri_params_stct"][::std::mem::size_of::<aeron_uri_params_stct>() - 16usize];
    ["Alignment of aeron_uri_params_stct"]
        [::std::mem::align_of::<aeron_uri_params_stct>() - 8usize];
    ["Offset of field: aeron_uri_params_stct::length"]
        [::std::mem::offset_of!(aeron_uri_params_stct, length) - 0usize];
    ["Offset of field: aeron_uri_params_stct::array"]
        [::std::mem::offset_of!(aeron_uri_params_stct, array) - 8usize];
};
impl Default for aeron_uri_params_stct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type aeron_uri_params_t = aeron_uri_params_stct;
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_udp_channel_params_stct {
    pub endpoint: *const ::std::os::raw::c_char,
    pub bind_interface: *const ::std::os::raw::c_char,
    pub control: *const ::std::os::raw::c_char,
    pub control_mode: *const ::std::os::raw::c_char,
    pub channel_tag: *const ::std::os::raw::c_char,
    pub entity_tag: *const ::std::os::raw::c_char,
    pub ttl: *const ::std::os::raw::c_char,
    pub additional_params: aeron_uri_params_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_udp_channel_params_stct"]
        [::std::mem::size_of::<aeron_udp_channel_params_stct>() - 72usize];
    ["Alignment of aeron_udp_channel_params_stct"]
        [::std::mem::align_of::<aeron_udp_channel_params_stct>() - 8usize];
    ["Offset of field: aeron_udp_channel_params_stct::endpoint"]
        [::std::mem::offset_of!(aeron_udp_channel_params_stct, endpoint) - 0usize];
    ["Offset of field: aeron_udp_channel_params_stct::bind_interface"]
        [::std::mem::offset_of!(aeron_udp_channel_params_stct, bind_interface) - 8usize];
    ["Offset of field: aeron_udp_channel_params_stct::control"]
        [::std::mem::offset_of!(aeron_udp_channel_params_stct, control) - 16usize];
    ["Offset of field: aeron_udp_channel_params_stct::control_mode"]
        [::std::mem::offset_of!(aeron_udp_channel_params_stct, control_mode) - 24usize];
    ["Offset of field: aeron_udp_channel_params_stct::channel_tag"]
        [::std::mem::offset_of!(aeron_udp_channel_params_stct, channel_tag) - 32usize];
    ["Offset of field: aeron_udp_channel_params_stct::entity_tag"]
        [::std::mem::offset_of!(aeron_udp_channel_params_stct, entity_tag) - 40usize];
    ["Offset of field: aeron_udp_channel_params_stct::ttl"]
        [::std::mem::offset_of!(aeron_udp_channel_params_stct, ttl) - 48usize];
    ["Offset of field: aeron_udp_channel_params_stct::additional_params"]
        [::std::mem::offset_of!(aeron_udp_channel_params_stct, additional_params) - 56usize];
};
impl Default for aeron_udp_channel_params_stct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type aeron_udp_channel_params_t = aeron_udp_channel_params_stct;
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_ipc_channel_params_stct {
    pub channel_tag: *const ::std::os::raw::c_char,
    pub entity_tag: *const ::std::os::raw::c_char,
    pub control_mode: *const ::std::os::raw::c_char,
    pub additional_params: aeron_uri_params_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_ipc_channel_params_stct"]
        [::std::mem::size_of::<aeron_ipc_channel_params_stct>() - 40usize];
    ["Alignment of aeron_ipc_channel_params_stct"]
        [::std::mem::align_of::<aeron_ipc_channel_params_stct>() - 8usize];
    ["Offset of field: aeron_ipc_channel_params_stct::channel_tag"]
        [::std::mem::offset_of!(aeron_ipc_channel_params_stct, channel_tag) - 0usize];
    ["Offset of field: aeron_ipc_channel_params_stct::entity_tag"]
        [::std::mem::offset_of!(aeron_ipc_channel_params_stct, entity_tag) - 8usize];
    ["Offset of field: aeron_ipc_channel_params_stct::control_mode"]
        [::std::mem::offset_of!(aeron_ipc_channel_params_stct, control_mode) - 16usize];
    ["Offset of field: aeron_ipc_channel_params_stct::additional_params"]
        [::std::mem::offset_of!(aeron_ipc_channel_params_stct, additional_params) - 24usize];
};
impl Default for aeron_ipc_channel_params_stct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type aeron_ipc_channel_params_t = aeron_ipc_channel_params_stct;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum aeron_uri_type_enum {
    AERON_URI_UDP = 0,
    AERON_URI_IPC = 1,
    AERON_URI_UNKNOWN = 2,
}
pub use self::aeron_uri_type_enum as aeron_uri_type_t;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct aeron_uri_stct {
    pub mutable_uri: [::std::os::raw::c_char; 4096usize],
    pub type_: aeron_uri_type_t,
    pub params: aeron_uri_stct__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union aeron_uri_stct__bindgen_ty_1 {
    pub udp: aeron_udp_channel_params_t,
    pub ipc: aeron_ipc_channel_params_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_uri_stct__bindgen_ty_1"]
        [::std::mem::size_of::<aeron_uri_stct__bindgen_ty_1>() - 72usize];
    ["Alignment of aeron_uri_stct__bindgen_ty_1"]
        [::std::mem::align_of::<aeron_uri_stct__bindgen_ty_1>() - 8usize];
    ["Offset of field: aeron_uri_stct__bindgen_ty_1::udp"]
        [::std::mem::offset_of!(aeron_uri_stct__bindgen_ty_1, udp) - 0usize];
    ["Offset of field: aeron_uri_stct__bindgen_ty_1::ipc"]
        [::std::mem::offset_of!(aeron_uri_stct__bindgen_ty_1, ipc) - 0usize];
};
impl Default for aeron_uri_stct__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_uri_stct"][::std::mem::size_of::<aeron_uri_stct>() - 4176usize];
    ["Alignment of aeron_uri_stct"][::std::mem::align_of::<aeron_uri_stct>() - 8usize];
    ["Offset of field: aeron_uri_stct::mutable_uri"]
        [::std::mem::offset_of!(aeron_uri_stct, mutable_uri) - 0usize];
    ["Offset of field: aeron_uri_stct::type_"]
        [::std::mem::offset_of!(aeron_uri_stct, type_) - 4096usize];
    ["Offset of field: aeron_uri_stct::params"]
        [::std::mem::offset_of!(aeron_uri_stct, params) - 4104usize];
};
impl Default for aeron_uri_stct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type aeron_uri_t = aeron_uri_stct;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum aeron_uri_ats_status_en {
    AERON_URI_ATS_STATUS_DEFAULT = 0,
    AERON_URI_ATS_STATUS_ENABLED = 1,
    AERON_URI_ATS_STATUS_DISABLED = 2,
}
pub use self::aeron_uri_ats_status_en as aeron_uri_ats_status_t;
pub type aeron_uri_parse_callback_t = ::std::option::Option<
    unsafe extern "C" fn(
        clientd: *mut ::std::os::raw::c_void,
        key: *const ::std::os::raw::c_char,
        value: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int,
>;
unsafe extern "C" {
    pub fn aeron_uri_parse_params(
        uri: *mut ::std::os::raw::c_char,
        param_func: aeron_uri_parse_callback_t,
        clientd: *mut ::std::os::raw::c_void,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_uri_parse(
        uri_length: usize,
        uri: *const ::std::os::raw::c_char,
        params: *mut aeron_uri_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_uri_close(params: *mut aeron_uri_t);
}
unsafe extern "C" {
    pub fn aeron_uri_multicast_ttl(uri: *mut aeron_uri_t) -> u8;
}
unsafe extern "C" {
    pub fn aeron_uri_find_param_value(
        uri_params: *const aeron_uri_params_t,
        key: *const ::std::os::raw::c_char,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn aeron_uri_get_int32(
        uri_params: *mut aeron_uri_params_t,
        key: *const ::std::os::raw::c_char,
        retval: *mut i32,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_uri_get_int64(
        uri_params: *mut aeron_uri_params_t,
        key: *const ::std::os::raw::c_char,
        default_val: i64,
        retval: *mut i64,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_uri_get_bool(
        uri_params: *mut aeron_uri_params_t,
        key: *const ::std::os::raw::c_char,
        retval: *mut bool,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_uri_get_ats(
        uri_params: *mut aeron_uri_params_t,
        uri_ats_status: *mut aeron_uri_ats_status_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_uri_get_timeout(
        uri_params: *mut aeron_uri_params_t,
        param_name: *const ::std::os::raw::c_char,
        timeout_ns: *mut u64,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_uri_sprint(
        uri: *mut aeron_uri_t,
        buffer: *mut ::std::os::raw::c_char,
        buffer_len: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_uri_get_socket_buf_lengths(
        uri_params: *mut aeron_uri_params_t,
        socket_sndbuf_length: *mut usize,
        socket_rcvbuf_length: *mut usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_uri_get_receiver_window_length(
        uri_params: *mut aeron_uri_params_t,
        receiver_window_length: *mut usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_uri_parse_tag(tag_str: *const ::std::os::raw::c_char) -> i64;
}
unsafe extern "C" {
    pub fn aeron_randomised_int32() -> i32;
}
unsafe extern "C" {
    pub fn aeron_format_date(str_: *mut ::std::os::raw::c_char, count: usize, timestamp: i64);
}
unsafe extern "C" {
    pub fn aeron_format_number_to_locale(
        value: ::std::os::raw::c_longlong,
        buffer: *mut ::std::os::raw::c_char,
        buffer_len: usize,
    ) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn aeron_format_to_hex(
        str_: *mut ::std::os::raw::c_char,
        str_length: usize,
        data: *const u8,
        data_len: usize,
    );
}
unsafe extern "C" {
    pub fn aeron_tokenise(
        input: *mut ::std::os::raw::c_char,
        delimiter: ::std::os::raw::c_char,
        max_tokens: ::std::os::raw::c_int,
        tokens: *mut *mut ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_digit_count(value: u32) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_per_thread_error_stct {
    pub errcode: ::std::os::raw::c_int,
    pub offset: usize,
    pub errmsg: [::std::os::raw::c_char; 8192usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_per_thread_error_stct"]
        [::std::mem::size_of::<aeron_per_thread_error_stct>() - 8208usize];
    ["Alignment of aeron_per_thread_error_stct"]
        [::std::mem::align_of::<aeron_per_thread_error_stct>() - 8usize];
    ["Offset of field: aeron_per_thread_error_stct::errcode"]
        [::std::mem::offset_of!(aeron_per_thread_error_stct, errcode) - 0usize];
    ["Offset of field: aeron_per_thread_error_stct::offset"]
        [::std::mem::offset_of!(aeron_per_thread_error_stct, offset) - 8usize];
    ["Offset of field: aeron_per_thread_error_stct::errmsg"]
        [::std::mem::offset_of!(aeron_per_thread_error_stct, errmsg) - 16usize];
};
impl Default for aeron_per_thread_error_stct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type aeron_per_thread_error_t = aeron_per_thread_error_stct;
unsafe extern "C" {
    pub fn aeron_set_errno(errcode: ::std::os::raw::c_int);
}
unsafe extern "C" {
    pub fn aeron_error_code_str(errcode: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn aeron_err_set(
        errcode: ::std::os::raw::c_int,
        function: *const ::std::os::raw::c_char,
        filename: *const ::std::os::raw::c_char,
        line_number: ::std::os::raw::c_int,
        format: *const ::std::os::raw::c_char,
        ...
    );
}
unsafe extern "C" {
    pub fn aeron_err_append(
        function: *const ::std::os::raw::c_char,
        filename: *const ::std::os::raw::c_char,
        line_number: ::std::os::raw::c_int,
        format: *const ::std::os::raw::c_char,
        ...
    );
}
unsafe extern "C" {
    pub fn aeron_err_clear();
}
unsafe extern "C" {
    pub fn aeron_alloc(ptr: *mut *mut ::std::os::raw::c_void, size: usize)
    -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_alloc_aligned(
        ptr: *mut *mut ::std::os::raw::c_void,
        offset: *mut usize,
        size: usize,
        alignment: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_reallocf(
        ptr: *mut *mut ::std::os::raw::c_void,
        size: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_free(ptr: *mut ::std::os::raw::c_void);
}
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_str_to_ptr_hash_map_key_stct {
    pub str_: *const ::std::os::raw::c_char,
    pub hash_code: u64,
    pub str_length: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_str_to_ptr_hash_map_key_stct"]
        [::std::mem::size_of::<aeron_str_to_ptr_hash_map_key_stct>() - 24usize];
    ["Alignment of aeron_str_to_ptr_hash_map_key_stct"]
        [::std::mem::align_of::<aeron_str_to_ptr_hash_map_key_stct>() - 8usize];
    ["Offset of field: aeron_str_to_ptr_hash_map_key_stct::str_"]
        [::std::mem::offset_of!(aeron_str_to_ptr_hash_map_key_stct, str_) - 0usize];
    ["Offset of field: aeron_str_to_ptr_hash_map_key_stct::hash_code"]
        [::std::mem::offset_of!(aeron_str_to_ptr_hash_map_key_stct, hash_code) - 8usize];
    ["Offset of field: aeron_str_to_ptr_hash_map_key_stct::str_length"]
        [::std::mem::offset_of!(aeron_str_to_ptr_hash_map_key_stct, str_length) - 16usize];
};
impl Default for aeron_str_to_ptr_hash_map_key_stct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type aeron_str_to_ptr_hash_map_key_t = aeron_str_to_ptr_hash_map_key_stct;
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct aeron_str_to_ptr_hash_map_stct {
    pub keys: *mut aeron_str_to_ptr_hash_map_key_t,
    pub values: *mut *mut ::std::os::raw::c_void,
    pub load_factor: f32,
    pub capacity: usize,
    pub size: usize,
    pub resize_threshold: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_str_to_ptr_hash_map_stct"]
        [::std::mem::size_of::<aeron_str_to_ptr_hash_map_stct>() - 48usize];
    ["Alignment of aeron_str_to_ptr_hash_map_stct"]
        [::std::mem::align_of::<aeron_str_to_ptr_hash_map_stct>() - 8usize];
    ["Offset of field: aeron_str_to_ptr_hash_map_stct::keys"]
        [::std::mem::offset_of!(aeron_str_to_ptr_hash_map_stct, keys) - 0usize];
    ["Offset of field: aeron_str_to_ptr_hash_map_stct::values"]
        [::std::mem::offset_of!(aeron_str_to_ptr_hash_map_stct, values) - 8usize];
    ["Offset of field: aeron_str_to_ptr_hash_map_stct::load_factor"]
        [::std::mem::offset_of!(aeron_str_to_ptr_hash_map_stct, load_factor) - 16usize];
    ["Offset of field: aeron_str_to_ptr_hash_map_stct::capacity"]
        [::std::mem::offset_of!(aeron_str_to_ptr_hash_map_stct, capacity) - 24usize];
    ["Offset of field: aeron_str_to_ptr_hash_map_stct::size"]
        [::std::mem::offset_of!(aeron_str_to_ptr_hash_map_stct, size) - 32usize];
    ["Offset of field: aeron_str_to_ptr_hash_map_stct::resize_threshold"]
        [::std::mem::offset_of!(aeron_str_to_ptr_hash_map_stct, resize_threshold) - 40usize];
};
impl Default for aeron_str_to_ptr_hash_map_stct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type aeron_str_to_ptr_hash_map_t = aeron_str_to_ptr_hash_map_stct;
pub type aeron_str_to_ptr_hash_map_for_each_func_t = ::std::option::Option<
    unsafe extern "C" fn(
        clientd: *mut ::std::os::raw::c_void,
        key: *const ::std::os::raw::c_char,
        key_len: usize,
        value: *mut ::std::os::raw::c_void,
    ),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq)]
pub struct aeron_uri_string_builder_stct {
    pub params: aeron_str_to_ptr_hash_map_t,
    pub closed: bool,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_uri_string_builder_stct"]
        [::std::mem::size_of::<aeron_uri_string_builder_stct>() - 56usize];
    ["Alignment of aeron_uri_string_builder_stct"]
        [::std::mem::align_of::<aeron_uri_string_builder_stct>() - 8usize];
    ["Offset of field: aeron_uri_string_builder_stct::params"]
        [::std::mem::offset_of!(aeron_uri_string_builder_stct, params) - 0usize];
    ["Offset of field: aeron_uri_string_builder_stct::closed"]
        [::std::mem::offset_of!(aeron_uri_string_builder_stct, closed) - 48usize];
};
impl Default for aeron_uri_string_builder_stct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type aeron_uri_string_builder_t = aeron_uri_string_builder_stct;
unsafe extern "C" {
    pub fn aeron_uri_string_builder_init_new(
        builder: *mut aeron_uri_string_builder_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_uri_string_builder_init_on_string(
        builder: *mut aeron_uri_string_builder_t,
        uri: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_uri_string_builder_close(
        builder: *mut aeron_uri_string_builder_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_uri_string_builder_put(
        builder: *mut aeron_uri_string_builder_t,
        key: *const ::std::os::raw::c_char,
        value: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_uri_string_builder_put_int32(
        builder: *mut aeron_uri_string_builder_t,
        key: *const ::std::os::raw::c_char,
        value: i32,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_uri_string_builder_put_int64(
        builder: *mut aeron_uri_string_builder_t,
        key: *const ::std::os::raw::c_char,
        value: i64,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_uri_string_builder_get(
        builder: *mut aeron_uri_string_builder_t,
        key: *const ::std::os::raw::c_char,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn aeron_uri_string_builder_sprint(
        builder: *mut aeron_uri_string_builder_t,
        buffer: *mut ::std::os::raw::c_char,
        buffer_len: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_uri_string_builder_set_initial_position(
        builder: *mut aeron_uri_string_builder_t,
        position: i64,
        initial_term_id: i32,
        term_length: i32,
    ) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_frame_header_stct {
    pub frame_length: i32,
    pub version: i8,
    pub flags: u8,
    pub type_: i16,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_frame_header_stct"][::std::mem::size_of::<aeron_frame_header_stct>() - 8usize];
    ["Alignment of aeron_frame_header_stct"]
        [::std::mem::align_of::<aeron_frame_header_stct>() - 4usize];
    ["Offset of field: aeron_frame_header_stct::frame_length"]
        [::std::mem::offset_of!(aeron_frame_header_stct, frame_length) - 0usize];
    ["Offset of field: aeron_frame_header_stct::version"]
        [::std::mem::offset_of!(aeron_frame_header_stct, version) - 4usize];
    ["Offset of field: aeron_frame_header_stct::flags"]
        [::std::mem::offset_of!(aeron_frame_header_stct, flags) - 5usize];
    ["Offset of field: aeron_frame_header_stct::type_"]
        [::std::mem::offset_of!(aeron_frame_header_stct, type_) - 6usize];
};
pub type aeron_frame_header_t = aeron_frame_header_stct;
#[repr(C, packed(4))]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_data_header_as_longs_stct {
    pub hdr: [u64; 4usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_data_header_as_longs_stct"]
        [::std::mem::size_of::<aeron_data_header_as_longs_stct>() - 32usize];
    ["Alignment of aeron_data_header_as_longs_stct"]
        [::std::mem::align_of::<aeron_data_header_as_longs_stct>() - 4usize];
    ["Offset of field: aeron_data_header_as_longs_stct::hdr"]
        [::std::mem::offset_of!(aeron_data_header_as_longs_stct, hdr) - 0usize];
};
pub type aeron_data_header_as_longs_t = aeron_data_header_as_longs_stct;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_setup_header_stct {
    pub frame_header: aeron_frame_header_t,
    pub term_offset: i32,
    pub session_id: i32,
    pub stream_id: i32,
    pub initial_term_id: i32,
    pub active_term_id: i32,
    pub term_length: i32,
    pub mtu: i32,
    pub ttl: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_setup_header_stct"][::std::mem::size_of::<aeron_setup_header_stct>() - 40usize];
    ["Alignment of aeron_setup_header_stct"]
        [::std::mem::align_of::<aeron_setup_header_stct>() - 4usize];
    ["Offset of field: aeron_setup_header_stct::frame_header"]
        [::std::mem::offset_of!(aeron_setup_header_stct, frame_header) - 0usize];
    ["Offset of field: aeron_setup_header_stct::term_offset"]
        [::std::mem::offset_of!(aeron_setup_header_stct, term_offset) - 8usize];
    ["Offset of field: aeron_setup_header_stct::session_id"]
        [::std::mem::offset_of!(aeron_setup_header_stct, session_id) - 12usize];
    ["Offset of field: aeron_setup_header_stct::stream_id"]
        [::std::mem::offset_of!(aeron_setup_header_stct, stream_id) - 16usize];
    ["Offset of field: aeron_setup_header_stct::initial_term_id"]
        [::std::mem::offset_of!(aeron_setup_header_stct, initial_term_id) - 20usize];
    ["Offset of field: aeron_setup_header_stct::active_term_id"]
        [::std::mem::offset_of!(aeron_setup_header_stct, active_term_id) - 24usize];
    ["Offset of field: aeron_setup_header_stct::term_length"]
        [::std::mem::offset_of!(aeron_setup_header_stct, term_length) - 28usize];
    ["Offset of field: aeron_setup_header_stct::mtu"]
        [::std::mem::offset_of!(aeron_setup_header_stct, mtu) - 32usize];
    ["Offset of field: aeron_setup_header_stct::ttl"]
        [::std::mem::offset_of!(aeron_setup_header_stct, ttl) - 36usize];
};
pub type aeron_setup_header_t = aeron_setup_header_stct;
#[repr(C, packed(4))]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_data_header_stct {
    pub frame_header: aeron_frame_header_t,
    pub term_offset: i32,
    pub session_id: i32,
    pub stream_id: i32,
    pub term_id: i32,
    pub reserved_value: i64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_data_header_stct"][::std::mem::size_of::<aeron_data_header_stct>() - 32usize];
    ["Alignment of aeron_data_header_stct"]
        [::std::mem::align_of::<aeron_data_header_stct>() - 4usize];
    ["Offset of field: aeron_data_header_stct::frame_header"]
        [::std::mem::offset_of!(aeron_data_header_stct, frame_header) - 0usize];
    ["Offset of field: aeron_data_header_stct::term_offset"]
        [::std::mem::offset_of!(aeron_data_header_stct, term_offset) - 8usize];
    ["Offset of field: aeron_data_header_stct::session_id"]
        [::std::mem::offset_of!(aeron_data_header_stct, session_id) - 12usize];
    ["Offset of field: aeron_data_header_stct::stream_id"]
        [::std::mem::offset_of!(aeron_data_header_stct, stream_id) - 16usize];
    ["Offset of field: aeron_data_header_stct::term_id"]
        [::std::mem::offset_of!(aeron_data_header_stct, term_id) - 20usize];
    ["Offset of field: aeron_data_header_stct::reserved_value"]
        [::std::mem::offset_of!(aeron_data_header_stct, reserved_value) - 24usize];
};
pub type aeron_data_header_t = aeron_data_header_stct;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_nak_header_stct {
    pub frame_header: aeron_frame_header_t,
    pub session_id: i32,
    pub stream_id: i32,
    pub term_id: i32,
    pub term_offset: i32,
    pub length: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_nak_header_stct"][::std::mem::size_of::<aeron_nak_header_stct>() - 28usize];
    ["Alignment of aeron_nak_header_stct"]
        [::std::mem::align_of::<aeron_nak_header_stct>() - 4usize];
    ["Offset of field: aeron_nak_header_stct::frame_header"]
        [::std::mem::offset_of!(aeron_nak_header_stct, frame_header) - 0usize];
    ["Offset of field: aeron_nak_header_stct::session_id"]
        [::std::mem::offset_of!(aeron_nak_header_stct, session_id) - 8usize];
    ["Offset of field: aeron_nak_header_stct::stream_id"]
        [::std::mem::offset_of!(aeron_nak_header_stct, stream_id) - 12usize];
    ["Offset of field: aeron_nak_header_stct::term_id"]
        [::std::mem::offset_of!(aeron_nak_header_stct, term_id) - 16usize];
    ["Offset of field: aeron_nak_header_stct::term_offset"]
        [::std::mem::offset_of!(aeron_nak_header_stct, term_offset) - 20usize];
    ["Offset of field: aeron_nak_header_stct::length"]
        [::std::mem::offset_of!(aeron_nak_header_stct, length) - 24usize];
};
pub type aeron_nak_header_t = aeron_nak_header_stct;
#[repr(C, packed(4))]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_status_message_header_stct {
    pub frame_header: aeron_frame_header_t,
    pub session_id: i32,
    pub stream_id: i32,
    pub consumption_term_id: i32,
    pub consumption_term_offset: i32,
    pub receiver_window: i32,
    pub receiver_id: i64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_status_message_header_stct"]
        [::std::mem::size_of::<aeron_status_message_header_stct>() - 36usize];
    ["Alignment of aeron_status_message_header_stct"]
        [::std::mem::align_of::<aeron_status_message_header_stct>() - 4usize];
    ["Offset of field: aeron_status_message_header_stct::frame_header"]
        [::std::mem::offset_of!(aeron_status_message_header_stct, frame_header) - 0usize];
    ["Offset of field: aeron_status_message_header_stct::session_id"]
        [::std::mem::offset_of!(aeron_status_message_header_stct, session_id) - 8usize];
    ["Offset of field: aeron_status_message_header_stct::stream_id"]
        [::std::mem::offset_of!(aeron_status_message_header_stct, stream_id) - 12usize];
    ["Offset of field: aeron_status_message_header_stct::consumption_term_id"]
        [::std::mem::offset_of!(aeron_status_message_header_stct, consumption_term_id) - 16usize];
    ["Offset of field: aeron_status_message_header_stct::consumption_term_offset"][::std::mem::offset_of!(
        aeron_status_message_header_stct,
        consumption_term_offset
    ) - 20usize];
    ["Offset of field: aeron_status_message_header_stct::receiver_window"]
        [::std::mem::offset_of!(aeron_status_message_header_stct, receiver_window) - 24usize];
    ["Offset of field: aeron_status_message_header_stct::receiver_id"]
        [::std::mem::offset_of!(aeron_status_message_header_stct, receiver_id) - 28usize];
};
pub type aeron_status_message_header_t = aeron_status_message_header_stct;
#[repr(C, packed(4))]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_status_message_optional_header_stct {
    pub group_tag: i64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_status_message_optional_header_stct"]
        [::std::mem::size_of::<aeron_status_message_optional_header_stct>() - 8usize];
    ["Alignment of aeron_status_message_optional_header_stct"]
        [::std::mem::align_of::<aeron_status_message_optional_header_stct>() - 4usize];
    ["Offset of field: aeron_status_message_optional_header_stct::group_tag"]
        [::std::mem::offset_of!(aeron_status_message_optional_header_stct, group_tag) - 0usize];
};
pub type aeron_status_message_optional_header_t = aeron_status_message_optional_header_stct;
#[repr(C, packed(4))]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_error_stct {
    pub frame_header: aeron_frame_header_t,
    pub session_id: i32,
    pub stream_id: i32,
    pub receiver_id: i64,
    pub group_tag: i64,
    pub error_code: i32,
    pub error_length: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_error_stct"][::std::mem::size_of::<aeron_error_stct>() - 40usize];
    ["Alignment of aeron_error_stct"][::std::mem::align_of::<aeron_error_stct>() - 4usize];
    ["Offset of field: aeron_error_stct::frame_header"]
        [::std::mem::offset_of!(aeron_error_stct, frame_header) - 0usize];
    ["Offset of field: aeron_error_stct::session_id"]
        [::std::mem::offset_of!(aeron_error_stct, session_id) - 8usize];
    ["Offset of field: aeron_error_stct::stream_id"]
        [::std::mem::offset_of!(aeron_error_stct, stream_id) - 12usize];
    ["Offset of field: aeron_error_stct::receiver_id"]
        [::std::mem::offset_of!(aeron_error_stct, receiver_id) - 16usize];
    ["Offset of field: aeron_error_stct::group_tag"]
        [::std::mem::offset_of!(aeron_error_stct, group_tag) - 24usize];
    ["Offset of field: aeron_error_stct::error_code"]
        [::std::mem::offset_of!(aeron_error_stct, error_code) - 32usize];
    ["Offset of field: aeron_error_stct::error_length"]
        [::std::mem::offset_of!(aeron_error_stct, error_length) - 36usize];
};
pub type aeron_error_t = aeron_error_stct;
#[repr(C, packed(4))]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_rttm_header_stct {
    pub frame_header: aeron_frame_header_t,
    pub session_id: i32,
    pub stream_id: i32,
    pub echo_timestamp: i64,
    pub reception_delta: i64,
    pub receiver_id: i64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_rttm_header_stct"][::std::mem::size_of::<aeron_rttm_header_stct>() - 40usize];
    ["Alignment of aeron_rttm_header_stct"]
        [::std::mem::align_of::<aeron_rttm_header_stct>() - 4usize];
    ["Offset of field: aeron_rttm_header_stct::frame_header"]
        [::std::mem::offset_of!(aeron_rttm_header_stct, frame_header) - 0usize];
    ["Offset of field: aeron_rttm_header_stct::session_id"]
        [::std::mem::offset_of!(aeron_rttm_header_stct, session_id) - 8usize];
    ["Offset of field: aeron_rttm_header_stct::stream_id"]
        [::std::mem::offset_of!(aeron_rttm_header_stct, stream_id) - 12usize];
    ["Offset of field: aeron_rttm_header_stct::echo_timestamp"]
        [::std::mem::offset_of!(aeron_rttm_header_stct, echo_timestamp) - 16usize];
    ["Offset of field: aeron_rttm_header_stct::reception_delta"]
        [::std::mem::offset_of!(aeron_rttm_header_stct, reception_delta) - 24usize];
    ["Offset of field: aeron_rttm_header_stct::receiver_id"]
        [::std::mem::offset_of!(aeron_rttm_header_stct, receiver_id) - 32usize];
};
pub type aeron_rttm_header_t = aeron_rttm_header_stct;
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_resolution_header_stct {
    pub res_type: i8,
    pub res_flags: u8,
    pub udp_port: u16,
    pub age_in_ms: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_resolution_header_stct"]
        [::std::mem::size_of::<aeron_resolution_header_stct>() - 8usize];
    ["Alignment of aeron_resolution_header_stct"]
        [::std::mem::align_of::<aeron_resolution_header_stct>() - 1usize];
    ["Offset of field: aeron_resolution_header_stct::res_type"]
        [::std::mem::offset_of!(aeron_resolution_header_stct, res_type) - 0usize];
    ["Offset of field: aeron_resolution_header_stct::res_flags"]
        [::std::mem::offset_of!(aeron_resolution_header_stct, res_flags) - 1usize];
    ["Offset of field: aeron_resolution_header_stct::udp_port"]
        [::std::mem::offset_of!(aeron_resolution_header_stct, udp_port) - 2usize];
    ["Offset of field: aeron_resolution_header_stct::age_in_ms"]
        [::std::mem::offset_of!(aeron_resolution_header_stct, age_in_ms) - 4usize];
};
pub type aeron_resolution_header_t = aeron_resolution_header_stct;
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_resolution_header_ipv4_stct {
    pub resolution_header: aeron_resolution_header_t,
    pub addr: [u8; 4usize],
    pub name_length: i16,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_resolution_header_ipv4_stct"]
        [::std::mem::size_of::<aeron_resolution_header_ipv4_stct>() - 14usize];
    ["Alignment of aeron_resolution_header_ipv4_stct"]
        [::std::mem::align_of::<aeron_resolution_header_ipv4_stct>() - 1usize];
    ["Offset of field: aeron_resolution_header_ipv4_stct::resolution_header"]
        [::std::mem::offset_of!(aeron_resolution_header_ipv4_stct, resolution_header) - 0usize];
    ["Offset of field: aeron_resolution_header_ipv4_stct::addr"]
        [::std::mem::offset_of!(aeron_resolution_header_ipv4_stct, addr) - 8usize];
    ["Offset of field: aeron_resolution_header_ipv4_stct::name_length"]
        [::std::mem::offset_of!(aeron_resolution_header_ipv4_stct, name_length) - 12usize];
};
pub type aeron_resolution_header_ipv4_t = aeron_resolution_header_ipv4_stct;
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_resolution_header_ipv6_stct {
    pub resolution_header: aeron_resolution_header_t,
    pub addr: [u8; 16usize],
    pub name_length: i16,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_resolution_header_ipv6_stct"]
        [::std::mem::size_of::<aeron_resolution_header_ipv6_stct>() - 26usize];
    ["Alignment of aeron_resolution_header_ipv6_stct"]
        [::std::mem::align_of::<aeron_resolution_header_ipv6_stct>() - 1usize];
    ["Offset of field: aeron_resolution_header_ipv6_stct::resolution_header"]
        [::std::mem::offset_of!(aeron_resolution_header_ipv6_stct, resolution_header) - 0usize];
    ["Offset of field: aeron_resolution_header_ipv6_stct::addr"]
        [::std::mem::offset_of!(aeron_resolution_header_ipv6_stct, addr) - 8usize];
    ["Offset of field: aeron_resolution_header_ipv6_stct::name_length"]
        [::std::mem::offset_of!(aeron_resolution_header_ipv6_stct, name_length) - 24usize];
};
pub type aeron_resolution_header_ipv6_t = aeron_resolution_header_ipv6_stct;
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_option_header_stct {
    pub option_length: u16,
    pub type_: u16,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_option_header_stct"]
        [::std::mem::size_of::<aeron_option_header_stct>() - 4usize];
    ["Alignment of aeron_option_header_stct"]
        [::std::mem::align_of::<aeron_option_header_stct>() - 1usize];
    ["Offset of field: aeron_option_header_stct::option_length"]
        [::std::mem::offset_of!(aeron_option_header_stct, option_length) - 0usize];
    ["Offset of field: aeron_option_header_stct::type_"]
        [::std::mem::offset_of!(aeron_option_header_stct, type_) - 2usize];
};
pub type aeron_option_header_t = aeron_option_header_stct;
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_response_setup_header_stct {
    pub frame_header: aeron_frame_header_t,
    pub session_id: i32,
    pub stream_id: i32,
    pub response_session_id: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_response_setup_header_stct"]
        [::std::mem::size_of::<aeron_response_setup_header_stct>() - 20usize];
    ["Alignment of aeron_response_setup_header_stct"]
        [::std::mem::align_of::<aeron_response_setup_header_stct>() - 1usize];
    ["Offset of field: aeron_response_setup_header_stct::frame_header"]
        [::std::mem::offset_of!(aeron_response_setup_header_stct, frame_header) - 0usize];
    ["Offset of field: aeron_response_setup_header_stct::session_id"]
        [::std::mem::offset_of!(aeron_response_setup_header_stct, session_id) - 8usize];
    ["Offset of field: aeron_response_setup_header_stct::stream_id"]
        [::std::mem::offset_of!(aeron_response_setup_header_stct, stream_id) - 12usize];
    ["Offset of field: aeron_response_setup_header_stct::response_session_id"]
        [::std::mem::offset_of!(aeron_response_setup_header_stct, response_session_id) - 16usize];
};
pub type aeron_response_setup_header_t = aeron_response_setup_header_stct;
unsafe extern "C" {
    pub fn aeron_udp_protocol_group_tag(
        sm: *mut aeron_status_message_header_t,
        group_tag: *mut i64,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_res_header_entry_length_ipv4(header: *mut aeron_resolution_header_ipv4_t)
    -> usize;
}
unsafe extern "C" {
    pub fn aeron_res_header_entry_length_ipv6(header: *mut aeron_resolution_header_ipv6_t)
    -> usize;
}
unsafe extern "C" {
    pub fn aeron_res_header_entry_length(
        res: *mut ::std::os::raw::c_void,
        remaining: usize,
    ) -> ::std::os::raw::c_int;
}
#[repr(C, packed(4))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_logbuffer_metadata_stct {
    pub term_tail_counters: [i64; 3usize],
    pub active_term_count: i32,
    pub pad1: [u8; 100usize],
    pub end_of_stream_position: i64,
    pub is_connected: i32,
    pub active_transport_count: i32,
    pub pad2: [u8; 112usize],
    pub correlation_id: i64,
    pub initial_term_id: i32,
    pub default_frame_header_length: i32,
    pub mtu_length: i32,
    pub term_length: i32,
    pub page_size: i32,
    pub publication_window_length: i32,
    pub receiver_window_length: i32,
    pub socket_sndbuf_length: i32,
    pub os_default_socket_sndbuf_length: i32,
    pub os_max_socket_sndbuf_length: i32,
    pub socket_rcvbuf_length: i32,
    pub os_default_socket_rcvbuf_length: i32,
    pub os_max_socket_rcvbuf_length: i32,
    pub max_resend: i32,
    pub default_header: [u8; 128usize],
    pub entity_tag: i64,
    pub response_correlation_id: i64,
    pub linger_timeout_ns: i64,
    pub untethered_window_limit_timeout_ns: i64,
    pub untethered_resting_timeout_ns: i64,
    pub group: u8,
    pub is_response: u8,
    pub rejoin: u8,
    pub reliable: u8,
    pub sparse: u8,
    pub signal_eos: u8,
    pub spies_simulate_connection: u8,
    pub tether: u8,
    pub is_publication_revoked: u8,
    pub type_: u8,
    pub pad3: [u8; 2usize],
    pub untethered_linger_timeout_ns: i64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_logbuffer_metadata_stct"]
        [::std::mem::size_of::<aeron_logbuffer_metadata_stct>() - 508usize];
    ["Alignment of aeron_logbuffer_metadata_stct"]
        [::std::mem::align_of::<aeron_logbuffer_metadata_stct>() - 4usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::term_tail_counters"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, term_tail_counters) - 0usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::active_term_count"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, active_term_count) - 24usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::pad1"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, pad1) - 28usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::end_of_stream_position"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, end_of_stream_position) - 128usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::is_connected"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, is_connected) - 136usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::active_transport_count"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, active_transport_count) - 140usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::pad2"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, pad2) - 144usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::correlation_id"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, correlation_id) - 256usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::initial_term_id"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, initial_term_id) - 264usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::default_frame_header_length"][::std::mem::offset_of!(
        aeron_logbuffer_metadata_stct,
        default_frame_header_length
    ) - 268usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::mtu_length"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, mtu_length) - 272usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::term_length"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, term_length) - 276usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::page_size"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, page_size) - 280usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::publication_window_length"][::std::mem::offset_of!(
        aeron_logbuffer_metadata_stct,
        publication_window_length
    ) - 284usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::receiver_window_length"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, receiver_window_length) - 288usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::socket_sndbuf_length"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, socket_sndbuf_length) - 292usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::os_default_socket_sndbuf_length"][::std::mem::offset_of!(
        aeron_logbuffer_metadata_stct,
        os_default_socket_sndbuf_length
    )
        - 296usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::os_max_socket_sndbuf_length"][::std::mem::offset_of!(
        aeron_logbuffer_metadata_stct,
        os_max_socket_sndbuf_length
    ) - 300usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::socket_rcvbuf_length"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, socket_rcvbuf_length) - 304usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::os_default_socket_rcvbuf_length"][::std::mem::offset_of!(
        aeron_logbuffer_metadata_stct,
        os_default_socket_rcvbuf_length
    )
        - 308usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::os_max_socket_rcvbuf_length"][::std::mem::offset_of!(
        aeron_logbuffer_metadata_stct,
        os_max_socket_rcvbuf_length
    ) - 312usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::max_resend"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, max_resend) - 316usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::default_header"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, default_header) - 320usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::entity_tag"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, entity_tag) - 448usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::response_correlation_id"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, response_correlation_id) - 456usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::linger_timeout_ns"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, linger_timeout_ns) - 464usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::untethered_window_limit_timeout_ns"][::std::mem::offset_of!(
        aeron_logbuffer_metadata_stct,
        untethered_window_limit_timeout_ns
    )
        - 472usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::untethered_resting_timeout_ns"][::std::mem::offset_of!(
        aeron_logbuffer_metadata_stct,
        untethered_resting_timeout_ns
    ) - 480usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::group"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, group) - 488usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::is_response"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, is_response) - 489usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::rejoin"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, rejoin) - 490usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::reliable"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, reliable) - 491usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::sparse"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, sparse) - 492usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::signal_eos"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, signal_eos) - 493usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::spies_simulate_connection"][::std::mem::offset_of!(
        aeron_logbuffer_metadata_stct,
        spies_simulate_connection
    ) - 494usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::tether"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, tether) - 495usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::is_publication_revoked"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, is_publication_revoked) - 496usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::type_"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, type_) - 497usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::pad3"]
        [::std::mem::offset_of!(aeron_logbuffer_metadata_stct, pad3) - 498usize];
    ["Offset of field: aeron_logbuffer_metadata_stct::untethered_linger_timeout_ns"][::std::mem::offset_of!(
        aeron_logbuffer_metadata_stct,
        untethered_linger_timeout_ns
    ) - 500usize];
};
impl Default for aeron_logbuffer_metadata_stct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type aeron_logbuffer_metadata_t = aeron_logbuffer_metadata_stct;
unsafe extern "C" {
    pub fn aeron_logbuffer_check_term_length(term_length: u64) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_logbuffer_check_page_size(page_size: u64) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_mapped_file_stct {
    pub addr: *mut ::std::os::raw::c_void,
    pub length: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_mapped_file_stct"][::std::mem::size_of::<aeron_mapped_file_stct>() - 16usize];
    ["Alignment of aeron_mapped_file_stct"]
        [::std::mem::align_of::<aeron_mapped_file_stct>() - 8usize];
    ["Offset of field: aeron_mapped_file_stct::addr"]
        [::std::mem::offset_of!(aeron_mapped_file_stct, addr) - 0usize];
    ["Offset of field: aeron_mapped_file_stct::length"]
        [::std::mem::offset_of!(aeron_mapped_file_stct, length) - 8usize];
};
impl Default for aeron_mapped_file_stct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type aeron_mapped_file_t = aeron_mapped_file_stct;
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_mapped_buffer_stct {
    pub addr: *mut u8,
    pub length: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_mapped_buffer_stct"]
        [::std::mem::size_of::<aeron_mapped_buffer_stct>() - 16usize];
    ["Alignment of aeron_mapped_buffer_stct"]
        [::std::mem::align_of::<aeron_mapped_buffer_stct>() - 8usize];
    ["Offset of field: aeron_mapped_buffer_stct::addr"]
        [::std::mem::offset_of!(aeron_mapped_buffer_stct, addr) - 0usize];
    ["Offset of field: aeron_mapped_buffer_stct::length"]
        [::std::mem::offset_of!(aeron_mapped_buffer_stct, length) - 8usize];
};
impl Default for aeron_mapped_buffer_stct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type aeron_mapped_buffer_t = aeron_mapped_buffer_stct;
unsafe extern "C" {
    pub fn aeron_is_directory(path: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_delete_directory(
        directory: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_mkdir_recursive(
        pathname: *const ::std::os::raw::c_char,
        permission: ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_map_new_file(
        mapped_file: *mut aeron_mapped_file_t,
        path: *const ::std::os::raw::c_char,
        fill_with_zeroes: bool,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_map_existing_file(
        mapped_file: *mut aeron_mapped_file_t,
        path: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_unmap(mapped_file: *mut aeron_mapped_file_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_msync(addr: *mut ::std::os::raw::c_void, length: usize) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_delete_file(path: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
pub type aeron_usable_fs_space_func_t =
    ::std::option::Option<unsafe extern "C" fn(path: *const ::std::os::raw::c_char) -> u64>;
unsafe extern "C" {
    pub fn aeron_file_length(path: *const ::std::os::raw::c_char) -> i64;
}
unsafe extern "C" {
    pub fn aeron_usable_fs_space(path: *const ::std::os::raw::c_char) -> u64;
}
unsafe extern "C" {
    pub fn aeron_usable_fs_space_disabled(path: *const ::std::os::raw::c_char) -> u64;
}
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_mapped_raw_log_stct {
    pub term_buffers: [aeron_mapped_buffer_t; 3usize],
    pub log_meta_data: aeron_mapped_buffer_t,
    pub mapped_file: aeron_mapped_file_t,
    pub term_length: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_mapped_raw_log_stct"]
        [::std::mem::size_of::<aeron_mapped_raw_log_stct>() - 88usize];
    ["Alignment of aeron_mapped_raw_log_stct"]
        [::std::mem::align_of::<aeron_mapped_raw_log_stct>() - 8usize];
    ["Offset of field: aeron_mapped_raw_log_stct::term_buffers"]
        [::std::mem::offset_of!(aeron_mapped_raw_log_stct, term_buffers) - 0usize];
    ["Offset of field: aeron_mapped_raw_log_stct::log_meta_data"]
        [::std::mem::offset_of!(aeron_mapped_raw_log_stct, log_meta_data) - 48usize];
    ["Offset of field: aeron_mapped_raw_log_stct::mapped_file"]
        [::std::mem::offset_of!(aeron_mapped_raw_log_stct, mapped_file) - 64usize];
    ["Offset of field: aeron_mapped_raw_log_stct::term_length"]
        [::std::mem::offset_of!(aeron_mapped_raw_log_stct, term_length) - 80usize];
};
impl Default for aeron_mapped_raw_log_stct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type aeron_mapped_raw_log_t = aeron_mapped_raw_log_stct;
unsafe extern "C" {
    pub fn aeron_ipc_publication_location(
        dst: *mut ::std::os::raw::c_char,
        length: usize,
        aeron_dir: *const ::std::os::raw::c_char,
        correlation_id: i64,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_network_publication_location(
        dst: *mut ::std::os::raw::c_char,
        length: usize,
        aeron_dir: *const ::std::os::raw::c_char,
        correlation_id: i64,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_publication_image_location(
        dst: *mut ::std::os::raw::c_char,
        length: usize,
        aeron_dir: *const ::std::os::raw::c_char,
        correlation_id: i64,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_temp_filename(filename: *mut ::std::os::raw::c_char, length: usize) -> usize;
}
pub type aeron_raw_log_map_func_t = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: *mut aeron_mapped_raw_log_t,
        arg2: *const ::std::os::raw::c_char,
        arg3: bool,
        arg4: u64,
        arg5: u64,
    ) -> ::std::os::raw::c_int,
>;
pub type aeron_raw_log_close_func_t = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: *mut aeron_mapped_raw_log_t,
        filename: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int,
>;
pub type aeron_raw_log_free_func_t = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: *mut aeron_mapped_raw_log_t,
        filename: *const ::std::os::raw::c_char,
    ) -> bool,
>;
unsafe extern "C" {
    pub fn aeron_raw_log_map(
        mapped_raw_log: *mut aeron_mapped_raw_log_t,
        path: *const ::std::os::raw::c_char,
        use_sparse_files: bool,
        term_length: u64,
        page_size: u64,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_raw_log_map_existing(
        mapped_raw_log: *mut aeron_mapped_raw_log_t,
        path: *const ::std::os::raw::c_char,
        pre_touch: bool,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_raw_log_close(
        mapped_raw_log: *mut aeron_mapped_raw_log_t,
        filename: *const ::std::os::raw::c_char,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_raw_log_free(
        mapped_raw_log: *mut aeron_mapped_raw_log_t,
        filename: *const ::std::os::raw::c_char,
    ) -> bool;
}
unsafe extern "C" {
    pub fn aeron_file_resolve(
        parent: *const ::std::os::raw::c_char,
        child: *const ::std::os::raw::c_char,
        buffer: *mut ::std::os::raw::c_char,
        buffer_len: usize,
    ) -> ::std::os::raw::c_int;
}
#[repr(C, packed(4))]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_cnc_metadata_stct {
    pub cnc_version: i32,
    pub to_driver_buffer_length: i32,
    pub to_clients_buffer_length: i32,
    pub counter_metadata_buffer_length: i32,
    pub counter_values_buffer_length: i32,
    pub error_log_buffer_length: i32,
    pub client_liveness_timeout: i64,
    pub start_timestamp: i64,
    pub pid: i64,
    pub file_page_size: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_cnc_metadata_stct"][::std::mem::size_of::<aeron_cnc_metadata_stct>() - 52usize];
    ["Alignment of aeron_cnc_metadata_stct"]
        [::std::mem::align_of::<aeron_cnc_metadata_stct>() - 4usize];
    ["Offset of field: aeron_cnc_metadata_stct::cnc_version"]
        [::std::mem::offset_of!(aeron_cnc_metadata_stct, cnc_version) - 0usize];
    ["Offset of field: aeron_cnc_metadata_stct::to_driver_buffer_length"]
        [::std::mem::offset_of!(aeron_cnc_metadata_stct, to_driver_buffer_length) - 4usize];
    ["Offset of field: aeron_cnc_metadata_stct::to_clients_buffer_length"]
        [::std::mem::offset_of!(aeron_cnc_metadata_stct, to_clients_buffer_length) - 8usize];
    ["Offset of field: aeron_cnc_metadata_stct::counter_metadata_buffer_length"]
        [::std::mem::offset_of!(aeron_cnc_metadata_stct, counter_metadata_buffer_length) - 12usize];
    ["Offset of field: aeron_cnc_metadata_stct::counter_values_buffer_length"]
        [::std::mem::offset_of!(aeron_cnc_metadata_stct, counter_values_buffer_length) - 16usize];
    ["Offset of field: aeron_cnc_metadata_stct::error_log_buffer_length"]
        [::std::mem::offset_of!(aeron_cnc_metadata_stct, error_log_buffer_length) - 20usize];
    ["Offset of field: aeron_cnc_metadata_stct::client_liveness_timeout"]
        [::std::mem::offset_of!(aeron_cnc_metadata_stct, client_liveness_timeout) - 24usize];
    ["Offset of field: aeron_cnc_metadata_stct::start_timestamp"]
        [::std::mem::offset_of!(aeron_cnc_metadata_stct, start_timestamp) - 32usize];
    ["Offset of field: aeron_cnc_metadata_stct::pid"]
        [::std::mem::offset_of!(aeron_cnc_metadata_stct, pid) - 40usize];
    ["Offset of field: aeron_cnc_metadata_stct::file_page_size"]
        [::std::mem::offset_of!(aeron_cnc_metadata_stct, file_page_size) - 48usize];
};
pub type aeron_cnc_metadata_t = aeron_cnc_metadata_stct;
#[repr(i32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum aeron_cnc_load_result_stct {
    AERON_CNC_LOAD_FAILED = -1,
    AERON_CNC_LOAD_SUCCESS = 0,
    AERON_CNC_LOAD_AWAIT_FILE = 1,
    AERON_CNC_LOAD_AWAIT_MMAP = 2,
    AERON_CNC_LOAD_AWAIT_VERSION = 3,
    AERON_CNC_LOAD_AWAIT_CNC_DATA = 4,
}
pub use self::aeron_cnc_load_result_stct as aeron_cnc_load_result_t;
unsafe extern "C" {
    pub fn aeron_cnc_version_volatile(metadata: *mut aeron_cnc_metadata_t) -> i32;
}
unsafe extern "C" {
    pub fn aeron_cnc_map_file_and_load_metadata(
        dir: *const ::std::os::raw::c_char,
        mapped_file: *mut aeron_mapped_file_t,
        metadata: *mut *mut aeron_cnc_metadata_t,
    ) -> aeron_cnc_load_result_t;
}
unsafe extern "C" {
    pub fn aeron_cnc_resolve_filename(
        directory: *const ::std::os::raw::c_char,
        filename_buffer: *mut ::std::os::raw::c_char,
        filename_buffer_length: usize,
    ) -> ::std::os::raw::c_int;
}
#[repr(C, packed(4))]
#[derive(Debug, Default, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_loss_reporter_entry_stct {
    pub observation_count: i64,
    pub total_bytes_lost: i64,
    pub first_observation_timestamp: i64,
    pub last_observation_timestamp: i64,
    pub session_id: i32,
    pub stream_id: i32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_loss_reporter_entry_stct"]
        [::std::mem::size_of::<aeron_loss_reporter_entry_stct>() - 40usize];
    ["Alignment of aeron_loss_reporter_entry_stct"]
        [::std::mem::align_of::<aeron_loss_reporter_entry_stct>() - 4usize];
    ["Offset of field: aeron_loss_reporter_entry_stct::observation_count"]
        [::std::mem::offset_of!(aeron_loss_reporter_entry_stct, observation_count) - 0usize];
    ["Offset of field: aeron_loss_reporter_entry_stct::total_bytes_lost"]
        [::std::mem::offset_of!(aeron_loss_reporter_entry_stct, total_bytes_lost) - 8usize];
    ["Offset of field: aeron_loss_reporter_entry_stct::first_observation_timestamp"][::std::mem::offset_of!(
        aeron_loss_reporter_entry_stct,
        first_observation_timestamp
    ) - 16usize];
    ["Offset of field: aeron_loss_reporter_entry_stct::last_observation_timestamp"][::std::mem::offset_of!(
        aeron_loss_reporter_entry_stct,
        last_observation_timestamp
    ) - 24usize];
    ["Offset of field: aeron_loss_reporter_entry_stct::session_id"]
        [::std::mem::offset_of!(aeron_loss_reporter_entry_stct, session_id) - 32usize];
    ["Offset of field: aeron_loss_reporter_entry_stct::stream_id"]
        [::std::mem::offset_of!(aeron_loss_reporter_entry_stct, stream_id) - 36usize];
};
pub type aeron_loss_reporter_entry_t = aeron_loss_reporter_entry_stct;
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct aeron_loss_reporter_stct {
    pub buffer: *mut u8,
    pub next_record_offset: usize,
    pub capacity: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of aeron_loss_reporter_stct"]
        [::std::mem::size_of::<aeron_loss_reporter_stct>() - 24usize];
    ["Alignment of aeron_loss_reporter_stct"]
        [::std::mem::align_of::<aeron_loss_reporter_stct>() - 8usize];
    ["Offset of field: aeron_loss_reporter_stct::buffer"]
        [::std::mem::offset_of!(aeron_loss_reporter_stct, buffer) - 0usize];
    ["Offset of field: aeron_loss_reporter_stct::next_record_offset"]
        [::std::mem::offset_of!(aeron_loss_reporter_stct, next_record_offset) - 8usize];
    ["Offset of field: aeron_loss_reporter_stct::capacity"]
        [::std::mem::offset_of!(aeron_loss_reporter_stct, capacity) - 16usize];
};
impl Default for aeron_loss_reporter_stct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type aeron_loss_reporter_t = aeron_loss_reporter_stct;
pub type aeron_loss_reporter_entry_offset_t = i64;
unsafe extern "C" {
    pub fn aeron_loss_reporter_init(
        reporter: *mut aeron_loss_reporter_t,
        buffer: *mut u8,
        length: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_loss_reporter_create_entry(
        reporter: *mut aeron_loss_reporter_t,
        initial_bytes_lost: i64,
        timestamp_ms: i64,
        session_id: i32,
        stream_id: i32,
        channel: *const ::std::os::raw::c_char,
        channel_length: usize,
        source: *const ::std::os::raw::c_char,
        source_length: usize,
    ) -> aeron_loss_reporter_entry_offset_t;
}
unsafe extern "C" {
    pub fn aeron_loss_reporter_record_observation(
        reporter: *mut aeron_loss_reporter_t,
        offset: aeron_loss_reporter_entry_offset_t,
        bytes_lost: i64,
        timestamp_ms: i64,
    );
}
unsafe extern "C" {
    pub fn aeron_loss_reporter_resolve_filename(
        directory: *const ::std::os::raw::c_char,
        filename_buffer: *mut ::std::os::raw::c_char,
        filename_buffer_length: usize,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn aeron_loss_reporter_read(
        buffer: *const u8,
        capacity: usize,
        entry_func: aeron_loss_reporter_read_entry_func_t,
        clientd: *mut ::std::os::raw::c_void,
    ) -> usize;
}