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

pub const SRTP_MASTER_KEY_LEN: u32 = 30;
pub const SRTP_MAX_KEY_LEN: u32 = 64;
pub const SRTP_MAX_TAG_LEN: u32 = 16;
pub const SRTP_MAX_MKI_LEN: u32 = 128;
pub const SRTP_MAX_TRAILER_LEN: u32 = 144;
pub const SRTP_MAX_NUM_MASTER_KEYS: u32 = 16;
pub const SRTP_SALT_LEN: u32 = 14;
pub const SRTP_AEAD_SALT_LEN: u32 = 12;
pub const SRTP_AES_128_KEY_LEN: u32 = 16;
pub const SRTP_AES_192_KEY_LEN: u32 = 24;
pub const SRTP_AES_256_KEY_LEN: u32 = 32;
pub const SRTP_AES_ICM_128_KEY_LEN_WSALT: u32 = 30;
pub const SRTP_AES_ICM_192_KEY_LEN_WSALT: u32 = 38;
pub const SRTP_AES_ICM_256_KEY_LEN_WSALT: u32 = 46;
pub const SRTP_AES_GCM_128_KEY_LEN_WSALT: u32 = 28;
pub const SRTP_AES_GCM_192_KEY_LEN_WSALT: u32 = 36;
pub const SRTP_AES_GCM_256_KEY_LEN_WSALT: u32 = 44;
pub const SRTCP_E_BIT: u32 = 2147483648;
pub const SRTCP_E_BYTE_BIT: u32 = 128;
pub const SRTCP_INDEX_MASK: u32 = 2147483647;
pub type __uint32_t = ::std::os::raw::c_uint;
#[doc = "  @brief A srtp_cipher_type_id_t is an identifier for a particular cipher"]
#[doc = "  type."]
#[doc = ""]
#[doc = "  A srtp_cipher_type_id_t is an integer that represents a particular"]
#[doc = "  cipher type, e.g. the Advanced Encryption Standard (AES).  A"]
#[doc = "  SRTP_NULL_CIPHER is avaliable; this cipher leaves the data unchanged,"]
#[doc = "  and can be selected to indicate that no encryption is to take"]
#[doc = "  place."]
#[doc = ""]
#[doc = "  @ingroup Ciphers"]
pub type srtp_cipher_type_id_t = u32;
#[doc = "  @brief An srtp_auth_type_id_t is an identifier for a particular"]
#[doc = " authentication"]
#[doc = "   function."]
#[doc = ""]
#[doc = "  An srtp_auth_type_id_t is an integer that represents a particular"]
#[doc = "  authentication function type, e.g. HMAC-SHA1.  A SRTP_NULL_AUTH is"]
#[doc = "  avaliable; this authentication function performs no computation,"]
#[doc = "  and can be selected to indicate that no authentication is to take"]
#[doc = "  place."]
#[doc = ""]
#[doc = "  @ingroup Authentication"]
pub type srtp_auth_type_id_t = u32;
#[doc = "< nothing to report"]
pub const srtp_err_status_t_srtp_err_status_ok: srtp_err_status_t = 0;
#[doc = "< unspecified failure"]
pub const srtp_err_status_t_srtp_err_status_fail: srtp_err_status_t = 1;
#[doc = "< unsupported parameter"]
pub const srtp_err_status_t_srtp_err_status_bad_param: srtp_err_status_t = 2;
#[doc = "< couldn't allocate memory"]
pub const srtp_err_status_t_srtp_err_status_alloc_fail: srtp_err_status_t = 3;
#[doc = "< couldn't deallocate properly"]
pub const srtp_err_status_t_srtp_err_status_dealloc_fail: srtp_err_status_t = 4;
#[doc = "< couldn't initialize"]
pub const srtp_err_status_t_srtp_err_status_init_fail: srtp_err_status_t = 5;
#[doc = "< can't process as much data as   */"]
pub const srtp_err_status_t_srtp_err_status_terminus: srtp_err_status_t = 6;
#[doc = "< authentication failure"]
pub const srtp_err_status_t_srtp_err_status_auth_fail: srtp_err_status_t = 7;
#[doc = "< cipher failure"]
pub const srtp_err_status_t_srtp_err_status_cipher_fail: srtp_err_status_t = 8;
#[doc = "< replay check failed (bad index)"]
pub const srtp_err_status_t_srtp_err_status_replay_fail: srtp_err_status_t = 9;
#[doc = "< replay check failed (index too  */"]
pub const srtp_err_status_t_srtp_err_status_replay_old: srtp_err_status_t = 10;
#[doc = "< algorithm failed test routine"]
pub const srtp_err_status_t_srtp_err_status_algo_fail: srtp_err_status_t = 11;
#[doc = "< unsupported operation"]
pub const srtp_err_status_t_srtp_err_status_no_such_op: srtp_err_status_t = 12;
#[doc = "< no appropriate context found"]
pub const srtp_err_status_t_srtp_err_status_no_ctx: srtp_err_status_t = 13;
#[doc = "< unable to perform desired       */"]
pub const srtp_err_status_t_srtp_err_status_cant_check: srtp_err_status_t = 14;
#[doc = "< can't use key any more"]
pub const srtp_err_status_t_srtp_err_status_key_expired: srtp_err_status_t = 15;
#[doc = "< error in use of socket"]
pub const srtp_err_status_t_srtp_err_status_socket_err: srtp_err_status_t = 16;
#[doc = "< error in use POSIX signals"]
pub const srtp_err_status_t_srtp_err_status_signal_err: srtp_err_status_t = 17;
#[doc = "< nonce check failed"]
pub const srtp_err_status_t_srtp_err_status_nonce_bad: srtp_err_status_t = 18;
#[doc = "< couldn't read data"]
pub const srtp_err_status_t_srtp_err_status_read_fail: srtp_err_status_t = 19;
#[doc = "< couldn't write data"]
pub const srtp_err_status_t_srtp_err_status_write_fail: srtp_err_status_t = 20;
#[doc = "< error parsing data"]
pub const srtp_err_status_t_srtp_err_status_parse_err: srtp_err_status_t = 21;
#[doc = "< error encoding data"]
pub const srtp_err_status_t_srtp_err_status_encode_err: srtp_err_status_t = 22;
#[doc = "< error while using semaphores"]
pub const srtp_err_status_t_srtp_err_status_semaphore_err: srtp_err_status_t = 23;
#[doc = "< error while using pfkey"]
pub const srtp_err_status_t_srtp_err_status_pfkey_err: srtp_err_status_t = 24;
#[doc = "< error MKI present in packet is  */"]
pub const srtp_err_status_t_srtp_err_status_bad_mki: srtp_err_status_t = 25;
#[doc = "< packet index is too old to      */"]
pub const srtp_err_status_t_srtp_err_status_pkt_idx_old: srtp_err_status_t = 26;
#[doc = "< packet index advanced, reset    */"]
pub const srtp_err_status_t_srtp_err_status_pkt_idx_adv: srtp_err_status_t = 27;
#[doc = " @brief srtp_err_status_t defines error codes."]
#[doc = ""]
#[doc = " The enumeration srtp_err_status_t defines error codes.  Note that the"]
#[doc = " value of srtp_err_status_ok is equal to zero, which can simplify error"]
#[doc = " checking somewhat."]
#[doc = ""]
pub type srtp_err_status_t = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct srtp_ctx_t_ {
    _unused: [u8; 0],
}
pub type srtp_ctx_t = srtp_ctx_t_;
#[doc = "< no services"]
pub const srtp_sec_serv_t_sec_serv_none: srtp_sec_serv_t = 0;
#[doc = "< confidentiality"]
pub const srtp_sec_serv_t_sec_serv_conf: srtp_sec_serv_t = 1;
#[doc = "< authentication"]
pub const srtp_sec_serv_t_sec_serv_auth: srtp_sec_serv_t = 2;
#[doc = "< confidentiality and authentication"]
pub const srtp_sec_serv_t_sec_serv_conf_and_auth: srtp_sec_serv_t = 3;
#[doc = " @brief srtp_sec_serv_t describes a set of security services."]
#[doc = ""]
#[doc = " A srtp_sec_serv_t enumeration is used to describe the particular"]
#[doc = " security services that will be applied by a particular crypto"]
#[doc = " policy (or other mechanism)."]
pub type srtp_sec_serv_t = ::std::os::raw::c_uint;
#[doc = " @brief srtp_crypto_policy_t describes a particular crypto policy that"]
#[doc = " can be applied to an SRTP stream."]
#[doc = ""]
#[doc = " A srtp_crypto_policy_t describes a particular cryptographic policy that"]
#[doc = " can be applied to an SRTP or SRTCP stream.  An SRTP session policy"]
#[doc = " consists of a list of these policies, one for each SRTP stream"]
#[doc = " in the session."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct srtp_crypto_policy_t {
    #[doc = "< An integer representing          */"]
    pub cipher_type: srtp_cipher_type_id_t,
    #[doc = "< The length of the cipher key     */"]
    pub cipher_key_len: ::std::os::raw::c_int,
    #[doc = "< An integer representing the      */"]
    pub auth_type: srtp_auth_type_id_t,
    #[doc = "< The length of the authentication */"]
    pub auth_key_len: ::std::os::raw::c_int,
    #[doc = "< The length of the authentication */"]
    pub auth_tag_len: ::std::os::raw::c_int,
    #[doc = "< The flag indicating the security */"]
    pub sec_serv: srtp_sec_serv_t,
}
#[test]
fn bindgen_test_layout_srtp_crypto_policy_t() {
    assert_eq!(
        ::std::mem::size_of::<srtp_crypto_policy_t>(),
        24usize,
        concat!("Size of: ", stringify!(srtp_crypto_policy_t))
    );
    assert_eq!(
        ::std::mem::align_of::<srtp_crypto_policy_t>(),
        4usize,
        concat!("Alignment of ", stringify!(srtp_crypto_policy_t))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<srtp_crypto_policy_t>())).cipher_type as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(srtp_crypto_policy_t),
            "::",
            stringify!(cipher_type)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<srtp_crypto_policy_t>())).cipher_key_len as *const _ as usize
        },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(srtp_crypto_policy_t),
            "::",
            stringify!(cipher_key_len)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<srtp_crypto_policy_t>())).auth_type as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(srtp_crypto_policy_t),
            "::",
            stringify!(auth_type)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<srtp_crypto_policy_t>())).auth_key_len as *const _ as usize
        },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(srtp_crypto_policy_t),
            "::",
            stringify!(auth_key_len)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<srtp_crypto_policy_t>())).auth_tag_len as *const _ as usize
        },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(srtp_crypto_policy_t),
            "::",
            stringify!(auth_tag_len)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<srtp_crypto_policy_t>())).sec_serv as *const _ as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(srtp_crypto_policy_t),
            "::",
            stringify!(sec_serv)
        )
    );
}
#[doc = "< Indicates an undefined SSRC type."]
pub const srtp_ssrc_type_t_ssrc_undefined: srtp_ssrc_type_t = 0;
#[doc = "< Indicates a specific SSRC value"]
pub const srtp_ssrc_type_t_ssrc_specific: srtp_ssrc_type_t = 1;
#[doc = "< Indicates any inbound SSRC value     */"]
pub const srtp_ssrc_type_t_ssrc_any_inbound: srtp_ssrc_type_t = 2;
#[doc = "< Indicates any outbound SSRC value    */"]
pub const srtp_ssrc_type_t_ssrc_any_outbound: srtp_ssrc_type_t = 3;
#[doc = " @brief srtp_ssrc_type_t describes the type of an SSRC."]
#[doc = ""]
#[doc = " An srtp_ssrc_type_t enumeration is used to indicate a type of SSRC.  See"]
#[doc = " @ref srtp_policy_t for more informataion."]
pub type srtp_ssrc_type_t = ::std::os::raw::c_uint;
#[doc = " @brief An srtp_ssrc_t represents a particular SSRC value, or a `wildcard'"]
#[doc = " SSRC."]
#[doc = ""]
#[doc = " An srtp_ssrc_t represents a particular SSRC value (if its type is"]
#[doc = " ssrc_specific), or a wildcard SSRC value that will match all"]
#[doc = " outbound SSRCs (if its type is ssrc_any_outbound) or all inbound"]
#[doc = " SSRCs (if its type is ssrc_any_inbound)."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct srtp_ssrc_t {
    #[doc = "< The type of this particular SSRC"]
    pub type_: srtp_ssrc_type_t,
    #[doc = "< The value of this SSRC, if it is not a */"]
    pub value: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout_srtp_ssrc_t() {
    assert_eq!(
        ::std::mem::size_of::<srtp_ssrc_t>(),
        8usize,
        concat!("Size of: ", stringify!(srtp_ssrc_t))
    );
    assert_eq!(
        ::std::mem::align_of::<srtp_ssrc_t>(),
        4usize,
        concat!("Alignment of ", stringify!(srtp_ssrc_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<srtp_ssrc_t>())).type_ as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(srtp_ssrc_t),
            "::",
            stringify!(type_)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<srtp_ssrc_t>())).value as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(srtp_ssrc_t),
            "::",
            stringify!(value)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct srtp_ekt_policy_ctx_t {
    _unused: [u8; 0],
}
#[doc = " @brief points to an EKT policy"]
pub type srtp_ekt_policy_t = *mut srtp_ekt_policy_ctx_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct srtp_ekt_stream_ctx_t {
    _unused: [u8; 0],
}
#[doc = " @brief points to EKT stream data"]
pub type srtp_ekt_stream_t = *mut srtp_ekt_stream_ctx_t;
#[doc = " @brief srtp_master_key_t represents a master key.  There will"]
#[doc = " be a Master Key Index and the Master Key associated with the"]
#[doc = " Master Key Index.  Need to also keep track of the Master Key"]
#[doc = " Index Size to correctly read it from a packet."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct srtp_master_key_t {
    pub key: *mut ::std::os::raw::c_uchar,
    pub mki_id: *mut ::std::os::raw::c_uchar,
    pub mki_size: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout_srtp_master_key_t() {
    assert_eq!(
        ::std::mem::size_of::<srtp_master_key_t>(),
        24usize,
        concat!("Size of: ", stringify!(srtp_master_key_t))
    );
    assert_eq!(
        ::std::mem::align_of::<srtp_master_key_t>(),
        8usize,
        concat!("Alignment of ", stringify!(srtp_master_key_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<srtp_master_key_t>())).key as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(srtp_master_key_t),
            "::",
            stringify!(key)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<srtp_master_key_t>())).mki_id as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(srtp_master_key_t),
            "::",
            stringify!(mki_id)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<srtp_master_key_t>())).mki_size as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(srtp_master_key_t),
            "::",
            stringify!(mki_size)
        )
    );
}
#[doc = " @brief represents the policy for an SRTP session."]
#[doc = ""]
#[doc = " A single srtp_policy_t struct represents the policy for a single"]
#[doc = " SRTP stream, and a linked list of these elements represents the"]
#[doc = " policy for an entire SRTP session.  Each element contains the SRTP"]
#[doc = " and SRTCP crypto policies for that stream, a pointer to the SRTP"]
#[doc = " master key for that stream, the SSRC describing that stream, or a"]
#[doc = " flag indicating a `wildcard' SSRC value, and a `next' field that"]
#[doc = " holds a pointer to the next element in the list of policy elements,"]
#[doc = " or NULL if it is the last element."]
#[doc = ""]
#[doc = " The wildcard value SSRC_ANY_INBOUND matches any SSRC from an"]
#[doc = " inbound stream that for which there is no explicit SSRC entry in"]
#[doc = " another policy element.  Similarly, the value SSRC_ANY_OUTBOUND"]
#[doc = " will matches any SSRC from an outbound stream that does not appear"]
#[doc = " in another policy element.  Note that wildcard SSRCs &b cannot be"]
#[doc = " used to match both inbound and outbound traffic.  This restriction"]
#[doc = " is intentional, and it allows libSRTP to ensure that no security"]
#[doc = " lapses result from accidental re-use of SSRC values during key"]
#[doc = " sharing."]
#[doc = ""]
#[doc = " @warning The final element of the list @b must have its `next' pointer"]
#[doc = "          set to NULL."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct srtp_policy_t {
    #[doc = "< The SSRC value of stream, or the    */"]
    pub ssrc: srtp_ssrc_t,
    #[doc = "< SRTP crypto policy."]
    pub rtp: srtp_crypto_policy_t,
    #[doc = "< SRTCP crypto policy."]
    pub rtcp: srtp_crypto_policy_t,
    #[doc = "< Pointer to the SRTP master key for  */"]
    pub key: *mut ::std::os::raw::c_uchar,
    pub keys: *mut *mut srtp_master_key_t,
    #[doc = " Array of Master Key structures"]
    pub num_master_keys: ::std::os::raw::c_ulong,
    #[doc = "< Pointer to the EKT policy structure */"]
    pub ekt: srtp_ekt_policy_t,
    #[doc = "< The window size to use for replay   */"]
    pub window_size: ::std::os::raw::c_ulong,
    #[doc = "< Whether retransmissions of          */"]
    pub allow_repeat_tx: ::std::os::raw::c_int,
    #[doc = "< List of header ids to encrypt."]
    pub enc_xtn_hdr: *mut ::std::os::raw::c_int,
    #[doc = "< Number of entries in list of header */"]
    pub enc_xtn_hdr_count: ::std::os::raw::c_int,
    #[doc = "< Pointer to next stream policy."]
    pub next: *mut srtp_policy_t,
}
#[test]
fn bindgen_test_layout_srtp_policy_t() {
    assert_eq!(
        ::std::mem::size_of::<srtp_policy_t>(),
        128usize,
        concat!("Size of: ", stringify!(srtp_policy_t))
    );
    assert_eq!(
        ::std::mem::align_of::<srtp_policy_t>(),
        8usize,
        concat!("Alignment of ", stringify!(srtp_policy_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<srtp_policy_t>())).ssrc as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(srtp_policy_t),
            "::",
            stringify!(ssrc)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<srtp_policy_t>())).rtp as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(srtp_policy_t),
            "::",
            stringify!(rtp)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<srtp_policy_t>())).rtcp as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(srtp_policy_t),
            "::",
            stringify!(rtcp)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<srtp_policy_t>())).key as *const _ as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(srtp_policy_t),
            "::",
            stringify!(key)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<srtp_policy_t>())).keys as *const _ as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(srtp_policy_t),
            "::",
            stringify!(keys)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<srtp_policy_t>())).num_master_keys as *const _ as usize },
        72usize,
        concat!(
            "Offset of field: ",
            stringify!(srtp_policy_t),
            "::",
            stringify!(num_master_keys)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<srtp_policy_t>())).ekt as *const _ as usize },
        80usize,
        concat!(
            "Offset of field: ",
            stringify!(srtp_policy_t),
            "::",
            stringify!(ekt)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<srtp_policy_t>())).window_size as *const _ as usize },
        88usize,
        concat!(
            "Offset of field: ",
            stringify!(srtp_policy_t),
            "::",
            stringify!(window_size)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<srtp_policy_t>())).allow_repeat_tx as *const _ as usize },
        96usize,
        concat!(
            "Offset of field: ",
            stringify!(srtp_policy_t),
            "::",
            stringify!(allow_repeat_tx)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<srtp_policy_t>())).enc_xtn_hdr as *const _ as usize },
        104usize,
        concat!(
            "Offset of field: ",
            stringify!(srtp_policy_t),
            "::",
            stringify!(enc_xtn_hdr)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<srtp_policy_t>())).enc_xtn_hdr_count as *const _ as usize },
        112usize,
        concat!(
            "Offset of field: ",
            stringify!(srtp_policy_t),
            "::",
            stringify!(enc_xtn_hdr_count)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<srtp_policy_t>())).next as *const _ as usize },
        120usize,
        concat!(
            "Offset of field: ",
            stringify!(srtp_policy_t),
            "::",
            stringify!(next)
        )
    );
}
#[doc = " @brief An srtp_t points to an SRTP session structure."]
#[doc = ""]
#[doc = " The typedef srtp_t is a pointer to a structure that represents"]
#[doc = " an SRTP session.  This datatype is intentially opaque in"]
#[doc = " order to separate the interface from the implementation."]
#[doc = ""]
#[doc = " An SRTP session consists of all of the traffic sent to the RTP and"]
#[doc = " RTCP destination transport addresses, using the RTP/SAVP (Secure"]
#[doc = " Audio/Video Profile).  A session can be viewed as a set of SRTP"]
#[doc = " streams, each of which originates with a different participant."]
pub type srtp_t = *mut srtp_ctx_t;
extern "C" {
    #[doc = " @brief srtp_init() initializes the srtp library."]
    #[doc = ""]
    #[doc = " @warning This function @b must be called before any other srtp"]
    #[doc = " functions."]
    pub fn srtp_init() -> srtp_err_status_t;
}
extern "C" {
    #[doc = " @brief srtp_shutdown() de-initializes the srtp library."]
    #[doc = ""]
    #[doc = " @warning No srtp functions may be called after calling this function."]
    pub fn srtp_shutdown() -> srtp_err_status_t;
}
extern "C" {
    #[doc = " @brief srtp_protect() is the Secure RTP sender-side packet processing"]
    #[doc = " function."]
    #[doc = ""]
    #[doc = " The function call srtp_protect(ctx, rtp_hdr, len_ptr) applies SRTP"]
    #[doc = " protection to the RTP packet rtp_hdr (which has length *len_ptr) using"]
    #[doc = " the SRTP context ctx.  If srtp_err_status_ok is returned, then rtp_hdr"]
    #[doc = " points to the resulting SRTP packet and *len_ptr is the number of"]
    #[doc = " octets in that packet; otherwise, no assumptions should be made"]
    #[doc = " about the value of either data elements."]
    #[doc = ""]
    #[doc = " The sequence numbers of the RTP packets presented to this function"]
    #[doc = " need not be consecutive, but they @b must be out of order by less"]
    #[doc = " than 2^15 = 32,768 packets."]
    #[doc = ""]
    #[doc = " @warning This function assumes that it can write the authentication"]
    #[doc = " tag into the location in memory immediately following the RTP"]
    #[doc = " packet, and assumes that the RTP packet is aligned on a 32-bit"]
    #[doc = " boundary."]
    #[doc = ""]
    #[doc = " @warning This function assumes that it can write SRTP_MAX_TRAILER_LEN"]
    #[doc = " into the location in memory immediately following the RTP packet."]
    #[doc = " Callers MUST ensure that this much writable memory is available in"]
    #[doc = " the buffer that holds the RTP packet."]
    #[doc = ""]
    #[doc = " @param ctx is the SRTP context to use in processing the packet."]
    #[doc = ""]
    #[doc = " @param rtp_hdr is a pointer to the RTP packet (before the call); after"]
    #[doc = " the function returns, it points to the srtp packet."]
    #[doc = ""]
    #[doc = " @param len_ptr is a pointer to the length in octets of the complete"]
    #[doc = " RTP packet (header and body) before the function call, and of the"]
    #[doc = " complete SRTP packet after the call, if srtp_err_status_ok was returned."]
    #[doc = " Otherwise, the value of the data to which it points is undefined."]
    #[doc = ""]
    #[doc = " @return"]
    #[doc = "    - srtp_err_status_ok            no problems"]
    #[doc = "    - srtp_err_status_replay_fail   rtp sequence number was non-increasing"]
    #[doc = "    - @e other                 failure in cryptographic mechanisms"]
    pub fn srtp_protect(
        ctx: srtp_t,
        rtp_hdr: *mut ::std::os::raw::c_void,
        len_ptr: *mut ::std::os::raw::c_int,
    ) -> srtp_err_status_t;
}
extern "C" {
    #[doc = " @brief srtp_protect_mki() is the Secure RTP sender-side packet processing"]
    #[doc = " function that can utilize MKI."]
    #[doc = ""]
    #[doc = " The function call srtp_protect(ctx, rtp_hdr, len_ptr) applies SRTP"]
    #[doc = " protection to the RTP packet rtp_hdr (which has length *len_ptr) using"]
    #[doc = " the SRTP context ctx.  If srtp_err_status_ok is returned, then rtp_hdr"]
    #[doc = " points to the resulting SRTP packet and *len_ptr is the number of"]
    #[doc = " octets in that packet; otherwise, no assumptions should be made"]
    #[doc = " about the value of either data elements."]
    #[doc = ""]
    #[doc = " The sequence numbers of the RTP packets presented to this function"]
    #[doc = " need not be consecutive, but they @b must be out of order by less"]
    #[doc = " than 2^15 = 32,768 packets."]
    #[doc = ""]
    #[doc = " @warning This function assumes that it can write the authentication"]
    #[doc = " tag into the location in memory immediately following the RTP"]
    #[doc = " packet, and assumes that the RTP packet is aligned on a 32-bit"]
    #[doc = " boundary."]
    #[doc = ""]
    #[doc = " @warning This function assumes that it can write SRTP_MAX_TRAILER_LEN"]
    #[doc = " into the location in memory immediately following the RTP packet."]
    #[doc = " Callers MUST ensure that this much writable memory is available in"]
    #[doc = " the buffer that holds the RTP packet."]
    #[doc = ""]
    #[doc = " @param ctx is the SRTP context to use in processing the packet."]
    #[doc = ""]
    #[doc = " @param rtp_hdr is a pointer to the RTP packet (before the call); after"]
    #[doc = " the function returns, it points to the srtp packet."]
    #[doc = ""]
    #[doc = " @param pkt_octet_len is a pointer to the length in octets of the complete"]
    #[doc = " RTP packet (header and body) before the function call, and of the"]
    #[doc = " complete SRTP packet after the call, if srtp_err_status_ok was returned."]
    #[doc = " Otherwise, the value of the data to which it points is undefined."]
    #[doc = ""]
    #[doc = " @param use_mki is a boolean to tell the system if mki is being used.  If"]
    #[doc = " set to false then will use the first set of session keys.  If set to true"]
    #[doc = " will"]
    #[doc = " use the session keys identified by the mki_index"]
    #[doc = ""]
    #[doc = " @param mki_index integer value specifying which set of session keys should be"]
    #[doc = " used if use_mki is set to true."]
    #[doc = ""]
    #[doc = " @return"]
    #[doc = "    - srtp_err_status_ok            no problems"]
    #[doc = "    - srtp_err_status_replay_fail   rtp sequence number was non-increasing"]
    #[doc = "    - @e other                 failure in cryptographic mechanisms"]
    pub fn srtp_protect_mki(
        ctx: *mut srtp_ctx_t,
        rtp_hdr: *mut ::std::os::raw::c_void,
        pkt_octet_len: *mut ::std::os::raw::c_int,
        use_mki: ::std::os::raw::c_uint,
        mki_index: ::std::os::raw::c_uint,
    ) -> srtp_err_status_t;
}
extern "C" {
    #[doc = " @brief srtp_unprotect() is the Secure RTP receiver-side packet"]
    #[doc = " processing function."]
    #[doc = ""]
    #[doc = " The function call srtp_unprotect(ctx, srtp_hdr, len_ptr) verifies"]
    #[doc = " the Secure RTP protection of the SRTP packet pointed to by srtp_hdr"]
    #[doc = " (which has length *len_ptr), using the SRTP context ctx.  If"]
    #[doc = " srtp_err_status_ok is returned, then srtp_hdr points to the resulting"]
    #[doc = " RTP packet and *len_ptr is the number of octets in that packet;"]
    #[doc = " otherwise, no assumptions should be made about the value of either"]
    #[doc = " data elements."]
    #[doc = ""]
    #[doc = " The sequence numbers of the RTP packets presented to this function"]
    #[doc = " need not be consecutive, but they @b must be out of order by less"]
    #[doc = " than 2^15 = 32,768 packets."]
    #[doc = ""]
    #[doc = " @warning This function assumes that the SRTP packet is aligned on a"]
    #[doc = " 32-bit boundary."]
    #[doc = ""]
    #[doc = " @param ctx is the SRTP session which applies to the particular packet."]
    #[doc = ""]
    #[doc = " @param srtp_hdr is a pointer to the header of the SRTP packet"]
    #[doc = " (before the call).  after the function returns, it points to the"]
    #[doc = " rtp packet if srtp_err_status_ok was returned; otherwise, the value of"]
    #[doc = " the data to which it points is undefined."]
    #[doc = ""]
    #[doc = " @param len_ptr is a pointer to the length in octets of the complete"]
    #[doc = " srtp packet (header and body) before the function call, and of the"]
    #[doc = " complete rtp packet after the call, if srtp_err_status_ok was returned."]
    #[doc = " Otherwise, the value of the data to which it points is undefined."]
    #[doc = ""]
    #[doc = " @return"]
    #[doc = "    - srtp_err_status_ok          if the RTP packet is valid."]
    #[doc = "    - srtp_err_status_auth_fail   if the SRTP packet failed the message"]
    #[doc = "                                  authentication check."]
    #[doc = "    - srtp_err_status_replay_fail if the SRTP packet is a replay (e.g. packet"]
    #[doc = "                                  has already been processed and accepted)."]
    #[doc = "    - [other]  if there has been an error in the cryptographic mechanisms."]
    #[doc = ""]
    pub fn srtp_unprotect(
        ctx: srtp_t,
        srtp_hdr: *mut ::std::os::raw::c_void,
        len_ptr: *mut ::std::os::raw::c_int,
    ) -> srtp_err_status_t;
}
extern "C" {
    #[doc = " @brief srtp_unprotect_mki() is the Secure RTP receiver-side packet"]
    #[doc = " processing function that checks for MKI."]
    #[doc = ""]
    #[doc = " The function call srtp_unprotect(ctx, srtp_hdr, len_ptr) verifies"]
    #[doc = " the Secure RTP protection of the SRTP packet pointed to by srtp_hdr"]
    #[doc = " (which has length *len_ptr), using the SRTP context ctx.  If"]
    #[doc = " srtp_err_status_ok is returned, then srtp_hdr points to the resulting"]
    #[doc = " RTP packet and *len_ptr is the number of octets in that packet;"]
    #[doc = " otherwise, no assumptions should be made about the value of either"]
    #[doc = " data elements."]
    #[doc = ""]
    #[doc = " The sequence numbers of the RTP packets presented to this function"]
    #[doc = " need not be consecutive, but they @b must be out of order by less"]
    #[doc = " than 2^15 = 32,768 packets."]
    #[doc = ""]
    #[doc = " @warning This function assumes that the SRTP packet is aligned on a"]
    #[doc = " 32-bit boundary."]
    #[doc = ""]
    #[doc = " @param ctx is the SRTP session which applies to the particular packet."]
    #[doc = ""]
    #[doc = " @param srtp_hdr is a pointer to the header of the SRTP packet"]
    #[doc = " (before the call).  after the function returns, it points to the"]
    #[doc = " rtp packet if srtp_err_status_ok was returned; otherwise, the value of"]
    #[doc = " the data to which it points is undefined."]
    #[doc = ""]
    #[doc = " @param len_ptr is a pointer to the length in octets of the complete"]
    #[doc = " srtp packet (header and body) before the function call, and of the"]
    #[doc = " complete rtp packet after the call, if srtp_err_status_ok was returned."]
    #[doc = " Otherwise, the value of the data to which it points is undefined."]
    #[doc = ""]
    #[doc = " @param use_mki is a boolean to tell the system if mki is being used.  If"]
    #[doc = " set to false then will use the first set of session keys.  If set to true"]
    #[doc = " will"]
    #[doc = " use the session keys identified by the mki_index"]
    #[doc = ""]
    #[doc = " @return"]
    #[doc = "    - srtp_err_status_ok          if the RTP packet is valid."]
    #[doc = "    - srtp_err_status_auth_fail   if the SRTP packet failed the message"]
    #[doc = "                                  authentication check."]
    #[doc = "    - srtp_err_status_replay_fail if the SRTP packet is a replay (e.g. packet"]
    #[doc = "                                  has already been processed and accepted)."]
    #[doc = "    - srtp_err_status_bad_mki if the MKI in the packet is not a known MKI id"]
    #[doc = "    - [other]  if there has been an error in the cryptographic mechanisms."]
    #[doc = ""]
    pub fn srtp_unprotect_mki(
        ctx: srtp_t,
        srtp_hdr: *mut ::std::os::raw::c_void,
        len_ptr: *mut ::std::os::raw::c_int,
        use_mki: ::std::os::raw::c_uint,
    ) -> srtp_err_status_t;
}
extern "C" {
    #[doc = " @brief srtp_create() allocates and initializes an SRTP session."]
    #[doc = ""]
    #[doc = " The function call srtp_create(session, policy) allocates and"]
    #[doc = " initializes an SRTP session context, applying the given policy."]
    #[doc = ""]
    #[doc = " @param session is a pointer to the SRTP session to which the policy is"]
    #[doc = " to be added."]
    #[doc = ""]
    #[doc = " @param policy is the srtp_policy_t struct that describes the policy"]
    #[doc = " for the session.  The struct may be a single element, or it may be"]
    #[doc = " the head of a list, in which case each element of the list is"]
    #[doc = " processed.  It may also be NULL, in which case streams should be added"]
    #[doc = " later using srtp_add_stream().  The final element of the list @b must"]
    #[doc = " have its `next' field set to NULL."]
    #[doc = ""]
    #[doc = " @return"]
    #[doc = "    - srtp_err_status_ok           if creation succeded."]
    #[doc = "    - srtp_err_status_alloc_fail   if allocation failed."]
    #[doc = "    - srtp_err_status_init_fail    if initialization failed."]
    pub fn srtp_create(session: *mut srtp_t, policy: *const srtp_policy_t) -> srtp_err_status_t;
}
extern "C" {
    #[doc = " @brief srtp_add_stream() allocates and initializes an SRTP stream"]
    #[doc = " within a given SRTP session."]
    #[doc = ""]
    #[doc = " The function call srtp_add_stream(session, policy) allocates and"]
    #[doc = " initializes a new SRTP stream within a given, previously created"]
    #[doc = " session, applying the policy given as the other argument to that"]
    #[doc = " stream."]
    #[doc = ""]
    #[doc = " @return values:"]
    #[doc = "    - srtp_err_status_ok           if stream creation succeded."]
    #[doc = "    - srtp_err_status_alloc_fail   if stream allocation failed"]
    #[doc = "    - srtp_err_status_init_fail    if stream initialization failed."]
    pub fn srtp_add_stream(session: srtp_t, policy: *const srtp_policy_t) -> srtp_err_status_t;
}
extern "C" {
    #[doc = " @brief srtp_remove_stream() deallocates an SRTP stream."]
    #[doc = ""]
    #[doc = " The function call srtp_remove_stream(session, ssrc) removes"]
    #[doc = " the SRTP stream with the SSRC value ssrc from the SRTP session"]
    #[doc = " context given by the argument session."]
    #[doc = ""]
    #[doc = " @param session is the SRTP session from which the stream"]
    #[doc = "        will be removed."]
    #[doc = ""]
    #[doc = " @param ssrc is the SSRC value of the stream to be removed"]
    #[doc = "             in network byte order."]
    #[doc = ""]
    #[doc = " @warning Wildcard SSRC values cannot be removed from a"]
    #[doc = "          session."]
    #[doc = ""]
    #[doc = " @return"]
    #[doc = "    - srtp_err_status_ok     if the stream deallocation succeded."]
    #[doc = "    - [other]           otherwise."]
    #[doc = ""]
    pub fn srtp_remove_stream(session: srtp_t, ssrc: ::std::os::raw::c_uint) -> srtp_err_status_t;
}
extern "C" {
    #[doc = " @brief srtp_update() udpates all streams in the session."]
    #[doc = ""]
    #[doc = " The function call srtp_update(session, policy) updates"]
    #[doc = " all the streams in the session applying the given policy"]
    #[doc = " and key. The exsisting ROC value of all streams will be"]
    #[doc = " preserved."]
    #[doc = ""]
    #[doc = " @param session is the SRTP session that contains the streams"]
    #[doc = "        to be updated."]
    #[doc = ""]
    #[doc = " @param policy is the srtp_policy_t struct that describes the policy"]
    #[doc = " for the session.  The struct may be a single element, or it may be"]
    #[doc = " the head of a list, in which case each element of the list is"]
    #[doc = " processed. The final element of the list @b must"]
    #[doc = " have its `next' field set to NULL."]
    #[doc = ""]
    #[doc = " @return"]
    #[doc = "    - srtp_err_status_ok           if stream creation succeded."]
    #[doc = "    - srtp_err_status_alloc_fail   if stream allocation failed"]
    #[doc = "    - srtp_err_status_init_fail    if stream initialization failed."]
    #[doc = "    - [other]                 otherwise."]
    #[doc = ""]
    pub fn srtp_update(session: srtp_t, policy: *const srtp_policy_t) -> srtp_err_status_t;
}
extern "C" {
    #[doc = " @brief srtp_update_stream() udpates a SRTP stream."]
    #[doc = ""]
    #[doc = " The function call srtp_update_stream(session, policy) updates"]
    #[doc = " the stream(s) in the session that match applying the given"]
    #[doc = " policy and key. The exsisting ROC value of all stream(s) will"]
    #[doc = " be preserved."]
    #[doc = ""]
    #[doc = " @param session is the SRTP session that contains the streams"]
    #[doc = "        to be updated."]
    #[doc = ""]
    #[doc = " @param policy is the srtp_policy_t struct that describes the policy"]
    #[doc = " for the session."]
    #[doc = ""]
    #[doc = " @return"]
    #[doc = "    - srtp_err_status_ok           if stream creation succeded."]
    #[doc = "    - srtp_err_status_alloc_fail   if stream allocation failed"]
    #[doc = "    - srtp_err_status_init_fail    if stream initialization failed."]
    #[doc = "    - [other]                      otherwise."]
    #[doc = ""]
    pub fn srtp_update_stream(session: srtp_t, policy: *const srtp_policy_t) -> srtp_err_status_t;
}
extern "C" {
    #[doc = " @brief srtp_crypto_policy_set_rtp_default() sets a crypto policy"]
    #[doc = " structure to the SRTP default policy for RTP protection."]
    #[doc = ""]
    #[doc = " @param p is a pointer to the policy structure to be set"]
    #[doc = ""]
    #[doc = " The function call srtp_crypto_policy_set_rtp_default(&p) sets the"]
    #[doc = " srtp_crypto_policy_t at location p to the SRTP default policy for RTP"]
    #[doc = " protection, as defined in the specification.  This function is a"]
    #[doc = " convenience that helps to avoid dealing directly with the policy"]
    #[doc = " data structure.  You are encouraged to initialize policy elements"]
    #[doc = " with this function call.  Doing so may allow your code to be"]
    #[doc = " forward compatible with later versions of libSRTP that include more"]
    #[doc = " elements in the srtp_crypto_policy_t datatype."]
    #[doc = ""]
    #[doc = " @return void."]
    #[doc = ""]
    pub fn srtp_crypto_policy_set_rtp_default(p: *mut srtp_crypto_policy_t);
}
extern "C" {
    #[doc = " @brief srtp_crypto_policy_set_rtcp_default() sets a crypto policy"]
    #[doc = " structure to the SRTP default policy for RTCP protection."]
    #[doc = ""]
    #[doc = " @param p is a pointer to the policy structure to be set"]
    #[doc = ""]
    #[doc = " The function call srtp_crypto_policy_set_rtcp_default(&p) sets the"]
    #[doc = " srtp_crypto_policy_t at location p to the SRTP default policy for RTCP"]
    #[doc = " protection, as defined in the specification.  This function is a"]
    #[doc = " convenience that helps to avoid dealing directly with the policy"]
    #[doc = " data structure.  You are encouraged to initialize policy elements"]
    #[doc = " with this function call.  Doing so may allow your code to be"]
    #[doc = " forward compatible with later versions of libSRTP that include more"]
    #[doc = " elements in the srtp_crypto_policy_t datatype."]
    #[doc = ""]
    #[doc = " @return void."]
    #[doc = ""]
    pub fn srtp_crypto_policy_set_rtcp_default(p: *mut srtp_crypto_policy_t);
}
extern "C" {
    #[doc = " @brief srtp_crypto_policy_set_aes_cm_128_hmac_sha1_32() sets a crypto"]
    #[doc = " policy structure to a short-authentication tag policy"]
    #[doc = ""]
    #[doc = " @param p is a pointer to the policy structure to be set"]
    #[doc = ""]
    #[doc = " The function call srtp_crypto_policy_set_aes_cm_128_hmac_sha1_32(&p)"]
    #[doc = " sets the srtp_crypto_policy_t at location p to use policy"]
    #[doc = " AES_CM_128_HMAC_SHA1_32 as defined in RFC 4568."]
    #[doc = " This policy uses AES-128"]
    #[doc = " Counter Mode encryption and HMAC-SHA1 authentication, with an"]
    #[doc = " authentication tag that is only 32 bits long.  This length is"]
    #[doc = " considered adequate only for protecting audio and video media that"]
    #[doc = " use a stateless playback function.  See Section 7.5 of RFC 3711"]
    #[doc = " (http://www.ietf.org/rfc/rfc3711.txt)."]
    #[doc = ""]
    #[doc = " This function is a convenience that helps to avoid dealing directly"]
    #[doc = " with the policy data structure.  You are encouraged to initialize"]
    #[doc = " policy elements with this function call.  Doing so may allow your"]
    #[doc = " code to be forward compatible with later versions of libSRTP that"]
    #[doc = " include more elements in the srtp_crypto_policy_t datatype."]
    #[doc = ""]
    #[doc = " @warning This crypto policy is intended for use in SRTP, but not in"]
    #[doc = " SRTCP.  It is recommended that a policy that uses longer"]
    #[doc = " authentication tags be used for SRTCP.  See Section 7.5 of RFC 3711"]
    #[doc = " (http://www.ietf.org/rfc/rfc3711.txt)."]
    #[doc = ""]
    #[doc = " @return void."]
    #[doc = ""]
    pub fn srtp_crypto_policy_set_aes_cm_128_hmac_sha1_32(p: *mut srtp_crypto_policy_t);
}
extern "C" {
    #[doc = " @brief srtp_crypto_policy_set_aes_cm_128_null_auth() sets a crypto"]
    #[doc = " policy structure to an encryption-only policy"]
    #[doc = ""]
    #[doc = " @param p is a pointer to the policy structure to be set"]
    #[doc = ""]
    #[doc = " The function call srtp_crypto_policy_set_aes_cm_128_null_auth(&p) sets"]
    #[doc = " the srtp_crypto_policy_t at location p to use the SRTP default cipher"]
    #[doc = " (AES-128 Counter Mode), but to use no authentication method.  This"]
    #[doc = " policy is NOT RECOMMENDED unless it is unavoidable; see Section 7.5"]
    #[doc = " of RFC 3711 (http://www.ietf.org/rfc/rfc3711.txt)."]
    #[doc = ""]
    #[doc = " This function is a convenience that helps to avoid dealing directly"]
    #[doc = " with the policy data structure.  You are encouraged to initialize"]
    #[doc = " policy elements with this function call.  Doing so may allow your"]
    #[doc = " code to be forward compatible with later versions of libSRTP that"]
    #[doc = " include more elements in the srtp_crypto_policy_t datatype."]
    #[doc = ""]
    #[doc = " @warning This policy is NOT RECOMMENDED for SRTP unless it is"]
    #[doc = " unavoidable, and it is NOT RECOMMENDED at all for SRTCP; see"]
    #[doc = " Section 7.5 of RFC 3711 (http://www.ietf.org/rfc/rfc3711.txt)."]
    #[doc = ""]
    #[doc = " @return void."]
    #[doc = ""]
    pub fn srtp_crypto_policy_set_aes_cm_128_null_auth(p: *mut srtp_crypto_policy_t);
}
extern "C" {
    #[doc = " @brief srtp_crypto_policy_set_null_cipher_hmac_sha1_80() sets a crypto"]
    #[doc = " policy structure to an authentication-only policy"]
    #[doc = ""]
    #[doc = " @param p is a pointer to the policy structure to be set"]
    #[doc = ""]
    #[doc = " The function call srtp_crypto_policy_set_null_cipher_hmac_sha1_80(&p)"]
    #[doc = " sets the srtp_crypto_policy_t at location p to use HMAC-SHA1 with an 80"]
    #[doc = " bit authentication tag to provide message authentication, but to"]
    #[doc = " use no encryption.  This policy is NOT RECOMMENDED for SRTP unless"]
    #[doc = " there is a requirement to forego encryption."]
    #[doc = ""]
    #[doc = " This function is a convenience that helps to avoid dealing directly"]
    #[doc = " with the policy data structure.  You are encouraged to initialize"]
    #[doc = " policy elements with this function call.  Doing so may allow your"]
    #[doc = " code to be forward compatible with later versions of libSRTP that"]
    #[doc = " include more elements in the srtp_crypto_policy_t datatype."]
    #[doc = ""]
    #[doc = " @warning This policy is NOT RECOMMENDED for SRTP unless there is a"]
    #[doc = " requirement to forego encryption."]
    #[doc = ""]
    #[doc = " @return void."]
    #[doc = ""]
    pub fn srtp_crypto_policy_set_null_cipher_hmac_sha1_80(p: *mut srtp_crypto_policy_t);
}
extern "C" {
    #[doc = " @brief srtp_crypto_policy_set_null_cipher_hmac_null() sets a crypto"]
    #[doc = " policy structure to use no encryption or authentication."]
    #[doc = ""]
    #[doc = " @param p is a pointer to the policy structure to be set"]
    #[doc = ""]
    #[doc = " The function call srtp_crypto_policy_set_null_cipher_hmac_null(&p)"]
    #[doc = " sets the srtp_crypto_policy_t at location p to use no encryption and"]
    #[doc = " no authentication.  This policy should only be used for testing and"]
    #[doc = " troubleshootingl."]
    #[doc = ""]
    #[doc = " This function is a convenience that helps to avoid dealing directly"]
    #[doc = " with the policy data structure.  You are encouraged to initialize"]
    #[doc = " policy elements with this function call.  Doing so may allow your"]
    #[doc = " code to be forward compatible with later versions of libSRTP that"]
    #[doc = " include more elements in the srtp_crypto_policy_t datatype."]
    #[doc = ""]
    #[doc = " @warning This policy is NOT RECOMMENDED for SRTP unless there is a"]
    #[doc = " requirement to forego encryption and authentication."]
    #[doc = ""]
    #[doc = " @return void."]
    #[doc = ""]
    pub fn srtp_crypto_policy_set_null_cipher_hmac_null(p: *mut srtp_crypto_policy_t);
}
extern "C" {
    #[doc = " @brief srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80() sets a crypto"]
    #[doc = " policy structure to a encryption and authentication policy using AES-256"]
    #[doc = " for RTP protection."]
    #[doc = ""]
    #[doc = " @param p is a pointer to the policy structure to be set"]
    #[doc = ""]
    #[doc = " The function call srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80(&p)"]
    #[doc = " sets the srtp_crypto_policy_t at location p to use policy"]
    #[doc = " AES_CM_256_HMAC_SHA1_80 as defined in RFC 6188.  This policy uses AES-256"]
    #[doc = " Counter Mode encryption and HMAC-SHA1 authentication, with an 80 bit"]
    #[doc = " authentication tag."]
    #[doc = ""]
    #[doc = " This function is a convenience that helps to avoid dealing directly"]
    #[doc = " with the policy data structure.  You are encouraged to initialize"]
    #[doc = " policy elements with this function call.  Doing so may allow your"]
    #[doc = " code to be forward compatible with later versions of libSRTP that"]
    #[doc = " include more elements in the srtp_crypto_policy_t datatype."]
    #[doc = ""]
    #[doc = " @return void."]
    #[doc = ""]
    pub fn srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80(p: *mut srtp_crypto_policy_t);
}
extern "C" {
    #[doc = " @brief srtp_crypto_policy_set_aes_cm_256_hmac_sha1_32() sets a crypto"]
    #[doc = " policy structure to a short-authentication tag policy using AES-256"]
    #[doc = " encryption."]
    #[doc = ""]
    #[doc = " @param p is a pointer to the policy structure to be set"]
    #[doc = ""]
    #[doc = " The function call srtp_crypto_policy_set_aes_cm_256_hmac_sha1_32(&p)"]
    #[doc = " sets the srtp_crypto_policy_t at location p to use policy"]
    #[doc = " AES_CM_256_HMAC_SHA1_32 as defined in RFC 6188.  This policy uses AES-256"]
    #[doc = " Counter Mode encryption and HMAC-SHA1 authentication, with an"]
    #[doc = " authentication tag that is only 32 bits long.  This length is"]
    #[doc = " considered adequate only for protecting audio and video media that"]
    #[doc = " use a stateless playback function.  See Section 7.5 of RFC 3711"]
    #[doc = " (http://www.ietf.org/rfc/rfc3711.txt)."]
    #[doc = ""]
    #[doc = " This function is a convenience that helps to avoid dealing directly"]
    #[doc = " with the policy data structure.  You are encouraged to initialize"]
    #[doc = " policy elements with this function call.  Doing so may allow your"]
    #[doc = " code to be forward compatible with later versions of libSRTP that"]
    #[doc = " include more elements in the srtp_crypto_policy_t datatype."]
    #[doc = ""]
    #[doc = " @warning This crypto policy is intended for use in SRTP, but not in"]
    #[doc = " SRTCP.  It is recommended that a policy that uses longer"]
    #[doc = " authentication tags be used for SRTCP.  See Section 7.5 of RFC 3711"]
    #[doc = " (http://www.ietf.org/rfc/rfc3711.txt)."]
    #[doc = ""]
    #[doc = " @return void."]
    #[doc = ""]
    pub fn srtp_crypto_policy_set_aes_cm_256_hmac_sha1_32(p: *mut srtp_crypto_policy_t);
}
extern "C" {
    #[doc = " @brief srtp_crypto_policy_set_aes_cm_256_null_auth() sets a crypto"]
    #[doc = " policy structure to an encryption-only policy"]
    #[doc = ""]
    #[doc = " @param p is a pointer to the policy structure to be set"]
    #[doc = ""]
    #[doc = " The function call srtp_crypto_policy_set_aes_cm_256_null_auth(&p) sets"]
    #[doc = " the srtp_crypto_policy_t at location p to use the SRTP default cipher"]
    #[doc = " (AES-256 Counter Mode), but to use no authentication method.  This"]
    #[doc = " policy is NOT RECOMMENDED unless it is unavoidable; see Section 7.5"]
    #[doc = " of RFC 3711 (http://www.ietf.org/rfc/rfc3711.txt)."]
    #[doc = ""]
    #[doc = " This function is a convenience that helps to avoid dealing directly"]
    #[doc = " with the policy data structure.  You are encouraged to initialize"]
    #[doc = " policy elements with this function call.  Doing so may allow your"]
    #[doc = " code to be forward compatible with later versions of libSRTP that"]
    #[doc = " include more elements in the srtp_crypto_policy_t datatype."]
    #[doc = ""]
    #[doc = " @warning This policy is NOT RECOMMENDED for SRTP unless it is"]
    #[doc = " unavoidable, and it is NOT RECOMMENDED at all for SRTCP; see"]
    #[doc = " Section 7.5 of RFC 3711 (http://www.ietf.org/rfc/rfc3711.txt)."]
    #[doc = ""]
    #[doc = " @return void."]
    #[doc = ""]
    pub fn srtp_crypto_policy_set_aes_cm_256_null_auth(p: *mut srtp_crypto_policy_t);
}
extern "C" {
    #[doc = " @brief srtp_crypto_policy_set_aes_cm_192_hmac_sha1_80() sets a crypto"]
    #[doc = " policy structure to a encryption and authentication policy using AES-192"]
    #[doc = " for RTP protection."]
    #[doc = ""]
    #[doc = " @param p is a pointer to the policy structure to be set"]
    #[doc = ""]
    #[doc = " The function call srtp_crypto_policy_set_aes_cm_192_hmac_sha1_80(&p)"]
    #[doc = " sets the srtp_crypto_policy_t at location p to use policy"]
    #[doc = " AES_CM_192_HMAC_SHA1_80 as defined in RFC 6188.  This policy uses AES-192"]
    #[doc = " Counter Mode encryption and HMAC-SHA1 authentication, with an 80 bit"]
    #[doc = " authentication tag."]
    #[doc = ""]
    #[doc = " This function is a convenience that helps to avoid dealing directly"]
    #[doc = " with the policy data structure.  You are encouraged to initialize"]
    #[doc = " policy elements with this function call.  Doing so may allow your"]
    #[doc = " code to be forward compatible with later versions of libSRTP that"]
    #[doc = " include more elements in the srtp_crypto_policy_t datatype."]
    #[doc = ""]
    #[doc = " @return void."]
    #[doc = ""]
    pub fn srtp_crypto_policy_set_aes_cm_192_hmac_sha1_80(p: *mut srtp_crypto_policy_t);
}
extern "C" {
    #[doc = " @brief srtp_crypto_policy_set_aes_cm_192_hmac_sha1_32() sets a crypto"]
    #[doc = " policy structure to a short-authentication tag policy using AES-192"]
    #[doc = " encryption."]
    #[doc = ""]
    #[doc = " @param p is a pointer to the policy structure to be set"]
    #[doc = ""]
    #[doc = " The function call srtp_crypto_policy_set_aes_cm_192_hmac_sha1_32(&p)"]
    #[doc = " sets the srtp_crypto_policy_t at location p to use policy"]
    #[doc = " AES_CM_192_HMAC_SHA1_32 as defined in RFC 6188.  This policy uses AES-192"]
    #[doc = " Counter Mode encryption and HMAC-SHA1 authentication, with an"]
    #[doc = " authentication tag that is only 32 bits long.  This length is"]
    #[doc = " considered adequate only for protecting audio and video media that"]
    #[doc = " use a stateless playback function.  See Section 7.5 of RFC 3711"]
    #[doc = " (http://www.ietf.org/rfc/rfc3711.txt)."]
    #[doc = ""]
    #[doc = " This function is a convenience that helps to avoid dealing directly"]
    #[doc = " with the policy data structure.  You are encouraged to initialize"]
    #[doc = " policy elements with this function call.  Doing so may allow your"]
    #[doc = " code to be forward compatible with later versions of libSRTP that"]
    #[doc = " include more elements in the srtp_crypto_policy_t datatype."]
    #[doc = ""]
    #[doc = " @warning This crypto policy is intended for use in SRTP, but not in"]
    #[doc = " SRTCP.  It is recommended that a policy that uses longer"]
    #[doc = " authentication tags be used for SRTCP.  See Section 7.5 of RFC 3711"]
    #[doc = " (http://www.ietf.org/rfc/rfc3711.txt)."]
    #[doc = ""]
    #[doc = " @return void."]
    #[doc = ""]
    pub fn srtp_crypto_policy_set_aes_cm_192_hmac_sha1_32(p: *mut srtp_crypto_policy_t);
}
extern "C" {
    #[doc = " @brief srtp_crypto_policy_set_aes_cm_192_null_auth() sets a crypto"]
    #[doc = " policy structure to an encryption-only policy"]
    #[doc = ""]
    #[doc = " @param p is a pointer to the policy structure to be set"]
    #[doc = ""]
    #[doc = " The function call srtp_crypto_policy_set_aes_cm_192_null_auth(&p) sets"]
    #[doc = " the srtp_crypto_policy_t at location p to use the SRTP default cipher"]
    #[doc = " (AES-192 Counter Mode), but to use no authentication method.  This"]
    #[doc = " policy is NOT RECOMMENDED unless it is unavoidable; see Section 7.5"]
    #[doc = " of RFC 3711 (http://www.ietf.org/rfc/rfc3711.txt)."]
    #[doc = ""]
    #[doc = " This function is a convenience that helps to avoid dealing directly"]
    #[doc = " with the policy data structure.  You are encouraged to initialize"]
    #[doc = " policy elements with this function call.  Doing so may allow your"]
    #[doc = " code to be forward compatible with later versions of libSRTP that"]
    #[doc = " include more elements in the srtp_crypto_policy_t datatype."]
    #[doc = ""]
    #[doc = " @warning This policy is NOT RECOMMENDED for SRTP unless it is"]
    #[doc = " unavoidable, and it is NOT RECOMMENDED at all for SRTCP; see"]
    #[doc = " Section 7.5 of RFC 3711 (http://www.ietf.org/rfc/rfc3711.txt)."]
    #[doc = ""]
    #[doc = " @return void."]
    #[doc = ""]
    pub fn srtp_crypto_policy_set_aes_cm_192_null_auth(p: *mut srtp_crypto_policy_t);
}
extern "C" {
    #[doc = " @brief srtp_crypto_policy_set_aes_gcm_128_8_auth() sets a crypto"]
    #[doc = " policy structure to an AEAD encryption policy."]
    #[doc = ""]
    #[doc = " @param p is a pointer to the policy structure to be set"]
    #[doc = ""]
    #[doc = " The function call srtp_crypto_policy_set_aes_gcm_128_8_auth(&p) sets"]
    #[doc = " the srtp_crypto_policy_t at location p to use the SRTP default cipher"]
    #[doc = " (AES-128 Galois Counter Mode) with 8 octet auth tag.  This"]
    #[doc = " policy applies confidentiality and authentication to both the"]
    #[doc = " RTP and RTCP packets."]
    #[doc = ""]
    #[doc = " This function is a convenience that helps to avoid dealing directly"]
    #[doc = " with the policy data structure.  You are encouraged to initialize"]
    #[doc = " policy elements with this function call.  Doing so may allow your"]
    #[doc = " code to be forward compatible with later versions of libSRTP that"]
    #[doc = " include more elements in the srtp_crypto_policy_t datatype."]
    #[doc = ""]
    #[doc = " @return void."]
    #[doc = ""]
    pub fn srtp_crypto_policy_set_aes_gcm_128_8_auth(p: *mut srtp_crypto_policy_t);
}
extern "C" {
    #[doc = " @brief srtp_crypto_policy_set_aes_gcm_256_8_auth() sets a crypto"]
    #[doc = " policy structure to an AEAD encryption policy"]
    #[doc = ""]
    #[doc = " @param p is a pointer to the policy structure to be set"]
    #[doc = ""]
    #[doc = " The function call srtp_crypto_policy_set_aes_gcm_256_8_auth(&p) sets"]
    #[doc = " the srtp_crypto_policy_t at location p to use the SRTP default cipher"]
    #[doc = " (AES-256 Galois Counter Mode) with 8 octet auth tag.  This"]
    #[doc = " policy applies confidentiality and authentication to both the"]
    #[doc = " RTP and RTCP packets."]
    #[doc = ""]
    #[doc = " This function is a convenience that helps to avoid dealing directly"]
    #[doc = " with the policy data structure.  You are encouraged to initialize"]
    #[doc = " policy elements with this function call.  Doing so may allow your"]
    #[doc = " code to be forward compatible with later versions of libSRTP that"]
    #[doc = " include more elements in the srtp_crypto_policy_t datatype."]
    #[doc = ""]
    #[doc = " @return void."]
    #[doc = ""]
    pub fn srtp_crypto_policy_set_aes_gcm_256_8_auth(p: *mut srtp_crypto_policy_t);
}
extern "C" {
    #[doc = " @brief srtp_crypto_policy_set_aes_gcm_128_8_only_auth() sets a crypto"]
    #[doc = " policy structure to an AEAD authentication-only policy"]
    #[doc = ""]
    #[doc = " @param p is a pointer to the policy structure to be set"]
    #[doc = ""]
    #[doc = " The function call srtp_crypto_policy_set_aes_gcm_128_8_only_auth(&p) sets"]
    #[doc = " the srtp_crypto_policy_t at location p to use the SRTP default cipher"]
    #[doc = " (AES-128 Galois Counter Mode) with 8 octet auth tag.  This policy"]
    #[doc = " applies confidentiality and authentication to the RTP packets,"]
    #[doc = " but only authentication to the RTCP packets."]
    #[doc = ""]
    #[doc = " This function is a convenience that helps to avoid dealing directly"]
    #[doc = " with the policy data structure.  You are encouraged to initialize"]
    #[doc = " policy elements with this function call.  Doing so may allow your"]
    #[doc = " code to be forward compatible with later versions of libSRTP that"]
    #[doc = " include more elements in the srtp_crypto_policy_t datatype."]
    #[doc = ""]
    #[doc = " @return void."]
    #[doc = ""]
    pub fn srtp_crypto_policy_set_aes_gcm_128_8_only_auth(p: *mut srtp_crypto_policy_t);
}
extern "C" {
    #[doc = " @brief srtp_crypto_policy_set_aes_gcm_256_8_only_auth() sets a crypto"]
    #[doc = " policy structure to an AEAD authentication-only policy"]
    #[doc = ""]
    #[doc = " @param p is a pointer to the policy structure to be set"]
    #[doc = ""]
    #[doc = " The function call srtp_crypto_policy_set_aes_gcm_256_8_only_auth(&p) sets"]
    #[doc = " the srtp_crypto_policy_t at location p to use the SRTP default cipher"]
    #[doc = " (AES-256 Galois Counter Mode) with 8 octet auth tag.  This policy"]
    #[doc = " applies confidentiality and authentication to the RTP packets,"]
    #[doc = " but only authentication to the RTCP packets."]
    #[doc = ""]
    #[doc = " This function is a convenience that helps to avoid dealing directly"]
    #[doc = " with the policy data structure.  You are encouraged to initialize"]
    #[doc = " policy elements with this function call.  Doing so may allow your"]
    #[doc = " code to be forward compatible with later versions of libSRTP that"]
    #[doc = " include more elements in the srtp_crypto_policy_t datatype."]
    #[doc = ""]
    #[doc = " @return void."]
    #[doc = ""]
    pub fn srtp_crypto_policy_set_aes_gcm_256_8_only_auth(p: *mut srtp_crypto_policy_t);
}
extern "C" {
    #[doc = " @brief srtp_crypto_policy_set_aes_gcm_128_16_auth() sets a crypto"]
    #[doc = " policy structure to an AEAD encryption policy."]
    #[doc = ""]
    #[doc = " @param p is a pointer to the policy structure to be set"]
    #[doc = ""]
    #[doc = " The function call srtp_crypto_policy_set_aes_gcm_128_16_auth(&p) sets"]
    #[doc = " the srtp_crypto_policy_t at location p to use the SRTP default cipher"]
    #[doc = " (AES-128 Galois Counter Mode) with 16 octet auth tag.  This"]
    #[doc = " policy applies confidentiality and authentication to both the"]
    #[doc = " RTP and RTCP packets."]
    #[doc = ""]
    #[doc = " This function is a convenience that helps to avoid dealing directly"]
    #[doc = " with the policy data structure.  You are encouraged to initialize"]
    #[doc = " policy elements with this function call.  Doing so may allow your"]
    #[doc = " code to be forward compatible with later versions of libSRTP that"]
    #[doc = " include more elements in the srtp_crypto_policy_t datatype."]
    #[doc = ""]
    #[doc = " @return void."]
    #[doc = ""]
    pub fn srtp_crypto_policy_set_aes_gcm_128_16_auth(p: *mut srtp_crypto_policy_t);
}
extern "C" {
    #[doc = " @brief srtp_crypto_policy_set_aes_gcm_256_16_auth() sets a crypto"]
    #[doc = " policy structure to an AEAD encryption policy"]
    #[doc = ""]
    #[doc = " @param p is a pointer to the policy structure to be set"]
    #[doc = ""]
    #[doc = " The function call srtp_crypto_policy_set_aes_gcm_256_16_auth(&p) sets"]
    #[doc = " the srtp_crypto_policy_t at location p to use the SRTP default cipher"]
    #[doc = " (AES-256 Galois Counter Mode) with 16 octet auth tag.  This"]
    #[doc = " policy applies confidentiality and authentication to both the"]
    #[doc = " RTP and RTCP packets."]
    #[doc = ""]
    #[doc = " This function is a convenience that helps to avoid dealing directly"]
    #[doc = " with the policy data structure.  You are encouraged to initialize"]
    #[doc = " policy elements with this function call.  Doing so may allow your"]
    #[doc = " code to be forward compatible with later versions of libSRTP that"]
    #[doc = " include more elements in the srtp_crypto_policy_t datatype."]
    #[doc = ""]
    #[doc = " @return void."]
    #[doc = ""]
    pub fn srtp_crypto_policy_set_aes_gcm_256_16_auth(p: *mut srtp_crypto_policy_t);
}
extern "C" {
    #[doc = " @brief srtp_dealloc() deallocates storage for an SRTP session"]
    #[doc = " context."]
    #[doc = ""]
    #[doc = " The function call srtp_dealloc(s) deallocates storage for the"]
    #[doc = " SRTP session context s.  This function should be called no more"]
    #[doc = " than one time for each of the contexts allocated by the function"]
    #[doc = " srtp_create()."]
    #[doc = ""]
    #[doc = " @param s is the srtp_t for the session to be deallocated."]
    #[doc = ""]
    #[doc = " @return"]
    #[doc = "    - srtp_err_status_ok             if there no problems."]
    #[doc = "    - srtp_err_status_dealloc_fail   a memory deallocation failure occured."]
    pub fn srtp_dealloc(s: srtp_t) -> srtp_err_status_t;
}
pub const srtp_profile_t_srtp_profile_reserved: srtp_profile_t = 0;
pub const srtp_profile_t_srtp_profile_aes128_cm_sha1_80: srtp_profile_t = 1;
pub const srtp_profile_t_srtp_profile_aes128_cm_sha1_32: srtp_profile_t = 2;
pub const srtp_profile_t_srtp_profile_null_sha1_80: srtp_profile_t = 5;
pub const srtp_profile_t_srtp_profile_null_sha1_32: srtp_profile_t = 6;
pub const srtp_profile_t_srtp_profile_aead_aes_128_gcm: srtp_profile_t = 7;
pub const srtp_profile_t_srtp_profile_aead_aes_256_gcm: srtp_profile_t = 8;
pub type srtp_profile_t = ::std::os::raw::c_uint;
extern "C" {
    #[doc = " @brief srtp_crypto_policy_set_from_profile_for_rtp() sets a crypto policy"]
    #[doc = " structure to the appropriate value for RTP based on an srtp_profile_t"]
    #[doc = ""]
    #[doc = " @param policy is a pointer to the policy structure to be set"]
    #[doc = ""]
    #[doc = " @param profile is an enumeration for the policy to be set"]
    #[doc = ""]
    #[doc = " The function call srtp_crypto_policy_set_rtp_default(&policy, profile)"]
    #[doc = " sets the srtp_crypto_policy_t at location policy to the policy for RTP"]
    #[doc = " protection, as defined by the srtp_profile_t profile."]
    #[doc = ""]
    #[doc = " This function is a convenience that helps to avoid dealing directly"]
    #[doc = " with the policy data structure.  You are encouraged to initialize"]
    #[doc = " policy elements with this function call.  Doing so may allow your"]
    #[doc = " code to be forward compatible with later versions of libSRTP that"]
    #[doc = " include more elements in the srtp_crypto_policy_t datatype."]
    #[doc = ""]
    #[doc = " @return values"]
    #[doc = "     - srtp_err_status_ok         no problems were encountered"]
    #[doc = "     - srtp_err_status_bad_param  the profile is not supported"]
    #[doc = ""]
    pub fn srtp_crypto_policy_set_from_profile_for_rtp(
        policy: *mut srtp_crypto_policy_t,
        profile: srtp_profile_t,
    ) -> srtp_err_status_t;
}
extern "C" {
    #[doc = " @brief srtp_crypto_policy_set_from_profile_for_rtcp() sets a crypto policy"]
    #[doc = " structure to the appropriate value for RTCP based on an srtp_profile_t"]
    #[doc = ""]
    #[doc = " @param policy is a pointer to the policy structure to be set"]
    #[doc = ""]
    #[doc = " @param profile is an enumeration for the policy to be set"]
    #[doc = ""]
    #[doc = " The function call srtp_crypto_policy_set_rtcp_default(&policy, profile)"]
    #[doc = " sets the srtp_crypto_policy_t at location policy to the policy for RTCP"]
    #[doc = " protection, as defined by the srtp_profile_t profile."]
    #[doc = ""]
    #[doc = " This function is a convenience that helps to avoid dealing directly"]
    #[doc = " with the policy data structure.  You are encouraged to initialize"]
    #[doc = " policy elements with this function call.  Doing so may allow your"]
    #[doc = " code to be forward compatible with later versions of libSRTP that"]
    #[doc = " include more elements in the srtp_crypto_policy_t datatype."]
    #[doc = ""]
    #[doc = " @return values"]
    #[doc = "     - srtp_err_status_ok         no problems were encountered"]
    #[doc = "     - srtp_err_status_bad_param  the profile is not supported"]
    #[doc = ""]
    pub fn srtp_crypto_policy_set_from_profile_for_rtcp(
        policy: *mut srtp_crypto_policy_t,
        profile: srtp_profile_t,
    ) -> srtp_err_status_t;
}
extern "C" {
    #[doc = " @brief returns the master key length for a given SRTP profile"]
    pub fn srtp_profile_get_master_key_length(profile: srtp_profile_t) -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = " @brief returns the master salt length for a given SRTP profile"]
    pub fn srtp_profile_get_master_salt_length(profile: srtp_profile_t) -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = " @brief appends the salt to the key"]
    #[doc = ""]
    #[doc = " The function call srtp_append_salt_to_key(k, klen, s, slen)"]
    #[doc = " copies the string s to the location at klen bytes following"]
    #[doc = " the location k."]
    #[doc = ""]
    #[doc = " @warning There must be at least bytes_in_salt + bytes_in_key bytes"]
    #[doc = "          available at the location pointed to by key."]
    #[doc = ""]
    pub fn srtp_append_salt_to_key(
        key: *mut ::std::os::raw::c_uchar,
        bytes_in_key: ::std::os::raw::c_uint,
        salt: *mut ::std::os::raw::c_uchar,
        bytes_in_salt: ::std::os::raw::c_uint,
    );
}
extern "C" {
    #[doc = " @brief srtp_protect_rtcp() is the Secure RTCP sender-side packet"]
    #[doc = " processing function."]
    #[doc = ""]
    #[doc = " The function call srtp_protect_rtcp(ctx, rtp_hdr, len_ptr) applies"]
    #[doc = " SRTCP protection to the RTCP packet rtcp_hdr (which has length"]
    #[doc = " *len_ptr) using the SRTP session context ctx.  If srtp_err_status_ok is"]
    #[doc = " returned, then rtp_hdr points to the resulting SRTCP packet and"]
    #[doc = " *len_ptr is the number of octets in that packet; otherwise, no"]
    #[doc = " assumptions should be made about the value of either data elements."]
    #[doc = ""]
    #[doc = " @warning This function assumes that it can write the authentication"]
    #[doc = " tag into the location in memory immediately following the RTCP"]
    #[doc = " packet, and assumes that the RTCP packet is aligned on a 32-bit"]
    #[doc = " boundary."]
    #[doc = ""]
    #[doc = " @warning This function assumes that it can write SRTP_MAX_TRAILER_LEN+4"]
    #[doc = " into the location in memory immediately following the RTCP packet."]
    #[doc = " Callers MUST ensure that this much writable memory is available in"]
    #[doc = " the buffer that holds the RTCP packet."]
    #[doc = ""]
    #[doc = " @param ctx is the SRTP context to use in processing the packet."]
    #[doc = ""]
    #[doc = " @param rtcp_hdr is a pointer to the RTCP packet (before the call); after"]
    #[doc = " the function returns, it points to the srtp packet."]
    #[doc = ""]
    #[doc = " @param pkt_octet_len is a pointer to the length in octets of the"]
    #[doc = " complete RTCP packet (header and body) before the function call,"]
    #[doc = " and of the complete SRTCP packet after the call, if srtp_err_status_ok"]
    #[doc = " was returned.  Otherwise, the value of the data to which it points"]
    #[doc = " is undefined."]
    #[doc = ""]
    #[doc = " @return"]
    #[doc = "    - srtp_err_status_ok            if there were no problems."]
    #[doc = "    - [other]                  if there was a failure in"]
    #[doc = "                               the cryptographic mechanisms."]
    pub fn srtp_protect_rtcp(
        ctx: srtp_t,
        rtcp_hdr: *mut ::std::os::raw::c_void,
        pkt_octet_len: *mut ::std::os::raw::c_int,
    ) -> srtp_err_status_t;
}
extern "C" {
    #[doc = " @brief srtp_protect_rtcp_mki() is the Secure RTCP sender-side packet"]
    #[doc = " processing function that can utilize mki."]
    #[doc = ""]
    #[doc = " The function call srtp_protect_rtcp(ctx, rtp_hdr, len_ptr) applies"]
    #[doc = " SRTCP protection to the RTCP packet rtcp_hdr (which has length"]
    #[doc = " *len_ptr) using the SRTP session context ctx.  If srtp_err_status_ok is"]
    #[doc = " returned, then rtp_hdr points to the resulting SRTCP packet and"]
    #[doc = " *len_ptr is the number of octets in that packet; otherwise, no"]
    #[doc = " assumptions should be made about the value of either data elements."]
    #[doc = ""]
    #[doc = " @warning This function assumes that it can write the authentication"]
    #[doc = " tag into the location in memory immediately following the RTCP"]
    #[doc = " packet, and assumes that the RTCP packet is aligned on a 32-bit"]
    #[doc = " boundary."]
    #[doc = ""]
    #[doc = " @warning This function assumes that it can write SRTP_MAX_TRAILER_LEN+4"]
    #[doc = " into the location in memory immediately following the RTCP packet."]
    #[doc = " Callers MUST ensure that this much writable memory is available in"]
    #[doc = " the buffer that holds the RTCP packet."]
    #[doc = ""]
    #[doc = " @param ctx is the SRTP context to use in processing the packet."]
    #[doc = ""]
    #[doc = " @param rtcp_hdr is a pointer to the RTCP packet (before the call); after"]
    #[doc = " the function returns, it points to the srtp packet."]
    #[doc = ""]
    #[doc = " @param pkt_octet_len is a pointer to the length in octets of the"]
    #[doc = " complete RTCP packet (header and body) before the function call,"]
    #[doc = " and of the complete SRTCP packet after the call, if srtp_err_status_ok"]
    #[doc = " was returned.  Otherwise, the value of the data to which it points"]
    #[doc = " is undefined."]
    #[doc = ""]
    #[doc = " @param use_mki is a boolean to tell the system if mki is being used.  If"]
    #[doc = " set to false then will use the first set of session keys.  If set to true"]
    #[doc = " will"]
    #[doc = " use the session keys identified by the mki_index"]
    #[doc = ""]
    #[doc = " @param mki_index integer value specifying which set of session kesy should be"]
    #[doc = " used if use_mki is set to true."]
    #[doc = ""]
    #[doc = " @return"]
    #[doc = "    - srtp_err_status_ok            if there were no problems."]
    #[doc = "    - [other]                  if there was a failure in"]
    #[doc = "                               the cryptographic mechanisms."]
    pub fn srtp_protect_rtcp_mki(
        ctx: srtp_t,
        rtcp_hdr: *mut ::std::os::raw::c_void,
        pkt_octet_len: *mut ::std::os::raw::c_int,
        use_mki: ::std::os::raw::c_uint,
        mki_index: ::std::os::raw::c_uint,
    ) -> srtp_err_status_t;
}
extern "C" {
    #[doc = " @brief srtp_unprotect_rtcp() is the Secure RTCP receiver-side packet"]
    #[doc = " processing function."]
    #[doc = ""]
    #[doc = " The function call srtp_unprotect_rtcp(ctx, srtp_hdr, len_ptr)"]
    #[doc = " verifies the Secure RTCP protection of the SRTCP packet pointed to"]
    #[doc = " by srtcp_hdr (which has length *len_ptr), using the SRTP session"]
    #[doc = " context ctx.  If srtp_err_status_ok is returned, then srtcp_hdr points"]
    #[doc = " to the resulting RTCP packet and *len_ptr is the number of octets"]
    #[doc = " in that packet; otherwise, no assumptions should be made about the"]
    #[doc = " value of either data elements."]
    #[doc = ""]
    #[doc = " @warning This function assumes that the SRTCP packet is aligned on a"]
    #[doc = " 32-bit boundary."]
    #[doc = ""]
    #[doc = " @param ctx is a pointer to the srtp_t which applies to the"]
    #[doc = " particular packet."]
    #[doc = ""]
    #[doc = " @param srtcp_hdr is a pointer to the header of the SRTCP packet"]
    #[doc = " (before the call).  After the function returns, it points to the"]
    #[doc = " rtp packet if srtp_err_status_ok was returned; otherwise, the value of"]
    #[doc = " the data to which it points is undefined."]
    #[doc = ""]
    #[doc = " @param pkt_octet_len is a pointer to the length in octets of the"]
    #[doc = " complete SRTCP packet (header and body) before the function call,"]
    #[doc = " and of the complete rtp packet after the call, if srtp_err_status_ok was"]
    #[doc = " returned.  Otherwise, the value of the data to which it points is"]
    #[doc = " undefined."]
    #[doc = ""]
    #[doc = " @return"]
    #[doc = "    - srtp_err_status_ok          if the RTCP packet is valid."]
    #[doc = "    - srtp_err_status_auth_fail   if the SRTCP packet failed the message"]
    #[doc = "                             authentication check."]
    #[doc = "    - srtp_err_status_replay_fail if the SRTCP packet is a replay (e.g. has"]
    #[doc = "                             already been processed and accepted)."]
    #[doc = "    - [other]  if there has been an error in the cryptographic mechanisms."]
    #[doc = ""]
    pub fn srtp_unprotect_rtcp(
        ctx: srtp_t,
        srtcp_hdr: *mut ::std::os::raw::c_void,
        pkt_octet_len: *mut ::std::os::raw::c_int,
    ) -> srtp_err_status_t;
}
extern "C" {
    #[doc = " @brief srtp_unprotect_rtcp() is the Secure RTCP receiver-side packet"]
    #[doc = " processing function."]
    #[doc = ""]
    #[doc = " The function call srtp_unprotect_rtcp(ctx, srtp_hdr, len_ptr)"]
    #[doc = " verifies the Secure RTCP protection of the SRTCP packet pointed to"]
    #[doc = " by srtcp_hdr (which has length *len_ptr), using the SRTP session"]
    #[doc = " context ctx.  If srtp_err_status_ok is returned, then srtcp_hdr points"]
    #[doc = " to the resulting RTCP packet and *len_ptr is the number of octets"]
    #[doc = " in that packet; otherwise, no assumptions should be made about the"]
    #[doc = " value of either data elements."]
    #[doc = ""]
    #[doc = " @warning This function assumes that the SRTCP packet is aligned on a"]
    #[doc = " 32-bit boundary."]
    #[doc = ""]
    #[doc = " @param ctx is a pointer to the srtp_t which applies to the"]
    #[doc = " particular packet."]
    #[doc = ""]
    #[doc = " @param srtcp_hdr is a pointer to the header of the SRTCP packet"]
    #[doc = " (before the call).  After the function returns, it points to the"]
    #[doc = " rtp packet if srtp_err_status_ok was returned; otherwise, the value of"]
    #[doc = " the data to which it points is undefined."]
    #[doc = ""]
    #[doc = " @param pkt_octet_len is a pointer to the length in octets of the"]
    #[doc = " complete SRTCP packet (header and body) before the function call,"]
    #[doc = " and of the complete rtp packet after the call, if srtp_err_status_ok was"]
    #[doc = " returned.  Otherwise, the value of the data to which it points is"]
    #[doc = " undefined."]
    #[doc = ""]
    #[doc = " @param use_mki is a boolean to tell the system if mki is being used.  If"]
    #[doc = " set to false then will use the first set of session keys.  If set to true"]
    #[doc = " will use the session keys identified by the mki_index"]
    #[doc = ""]
    #[doc = " @return"]
    #[doc = "    - srtp_err_status_ok          if the RTCP packet is valid."]
    #[doc = "    - srtp_err_status_auth_fail   if the SRTCP packet failed the message"]
    #[doc = "                                  authentication check."]
    #[doc = "    - srtp_err_status_replay_fail if the SRTCP packet is a replay (e.g. has"]
    #[doc = "                                  already been processed and accepted)."]
    #[doc = "    - srtp_err_status_bad_mki     if the MKI in the packet is not a known MKI"]
    #[doc = "                                  id"]
    #[doc = "    - [other]                     if there has been an error in the"]
    #[doc = "                                  cryptographic mechanisms."]
    #[doc = ""]
    pub fn srtp_unprotect_rtcp_mki(
        ctx: srtp_t,
        srtcp_hdr: *mut ::std::os::raw::c_void,
        pkt_octet_len: *mut ::std::os::raw::c_int,
        use_mki: ::std::os::raw::c_uint,
    ) -> srtp_err_status_t;
}
extern "C" {
    #[doc = " @brief srtp_set_user_data() stores the given pointer into the SRTP"]
    #[doc = " session for later retrieval."]
    #[doc = ""]
    #[doc = " @param ctx is the srtp_t context in which the given data pointer is"]
    #[doc = " stored."]
    #[doc = ""]
    #[doc = " @param data is a pointer to the custom information (struct, function,"]
    #[doc = " etc) associated with the SRTP session."]
    #[doc = ""]
    #[doc = " @return void."]
    #[doc = ""]
    pub fn srtp_set_user_data(ctx: srtp_t, data: *mut ::std::os::raw::c_void);
}
extern "C" {
    #[doc = " @brief srtp_get_user_data() retrieves the pointer to the custom data"]
    #[doc = " previously stored with srtp_set_user_data()."]
    #[doc = ""]
    #[doc = " This function is mostly useful for retrieving data associated to a"]
    #[doc = " SRTP session when an event fires. The user can then get such a custom"]
    #[doc = " data by calling this function with the session field of the"]
    #[doc = " srtp_event_data_t struct as argument."]
    #[doc = ""]
    #[doc = " @param ctx is the srtp_t context in which the given data pointer was"]
    #[doc = " stored."]
    #[doc = ""]
    #[doc = " @return void* pointer to the user data."]
    #[doc = ""]
    pub fn srtp_get_user_data(ctx: srtp_t) -> *mut ::std::os::raw::c_void;
}
#[doc = "< An SSRC collision occured."]
pub const srtp_event_t_event_ssrc_collision: srtp_event_t = 0;
#[doc = "< An SRTP stream reached the soft key   */"]
pub const srtp_event_t_event_key_soft_limit: srtp_event_t = 1;
#[doc = "< An SRTP stream reached the hard       */"]
pub const srtp_event_t_event_key_hard_limit: srtp_event_t = 2;
#[doc = "< An SRTP stream reached the hard       */"]
pub const srtp_event_t_event_packet_index_limit: srtp_event_t = 3;
#[doc = " @brief srtp_event_t defines events that need to be handled"]
#[doc = ""]
#[doc = " The enum srtp_event_t defines events that need to be handled"]
#[doc = " outside the `data plane', such as SSRC collisions and"]
#[doc = " key expirations."]
#[doc = ""]
#[doc = " When a key expires or the maximum number of packets has been"]
#[doc = " reached, an SRTP stream will enter an `expired' state in which no"]
#[doc = " more packets can be protected or unprotected.  When this happens,"]
#[doc = " it is likely that you will want to either deallocate the stream"]
#[doc = " (using srtp_remove_stream()), and possibly allocate a new one."]
#[doc = ""]
#[doc = " When an SRTP stream expires, the other streams in the same session"]
#[doc = " are unaffected, unless key sharing is used by that stream.  In the"]
#[doc = " latter case, all of the streams in the session will expire."]
pub type srtp_event_t = ::std::os::raw::c_uint;
#[doc = " @brief srtp_event_data_t is the structure passed as a callback to"]
#[doc = " the event handler function"]
#[doc = ""]
#[doc = " The struct srtp_event_data_t holds the data passed to the event"]
#[doc = " handler function."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct srtp_event_data_t {
    #[doc = "< The session in which the event happend."]
    pub session: srtp_t,
    #[doc = "< The ssrc in host order of the stream in which  */"]
    pub ssrc: u32,
    #[doc = "< An enum indicating the type of event."]
    pub event: srtp_event_t,
}
#[test]
fn bindgen_test_layout_srtp_event_data_t() {
    assert_eq!(
        ::std::mem::size_of::<srtp_event_data_t>(),
        16usize,
        concat!("Size of: ", stringify!(srtp_event_data_t))
    );
    assert_eq!(
        ::std::mem::align_of::<srtp_event_data_t>(),
        8usize,
        concat!("Alignment of ", stringify!(srtp_event_data_t))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<srtp_event_data_t>())).session as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(srtp_event_data_t),
            "::",
            stringify!(session)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<srtp_event_data_t>())).ssrc as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(srtp_event_data_t),
            "::",
            stringify!(ssrc)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<srtp_event_data_t>())).event as *const _ as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(srtp_event_data_t),
            "::",
            stringify!(event)
        )
    );
}
#[doc = " @brief srtp_event_handler_func_t is the function prototype for"]
#[doc = " the event handler."]
#[doc = ""]
#[doc = " The typedef srtp_event_handler_func_t is the prototype for the"]
#[doc = " event handler function.  It has as its only argument an"]
#[doc = " srtp_event_data_t which describes the event that needs to be handled."]
#[doc = " There can only be a single, global handler for all events in"]
#[doc = " libSRTP."]
pub type srtp_event_handler_func_t =
    ::std::option::Option<unsafe extern "C" fn(data: *mut srtp_event_data_t)>;
