/usr/share/gtk-doc/html/libnice/libnice-StunMessage.html is in libnice-doc 0.1.14-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>StunMessage: libnice Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="libnice Reference Manual">
<link rel="up" href="ch03.html" title="">
<link rel="prev" href="libnice-StunAgent.html" title="StunAgent">
<link rel="next" href="libnice-STUN-Constants.html" title="STUN Constants">
<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#libnice-StunMessage.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch03.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="libnice-StunAgent.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libnice-STUN-Constants.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libnice-StunMessage"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libnice-StunMessage.top_of_page"></a>StunMessage</span></h2>
<p>StunMessage — STUN messages parsing and formatting functions</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libnice-StunMessage.stability-level"></a><h2>Stability Level</h2>
<acronym title="The intention of a Stable interface is to enable arbitrary third parties to
develop applications to these interfaces, release them, and have confidence that
they will run on all minor releases of the product (after the one in which the
interface was introduced, and within the same major release). Even at a major
release, incompatible changes are expected to be rare, and to have strong
justifications.
"><span class="acronym">Stable</span></acronym>, unless otherwise indicated
</div>
<div class="refsect1">
<a name="libnice-StunMessage.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">bool</span>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-init" title="stun_message_init ()">stun_message_init</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">uint16_t</span>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-length" title="stun_message_length ()">stun_message_length</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">void</span> *
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-find" title="stun_message_find ()">stun_message_find</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-find-flag" title="stun_message_find_flag ()">stun_message_find_flag</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-find32" title="stun_message_find32 ()">stun_message_find32</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-find64" title="stun_message_find64 ()">stun_message_find64</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-find-string" title="stun_message_find_string ()">stun_message_find_string</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-find-addr" title="stun_message_find_addr ()">stun_message_find_addr</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-find-xor-addr" title="stun_message_find_xor_addr ()">stun_message_find_xor_addr</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-find-xor-addr-full" title="stun_message_find_xor_addr_full ()">stun_message_find_xor_addr_full</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-find-error" title="stun_message_find_error ()">stun_message_find_error</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span> *
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-append" title="stun_message_append ()">stun_message_append</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-append-bytes" title="stun_message_append_bytes ()">stun_message_append_bytes</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-append-flag" title="stun_message_append_flag ()">stun_message_append_flag</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-append32" title="stun_message_append32 ()">stun_message_append32</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-append64" title="stun_message_append64 ()">stun_message_append64</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-append-string" title="stun_message_append_string ()">stun_message_append_string</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-append-addr" title="stun_message_append_addr ()">stun_message_append_addr</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-append-xor-addr" title="stun_message_append_xor_addr ()">stun_message_append_xor_addr</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-append-xor-addr-full" title="stun_message_append_xor_addr_full ()">stun_message_append_xor_addr_full</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-append-error" title="stun_message_append_error ()">stun_message_append_error</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-validate-buffer-length" title="stun_message_validate_buffer_length ()">stun_message_validate_buffer_length</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">ssize_t</span>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-validate-buffer-length-fast" title="stun_message_validate_buffer_length_fast ()">stun_message_validate_buffer_length_fast</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-id" title="stun_message_id ()">stun_message_id</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libnice-StunMessage.html#StunClass" title="enum StunClass"><span class="returnvalue">StunClass</span></a>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-get-class" title="stun_message_get_class ()">stun_message_get_class</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libnice-StunMessage.html#StunMethod" title="enum StunMethod"><span class="returnvalue">StunMethod</span></a>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-get-method" title="stun_message_get_method ()">stun_message_get_method</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">bool</span>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-has-attribute" title="stun_message_has_attribute ()">stun_message_has_attribute</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">bool</span>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-message-has-cookie" title="stun_message_has_cookie ()">stun_message_has_cookie</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">bool</span>
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-optional" title="stun_optional ()">stun_optional</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libnice-StunMessage.html#stun-strerror" title="stun_strerror ()">stun_strerror</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libnice-StunMessage.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage">StunMessage</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="libnice-StunMessage.html#StunClass" title="enum StunClass">StunClass</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="libnice-StunMessage.html#StunMethod" title="enum StunMethod">StunMethod</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute">StunAttribute</a></td>
</tr>
<tr>
<td class="typedef_keyword">typedef</td>
<td class="function_name"><a class="link" href="libnice-StunMessage.html#StunTransactionId" title="StunTransactionId">StunTransactionId</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="libnice-StunMessage.html#StunError" title="enum StunError">StunError</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn">StunMessageReturn</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-BUFFER-INCOMPLETE:CAPS" title="STUN_MESSAGE_BUFFER_INCOMPLETE">STUN_MESSAGE_BUFFER_INCOMPLETE</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-BUFFER-INVALID:CAPS" title="STUN_MESSAGE_BUFFER_INVALID">STUN_MESSAGE_BUFFER_INVALID</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="libnice-StunMessage.html#StunInputVector" title="StunInputVector">StunInputVector</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libnice-StunMessage.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include <stun/stunmessage.h>
</pre>
</div>
<div class="refsect1">
<a name="libnice-StunMessage.description"></a><h2>Description</h2>
<p>The STUN Messages API allows you to create STUN messages easily as well as to
parse existing messages.</p>
</div>
<div class="refsect1">
<a name="libnice-StunMessage.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="stun-message-init"></a><h3>stun_message_init ()</h3>
<pre class="programlisting"><span class="returnvalue">bool</span>
stun_message_init (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunClass" title="enum StunClass"><span class="type">StunClass</span></a> c</code></em>,
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMethod" title="enum StunMethod"><span class="type">StunMethod</span></a> m</code></em>,
<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunTransactionId" title="StunTransactionId"><span class="type">StunTransactionId</span></a> id</code></em>);</pre>
<p>Initializes a STUN message buffer, with no attributes.</p>
<div class="refsect3">
<a name="stun-message-init.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> to initialize</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>c</p></td>
<td class="parameter_description"><p>STUN message class (host byte order)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>m</p></td>
<td class="parameter_description"><p>STUN message method (host byte order)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>id</p></td>
<td class="parameter_description"><p>16-bytes transaction ID</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-init.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the initialization was successful</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-length"></a><h3>stun_message_length ()</h3>
<pre class="programlisting"><span class="returnvalue">uint16_t</span>
stun_message_length (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>);</pre>
<p>Get the length of the message (including the header)</p>
<div class="refsect3">
<a name="stun-message-length.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-length.returns"></a><h4>Returns</h4>
<p> The length of the message</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-find"></a><h3>stun_message_find ()</h3>
<pre class="programlisting">const <span class="returnvalue">void</span> *
stun_message_find (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>,
<em class="parameter"><code><span class="type">uint16_t</span> *palen</code></em>);</pre>
<p>Finds an attribute in a STUN message and fetches its content</p>
<div class="refsect3">
<a name="stun-message-find.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to find</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>palen</p></td>
<td class="parameter_description"><p>A pointer to store the length of the attribute</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-find.returns"></a><h4>Returns</h4>
<p> A pointer to the start of the attribute payload if found,
otherwise NULL.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-find-flag"></a><h3>stun_message_find_flag ()</h3>
<pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
stun_message_find_flag (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>);</pre>
<p>Looks for a flag attribute within a valid STUN message.</p>
<div class="refsect3">
<a name="stun-message-find-flag.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to find</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-find-flag.returns"></a><h4>Returns</h4>
<p> A <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="type">StunMessageReturn</span></a> value.
<a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-RETURN-INVALID:CAPS"><code class="literal">STUN_MESSAGE_RETURN_INVALID</code></a> is returned if the attribute's size is not zero.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-find32"></a><h3>stun_message_find32 ()</h3>
<pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
stun_message_find32 (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>,
<em class="parameter"><code><span class="type">uint32_t</span> *pval</code></em>);</pre>
<p>Extracts a 32-bits attribute from a STUN message.</p>
<div class="refsect3">
<a name="stun-message-find32.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to find</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>pval</p></td>
<td class="parameter_description"><p>A pointer where to store the value (host byte order)</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-find32.returns"></a><h4>Returns</h4>
<p> A <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="type">StunMessageReturn</span></a> value.
<a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-RETURN-INVALID:CAPS"><code class="literal">STUN_MESSAGE_RETURN_INVALID</code></a> is returned if the attribute's size is not
4 bytes.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-find64"></a><h3>stun_message_find64 ()</h3>
<pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
stun_message_find64 (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>,
<em class="parameter"><code><span class="type">uint64_t</span> *pval</code></em>);</pre>
<p>Extracts a 64-bits attribute from a STUN message.</p>
<div class="refsect3">
<a name="stun-message-find64.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to find</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>pval</p></td>
<td class="parameter_description"><p>A pointer where to store the value (host byte order)</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-find64.returns"></a><h4>Returns</h4>
<p> A <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="type">StunMessageReturn</span></a> value.
<a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-RETURN-INVALID:CAPS"><code class="literal">STUN_MESSAGE_RETURN_INVALID</code></a> is returned if the attribute's size is not
8 bytes.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-find-string"></a><h3>stun_message_find_string ()</h3>
<pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
stun_message_find_string (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>,
<em class="parameter"><code><span class="type">char</span> *buf</code></em>,
<em class="parameter"><code><span class="type">size_t</span> buflen</code></em>);</pre>
<p>Extracts an UTF-8 string from a valid STUN message.</p>
<div class="refsect3">
<a name="stun-message-find-string.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to find</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buf</p></td>
<td class="parameter_description"><p>A pointer where to store the data</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buflen</p></td>
<td class="parameter_description"><p>The length of the buffer</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-find-string.returns"></a><h4>Returns</h4>
<p> A <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="type">StunMessageReturn</span></a> value.
<a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-RETURN-INVALID:CAPS"><code class="literal">STUN_MESSAGE_RETURN_INVALID</code></a> is returned if the attribute is improperly
encoded
<a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-RETURN-NOT-ENOUGH-SPACE:CAPS"><code class="literal">STUN_MESSAGE_RETURN_NOT_ENOUGH_SPACE</code></a> is return if the buffer size is too
small to hold the string</p>
<div class="note"><p>
The string will be nul-terminated.
</p></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-find-addr"></a><h3>stun_message_find_addr ()</h3>
<pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
stun_message_find_addr (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>,
<em class="parameter"><code><span class="type">struct sockaddr_storage</span> *addr</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/camelcamel-camel-net-utils.html#socklen-t"><span class="type">socklen_t</span></a> *addrlen</code></em>);</pre>
<p>Extracts a network address attribute from a STUN message.</p>
<div class="refsect3">
<a name="stun-message-find-addr.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to find</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>addr</p></td>
<td class="parameter_description"><p>The <a href="/usr/share/gtk-doc/html/camelcamel-camel-net-utils.html#sockaddr"><span class="type">sockaddr</span></a> to be filled</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>addrlen</p></td>
<td class="parameter_description"><p>The size of the <em class="parameter"><code>addr</code></em>
variable. Must be set to the size of the
<em class="parameter"><code>addr</code></em>
socket address and will be set to the size of the extracted socket
address.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-find-addr.returns"></a><h4>Returns</h4>
<p> A <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="type">StunMessageReturn</span></a> value.
<a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-RETURN-INVALID:CAPS"><code class="literal">STUN_MESSAGE_RETURN_INVALID</code></a> is returned if the attribute payload size is
wrong or if the <em class="parameter"><code>addrlen</code></em>
is too small
<a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-RETURN-UNSUPPORTED-ADDRESS:CAPS"><code class="literal">STUN_MESSAGE_RETURN_UNSUPPORTED_ADDRESS</code></a> if the address family is unknown.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-find-xor-addr"></a><h3>stun_message_find_xor_addr ()</h3>
<pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
stun_message_find_xor_addr (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>,
<em class="parameter"><code><span class="type">struct sockaddr_storage</span> *addr</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/camelcamel-camel-net-utils.html#socklen-t"><span class="type">socklen_t</span></a> *addrlen</code></em>);</pre>
<p>Extracts an obfuscated network address attribute from a STUN message.</p>
<div class="refsect3">
<a name="stun-message-find-xor-addr.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to find</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>addr</p></td>
<td class="parameter_description"><p>The <a href="/usr/share/gtk-doc/html/camelcamel-camel-net-utils.html#sockaddr"><span class="type">sockaddr</span></a> to be filled</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>addrlen</p></td>
<td class="parameter_description"><p>The size of the <em class="parameter"><code>addr</code></em>
variable. Must be set to the size of the
<em class="parameter"><code>addr</code></em>
socket address and will be set to the size of the
extracted socket address.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-find-xor-addr.returns"></a><h4>Returns</h4>
<p> A <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="type">StunMessageReturn</span></a> value.
<a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-RETURN-INVALID:CAPS"><code class="literal">STUN_MESSAGE_RETURN_INVALID</code></a> is returned if the attribute payload size is
wrong or if the <em class="parameter"><code>addrlen</code></em>
is too small
<a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-RETURN-UNSUPPORTED-ADDRESS:CAPS"><code class="literal">STUN_MESSAGE_RETURN_UNSUPPORTED_ADDRESS</code></a> if the address family is unknown.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-find-xor-addr-full"></a><h3>stun_message_find_xor_addr_full ()</h3>
<pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
stun_message_find_xor_addr_full (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>,
<em class="parameter"><code><span class="type">struct sockaddr_storage</span> *addr</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/camelcamel-camel-net-utils.html#socklen-t"><span class="type">socklen_t</span></a> *addrlen</code></em>,
<em class="parameter"><code><span class="type">uint32_t</span> magic_cookie</code></em>);</pre>
<p>Extracts an obfuscated network address attribute from a STUN message.</p>
<div class="refsect3">
<a name="stun-message-find-xor-addr-full.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to find</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>addr</p></td>
<td class="parameter_description"><p>The <a href="/usr/share/gtk-doc/html/camelcamel-camel-net-utils.html#sockaddr"><span class="type">sockaddr</span></a> to be filled</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>addrlen</p></td>
<td class="parameter_description"><p>The size of the <em class="parameter"><code>addr</code></em>
variable. Must be set to the size of the
<em class="parameter"><code>addr</code></em>
socket address and will be set to the size of the
extracted socket address.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>magic_cookie</p></td>
<td class="parameter_description"><p>The magic cookie to use to XOR the address.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-find-xor-addr-full.returns"></a><h4>Returns</h4>
<p> A <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="type">StunMessageReturn</span></a> value.
<a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-RETURN-INVALID:CAPS"><code class="literal">STUN_MESSAGE_RETURN_INVALID</code></a> is returned if the attribute payload size is
wrong or if the <em class="parameter"><code>addrlen</code></em>
is too small
<a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-RETURN-UNSUPPORTED-ADDRESS:CAPS"><code class="literal">STUN_MESSAGE_RETURN_UNSUPPORTED_ADDRESS</code></a> if the address family is unknown.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-find-error"></a><h3>stun_message_find_error ()</h3>
<pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
stun_message_find_error (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
<em class="parameter"><code><span class="type">int</span> *code</code></em>);</pre>
<p>Extract the error response code from a STUN message</p>
<div class="refsect3">
<a name="stun-message-find-error.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>code</p></td>
<td class="parameter_description"><p>A pointer where to store the value</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-find-error.returns"></a><h4>Returns</h4>
<p> A <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="type">StunMessageReturn</span></a> value.
<a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-RETURN-INVALID:CAPS"><code class="literal">STUN_MESSAGE_RETURN_INVALID</code></a> is returned if the value is invalid</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-append"></a><h3>stun_message_append ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> *
stun_message_append (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>,
<em class="parameter"><code><span class="type">size_t</span> length</code></em>);</pre>
<p>Reserves room for appending an attribute to an unfinished STUN message.</p>
<div class="refsect3">
<a name="stun-message-append.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>The length of the attribute</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-append.returns"></a><h4>Returns</h4>
<p> A pointer to an unitialized buffer of <em class="parameter"><code>length</code></em>
bytes to
where the attribute payload must be written, or NULL if there is not
enough room in the STUN message buffer.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-append-bytes"></a><h3>stun_message_append_bytes ()</h3>
<pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
stun_message_append_bytes (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>,
<em class="parameter"><code>const <span class="type">void</span> *data</code></em>,
<em class="parameter"><code><span class="type">size_t</span> len</code></em>);</pre>
<p>Appends a binary value to a STUN message</p>
<div class="refsect3">
<a name="stun-message-append-bytes.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>The data to append</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>len</p></td>
<td class="parameter_description"><p>The length of the attribute</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-append-bytes.returns"></a><h4>Returns</h4>
<p> A <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="type">StunMessageReturn</span></a> value.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-append-flag"></a><h3>stun_message_append_flag ()</h3>
<pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
stun_message_append_flag (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>);</pre>
<p>Appends an empty flag attribute to a STUN message</p>
<div class="refsect3">
<a name="stun-message-append-flag.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-append-flag.returns"></a><h4>Returns</h4>
<p> A <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="type">StunMessageReturn</span></a> value.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-append32"></a><h3>stun_message_append32 ()</h3>
<pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
stun_message_append32 (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>,
<em class="parameter"><code><span class="type">uint32_t</span> value</code></em>);</pre>
<p>Appends a 32-bits value attribute to a STUN message</p>
<div class="refsect3">
<a name="stun-message-append32.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>The value to append (host byte order)</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-append32.returns"></a><h4>Returns</h4>
<p> A <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="type">StunMessageReturn</span></a> value.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-append64"></a><h3>stun_message_append64 ()</h3>
<pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
stun_message_append64 (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>,
<em class="parameter"><code><span class="type">uint64_t</span> value</code></em>);</pre>
<p>Appends a 64-bits value attribute to a STUN message</p>
<div class="refsect3">
<a name="stun-message-append64.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>The value to append (host byte order)</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-append64.returns"></a><h4>Returns</h4>
<p> A <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="type">StunMessageReturn</span></a> value.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-append-string"></a><h3>stun_message_append_string ()</h3>
<pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
stun_message_append_string (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *str</code></em>);</pre>
<p>Adds an attribute from a nul-terminated string to a STUN message</p>
<div class="refsect3">
<a name="stun-message-append-string.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>The string to append</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-append-string.returns"></a><h4>Returns</h4>
<p> A <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="type">StunMessageReturn</span></a> value.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-append-addr"></a><h3>stun_message_append_addr ()</h3>
<pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
stun_message_append_addr (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>,
<em class="parameter"><code>const <span class="type">struct sockaddr</span> *addr</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/camelcamel-camel-net-utils.html#socklen-t"><span class="type">socklen_t</span></a> addrlen</code></em>);</pre>
<p>Append a network address attribute to a STUN message</p>
<div class="refsect3">
<a name="stun-message-append-addr.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>addr</p></td>
<td class="parameter_description"><p>The <a href="/usr/share/gtk-doc/html/camelcamel-camel-net-utils.html#sockaddr"><span class="type">sockaddr</span></a> to be append</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>addrlen</p></td>
<td class="parameter_description"><p>The size of the <em class="parameter"><code>addr</code></em>
variable.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-append-addr.returns"></a><h4>Returns</h4>
<p> A <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="type">StunMessageReturn</span></a> value.
<a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-RETURN-INVALID:CAPS"><code class="literal">STUN_MESSAGE_RETURN_INVALID</code></a> is returned if the <em class="parameter"><code>addrlen</code></em>
is too small
<a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-RETURN-UNSUPPORTED-ADDRESS:CAPS"><code class="literal">STUN_MESSAGE_RETURN_UNSUPPORTED_ADDRESS</code></a> if the address family is unknown.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-append-xor-addr"></a><h3>stun_message_append_xor_addr ()</h3>
<pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
stun_message_append_xor_addr (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>,
<em class="parameter"><code>const <span class="type">struct sockaddr_storage</span> *addr</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/camelcamel-camel-net-utils.html#socklen-t"><span class="type">socklen_t</span></a> addrlen</code></em>);</pre>
<p>Append an obfuscated network address attribute to a STUN message</p>
<div class="refsect3">
<a name="stun-message-append-xor-addr.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>addr</p></td>
<td class="parameter_description"><p>The <a href="/usr/share/gtk-doc/html/camelcamel-camel-net-utils.html#sockaddr"><span class="type">sockaddr</span></a> to be append</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>addrlen</p></td>
<td class="parameter_description"><p>The size of the <em class="parameter"><code>addr</code></em>
variable.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-append-xor-addr.returns"></a><h4>Returns</h4>
<p> A <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="type">StunMessageReturn</span></a> value.
<a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-RETURN-INVALID:CAPS"><code class="literal">STUN_MESSAGE_RETURN_INVALID</code></a> is returned if the <em class="parameter"><code>addrlen</code></em>
is too small
<a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-RETURN-UNSUPPORTED-ADDRESS:CAPS"><code class="literal">STUN_MESSAGE_RETURN_UNSUPPORTED_ADDRESS</code></a> if the address family is unknown.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-append-xor-addr-full"></a><h3>stun_message_append_xor_addr_full ()</h3>
<pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
stun_message_append_xor_addr_full (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>,
<em class="parameter"><code>const <span class="type">struct sockaddr_storage</span> *addr</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/camelcamel-camel-net-utils.html#socklen-t"><span class="type">socklen_t</span></a> addrlen</code></em>,
<em class="parameter"><code><span class="type">uint32_t</span> magic_cookie</code></em>);</pre>
<p>Append an obfuscated network address attribute from a STUN message.</p>
<div class="refsect3">
<a name="stun-message-append-xor-addr-full.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>addr</p></td>
<td class="parameter_description"><p>The <a href="/usr/share/gtk-doc/html/camelcamel-camel-net-utils.html#sockaddr"><span class="type">sockaddr</span></a> to be append</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>addrlen</p></td>
<td class="parameter_description"><p>The size of the <em class="parameter"><code>addr</code></em>
variable.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>magic_cookie</p></td>
<td class="parameter_description"><p>The magic cookie to use to XOR the address.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-append-xor-addr-full.returns"></a><h4>Returns</h4>
<p> A <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="type">StunMessageReturn</span></a> value.
<a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-RETURN-INVALID:CAPS"><code class="literal">STUN_MESSAGE_RETURN_INVALID</code></a> is returned if the <em class="parameter"><code>addrlen</code></em>
is too small
<a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-RETURN-UNSUPPORTED-ADDRESS:CAPS"><code class="literal">STUN_MESSAGE_RETURN_UNSUPPORTED_ADDRESS</code></a> if the address family is unknown.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-append-error"></a><h3>stun_message_append_error ()</h3>
<pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a>
stun_message_append_error (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunError" title="enum StunError"><span class="type">StunError</span></a> code</code></em>);</pre>
<p>Appends the ERROR-CODE attribute to the STUN message and fills it according
to <span class="type">code</span></p>
<div class="refsect3">
<a name="stun-message-append-error.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>code</p></td>
<td class="parameter_description"><p>The error code value</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-append-error.returns"></a><h4>Returns</h4>
<p> A <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="type">StunMessageReturn</span></a> value.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-validate-buffer-length"></a><h3>stun_message_validate_buffer_length ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
stun_message_validate_buffer_length (<em class="parameter"><code>const <span class="type">uint8_t</span> *msg</code></em>,
<em class="parameter"><code><span class="type">size_t</span> length</code></em>,
<em class="parameter"><code><span class="type">bool</span> has_padding</code></em>);</pre>
<p>This function will take a data buffer and will try to validate whether it is
a STUN message or if it's not or if it's an incomplete STUN message and will
provide us with the length of the STUN message.</p>
<div class="refsect3">
<a name="stun-message-validate-buffer-length.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The buffer to validate</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>The length of the buffer</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>has_padding</p></td>
<td class="parameter_description"><p>Set TRUE if attributes should be padded to multiple of 4 bytes</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-validate-buffer-length.returns"></a><h4>Returns</h4>
<p> The length of the valid STUN message in the buffer.</p>
<p> See also: <a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-BUFFER-INCOMPLETE:CAPS" title="STUN_MESSAGE_BUFFER_INCOMPLETE"><span class="type">STUN_MESSAGE_BUFFER_INCOMPLETE</span></a> </p>
<p> See also: <a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-BUFFER-INVALID:CAPS" title="STUN_MESSAGE_BUFFER_INVALID"><span class="type">STUN_MESSAGE_BUFFER_INVALID</span></a> </p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-validate-buffer-length-fast"></a><h3>stun_message_validate_buffer_length_fast ()</h3>
<pre class="programlisting"><span class="returnvalue">ssize_t</span>
stun_message_validate_buffer_length_fast
(<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunInputVector" title="StunInputVector"><span class="type">StunInputVector</span></a> *buffers</code></em>,
<em class="parameter"><code><span class="type">int</span> n_buffers</code></em>,
<em class="parameter"><code><span class="type">size_t</span> total_length</code></em>,
<em class="parameter"><code><span class="type">bool</span> has_padding</code></em>);</pre>
<p>Quickly validate whether the message in the given <em class="parameter"><code>buffers</code></em>
is potentially a
valid STUN message, an incomplete STUN message, or if it’s definitely not one
at all.</p>
<p>This is designed as a first-pass validation only, and does not check the
message’s attributes for validity. If this function returns success, the
buffers can be compacted and a more thorough validation can be performed
using <a class="link" href="libnice-StunMessage.html#stun-message-validate-buffer-length" title="stun_message_validate_buffer_length ()"><code class="function">stun_message_validate_buffer_length()</code></a>. If it fails, the buffers
definitely do not contain a complete, valid STUN message.</p>
<div class="refsect3">
<a name="stun-message-validate-buffer-length-fast.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffers</p></td>
<td class="parameter_description"><p> array of contiguous
<a href="libnice-StunMessage.html#StunInputVector"><span class="type">StunInputVectors</span></a> containing already-received message data. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_buffers][<acronym title="Parameter for input. Default is transfer none."><span class="acronym">in</span></acronym> caller-allocated]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>n_buffers</p></td>
<td class="parameter_description"><p>number of entries in <em class="parameter"><code>buffers</code></em>
or if -1 , then buffers is
terminated by a <a class="link" href="libnice-StunMessage.html#StunInputVector" title="StunInputVector"><span class="type">StunInputVector</span></a> with the buffer pointer being <a href="/usr/share/gtk-doc/html/liboilliboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>total_length</p></td>
<td class="parameter_description"><p>total number of valid bytes stored consecutively in <em class="parameter"><code>buffers</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>has_padding</p></td>
<td class="parameter_description"><p><a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if attributes should be padded to 4-byte boundaries</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-validate-buffer-length-fast.returns"></a><h4>Returns</h4>
<p> The length of the valid STUN message in the buffer, or zero or -1 on
failure</p>
<p> See also: <a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-BUFFER-INCOMPLETE:CAPS" title="STUN_MESSAGE_BUFFER_INCOMPLETE"><span class="type">STUN_MESSAGE_BUFFER_INCOMPLETE</span></a> </p>
<p> See also: <a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-BUFFER-INVALID:CAPS" title="STUN_MESSAGE_BUFFER_INVALID"><span class="type">STUN_MESSAGE_BUFFER_INVALID</span></a> </p>
</div>
<p class="since">Since: <a class="link" href="ix10.html#api-index-0.1.5">0.1.5</a></p>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-id"></a><h3>stun_message_id ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
stun_message_id (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunTransactionId" title="StunTransactionId"><span class="type">StunTransactionId</span></a> id</code></em>);</pre>
<p>Retreive the STUN transaction id from a STUN message</p>
<div class="refsect3">
<a name="stun-message-id.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>id</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunTransactionId" title="StunTransactionId"><span class="type">StunTransactionId</span></a> to fill</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-get-class"></a><h3>stun_message_get_class ()</h3>
<pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunClass" title="enum StunClass"><span class="returnvalue">StunClass</span></a>
stun_message_get_class (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>);</pre>
<p>Retreive the STUN class from a STUN message</p>
<div class="refsect3">
<a name="stun-message-get-class.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-get-class.returns"></a><h4>Returns</h4>
<p> The <a class="link" href="libnice-StunMessage.html#StunClass" title="enum StunClass"><span class="type">StunClass</span></a></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-get-method"></a><h3>stun_message_get_method ()</h3>
<pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMethod" title="enum StunMethod"><span class="returnvalue">StunMethod</span></a>
stun_message_get_method (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>);</pre>
<p>Retreive the STUN method from a STUN message</p>
<div class="refsect3">
<a name="stun-message-get-method.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-get-method.returns"></a><h4>Returns</h4>
<p> The <a class="link" href="libnice-StunMessage.html#StunMethod" title="enum StunMethod"><span class="type">StunMethod</span></a></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-has-attribute"></a><h3>stun_message_has_attribute ()</h3>
<pre class="programlisting"><span class="returnvalue">bool</span>
stun_message_has_attribute (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>,
<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>);</pre>
<p>Checks if an attribute is present within a STUN message.</p>
<div class="refsect3">
<a name="stun-message-has-attribute.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to look for</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-has-attribute.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the attribute is found, <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-message-has-cookie"></a><h3>stun_message_has_cookie ()</h3>
<pre class="programlisting"><span class="returnvalue">bool</span>
stun_message_has_cookie (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>);</pre>
<p>Checks if the STUN message has a RFC5389 compatible cookie</p>
<div class="refsect3">
<a name="stun-message-has-cookie.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="struct StunMessage"><span class="type">StunMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-message-has-cookie.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the cookie is present, <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-optional"></a><h3>stun_optional ()</h3>
<pre class="programlisting"><span class="returnvalue">bool</span>
stun_optional (<em class="parameter"><code><span class="type">uint16_t</span> t</code></em>);</pre>
<p>Helper function that checks whether a STUN attribute is a mandatory
or an optional attribute</p>
<div class="refsect3">
<a name="stun-optional.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>t</p></td>
<td class="parameter_description"><p>An attribute type</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-optional.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the attribute is an optional one</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="stun-strerror"></a><h3>stun_strerror ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
stun_strerror (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunError" title="enum StunError"><span class="type">StunError</span></a> code</code></em>);</pre>
<p>Transforms a STUN error-code into a human readable string</p>
<div class="refsect3">
<a name="stun-strerror.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>code</p></td>
<td class="parameter_description"><p>host-byte order error code</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="stun-strerror.returns"></a><h4>Returns</h4>
<p> A static pointer to a nul-terminated error message string.</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="libnice-StunMessage.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="StunMessage"></a><h3>struct StunMessage</h3>
<pre class="programlisting">struct StunMessage {
StunAgent *agent;
uint8_t *buffer;
size_t buffer_len;
uint8_t *key;
size_t key_len;
uint8_t long_term_key[16];
bool long_term_valid;
};
</pre>
<p>This structure represents a STUN message</p>
<div class="refsect3">
<a name="StunMessage.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *<em class="structfield"><code><a name="StunMessage.agent"></a>agent</code></em>;</p></td>
<td class="struct_member_description"><p>The agent that created or validated this message</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">uint8_t</span> *<em class="structfield"><code><a name="StunMessage.buffer"></a>buffer</code></em>;</p></td>
<td class="struct_member_description"><p>The buffer containing the STUN message</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">size_t</span> <em class="structfield"><code><a name="StunMessage.buffer-len"></a>buffer_len</code></em>;</p></td>
<td class="struct_member_description"><p>The length of the buffer (not the size of the message)</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">uint8_t</span> *<em class="structfield"><code><a name="StunMessage.key"></a>key</code></em>;</p></td>
<td class="struct_member_description"><p>The short term credentials key to use for authentication validation
or that was used to finalize this message</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">size_t</span> <em class="structfield"><code><a name="StunMessage.key-len"></a>key_len</code></em>;</p></td>
<td class="struct_member_description"><p>The length of the associated key</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">uint8_t</span> <em class="structfield"><code><a name="StunMessage.long-term-key"></a>long_term_key</code></em>[16];</p></td>
<td class="struct_member_description"><p>The long term credential key to use for authentication
validation or that was used to finalize this message</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">bool</span> <em class="structfield"><code><a name="StunMessage.long-term-valid"></a>long_term_valid</code></em>;</p></td>
<td class="struct_member_description"><p>Whether or not the <span class="type">long_term_key</span> variable contains valid
data</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="StunClass"></a><h3>enum StunClass</h3>
<p>This enum is used to represent the class of
a STUN message, as defined in RFC5389</p>
<div class="refsect3">
<a name="StunClass.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="STUN-REQUEST:CAPS"></a>STUN_REQUEST</p></td>
<td class="enum_member_description">
<p>A STUN Request message</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-INDICATION:CAPS"></a>STUN_INDICATION</p></td>
<td class="enum_member_description">
<p>A STUN indication message</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-RESPONSE:CAPS"></a>STUN_RESPONSE</p></td>
<td class="enum_member_description">
<p>A STUN Response message</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ERROR:CAPS"></a>STUN_ERROR</p></td>
<td class="enum_member_description">
<p>A STUN Error message</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="StunMethod"></a><h3>enum StunMethod</h3>
<p>This enum is used to represent the method of
a STUN message, as defined by various RFCs</p>
<div class="refsect3">
<a name="StunMethod.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="STUN-BINDING:CAPS"></a>STUN_BINDING</p></td>
<td class="enum_member_description">
<p>The Binding method as defined by the RFC5389</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-SHARED-SECRET:CAPS"></a>STUN_SHARED_SECRET</p></td>
<td class="enum_member_description">
<p>The Shared-Secret method as defined by the RFC3489</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ALLOCATE:CAPS"></a>STUN_ALLOCATE</p></td>
<td class="enum_member_description">
<p>The Allocate method as defined by the TURN draft 12</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-SET-ACTIVE-DST:CAPS"></a>STUN_SET_ACTIVE_DST</p></td>
<td class="enum_member_description">
<p>The Set-Active-Destination method as defined by
the TURN draft 4</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-REFRESH:CAPS"></a>STUN_REFRESH</p></td>
<td class="enum_member_description">
<p>The Refresh method as defined by the TURN draft 12</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-SEND:CAPS"></a>STUN_SEND</p></td>
<td class="enum_member_description">
<p>The Send method as defined by the TURN draft 00</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-CONNECT:CAPS"></a>STUN_CONNECT</p></td>
<td class="enum_member_description">
<p>The Connect method as defined by the TURN draft 4</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-OLD-SET-ACTIVE-DST:CAPS"></a>STUN_OLD_SET_ACTIVE_DST</p></td>
<td class="enum_member_description">
<p>The older Set-Active-Destination method as
defined by the TURN draft 0</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-IND-SEND:CAPS"></a>STUN_IND_SEND</p></td>
<td class="enum_member_description">
<p>The Send method used in indication messages as defined
by the TURN draft 12</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-IND-DATA:CAPS"></a>STUN_IND_DATA</p></td>
<td class="enum_member_description">
<p>The Data method used in indication messages as defined
by the TURN draft 12</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-IND-CONNECT-STATUS:CAPS"></a>STUN_IND_CONNECT_STATUS</p></td>
<td class="enum_member_description">
<p>The Connect-Status method used in indication
messages as defined by the TURN draft 4</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-CREATEPERMISSION:CAPS"></a>STUN_CREATEPERMISSION</p></td>
<td class="enum_member_description">
<p>The CreatePermission method as defined by
the TURN draft 12</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-CHANNELBIND:CAPS"></a>STUN_CHANNELBIND</p></td>
<td class="enum_member_description">
<p>The ChannelBind method as defined by the TURN draft 12</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="StunAttribute"></a><h3>enum StunAttribute</h3>
<p>Known STUN attribute types as defined by various RFCs and drafts</p>
<div class="refsect3">
<a name="StunAttribute.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-MAPPED-ADDRESS:CAPS"></a>STUN_ATTRIBUTE_MAPPED_ADDRESS</p></td>
<td class="enum_member_description">
<p>The MAPPED-ADDRESS attribute as defined
by RFC5389</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-RESPONSE-ADDRESS:CAPS"></a>STUN_ATTRIBUTE_RESPONSE_ADDRESS</p></td>
<td class="enum_member_description">
<p>The RESPONSE-ADDRESS attribute as defined
by RFC3489</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-CHANGE-REQUEST:CAPS"></a>STUN_ATTRIBUTE_CHANGE_REQUEST</p></td>
<td class="enum_member_description">
<p>The CHANGE-REQUEST attribute as defined by
RFC3489</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-SOURCE-ADDRESS:CAPS"></a>STUN_ATTRIBUTE_SOURCE_ADDRESS</p></td>
<td class="enum_member_description">
<p>The SOURCE-ADDRESS attribute as defined by
RFC3489</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-CHANGED-ADDRESS:CAPS"></a>STUN_ATTRIBUTE_CHANGED_ADDRESS</p></td>
<td class="enum_member_description">
<p>The CHANGED-ADDRESS attribute as defined
by RFC3489</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-USERNAME:CAPS"></a>STUN_ATTRIBUTE_USERNAME</p></td>
<td class="enum_member_description">
<p>The USERNAME attribute as defined by RFC5389</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-PASSWORD:CAPS"></a>STUN_ATTRIBUTE_PASSWORD</p></td>
<td class="enum_member_description">
<p>The PASSWORD attribute as defined by RFC3489</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-MESSAGE-INTEGRITY:CAPS"></a>STUN_ATTRIBUTE_MESSAGE_INTEGRITY</p></td>
<td class="enum_member_description">
<p>The MESSAGE-INTEGRITY attribute as defined
by RFC5389</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-ERROR-CODE:CAPS"></a>STUN_ATTRIBUTE_ERROR_CODE</p></td>
<td class="enum_member_description">
<p>The ERROR-CODE attribute as defined by RFC5389</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-UNKNOWN-ATTRIBUTES:CAPS"></a>STUN_ATTRIBUTE_UNKNOWN_ATTRIBUTES</p></td>
<td class="enum_member_description">
<p>The UNKNOWN-ATTRIBUTES attribute as
defined by RFC5389</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-REFLECTED-FROM:CAPS"></a>STUN_ATTRIBUTE_REFLECTED_FROM</p></td>
<td class="enum_member_description">
<p>The REFLECTED-FROM attribute as defined
by RFC3489</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-CHANNEL-NUMBER:CAPS"></a>STUN_ATTRIBUTE_CHANNEL_NUMBER</p></td>
<td class="enum_member_description">
<p>The CHANNEL-NUMBER attribute as defined by
TURN draft 09 and 12</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-LIFETIME:CAPS"></a>STUN_ATTRIBUTE_LIFETIME</p></td>
<td class="enum_member_description">
<p>The LIFETIME attribute as defined by TURN
draft 04, 09 and 12</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-MS-ALTERNATE-SERVER:CAPS"></a>STUN_ATTRIBUTE_MS_ALTERNATE_SERVER</p></td>
<td class="enum_member_description">
<p>The ALTERNATE-SERVER attribute as
defined by [MS-TURN]</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-MAGIC-COOKIE:CAPS"></a>STUN_ATTRIBUTE_MAGIC_COOKIE</p></td>
<td class="enum_member_description">
<p>The MAGIC-COOKIE attribute as defined by
the rosenberg-midcom TURN draft 08</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-BANDWIDTH:CAPS"></a>STUN_ATTRIBUTE_BANDWIDTH</p></td>
<td class="enum_member_description">
<p>The BANDWIDTH attribute as defined by TURN draft 04</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-DESTINATION-ADDRESS:CAPS"></a>STUN_ATTRIBUTE_DESTINATION_ADDRESS</p></td>
<td class="enum_member_description">
<p>The DESTINATION-ADDRESS attribute as
defined by the rosenberg-midcom TURN draft 08</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-REMOTE-ADDRESS:CAPS"></a>STUN_ATTRIBUTE_REMOTE_ADDRESS</p></td>
<td class="enum_member_description">
<p>The REMOTE-ADDRESS attribute as defined by
TURN draft 04</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-PEER-ADDRESS:CAPS"></a>STUN_ATTRIBUTE_PEER_ADDRESS</p></td>
<td class="enum_member_description">
<p>The PEER-ADDRESS attribute as defined by
TURN draft 09</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-XOR-PEER-ADDRESS:CAPS"></a>STUN_ATTRIBUTE_XOR_PEER_ADDRESS</p></td>
<td class="enum_member_description">
<p>The XOR-PEER-ADDRESS attribute as defined
by TURN draft 12</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-DATA:CAPS"></a>STUN_ATTRIBUTE_DATA</p></td>
<td class="enum_member_description">
<p>The DATA attribute as defined by TURN draft 04,
09 and 12</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-REALM:CAPS"></a>STUN_ATTRIBUTE_REALM</p></td>
<td class="enum_member_description">
<p>The REALM attribute as defined by RFC5389</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-NONCE:CAPS"></a>STUN_ATTRIBUTE_NONCE</p></td>
<td class="enum_member_description">
<p>The NONCE attribute as defined by RFC5389</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-RELAY-ADDRESS:CAPS"></a>STUN_ATTRIBUTE_RELAY_ADDRESS</p></td>
<td class="enum_member_description">
<p>The RELAY-ADDRESS attribute as defined by
TURN draft 04</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-RELAYED-ADDRESS:CAPS"></a>STUN_ATTRIBUTE_RELAYED_ADDRESS</p></td>
<td class="enum_member_description">
<p>The RELAYED-ADDRESS attribute as defined by
TURN draft 09</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-XOR-RELAYED-ADDRESS:CAPS"></a>STUN_ATTRIBUTE_XOR_RELAYED_ADDRESS</p></td>
<td class="enum_member_description">
<p>The XOR-RELAYED-ADDRESS attribute as
defined by TURN draft 12</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-REQUESTED-ADDRESS-TYPE:CAPS"></a>STUN_ATTRIBUTE_REQUESTED_ADDRESS_TYPE</p></td>
<td class="enum_member_description">
<p>The REQUESTED-ADDRESS-TYPE attribute
as defined by TURN-IPV6 draft 05</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-REQUESTED-PORT-PROPS:CAPS"></a>STUN_ATTRIBUTE_REQUESTED_PORT_PROPS</p></td>
<td class="enum_member_description">
<p>The REQUESTED-PORT-PROPS attribute
as defined by TURN draft 04</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-REQUESTED-PROPS:CAPS"></a>STUN_ATTRIBUTE_REQUESTED_PROPS</p></td>
<td class="enum_member_description">
<p>The REQUESTED-PROPS attribute as defined
by TURN draft 09</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-EVEN-PORT:CAPS"></a>STUN_ATTRIBUTE_EVEN_PORT</p></td>
<td class="enum_member_description">
<p>The EVEN-PORT attribute as defined by TURN draft 12</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-REQUESTED-TRANSPORT:CAPS"></a>STUN_ATTRIBUTE_REQUESTED_TRANSPORT</p></td>
<td class="enum_member_description">
<p>The REQUESTED-TRANSPORT attribute as
defined by TURN draft 12</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-DONT-FRAGMENT:CAPS"></a>STUN_ATTRIBUTE_DONT_FRAGMENT</p></td>
<td class="enum_member_description">
<p>The DONT-FRAGMENT attribute as defined
by TURN draft 12</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-XOR-MAPPED-ADDRESS:CAPS"></a>STUN_ATTRIBUTE_XOR_MAPPED_ADDRESS</p></td>
<td class="enum_member_description">
<p>The XOR-MAPPED-ADDRESS attribute as
defined by RFC5389</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-TIMER-VAL:CAPS"></a>STUN_ATTRIBUTE_TIMER_VAL</p></td>
<td class="enum_member_description">
<p>The TIMER-VAL attribute as defined by TURN draft 04</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-REQUESTED-IP:CAPS"></a>STUN_ATTRIBUTE_REQUESTED_IP</p></td>
<td class="enum_member_description">
<p>The REQUESTED-IP attribute as defined by
TURN draft 04</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-RESERVATION-TOKEN:CAPS"></a>STUN_ATTRIBUTE_RESERVATION_TOKEN</p></td>
<td class="enum_member_description">
<p>The RESERVATION-TOKEN attribute as defined
by TURN draft 09 and 12</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-CONNECT-STAT:CAPS"></a>STUN_ATTRIBUTE_CONNECT_STAT</p></td>
<td class="enum_member_description">
<p>The CONNECT-STAT attribute as defined by TURN
draft 04</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-PRIORITY:CAPS"></a>STUN_ATTRIBUTE_PRIORITY</p></td>
<td class="enum_member_description">
<p>The PRIORITY attribute as defined by ICE draft 19</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-USE-CANDIDATE:CAPS"></a>STUN_ATTRIBUTE_USE_CANDIDATE</p></td>
<td class="enum_member_description">
<p>The USE-CANDIDATE attribute as defined by
ICE draft 19</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-OPTIONS:CAPS"></a>STUN_ATTRIBUTE_OPTIONS</p></td>
<td class="enum_member_description">
<p>The OPTIONS optional attribute as defined by
libjingle</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-MS-VERSION:CAPS"></a>STUN_ATTRIBUTE_MS_VERSION</p></td>
<td class="enum_member_description">
<p>The MS-VERSION optional attribute as defined
by [MS-TURN]</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-MS-XOR-MAPPED-ADDRESS:CAPS"></a>STUN_ATTRIBUTE_MS_XOR_MAPPED_ADDRESS</p></td>
<td class="enum_member_description">
<p>The XOR-MAPPED-ADDRESS optional
attribute as defined by [MS-TURN]</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-SOFTWARE:CAPS"></a>STUN_ATTRIBUTE_SOFTWARE</p></td>
<td class="enum_member_description">
<p>The SOFTWARE optional attribute as defined by RFC5389</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-ALTERNATE-SERVER:CAPS"></a>STUN_ATTRIBUTE_ALTERNATE_SERVER</p></td>
<td class="enum_member_description">
<p>The ALTERNATE-SERVER optional attribute as
defined by RFC5389</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-FINGERPRINT:CAPS"></a>STUN_ATTRIBUTE_FINGERPRINT</p></td>
<td class="enum_member_description">
<p>The FINGERPRINT optional attribute as defined
by RFC5389</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-ICE-CONTROLLED:CAPS"></a>STUN_ATTRIBUTE_ICE_CONTROLLED</p></td>
<td class="enum_member_description">
<p>The ICE-CONTROLLED optional attribute as
defined by ICE draft 19</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-ICE-CONTROLLING:CAPS"></a>STUN_ATTRIBUTE_ICE_CONTROLLING</p></td>
<td class="enum_member_description">
<p>The ICE-CONTROLLING optional attribute as
defined by ICE draft 19</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-MS-SEQUENCE-NUMBER:CAPS"></a>STUN_ATTRIBUTE_MS_SEQUENCE_NUMBER</p></td>
<td class="enum_member_description">
<p>The MS-SEQUENCE NUMBER optional attribute
as defined by [MS-TURN]</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-CANDIDATE-IDENTIFIER:CAPS"></a>STUN_ATTRIBUTE_CANDIDATE_IDENTIFIER</p></td>
<td class="enum_member_description">
<p>The CANDIDATE-IDENTIFIER optional
attribute as defined by [MS-ICE2]</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ATTRIBUTE-MS-IMPLEMENTATION-VERSION:CAPS"></a>STUN_ATTRIBUTE_MS_IMPLEMENTATION_VERSION</p></td>
<td class="enum_member_description">
<p>The IMPLEMENTATION-VERSION
optional attribute as defined by [MS-ICE2]</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="StunTransactionId"></a><h3>StunTransactionId</h3>
<pre class="programlisting">typedef uint8_t StunTransactionId[STUN_MESSAGE_TRANS_ID_LEN];
</pre>
<p>A type that holds a STUN transaction id.</p>
</div>
<hr>
<div class="refsect2">
<a name="StunError"></a><h3>enum StunError</h3>
<p>STUN error codes as defined by various RFCs and drafts</p>
<div class="refsect3">
<a name="StunError.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="STUN-ERROR-TRY-ALTERNATE:CAPS"></a>STUN_ERROR_TRY_ALTERNATE</p></td>
<td class="enum_member_description">
<p>The ERROR-CODE value for the
"Try Alternate" error as defined in RFC5389</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ERROR-BAD-REQUEST:CAPS"></a>STUN_ERROR_BAD_REQUEST</p></td>
<td class="enum_member_description">
<p>The ERROR-CODE value for the
"Bad Request" error as defined in RFC5389</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ERROR-UNAUTHORIZED:CAPS"></a>STUN_ERROR_UNAUTHORIZED</p></td>
<td class="enum_member_description">
<p>The ERROR-CODE value for the
"Unauthorized" error as defined in RFC5389</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ERROR-UNKNOWN-ATTRIBUTE:CAPS"></a>STUN_ERROR_UNKNOWN_ATTRIBUTE</p></td>
<td class="enum_member_description">
<p>The ERROR-CODE value for the
"Unknown Attribute" error as defined in RFC5389</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ERROR-ALLOCATION-MISMATCH:CAPS"></a>STUN_ERROR_ALLOCATION_MISMATCH</p></td>
<td class="enum_member_description">
<p>The ERROR-CODE value for the
"Allocation Mismatch" error as defined in TURN draft 12.
Equivalent to the "No Binding" error defined in TURN draft 04.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ERROR-STALE-NONCE:CAPS"></a>STUN_ERROR_STALE_NONCE</p></td>
<td class="enum_member_description">
<p>The ERROR-CODE value for the
"Stale Nonce" error as defined in RFC5389</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ERROR-ACT-DST-ALREADY:CAPS"></a>STUN_ERROR_ACT_DST_ALREADY</p></td>
<td class="enum_member_description">
<p>The ERROR-CODE value for the
"Active Destination Already Set" error as defined in TURN draft 04.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ERROR-UNSUPPORTED-FAMILY:CAPS"></a>STUN_ERROR_UNSUPPORTED_FAMILY</p></td>
<td class="enum_member_description">
<p>The ERROR-CODE value for the
"Address Family not Supported" error as defined in TURN IPV6 Draft 05.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ERROR-WRONG-CREDENTIALS:CAPS"></a>STUN_ERROR_WRONG_CREDENTIALS</p></td>
<td class="enum_member_description">
<p>The ERROR-CODE value for the
"Wrong Credentials" error as defined in TURN Draft 12.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ERROR-UNSUPPORTED-TRANSPORT:CAPS"></a>STUN_ERROR_UNSUPPORTED_TRANSPORT</p></td>
<td class="enum_member_description">
<p>he ERROR-CODE value for the
"Unsupported Transport Protocol" error as defined in TURN Draft 12.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ERROR-INVALID-IP:CAPS"></a>STUN_ERROR_INVALID_IP</p></td>
<td class="enum_member_description">
<p>The ERROR-CODE value for the
"Invalid IP Address" error as defined in TURN draft 04.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ERROR-INVALID-PORT:CAPS"></a>STUN_ERROR_INVALID_PORT</p></td>
<td class="enum_member_description">
<p>The ERROR-CODE value for the
"Invalid Port" error as defined in TURN draft 04.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ERROR-OP-TCP-ONLY:CAPS"></a>STUN_ERROR_OP_TCP_ONLY</p></td>
<td class="enum_member_description">
<p>The ERROR-CODE value for the
"Operation for TCP Only" error as defined in TURN draft 04.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ERROR-CONN-ALREADY:CAPS"></a>STUN_ERROR_CONN_ALREADY</p></td>
<td class="enum_member_description">
<p>The ERROR-CODE value for the
"Connection Already Exists" error as defined in TURN draft 04.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ERROR-ALLOCATION-QUOTA-REACHED:CAPS"></a>STUN_ERROR_ALLOCATION_QUOTA_REACHED</p></td>
<td class="enum_member_description">
<p>The ERROR-CODE value for the
"Allocation Quota Reached" error as defined in TURN draft 12.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ERROR-ROLE-CONFLICT:CAPS"></a>STUN_ERROR_ROLE_CONFLICT</p></td>
<td class="enum_member_description">
<p>The ERROR-CODE value for the
"Role Conflict" error as defined in ICE draft 19.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ERROR-SERVER-ERROR:CAPS"></a>STUN_ERROR_SERVER_ERROR</p></td>
<td class="enum_member_description">
<p>The ERROR-CODE value for the
"Server Error" error as defined in RFC5389</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ERROR-SERVER-CAPACITY:CAPS"></a>STUN_ERROR_SERVER_CAPACITY</p></td>
<td class="enum_member_description">
<p>The ERROR-CODE value for the
"Insufficient Capacity" error as defined in TURN draft 04.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ERROR-INSUFFICIENT-CAPACITY:CAPS"></a>STUN_ERROR_INSUFFICIENT_CAPACITY</p></td>
<td class="enum_member_description">
<p>The ERROR-CODE value for the
"Insufficient Capacity" error as defined in TURN draft 12.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-ERROR-MAX:CAPS"></a>STUN_ERROR_MAX</p></td>
<td class="enum_member_description">
<p>The maximum possible ERROR-CODE value as defined by RFC 5389.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="StunMessageReturn"></a><h3>enum StunMessageReturn</h3>
<p>The return value of most stun_message_* functions.
This enum will report on whether an operation was successful or not
and what error occured if any.</p>
<div class="refsect3">
<a name="StunMessageReturn.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="STUN-MESSAGE-RETURN-SUCCESS:CAPS"></a>STUN_MESSAGE_RETURN_SUCCESS</p></td>
<td class="enum_member_description">
<p>The operation was successful</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-MESSAGE-RETURN-NOT-FOUND:CAPS"></a>STUN_MESSAGE_RETURN_NOT_FOUND</p></td>
<td class="enum_member_description">
<p>The attribute was not found</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-MESSAGE-RETURN-INVALID:CAPS"></a>STUN_MESSAGE_RETURN_INVALID</p></td>
<td class="enum_member_description">
<p>The argument or data is invalid</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-MESSAGE-RETURN-NOT-ENOUGH-SPACE:CAPS"></a>STUN_MESSAGE_RETURN_NOT_ENOUGH_SPACE</p></td>
<td class="enum_member_description">
<p>There is not enough space in the
message to append data to it, or not enough in an argument to fill it with
the data requested.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="STUN-MESSAGE-RETURN-UNSUPPORTED-ADDRESS:CAPS"></a>STUN_MESSAGE_RETURN_UNSUPPORTED_ADDRESS</p></td>
<td class="enum_member_description">
<p>The address in the arguments or in
the STUN message is not supported.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="STUN-MESSAGE-BUFFER-INCOMPLETE:CAPS"></a><h3>STUN_MESSAGE_BUFFER_INCOMPLETE</h3>
<pre class="programlisting">#define STUN_MESSAGE_BUFFER_INCOMPLETE 0
</pre>
<p>Convenience macro for <a class="link" href="libnice-StunMessage.html#stun-message-validate-buffer-length" title="stun_message_validate_buffer_length ()"><code class="function">stun_message_validate_buffer_length()</code></a> meaning that the
data to validate does not hold a complete STUN message</p>
</div>
<hr>
<div class="refsect2">
<a name="STUN-MESSAGE-BUFFER-INVALID:CAPS"></a><h3>STUN_MESSAGE_BUFFER_INVALID</h3>
<pre class="programlisting">#define STUN_MESSAGE_BUFFER_INVALID -1
</pre>
<p>Convenience macro for <a class="link" href="libnice-StunMessage.html#stun-message-validate-buffer-length" title="stun_message_validate_buffer_length ()"><code class="function">stun_message_validate_buffer_length()</code></a> meaning that the
data to validate is not a valid STUN message</p>
</div>
<hr>
<div class="refsect2">
<a name="StunInputVector"></a><h3>StunInputVector</h3>
<pre class="programlisting">typedef struct {
const uint8_t *buffer;
size_t size;
} StunInputVector;
</pre>
<p>Container for a single buffer which also stores its length. This is designed
for vectored I/O: typically an array of <a href="libnice-StunMessage.html#StunInputVector"><span class="type">StunInputVectors</span></a> is passed to
functions, providing multiple buffers which store logically contiguous
received data.</p>
<p>This is guaranteed to be layed out identically in memory to <a href="/usr/share/gtk-doc/html/gioGSocket.html#GInputVector"><span class="type">GInputVector</span></a>.</p>
<div class="refsect3">
<a name="StunInputVector.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p>const <span class="type">uint8_t</span> *<em class="structfield"><code><a name="StunInputVector.buffer"></a>buffer</code></em>;</p></td>
<td class="struct_member_description"><p>a buffer containing already-received binary data</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">size_t</span> <em class="structfield"><code><a name="StunInputVector.size"></a>size</code></em>;</p></td>
<td class="struct_member_description"><p>length of <em class="parameter"><code>buffer</code></em>
, in bytes</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix10.html#api-index-0.1.5">0.1.5</a></p>
</div>
</div>
<div class="refsect1">
<a name="libnice-StunMessage.see-also"></a><h2>See Also</h2>
<p><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>
|