extern "C" {
    #[doc = " @brief sets the event handler to the function supplied by the caller."]
    #[doc = ""]
    #[doc = " The function call srtp_install_event_handler(func) sets the event"]
    #[doc = " handler function to the value func.  The value NULL is acceptable"]
    #[doc = " as an argument; in this case, events will be ignored rather than"]
    #[doc = " handled."]
    #[doc = ""]
    #[doc = " @param func is a pointer to a fuction that takes an srtp_event_data_t"]
    #[doc = "             pointer as an argument and returns void.  This function"]
    #[doc = "             will be used by libSRTP to handle events."]
    pub fn srtp_install_event_handler(func: srtp_event_handler_func_t) -> srtp_err_status_t;
}
extern "C" {
    #[doc = " @brief Returns the version string of the library."]
    #[doc = ""]
    pub fn srtp_get_version_string() -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " @brief Returns the numeric representation of the library version."]
    #[doc = ""]
    pub fn srtp_get_version() -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = " @brief srtp_set_debug_module(mod_name, v)"]
    #[doc = ""]
    #[doc = " sets dynamic debugging to the value v (0 for off, 1 for on) for the"]
    #[doc = " debug module with the name mod_name"]
    #[doc = ""]
    #[doc = " returns err_status_ok on success, err_status_fail otherwise"]
    pub fn srtp_set_debug_module(
        mod_name: *const ::std::os::raw::c_char,
        v: ::std::os::raw::c_int,
    ) -> srtp_err_status_t;
}
extern "C" {
    #[doc = " @brief srtp_list_debug_modules() outputs a list of debugging modules"]
    #[doc = ""]
    pub fn srtp_list_debug_modules() -> srtp_err_status_t;
}
#[doc = "< log level is reporting an error message"]
pub const srtp_log_level_t_srtp_log_level_error: srtp_log_level_t = 0;
#[doc = "< log level is reporting a warning message"]
pub const srtp_log_level_t_srtp_log_level_warning: srtp_log_level_t = 1;
#[doc = "< log level is reporting an info message"]
pub const srtp_log_level_t_srtp_log_level_info: srtp_log_level_t = 2;
#[doc = "< log level is reporting a debug message"]
pub const srtp_log_level_t_srtp_log_level_debug: srtp_log_level_t = 3;
#[doc = " @brief srtp_log_level_t defines log levels."]
#[doc = ""]
#[doc = " The enumeration srtp_log_level_t defines log levels reported"]
#[doc = " in the srtp_log_handler_func_t."]
#[doc = ""]
pub type srtp_log_level_t = ::std::os::raw::c_uint;
#[doc = " @brief srtp_log_handler_func_t is the function prototype for"]
#[doc = " the log handler."]
#[doc = ""]
#[doc = " The typedef srtp_event_handler_func_t is the prototype for the"]
#[doc = " event handler function.  It has as srtp_log_level_t, log"]
#[doc = " message and data as arguments."]
#[doc = " There can only be a single, global handler for all log messages in"]
#[doc = " libSRTP."]
pub type srtp_log_handler_func_t = ::std::option::Option<
    unsafe extern "C" fn(
        level: srtp_log_level_t,
        msg: *const ::std::os::raw::c_char,
        data: *mut ::std::os::raw::c_void,
    ),
>;
extern "C" {
    #[doc = " @brief sets the log handler to the function supplied by the caller."]
    #[doc = ""]
    #[doc = " The function call srtp_install_log_handler(func) sets the log"]
    #[doc = " handler function to the value func.  The value NULL is acceptable"]
    #[doc = " as an argument; in this case, log messages will be ignored."]
    #[doc = " This function can be called before srtp_init() inorder to capture"]
    #[doc = " any logging during start up."]
    #[doc = ""]
    #[doc = " @param func is a pointer to a fuction of type srtp_log_handler_func_t."]
    #[doc = "             This function will be used by libSRTP to output log messages."]
    #[doc = " @param data is a user pointer that will be returned as the data argument in"]
    #[doc = " func."]
    pub fn srtp_install_log_handler(
        func: srtp_log_handler_func_t,
        data: *mut ::std::os::raw::c_void,
    ) -> srtp_err_status_t;
}
extern "C" {
    #[doc = " @brief srtp_get_protect_trailer_length(session, use_mki, mki_index, length)"]
    #[doc = ""]
    #[doc = " Determines the length of the amount of data Lib SRTP will add to the"]
    #[doc = " packet during the protect process. The length is returned in the length"]
    #[doc = " parameter"]
    #[doc = ""]
    #[doc = " returns err_status_ok on success, err_status_bad_mki if the MKI index is"]
    #[doc = " invalid"]
    #[doc = ""]
    pub fn srtp_get_protect_trailer_length(
        session: srtp_t,
        use_mki: u32,
        mki_index: u32,
        length: *mut u32,
    ) -> srtp_err_status_t;
}
extern "C" {
    #[doc = " @brief srtp_get_protect_rtcp_trailer_length(session, use_mki, mki_index,"]
    #[doc = " length)"]
    #[doc = ""]
    #[doc = " Determines the length of the amount of data Lib SRTP will add to the"]
    #[doc = " packet during the protect process. The length is returned in the length"]
    #[doc = " parameter"]
    #[doc = ""]
    #[doc = " returns err_status_ok on success, err_status_bad_mki if the MKI index is"]
    #[doc = " invalid"]
    #[doc = ""]
    pub fn srtp_get_protect_rtcp_trailer_length(
        session: srtp_t,
        use_mki: u32,
        mki_index: u32,
        length: *mut u32,
    ) -> srtp_err_status_t;
}
extern "C" {
    #[doc = " @brief srtp_set_stream_roc(session, ssrc, roc)"]
    #[doc = ""]
    #[doc = " Set the roll-over-counter on a session for a given SSRC"]
    #[doc = ""]
    #[doc = " returns err_status_ok on success, srtp_err_status_bad_param if there is no"]
    #[doc = " stream found"]
    #[doc = ""]
    pub fn srtp_set_stream_roc(session: srtp_t, ssrc: u32, roc: u32) -> srtp_err_status_t;
}
extern "C" {
    #[doc = " @brief srtp_get_stream_roc(session, ssrc, roc)"]
    #[doc = ""]
    #[doc = " Get the roll-over-counter on a session for a given SSRC"]
    #[doc = ""]
    #[doc = " returns err_status_ok on success, srtp_err_status_bad_param if there is no"]
    #[doc = " stream found"]
    #[doc = ""]
    pub fn srtp_get_stream_roc(session: srtp_t, ssrc: u32, roc: *mut u32) -> srtp_err_status_t;
}