Imported Upstream version 0.0.13
Laurent Bigonville
13 years ago
179 | 179 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
180 | 180 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
181 | 181 | PKG_CONFIG = @PKG_CONFIG@ |
182 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | |
183 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | |
182 | 184 | RANLIB = @RANLIB@ |
183 | 185 | SED = @SED@ |
184 | 186 | SET_MAKE = @SET_MAKE@ |
0 | libnice 0.0.13 (2010-07-20) | |
1 | ========================== | |
2 | ||
3 | Add support for IPv6 | |
4 | Fix crc32 function conflict with libz.so | |
5 | Various bug fixing and code cleaning | |
6 | Validate the remote candidate address before adding it | |
7 | ||
8 | libnice 0.0.12 (2010-05-19) | |
9 | ========================== | |
10 | ||
11 | Update compatibility to RFC5245 | |
12 | Fix a memory corruption bug | |
13 | Fix a possible buffer overflow with socks5 proxies | |
14 | ||
0 | 15 | libnice 0.0.11 (2010-03-18) |
1 | 16 | =========================== |
2 | 17 |
8047 | 8047 | m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) |
8048 | 8048 | |
8049 | 8049 | # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- |
8050 | # serial 1 (pkg-config-0.24) | |
8050 | 8051 | # |
8051 | 8052 | # Copyright © 2004 Scott James Remnant <scott@netsplit.com>. |
8052 | 8053 | # |
8074 | 8075 | AC_DEFUN([PKG_PROG_PKG_CONFIG], |
8075 | 8076 | [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) |
8076 | 8077 | m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) |
8077 | AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl | |
8078 | AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) | |
8079 | AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) | |
8080 | AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) | |
8081 | ||
8078 | 8082 | if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then |
8079 | 8083 | AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) |
8080 | 8084 | fi |
8087 | 8091 | AC_MSG_RESULT([no]) |
8088 | 8092 | PKG_CONFIG="" |
8089 | 8093 | fi |
8090 | ||
8091 | 8094 | fi[]dnl |
8092 | 8095 | ])# PKG_PROG_PKG_CONFIG |
8093 | 8096 | |
8096 | 8099 | # Check to see whether a particular set of modules exists. Similar |
8097 | 8100 | # to PKG_CHECK_MODULES(), but does not set variables or print errors. |
8098 | 8101 | # |
8099 | # | |
8100 | # Similar to PKG_CHECK_MODULES, make sure that the first instance of | |
8101 | # this or PKG_CHECK_MODULES is called, or make sure to call | |
8102 | # PKG_CHECK_EXISTS manually | |
8102 | # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | |
8103 | # only at the first occurence in configure.ac, so if the first place | |
8104 | # it's called might be skipped (such as if it is within an "if", you | |
8105 | # have to call PKG_CHECK_EXISTS manually | |
8103 | 8106 | # -------------------------------------------------------------- |
8104 | 8107 | AC_DEFUN([PKG_CHECK_EXISTS], |
8105 | 8108 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
8106 | 8109 | if test -n "$PKG_CONFIG" && \ |
8107 | 8110 | AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then |
8108 | m4_ifval([$2], [$2], [:]) | |
8111 | m4_default([$2], [:]) | |
8109 | 8112 | m4_ifvaln([$3], [else |
8110 | 8113 | $3])dnl |
8111 | 8114 | fi]) |
8112 | 8115 | |
8113 | ||
8114 | 8116 | # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) |
8115 | 8117 | # --------------------------------------------- |
8116 | 8118 | m4_define([_PKG_CONFIG], |
8117 | [if test -n "$PKG_CONFIG"; then | |
8118 | if test -n "$$1"; then | |
8119 | pkg_cv_[]$1="$$1" | |
8120 | else | |
8121 | PKG_CHECK_EXISTS([$3], | |
8122 | [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], | |
8123 | [pkg_failed=yes]) | |
8124 | fi | |
8125 | else | |
8126 | pkg_failed=untried | |
8119 | [if test -n "$$1"; then | |
8120 | pkg_cv_[]$1="$$1" | |
8121 | elif test -n "$PKG_CONFIG"; then | |
8122 | PKG_CHECK_EXISTS([$3], | |
8123 | [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], | |
8124 | [pkg_failed=yes]) | |
8125 | else | |
8126 | pkg_failed=untried | |
8127 | 8127 | fi[]dnl |
8128 | 8128 | ])# _PKG_CONFIG |
8129 | 8129 | |
8165 | 8165 | See the pkg-config man page for more details.]) |
8166 | 8166 | |
8167 | 8167 | if test $pkg_failed = yes; then |
8168 | AC_MSG_RESULT([no]) | |
8168 | 8169 | _PKG_SHORT_ERRORS_SUPPORTED |
8169 | 8170 | if test $_pkg_short_errors_supported = yes; then |
8170 | $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` | |
8171 | $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` | |
8171 | 8172 | else |
8172 | $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` | |
8173 | $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` | |
8173 | 8174 | fi |
8174 | 8175 | # Put the nasty error message in config.log where it belongs |
8175 | 8176 | echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD |
8176 | 8177 | |
8177 | ifelse([$4], , [AC_MSG_ERROR(dnl | |
8178 | m4_default([$4], [AC_MSG_ERROR( | |
8178 | 8179 | [Package requirements ($2) were not met: |
8179 | 8180 | |
8180 | 8181 | $$1_PKG_ERRORS |
8182 | 8183 | Consider adjusting the PKG_CONFIG_PATH environment variable if you |
8183 | 8184 | installed software in a non-standard prefix. |
8184 | 8185 | |
8185 | _PKG_TEXT | |
8186 | ])], | |
8187 | [AC_MSG_RESULT([no]) | |
8188 | $4]) | |
8186 | _PKG_TEXT])dnl | |
8187 | ]) | |
8189 | 8188 | elif test $pkg_failed = untried; then |
8190 | ifelse([$4], , [AC_MSG_FAILURE(dnl | |
8189 | AC_MSG_RESULT([no]) | |
8190 | m4_default([$4], [AC_MSG_FAILURE( | |
8191 | 8191 | [The pkg-config script could not be found or is too old. Make sure it |
8192 | 8192 | is in your PATH or set the PKG_CONFIG environment variable to the full |
8193 | 8193 | path to pkg-config. |
8194 | 8194 | |
8195 | 8195 | _PKG_TEXT |
8196 | 8196 | |
8197 | To get pkg-config, see <http://pkg-config.freedesktop.org/>.])], | |
8198 | [$4]) | |
8197 | To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl | |
8198 | ]) | |
8199 | 8199 | else |
8200 | 8200 | $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS |
8201 | 8201 | $1[]_LIBS=$pkg_cv_[]$1[]_LIBS |
8202 | 8202 | AC_MSG_RESULT([yes]) |
8203 | ifelse([$3], , :, [$3]) | |
8203 | $3 | |
8204 | 8204 | fi[]dnl |
8205 | 8205 | ])# PKG_CHECK_MODULES |
8206 | 8206 |
172 | 172 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
173 | 173 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
174 | 174 | PKG_CONFIG = @PKG_CONFIG@ |
175 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | |
176 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | |
175 | 177 | RANLIB = @RANLIB@ |
176 | 178 | SED = @SED@ |
177 | 179 | SET_MAKE = @SET_MAKE@ |
148 | 148 | STUN_USAGE_ICE_COMPATIBILITY_GOOGLE : |
149 | 149 | agent->compatibility == NICE_COMPATIBILITY_MSN ? |
150 | 150 | STUN_USAGE_ICE_COMPATIBILITY_MSN : |
151 | STUN_USAGE_ICE_COMPATIBILITY_DRAFT19; | |
151 | STUN_USAGE_ICE_COMPATIBILITY_RFC5245; | |
152 | 152 | } |
153 | 153 | |
154 | 154 | |
275 | 275 | "compatibility", |
276 | 276 | "ICE specification compatibility", |
277 | 277 | "The compatibility mode for the agent", |
278 | NICE_COMPATIBILITY_DRAFT19, NICE_COMPATIBILITY_LAST, | |
279 | NICE_COMPATIBILITY_DRAFT19, | |
278 | NICE_COMPATIBILITY_RFC5245, NICE_COMPATIBILITY_LAST, | |
279 | NICE_COMPATIBILITY_RFC5245, | |
280 | 280 | G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); |
281 | 281 | |
282 | 282 | g_object_class_install_property (gobject_class, PROP_STUN_SERVER, |
670 | 670 | agent->media_after_tick = FALSE; |
671 | 671 | agent->software_attribute = NULL; |
672 | 672 | |
673 | agent->compatibility = NICE_COMPATIBILITY_DRAFT19; | |
673 | agent->compatibility = NICE_COMPATIBILITY_RFC5245; | |
674 | 674 | agent->reliable = FALSE; |
675 | 675 | |
676 | 676 | stun_agent_init (&agent->stun_agent, STUN_ALL_KNOWN_ATTRIBUTES, |
818 | 818 | { |
819 | 819 | case PROP_MAIN_CONTEXT: |
820 | 820 | agent->main_context = g_value_get_pointer (value); |
821 | if (agent->main_context != NULL) | |
822 | g_main_context_ref (agent->main_context); | |
821 | 823 | break; |
822 | 824 | |
823 | 825 | case PROP_COMPATIBILITY: |
1291 | 1293 | return nice_candidate_pair_priority (remote->priority, local->priority); |
1292 | 1294 | } |
1293 | 1295 | |
1294 | static gboolean | |
1296 | static void | |
1295 | 1297 | priv_add_new_candidate_discovery_stun (NiceAgent *agent, |
1296 | 1298 | NiceSocket *socket, NiceAddress server, |
1297 | 1299 | Stream *stream, guint component_id) |
1298 | 1300 | { |
1299 | 1301 | CandidateDiscovery *cdisco; |
1300 | GSList *modified_list; | |
1301 | 1302 | |
1302 | 1303 | /* note: no need to check for redundant candidates, as this is |
1303 | 1304 | * done later on in the process */ |
1304 | 1305 | |
1305 | 1306 | cdisco = g_slice_new0 (CandidateDiscovery); |
1306 | if (cdisco) { | |
1307 | modified_list = g_slist_append (agent->discovery_list, cdisco); | |
1308 | ||
1309 | if (modified_list) { | |
1310 | cdisco->type = NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE; | |
1311 | cdisco->nicesock = socket; | |
1312 | cdisco->server = server; | |
1313 | cdisco->stream = stream; | |
1314 | cdisco->component = stream_find_component_by_id (stream, component_id); | |
1315 | cdisco->agent = agent; | |
1316 | stun_agent_init (&cdisco->stun_agent, STUN_ALL_KNOWN_ATTRIBUTES, | |
1317 | STUN_COMPATIBILITY_RFC3489, 0); | |
1318 | ||
1319 | nice_debug ("Agent %p : Adding new srv-rflx candidate discovery %p\n", | |
1320 | agent, cdisco); | |
1321 | agent->discovery_list = modified_list; | |
1322 | ++agent->discovery_unsched_items; | |
1323 | } | |
1324 | ||
1325 | return TRUE; | |
1326 | } | |
1327 | ||
1328 | return FALSE; | |
1329 | } | |
1330 | ||
1331 | static gboolean | |
1307 | ||
1308 | cdisco->type = NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE; | |
1309 | cdisco->nicesock = socket; | |
1310 | cdisco->server = server; | |
1311 | cdisco->stream = stream; | |
1312 | cdisco->component = stream_find_component_by_id (stream, component_id); | |
1313 | cdisco->agent = agent; | |
1314 | stun_agent_init (&cdisco->stun_agent, STUN_ALL_KNOWN_ATTRIBUTES, | |
1315 | STUN_COMPATIBILITY_RFC3489, 0); | |
1316 | ||
1317 | nice_debug ("Agent %p : Adding new srv-rflx candidate discovery %p\n", | |
1318 | agent, cdisco); | |
1319 | ||
1320 | agent->discovery_list = g_slist_append (agent->discovery_list, cdisco); | |
1321 | ++agent->discovery_unsched_items; | |
1322 | } | |
1323 | ||
1324 | static void | |
1332 | 1325 | priv_add_new_candidate_discovery_turn (NiceAgent *agent, |
1333 | 1326 | NiceSocket *socket, TurnServer *turn, |
1334 | 1327 | Stream *stream, guint component_id) |
1335 | 1328 | { |
1336 | 1329 | CandidateDiscovery *cdisco; |
1337 | GSList *modified_list; | |
1338 | GSList *socket_modified_list; | |
1330 | Component *component = stream_find_component_by_id (stream, component_id); | |
1339 | 1331 | |
1340 | 1332 | /* note: no need to check for redundant candidates, as this is |
1341 | 1333 | * done later on in the process */ |
1342 | 1334 | |
1343 | 1335 | cdisco = g_slice_new0 (CandidateDiscovery); |
1344 | if (cdisco) { | |
1345 | modified_list = g_slist_append (agent->discovery_list, cdisco); | |
1346 | ||
1347 | if (modified_list) { | |
1348 | Component *component = stream_find_component_by_id (stream, component_id); | |
1349 | ||
1350 | cdisco->type = NICE_CANDIDATE_TYPE_RELAYED; | |
1351 | ||
1352 | if (turn->type == NICE_RELAY_TYPE_TURN_UDP) { | |
1353 | if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE) { | |
1354 | NiceAddress addr = socket->addr; | |
1355 | NiceSocket *new_socket; | |
1356 | nice_address_set_port (&addr, 0); | |
1357 | ||
1358 | new_socket = nice_udp_bsd_socket_new (&addr); | |
1359 | if (new_socket) { | |
1360 | _priv_set_socket_tos (agent, new_socket, stream->tos); | |
1361 | agent_attach_stream_component_socket (agent, stream, | |
1362 | component, new_socket); | |
1363 | socket_modified_list = g_slist_append (component->sockets, new_socket); | |
1364 | if (socket_modified_list) { | |
1365 | /* success: store a pointer to the sockaddr */ | |
1366 | component->sockets = socket_modified_list; | |
1367 | socket = new_socket; | |
1368 | } else { | |
1369 | nice_socket_free (new_socket); | |
1370 | } | |
1371 | } | |
1372 | } | |
1373 | cdisco->nicesock = socket; | |
1374 | } else { | |
1375 | NiceAddress proxy_server; | |
1376 | socket = NULL; | |
1377 | ||
1378 | if (agent->proxy_type != NICE_PROXY_TYPE_NONE && | |
1379 | agent->proxy_ip != NULL && | |
1380 | nice_address_set_from_string (&proxy_server, agent->proxy_ip)) { | |
1381 | nice_address_set_port (&proxy_server, agent->proxy_port); | |
1382 | socket = nice_tcp_bsd_socket_new (agent, component->ctx, &proxy_server); | |
1383 | ||
1384 | if (socket) { | |
1385 | _priv_set_socket_tos (agent, socket, stream->tos); | |
1386 | if (agent->proxy_type == NICE_PROXY_TYPE_SOCKS5) { | |
1387 | socket = nice_socks5_socket_new (socket, &turn->server, | |
1388 | agent->proxy_username, agent->proxy_password); | |
1389 | } else if (agent->proxy_type == NICE_PROXY_TYPE_HTTP){ | |
1390 | socket = nice_http_socket_new (socket, &turn->server, | |
1391 | agent->proxy_username, agent->proxy_password); | |
1392 | } else { | |
1393 | nice_socket_free (socket); | |
1394 | socket = NULL; | |
1395 | } | |
1396 | } | |
1397 | ||
1398 | } | |
1399 | if (socket == NULL) { | |
1400 | socket = nice_tcp_bsd_socket_new (agent, component->ctx, &turn->server); | |
1401 | _priv_set_socket_tos (agent, socket, stream->tos); | |
1402 | } | |
1403 | if (turn->type == NICE_RELAY_TYPE_TURN_TLS && | |
1404 | agent->compatibility == NICE_COMPATIBILITY_GOOGLE) { | |
1405 | socket = nice_pseudossl_socket_new (agent, socket); | |
1406 | } | |
1407 | cdisco->nicesock = nice_tcp_turn_socket_new (agent, socket, | |
1408 | agent_to_turn_socket_compatibility (agent)); | |
1409 | ||
1410 | if (!cdisco->nicesock) { | |
1411 | agent->discovery_list = g_slist_remove (modified_list, cdisco); | |
1412 | g_slice_free (CandidateDiscovery, cdisco); | |
1413 | return FALSE; | |
1414 | } | |
1415 | ||
1336 | cdisco->type = NICE_CANDIDATE_TYPE_RELAYED; | |
1337 | ||
1338 | if (turn->type == NICE_RELAY_TYPE_TURN_UDP) { | |
1339 | if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE) { | |
1340 | NiceAddress addr = socket->addr; | |
1341 | NiceSocket *new_socket; | |
1342 | nice_address_set_port (&addr, 0); | |
1343 | ||
1344 | new_socket = nice_udp_bsd_socket_new (&addr); | |
1345 | if (new_socket) { | |
1346 | _priv_set_socket_tos (agent, new_socket, stream->tos); | |
1416 | 1347 | agent_attach_stream_component_socket (agent, stream, |
1417 | component, cdisco->nicesock); | |
1418 | socket_modified_list = g_slist_append (component->sockets, cdisco->nicesock); | |
1419 | if (socket_modified_list) { | |
1420 | /* success: store a pointer to the sockaddr */ | |
1421 | component->sockets = socket_modified_list; | |
1348 | component, new_socket); | |
1349 | component->sockets= g_slist_append (component->sockets, new_socket); | |
1350 | socket = new_socket; | |
1351 | } | |
1352 | } | |
1353 | cdisco->nicesock = socket; | |
1354 | } else { | |
1355 | NiceAddress proxy_server; | |
1356 | socket = NULL; | |
1357 | ||
1358 | if (agent->proxy_type != NICE_PROXY_TYPE_NONE && | |
1359 | agent->proxy_ip != NULL && | |
1360 | nice_address_set_from_string (&proxy_server, agent->proxy_ip)) { | |
1361 | nice_address_set_port (&proxy_server, agent->proxy_port); | |
1362 | socket = nice_tcp_bsd_socket_new (agent, component->ctx, &proxy_server); | |
1363 | ||
1364 | if (socket) { | |
1365 | _priv_set_socket_tos (agent, socket, stream->tos); | |
1366 | if (agent->proxy_type == NICE_PROXY_TYPE_SOCKS5) { | |
1367 | socket = nice_socks5_socket_new (socket, &turn->server, | |
1368 | agent->proxy_username, agent->proxy_password); | |
1369 | } else if (agent->proxy_type == NICE_PROXY_TYPE_HTTP){ | |
1370 | socket = nice_http_socket_new (socket, &turn->server, | |
1371 | agent->proxy_username, agent->proxy_password); | |
1372 | } else { | |
1373 | nice_socket_free (socket); | |
1374 | socket = NULL; | |
1422 | 1375 | } |
1423 | 1376 | } |
1424 | cdisco->turn = turn; | |
1425 | cdisco->server = turn->server; | |
1426 | ||
1427 | cdisco->stream = stream; | |
1428 | cdisco->component = stream_find_component_by_id (stream, component_id); | |
1429 | cdisco->agent = agent; | |
1430 | ||
1431 | if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE) { | |
1432 | stun_agent_init (&cdisco->stun_agent, STUN_ALL_KNOWN_ATTRIBUTES, | |
1433 | STUN_COMPATIBILITY_RFC3489, | |
1434 | STUN_AGENT_USAGE_SHORT_TERM_CREDENTIALS | | |
1435 | STUN_AGENT_USAGE_IGNORE_CREDENTIALS); | |
1436 | } else if (agent->compatibility == NICE_COMPATIBILITY_MSN || | |
1437 | agent->compatibility == NICE_COMPATIBILITY_WLM2009) { | |
1438 | stun_agent_init (&cdisco->stun_agent, STUN_ALL_KNOWN_ATTRIBUTES, | |
1439 | STUN_COMPATIBILITY_RFC3489, | |
1440 | STUN_AGENT_USAGE_SHORT_TERM_CREDENTIALS); | |
1441 | } else { | |
1442 | stun_agent_init (&cdisco->stun_agent, STUN_ALL_KNOWN_ATTRIBUTES, | |
1443 | STUN_COMPATIBILITY_RFC5389, | |
1444 | STUN_AGENT_USAGE_ADD_SOFTWARE | | |
1445 | STUN_AGENT_USAGE_LONG_TERM_CREDENTIALS); | |
1446 | } | |
1447 | stun_agent_set_software (&cdisco->stun_agent, agent->software_attribute); | |
1448 | ||
1449 | nice_debug ("Agent %p : Adding new relay-rflx candidate discovery %p\n", | |
1450 | agent, cdisco); | |
1451 | agent->discovery_list = modified_list; | |
1452 | ++agent->discovery_unsched_items; | |
1453 | } | |
1454 | ||
1455 | return TRUE; | |
1456 | } | |
1457 | ||
1458 | return FALSE; | |
1377 | ||
1378 | } | |
1379 | if (socket == NULL) { | |
1380 | socket = nice_tcp_bsd_socket_new (agent, component->ctx, &turn->server); | |
1381 | _priv_set_socket_tos (agent, socket, stream->tos); | |
1382 | } | |
1383 | if (turn->type == NICE_RELAY_TYPE_TURN_TLS && | |
1384 | agent->compatibility == NICE_COMPATIBILITY_GOOGLE) { | |
1385 | socket = nice_pseudossl_socket_new (agent, socket); | |
1386 | } | |
1387 | cdisco->nicesock = nice_tcp_turn_socket_new (agent, socket, | |
1388 | agent_to_turn_socket_compatibility (agent)); | |
1389 | ||
1390 | agent_attach_stream_component_socket (agent, stream, | |
1391 | component, cdisco->nicesock); | |
1392 | component->sockets = g_slist_append (component->sockets, cdisco->nicesock); | |
1393 | } | |
1394 | ||
1395 | cdisco->turn = turn; | |
1396 | cdisco->server = turn->server; | |
1397 | ||
1398 | cdisco->stream = stream; | |
1399 | cdisco->component = stream_find_component_by_id (stream, component_id); | |
1400 | cdisco->agent = agent; | |
1401 | ||
1402 | if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE) { | |
1403 | stun_agent_init (&cdisco->stun_agent, STUN_ALL_KNOWN_ATTRIBUTES, | |
1404 | STUN_COMPATIBILITY_RFC3489, | |
1405 | STUN_AGENT_USAGE_SHORT_TERM_CREDENTIALS | | |
1406 | STUN_AGENT_USAGE_IGNORE_CREDENTIALS); | |
1407 | } else if (agent->compatibility == NICE_COMPATIBILITY_MSN || | |
1408 | agent->compatibility == NICE_COMPATIBILITY_WLM2009) { | |
1409 | stun_agent_init (&cdisco->stun_agent, STUN_ALL_KNOWN_ATTRIBUTES, | |
1410 | STUN_COMPATIBILITY_RFC3489, | |
1411 | STUN_AGENT_USAGE_SHORT_TERM_CREDENTIALS); | |
1412 | } else { | |
1413 | stun_agent_init (&cdisco->stun_agent, STUN_ALL_KNOWN_ATTRIBUTES, | |
1414 | STUN_COMPATIBILITY_RFC5389, | |
1415 | STUN_AGENT_USAGE_ADD_SOFTWARE | | |
1416 | STUN_AGENT_USAGE_LONG_TERM_CREDENTIALS); | |
1417 | } | |
1418 | stun_agent_set_software (&cdisco->stun_agent, agent->software_attribute); | |
1419 | ||
1420 | nice_debug ("Agent %p : Adding new relay-rflx candidate discovery %p\n", | |
1421 | agent, cdisco); | |
1422 | agent->discovery_list = g_slist_append (agent->discovery_list, cdisco); | |
1423 | ++agent->discovery_unsched_items; | |
1459 | 1424 | } |
1460 | 1425 | |
1461 | 1426 | NICEAPI_EXPORT guint |
1464 | 1429 | guint n_components) |
1465 | 1430 | { |
1466 | 1431 | Stream *stream; |
1467 | GSList *modified_list = NULL; | |
1468 | 1432 | guint ret = 0; |
1469 | 1433 | guint i; |
1470 | 1434 | |
1471 | 1435 | agent_lock(); |
1472 | 1436 | stream = stream_new (n_components); |
1473 | if (stream) { | |
1474 | modified_list = g_slist_append (agent->streams, stream); | |
1475 | if (modified_list) { | |
1476 | stream->id = agent->next_stream_id++; | |
1477 | nice_debug ("Agent %p : allocating stream id %u (%p)", agent, stream->id, stream); | |
1478 | if (agent->reliable) { | |
1479 | nice_debug ("Agent %p : reliable stream", agent); | |
1480 | for (i = 0; i < n_components; i++) { | |
1481 | Component *component = stream_find_component_by_id (stream, i + 1); | |
1482 | if (component) { | |
1483 | TcpUserData *data = g_slice_new0 (TcpUserData); | |
1484 | PseudoTcpCallbacks tcp_callbacks = {data, | |
1485 | pseudo_tcp_socket_opened, | |
1486 | pseudo_tcp_socket_readable, | |
1487 | pseudo_tcp_socket_writable, | |
1488 | pseudo_tcp_socket_closed, | |
1489 | pseudo_tcp_socket_write_packet}; | |
1490 | data->agent = agent; | |
1491 | data->stream = stream; | |
1492 | data->component = component; | |
1493 | component->tcp_data = data; | |
1494 | component->tcp = pseudo_tcp_socket_new (0, &tcp_callbacks); | |
1495 | adjust_tcp_clock (agent, stream, component); | |
1496 | nice_debug ("Agent %p: Create Pseudo Tcp Socket for component %d", | |
1497 | agent, i+1); | |
1498 | } else { | |
1499 | nice_debug ("Agent %p: couldn't find component %d", agent, i+1); | |
1500 | } | |
1501 | } | |
1437 | ||
1438 | agent->streams = g_slist_append (agent->streams, stream); | |
1439 | stream->id = agent->next_stream_id++; | |
1440 | nice_debug ("Agent %p : allocating stream id %u (%p)", agent, stream->id, stream); | |
1441 | if (agent->reliable) { | |
1442 | nice_debug ("Agent %p : reliable stream", agent); | |
1443 | for (i = 0; i < n_components; i++) { | |
1444 | Component *component = stream_find_component_by_id (stream, i + 1); | |
1445 | if (component) { | |
1446 | TcpUserData *data = g_slice_new0 (TcpUserData); | |
1447 | PseudoTcpCallbacks tcp_callbacks = {data, | |
1448 | pseudo_tcp_socket_opened, | |
1449 | pseudo_tcp_socket_readable, | |
1450 | pseudo_tcp_socket_writable, | |
1451 | pseudo_tcp_socket_closed, | |
1452 | pseudo_tcp_socket_write_packet}; | |
1453 | data->agent = agent; | |
1454 | data->stream = stream; | |
1455 | data->component = component; | |
1456 | component->tcp_data = data; | |
1457 | component->tcp = pseudo_tcp_socket_new (0, &tcp_callbacks); | |
1458 | adjust_tcp_clock (agent, stream, component); | |
1459 | nice_debug ("Agent %p: Create Pseudo Tcp Socket for component %d", | |
1460 | agent, i+1); | |
1461 | } else { | |
1462 | nice_debug ("Agent %p: couldn't find component %d", agent, i+1); | |
1502 | 1463 | } |
1503 | ||
1504 | stream_initialize_credentials (stream, agent->rng); | |
1505 | ||
1506 | agent->streams = modified_list; | |
1507 | } | |
1508 | else | |
1509 | stream_free (stream); | |
1510 | } | |
1464 | } | |
1465 | } | |
1466 | ||
1467 | stream_initialize_credentials (stream, agent->rng); | |
1511 | 1468 | |
1512 | 1469 | ret = stream->id; |
1513 | 1470 | |
1700 | 1657 | |
1701 | 1658 | #endif |
1702 | 1659 | |
1703 | NICEAPI_EXPORT void | |
1660 | NICEAPI_EXPORT gboolean | |
1704 | 1661 | nice_agent_gather_candidates ( |
1705 | 1662 | NiceAgent *agent, |
1706 | 1663 | guint stream_id) |
1785 | 1742 | n + 1, addr); |
1786 | 1743 | |
1787 | 1744 | if (!host_candidate) { |
1788 | g_error ("No host candidate??"); | |
1789 | break; | |
1745 | g_warning ("No host candidate??"); | |
1746 | return FALSE; | |
1790 | 1747 | } |
1791 | 1748 | |
1792 | 1749 | #ifdef HAVE_GUPNP |
1805 | 1762 | agent->stun_server_ip) { |
1806 | 1763 | NiceAddress stun_server; |
1807 | 1764 | if (nice_address_set_from_string (&stun_server, agent->stun_server_ip)) { |
1808 | gboolean res; | |
1809 | 1765 | nice_address_set_port (&stun_server, agent->stun_server_port); |
1810 | 1766 | |
1811 | res = | |
1812 | priv_add_new_candidate_discovery_stun (agent, | |
1813 | host_candidate->sockptr, | |
1814 | stun_server, | |
1815 | stream, | |
1816 | n + 1); | |
1817 | ||
1818 | if (res != TRUE) { | |
1819 | /* note: memory allocation failure, return error */ | |
1820 | g_error ("Memory allocation failure?"); | |
1821 | } | |
1767 | priv_add_new_candidate_discovery_stun (agent, | |
1768 | host_candidate->sockptr, | |
1769 | stun_server, | |
1770 | stream, | |
1771 | n + 1); | |
1822 | 1772 | } |
1823 | 1773 | } |
1824 | 1774 | |
1828 | 1778 | for (item = component->turn_servers; item; item = item->next) { |
1829 | 1779 | TurnServer *turn = item->data; |
1830 | 1780 | |
1831 | gboolean res = | |
1832 | priv_add_new_candidate_discovery_turn (agent, | |
1833 | host_candidate->sockptr, | |
1834 | turn, | |
1835 | stream, | |
1836 | n + 1); | |
1837 | ||
1838 | if (res != TRUE) { | |
1839 | /* note: memory allocation failure, return error */ | |
1840 | g_error ("Memory allocation failure?"); | |
1841 | } | |
1781 | priv_add_new_candidate_discovery_turn (agent, | |
1782 | host_candidate->sockptr, | |
1783 | turn, | |
1784 | stream, | |
1785 | n + 1); | |
1842 | 1786 | } |
1843 | 1787 | } |
1844 | 1788 | } |
1860 | 1804 | done: |
1861 | 1805 | |
1862 | 1806 | agent_unlock(); |
1807 | ||
1808 | return TRUE; | |
1863 | 1809 | } |
1864 | 1810 | |
1865 | 1811 | static void priv_free_upnp (NiceAgent *agent) |
1932 | 1878 | nice_agent_add_local_address (NiceAgent *agent, NiceAddress *addr) |
1933 | 1879 | { |
1934 | 1880 | NiceAddress *dup; |
1935 | GSList *modified_list; | |
1936 | gboolean ret = FALSE; | |
1937 | 1881 | |
1938 | 1882 | agent_lock(); |
1939 | 1883 | |
1940 | 1884 | dup = nice_address_dup (addr); |
1941 | 1885 | nice_address_set_port (dup, 0); |
1942 | modified_list = g_slist_append (agent->local_addresses, dup); | |
1943 | if (modified_list) { | |
1944 | agent->local_addresses = modified_list; | |
1945 | ||
1946 | ret = TRUE; | |
1947 | goto done; | |
1948 | } | |
1949 | ||
1950 | done: | |
1886 | agent->local_addresses = g_slist_append (agent->local_addresses, dup); | |
1887 | ||
1951 | 1888 | agent_unlock(); |
1952 | return ret; | |
1889 | return TRUE; | |
1953 | 1890 | } |
1954 | 1891 | |
1955 | 1892 | static gboolean priv_add_remote_candidate ( |
1967 | 1904 | { |
1968 | 1905 | Component *component; |
1969 | 1906 | NiceCandidate *candidate; |
1970 | gboolean error_flag = FALSE; | |
1971 | 1907 | |
1972 | 1908 | if (!agent_find_component (agent, stream_id, component_id, NULL, &component)) |
1973 | 1909 | return FALSE; |
2010 | 1946 | candidate->password = g_strdup (password); |
2011 | 1947 | } |
2012 | 1948 | if (conn_check_add_for_candidate (agent, stream_id, component, candidate) < 0) |
2013 | error_flag = TRUE; | |
1949 | goto errors; | |
2014 | 1950 | } |
2015 | 1951 | else { |
2016 | 1952 | /* case 2: add a new candidate */ |
2017 | 1953 | |
2018 | 1954 | candidate = nice_candidate_new (type); |
2019 | if (candidate) { | |
2020 | GSList *modified_list = g_slist_append (component->remote_candidates, candidate); | |
2021 | if (modified_list) { | |
2022 | component->remote_candidates = modified_list; | |
2023 | ||
2024 | candidate->stream_id = stream_id; | |
2025 | candidate->component_id = component_id; | |
2026 | ||
2027 | candidate->type = type; | |
2028 | if (addr) | |
2029 | candidate->addr = *addr; | |
2030 | { | |
2031 | gchar tmpbuf[INET6_ADDRSTRLEN] = {0}; | |
2032 | if(addr) | |
2033 | nice_address_to_string (addr, tmpbuf); | |
2034 | nice_debug ("Agent %p : Adding remote candidate with addr [%s]:%u" | |
2035 | " for s%d/c%d. U/P '%s'/'%s' prio: %u", agent, tmpbuf, | |
2036 | addr? nice_address_get_port (addr) : 0, stream_id, component_id, | |
2037 | username, password, priority); | |
2038 | } | |
2039 | ||
2040 | if (base_addr) | |
2041 | candidate->base_addr = *base_addr; | |
2042 | ||
2043 | candidate->transport = transport; | |
2044 | candidate->priority = priority; | |
2045 | candidate->username = g_strdup (username); | |
2046 | candidate->password = g_strdup (password); | |
2047 | ||
2048 | if (foundation) | |
2049 | g_strlcpy (candidate->foundation, foundation, | |
2050 | NICE_CANDIDATE_MAX_FOUNDATION); | |
2051 | ||
2052 | if (conn_check_add_for_candidate (agent, stream_id, component, candidate) < 0) | |
2053 | error_flag = TRUE; | |
2054 | } | |
2055 | else /* memory alloc error: list insert */ | |
2056 | error_flag = TRUE; | |
2057 | } | |
2058 | else /* memory alloc error: candidate creation */ | |
2059 | error_flag = TRUE; | |
2060 | } | |
2061 | ||
2062 | if (error_flag) { | |
2063 | if (candidate) | |
2064 | nice_candidate_free (candidate); | |
2065 | return FALSE; | |
1955 | component->remote_candidates = g_slist_append (component->remote_candidates, | |
1956 | candidate); | |
1957 | ||
1958 | candidate->stream_id = stream_id; | |
1959 | candidate->component_id = component_id; | |
1960 | ||
1961 | candidate->type = type; | |
1962 | if (addr) | |
1963 | candidate->addr = *addr; | |
1964 | ||
1965 | { | |
1966 | gchar tmpbuf[INET6_ADDRSTRLEN] = {0}; | |
1967 | if(addr) | |
1968 | nice_address_to_string (addr, tmpbuf); | |
1969 | nice_debug ("Agent %p : Adding remote candidate with addr [%s]:%u" | |
1970 | " for s%d/c%d. U/P '%s'/'%s' prio: %u", agent, tmpbuf, | |
1971 | addr? nice_address_get_port (addr) : 0, stream_id, component_id, | |
1972 | username, password, priority); | |
1973 | } | |
1974 | ||
1975 | if (base_addr) | |
1976 | candidate->base_addr = *base_addr; | |
1977 | ||
1978 | candidate->transport = transport; | |
1979 | candidate->priority = priority; | |
1980 | candidate->username = g_strdup (username); | |
1981 | candidate->password = g_strdup (password); | |
1982 | ||
1983 | if (foundation) | |
1984 | g_strlcpy (candidate->foundation, foundation, | |
1985 | NICE_CANDIDATE_MAX_FOUNDATION); | |
1986 | ||
1987 | if (conn_check_add_for_candidate (agent, stream_id, component, candidate) < 0) | |
1988 | goto errors; | |
2066 | 1989 | } |
2067 | 1990 | |
2068 | 1991 | return TRUE; |
1992 | ||
1993 | errors: | |
1994 | nice_candidate_free (candidate); | |
1995 | return FALSE; | |
2069 | 1996 | } |
2070 | 1997 | |
2071 | 1998 | NICEAPI_EXPORT gboolean |
2162 | 2089 | |
2163 | 2090 | for (i = candidates; i && added >= 0; i = i->next) { |
2164 | 2091 | NiceCandidate *d = (NiceCandidate*) i->data; |
2165 | gboolean res = | |
2166 | priv_add_remote_candidate (agent, | |
2167 | stream_id, | |
2168 | component_id, | |
2169 | d->type, | |
2170 | &d->addr, | |
2171 | &d->base_addr, | |
2172 | d->transport, | |
2173 | d->priority, | |
2174 | d->username, | |
2175 | d->password, | |
2176 | d->foundation); | |
2177 | if (res) | |
2178 | ++added; | |
2179 | else | |
2180 | added = -1; | |
2092 | ||
2093 | if (nice_address_is_valid (&d->addr) == TRUE) { | |
2094 | gboolean res = | |
2095 | priv_add_remote_candidate (agent, | |
2096 | stream_id, | |
2097 | component_id, | |
2098 | d->type, | |
2099 | &d->addr, | |
2100 | &d->base_addr, | |
2101 | d->transport, | |
2102 | d->priority, | |
2103 | d->username, | |
2104 | d->password, | |
2105 | d->foundation); | |
2106 | if (res) | |
2107 | ++added; | |
2108 | } | |
2181 | 2109 | } |
2182 | 2110 | |
2183 | 2111 | conn_check_remote_candidates_set(agent); |
2451 | 2379 | g_free (agent->software_attribute); |
2452 | 2380 | agent->software_attribute = NULL; |
2453 | 2381 | |
2382 | if (agent->main_context != NULL) | |
2383 | g_main_context_unref (agent->main_context); | |
2384 | agent->main_context = NULL; | |
2385 | ||
2454 | 2386 | if (G_OBJECT_CLASS (nice_agent_parent_class)->dispose) |
2455 | 2387 | G_OBJECT_CLASS (nice_agent_parent_class)->dispose (object); |
2456 | 2388 | |
2482 | 2414 | IOCtx *ctx; |
2483 | 2415 | |
2484 | 2416 | ctx = g_slice_new0 (IOCtx); |
2485 | if (ctx) { | |
2486 | ctx->agent = agent; | |
2487 | ctx->stream = stream; | |
2488 | ctx->component = component; | |
2489 | ctx->socket = socket; | |
2490 | ctx->channel = channel; | |
2491 | ctx->source = source; | |
2492 | } | |
2417 | ctx->agent = agent; | |
2418 | ctx->stream = stream; | |
2419 | ctx->component = component; | |
2420 | ctx->socket = socket; | |
2421 | ctx->channel = channel; | |
2422 | ctx->source = source; | |
2423 | ||
2493 | 2424 | return ctx; |
2494 | 2425 | } |
2495 | 2426 |
60 | 60 | GSList *lcands = NULL; |
61 | 61 | |
62 | 62 | // Create a nice agent |
63 | NiceAgent *agent = nice_agent_new (NULL, NICE_COMPATIBILITY_DRAFT19); | |
63 | NiceAgent *agent = nice_agent_new (NULL, NICE_COMPATIBILITY_RFC5245); | |
64 | 64 | |
65 | 65 | // Connect the signals |
66 | 66 | g_signal_connect (G_OBJECT (agent), "candidate-gathering-done", |
207 | 207 | |
208 | 208 | /** |
209 | 209 | * NiceCompatibility: |
210 | * @NICE_COMPATIBILITY_DRAFT19: Use compatibility for ICE Draft 19 specs | |
210 | * @NICE_COMPATIBILITY_RFC5245: Use compatibility with the RFC5245 ICE specs | |
211 | 211 | * @NICE_COMPATIBILITY_GOOGLE: Use compatibility for Google Talk specs |
212 | 212 | * @NICE_COMPATIBILITY_MSN: Use compatibility for MSN Messenger specs |
213 | 213 | * @NICE_COMPATIBILITY_WLM2009: Use compatibility with Windows Live Messenger |
214 | 214 | * 2009 |
215 | * @NICE_COMPATIBILITY_DRAFT19: Use compatibility for ICE Draft 19 specs | |
215 | 216 | * @NICE_COMPATIBILITY_LAST: Dummy last compatibility mode |
216 | 217 | * |
217 | 218 | * An enum to specify which compatible specifications the #NiceAgent should use. |
218 | 219 | * Use with nice_agent_new() |
220 | * | |
221 | * <warning>@NICE_COMPATIBILITY_DRAFT19 is deprecated and should not be used | |
222 | * in newly-written code. It is kept for compatibility reasons and | |
223 | * represents the same compatibility as @NICE_COMPATIBILITY_RFC5245 </warning> | |
219 | 224 | */ |
220 | 225 | typedef enum |
221 | 226 | { |
222 | NICE_COMPATIBILITY_DRAFT19 = 0, | |
227 | NICE_COMPATIBILITY_RFC5245 = 0, | |
223 | 228 | NICE_COMPATIBILITY_GOOGLE, |
224 | 229 | NICE_COMPATIBILITY_MSN, |
225 | 230 | NICE_COMPATIBILITY_WLM2009, |
226 | NICE_COMPATIBILITY_LAST = NICE_COMPATIBILITY_WLM2009 | |
231 | NICE_COMPATIBILITY_DRAFT19 = NICE_COMPATIBILITY_RFC5245, | |
232 | NICE_COMPATIBILITY_LAST = NICE_COMPATIBILITY_WLM2009, | |
227 | 233 | } NiceCompatibility; |
228 | 234 | |
229 | 235 | /** |
377 | 383 | * |
378 | 384 | * Start the candidate gathering process. |
379 | 385 | * Once done, #NiceAgent::candidate-gathering-done is called for the stream |
386 | * | |
387 | * Returns: %FALSE if there were no local addresses and they couldn't be discovered. In this case, call nice_agent_add_local_address() first. | |
380 | 388 | * |
381 | 389 | * See also: nice_agent_add_local_address() |
382 | 390 | <note> |
390 | 398 | </para> |
391 | 399 | </note> |
392 | 400 | */ |
393 | void | |
401 | gboolean | |
394 | 402 | nice_agent_gather_candidates ( |
395 | 403 | NiceAgent *agent, |
396 | 404 | guint stream_id); |
674 | 682 | * This function will set the value of the SOFTWARE attribute to be added to |
675 | 683 | * STUN requests, responses and error responses sent during connectivity checks. |
676 | 684 | * <para> |
677 | * The SOFTWARE attribute will only be added in the #NICE_COMPATIBILITY_DRAFT19 | |
685 | * The SOFTWARE attribute will only be added in the #NICE_COMPATIBILITY_RFC5245 | |
678 | 686 | * and #NICE_COMPATIBILITY_WLM2009 compatibility modes. |
679 | 687 | * |
680 | 688 | * </para> |
309 | 309 | candidate->transport); |
310 | 310 | |
311 | 311 | if (!remote) { |
312 | GSList *modified_list = NULL; | |
313 | ||
314 | 312 | remote = nice_candidate_copy (candidate); |
315 | ||
316 | modified_list = g_slist_append (component->remote_candidates, | |
317 | remote); | |
318 | if (modified_list) { | |
319 | component->remote_candidates = modified_list; | |
320 | agent_signal_new_remote_candidate (agent, remote); | |
321 | } | |
322 | else { /* error: memory alloc / list */ | |
323 | nice_candidate_free (remote), remote = NULL; | |
324 | return NULL; | |
325 | } | |
313 | component->remote_candidates = g_slist_append (component->remote_candidates, | |
314 | remote); | |
315 | agent_signal_new_remote_candidate (agent, remote); | |
326 | 316 | } |
327 | 317 | |
328 | 318 | if (component->selected_pair.keepalive.tick_source != NULL) { |
1035 | 1035 | } |
1036 | 1036 | } |
1037 | 1037 | } |
1038 | /* Once we process the pending checks, we should free them to avoid | |
1039 | * reprocessing them again if a dribble-mode set_remote_candidates | |
1040 | * is called */ | |
1041 | for (m = component->incoming_checks; m; m = m->next) { | |
1042 | IncomingCheck *icheck = m->data; | |
1043 | g_free (icheck->username); | |
1044 | g_slice_free (IncomingCheck, icheck); | |
1045 | } | |
1046 | g_slist_free (component->incoming_checks); | |
1047 | component->incoming_checks = NULL; | |
1048 | } | |
1038 | } | |
1039 | ||
1040 | /* Once we process the pending checks, we should free them to avoid | |
1041 | * reprocessing them again if a dribble-mode set_remote_candidates | |
1042 | * is called */ | |
1043 | for (m = component->incoming_checks; m; m = m->next) { | |
1044 | IncomingCheck *icheck = m->data; | |
1045 | g_free (icheck->username); | |
1046 | g_slice_free (IncomingCheck, icheck); | |
1047 | } | |
1048 | g_slist_free (component->incoming_checks); | |
1049 | component->incoming_checks = NULL; | |
1049 | 1050 | } |
1050 | 1051 | } |
1051 | 1052 | } |
1247 | 1248 | * Creates a new connectivity check pair and adds it to |
1248 | 1249 | * the agent's list of checks. |
1249 | 1250 | */ |
1250 | static gboolean priv_add_new_check_pair (NiceAgent *agent, guint stream_id, Component *component, NiceCandidate *local, NiceCandidate *remote, NiceCheckState initial_state, gboolean use_candidate) | |
1251 | { | |
1252 | gboolean result = FALSE; | |
1251 | static void priv_add_new_check_pair (NiceAgent *agent, guint stream_id, Component *component, NiceCandidate *local, NiceCandidate *remote, NiceCheckState initial_state, gboolean use_candidate) | |
1252 | { | |
1253 | 1253 | Stream *stream = agent_find_stream (agent, stream_id); |
1254 | 1254 | CandidateCheckPair *pair = g_slice_new0 (CandidateCheckPair); |
1255 | if (pair) { | |
1256 | GSList *modified_list = | |
1257 | g_slist_insert_sorted (stream->conncheck_list, pair, (GCompareFunc)conn_check_compare); | |
1258 | if (modified_list) { | |
1259 | /* step: allocation and addition succesful, do rest of the work */ | |
1260 | ||
1261 | pair->agent = agent; | |
1262 | pair->stream_id = stream_id; | |
1263 | pair->component_id = component->id;; | |
1264 | pair->local = local; | |
1265 | pair->remote = remote; | |
1266 | g_snprintf (pair->foundation, NICE_CANDIDATE_PAIR_MAX_FOUNDATION, "%s:%s", local->foundation, remote->foundation); | |
1267 | ||
1268 | pair->priority = agent_candidate_pair_priority (agent, local, remote); | |
1269 | pair->state = initial_state; | |
1270 | nice_debug ("Agent %p : creating new pair %p state %d", agent, pair, initial_state); | |
1271 | pair->nominated = use_candidate; | |
1272 | pair->controlling = agent->controlling_mode; | |
1273 | ||
1274 | /* note: for the first added check */ | |
1275 | if (!stream->conncheck_list) | |
1276 | stream->conncheck_state = NICE_CHECKLIST_RUNNING; | |
1277 | stream->conncheck_list = modified_list; | |
1278 | ||
1279 | result = TRUE; | |
1280 | nice_debug ("Agent %p : added a new conncheck %p with foundation of '%s' to list %u.", agent, pair, pair->foundation, stream_id); | |
1281 | ||
1282 | /* implement the hard upper limit for number of | |
1283 | checks (see sect 5.7.3 ICE ID-19): */ | |
1284 | if (agent->compatibility == NICE_COMPATIBILITY_DRAFT19) { | |
1285 | stream->conncheck_list = | |
1286 | priv_limit_conn_check_list_size (stream->conncheck_list, agent->max_conn_checks); | |
1287 | } | |
1288 | if (!stream->conncheck_list) { | |
1289 | stream->conncheck_state = NICE_CHECKLIST_FAILED; | |
1290 | result = FALSE; | |
1291 | } | |
1292 | } | |
1293 | else { | |
1294 | /* memory alloc failed: list insert */ | |
1295 | conn_check_free_item (pair, NULL); | |
1296 | stream->conncheck_state = NICE_CHECKLIST_FAILED; | |
1297 | } | |
1298 | } | |
1299 | else { /* memory alloc failed: new pair */ | |
1300 | stream->conncheck_state = NICE_CHECKLIST_FAILED; | |
1301 | } | |
1302 | ||
1303 | return result; | |
1255 | ||
1256 | stream->conncheck_list = g_slist_insert_sorted (stream->conncheck_list, pair, | |
1257 | (GCompareFunc)conn_check_compare); | |
1258 | ||
1259 | pair->agent = agent; | |
1260 | pair->stream_id = stream_id; | |
1261 | pair->component_id = component->id;; | |
1262 | pair->local = local; | |
1263 | pair->remote = remote; | |
1264 | g_snprintf (pair->foundation, NICE_CANDIDATE_PAIR_MAX_FOUNDATION, "%s:%s", local->foundation, remote->foundation); | |
1265 | ||
1266 | pair->priority = agent_candidate_pair_priority (agent, local, remote); | |
1267 | pair->state = initial_state; | |
1268 | nice_debug ("Agent %p : creating new pair %p state %d", agent, pair, initial_state); | |
1269 | pair->nominated = use_candidate; | |
1270 | pair->controlling = agent->controlling_mode; | |
1271 | ||
1272 | /* note: for the first added check */ | |
1273 | if (!stream->conncheck_list) | |
1274 | stream->conncheck_state = NICE_CHECKLIST_RUNNING; | |
1275 | ||
1276 | nice_debug ("Agent %p : added a new conncheck %p with foundation of '%s' to list %u.", agent, pair, pair->foundation, stream_id); | |
1277 | ||
1278 | /* implement the hard upper limit for number of | |
1279 | checks (see sect 5.7.3 ICE ID-19): */ | |
1280 | if (agent->compatibility == NICE_COMPATIBILITY_RFC5245) { | |
1281 | stream->conncheck_list = | |
1282 | priv_limit_conn_check_list_size (stream->conncheck_list, agent->max_conn_checks); | |
1283 | } | |
1304 | 1284 | } |
1305 | 1285 | |
1306 | 1286 | /* |
1328 | 1308 | if (local->transport == remote->transport && |
1329 | 1309 | local->addr.s.addr.sa_family == remote->addr.s.addr.sa_family) { |
1330 | 1310 | |
1331 | gboolean result; | |
1332 | ||
1333 | 1311 | /* note: do not create pairs where local candidate is |
1334 | 1312 | * a srv-reflexive (ICE 5.7.3. "Pruning the Pairs" ID-19) */ |
1335 | if ((agent->compatibility == NICE_COMPATIBILITY_DRAFT19 || | |
1313 | if ((agent->compatibility == NICE_COMPATIBILITY_RFC5245 || | |
1336 | 1314 | agent->compatibility == NICE_COMPATIBILITY_WLM2009) && |
1337 | 1315 | local->type == NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE) |
1338 | 1316 | continue; |
1339 | 1317 | |
1340 | result = priv_add_new_check_pair (agent, stream_id, component, local, remote, NICE_CHECK_FROZEN, FALSE); | |
1341 | if (result) { | |
1342 | ++added; | |
1343 | if (component->state < NICE_COMPONENT_STATE_CONNECTED) { | |
1344 | agent_signal_component_state_change (agent, | |
1345 | stream_id, | |
1346 | component->id, | |
1347 | NICE_COMPONENT_STATE_CONNECTING); | |
1348 | } else { | |
1349 | agent_signal_component_state_change (agent, | |
1350 | stream_id, | |
1351 | component->id, | |
1352 | NICE_COMPONENT_STATE_CONNECTED); | |
1353 | } | |
1354 | } | |
1355 | else { | |
1356 | added = -1; | |
1357 | break; | |
1318 | priv_add_new_check_pair (agent, stream_id, component, local, remote, NICE_CHECK_FROZEN, FALSE); | |
1319 | ++added; | |
1320 | if (component->state < NICE_COMPONENT_STATE_CONNECTED) { | |
1321 | agent_signal_component_state_change (agent, | |
1322 | stream_id, | |
1323 | component->id, | |
1324 | NICE_COMPONENT_STATE_CONNECTING); | |
1325 | } else { | |
1326 | agent_signal_component_state_change (agent, | |
1327 | stream_id, | |
1328 | component->id, | |
1329 | NICE_COMPONENT_STATE_CONNECTED); | |
1358 | 1330 | } |
1359 | 1331 | } |
1360 | 1332 | } |
1451 | 1423 | gsize local_len = strlen (local); |
1452 | 1424 | |
1453 | 1425 | if (remote_len > 0 && local_len > 0) { |
1454 | if (agent->compatibility == NICE_COMPATIBILITY_DRAFT19 && | |
1426 | if (agent->compatibility == NICE_COMPATIBILITY_RFC5245 && | |
1455 | 1427 | dest_len >= remote_len + local_len + 1) { |
1456 | 1428 | memcpy (dest, remote, remote_len); |
1457 | 1429 | len += remote_len; |
1640 | 1612 | { |
1641 | 1613 | gchar tmpbuf[INET6_ADDRSTRLEN]; |
1642 | 1614 | nice_address_to_string (&pair->remote->addr, tmpbuf); |
1643 | nice_debug ("Agent %p : STUN-CC REQ to '%s:%u', socket=%u, pair=%s (c-id:%u), tie=%llu, username='%s' (%d), password='%s' (%d), priority=%u.", agent, | |
1615 | nice_debug ("Agent %p : STUN-CC REQ to '%s:%u', socket=%u, pair=%s (c-id:%u), tie=%llu, username='%s' (%d), password='%s' (%d), priority=%u.", agent, | |
1644 | 1616 | tmpbuf, |
1645 | ntohs(nice_address_get_port (&pair->remote->addr)), | |
1617 | nice_address_get_port (&pair->remote->addr), | |
1646 | 1618 | ((NiceSocket *)pair->local->sockptr)->fileno, |
1647 | 1619 | pair->foundation, pair->component_id, |
1648 | 1620 | (unsigned long long)agent->tie_breaker, |
1650 | 1622 | |
1651 | 1623 | } |
1652 | 1624 | |
1653 | if (cand_use) | |
1625 | if (cand_use) | |
1654 | 1626 | pair->nominated = controlling; |
1655 | 1627 | |
1656 | 1628 | if (uname_len > 0) { |
1764 | 1736 | static gboolean priv_schedule_triggered_check (NiceAgent *agent, Stream *stream, Component *component, NiceSocket *local_socket, NiceCandidate *remote_cand, gboolean use_candidate) |
1765 | 1737 | { |
1766 | 1738 | GSList *i; |
1767 | gboolean result = FALSE; | |
1739 | NiceCandidate *local = NULL; | |
1768 | 1740 | |
1769 | 1741 | for (i = stream->conncheck_list; i ; i = i->next) { |
1770 | 1742 | CandidateCheckPair *p = i->data; |
1792 | 1764 | /* note: to take care of the controlling-controlling case in |
1793 | 1765 | * aggressive nomination mode, send a new triggered |
1794 | 1766 | * check to nominate the pair */ |
1795 | if ((agent->compatibility == NICE_COMPATIBILITY_DRAFT19 || | |
1767 | if ((agent->compatibility == NICE_COMPATIBILITY_RFC5245 || | |
1796 | 1768 | agent->compatibility == NICE_COMPATIBILITY_WLM2009) && |
1797 | 1769 | agent->controlling_mode) |
1798 | 1770 | priv_conn_check_initiate (agent, p); |
1805 | 1777 | } |
1806 | 1778 | } |
1807 | 1779 | |
1808 | { | |
1809 | NiceCandidate *local = NULL; | |
1810 | ||
1811 | for (i = component->local_candidates; i ; i = i->next) { | |
1812 | local = i->data; | |
1813 | if (local->sockptr == local_socket) | |
1814 | break; | |
1815 | } | |
1816 | if (i) { | |
1817 | nice_debug ("Agent %p : Adding a triggered check to conn.check list (local=%p).", agent, local); | |
1818 | result = priv_add_new_check_pair (agent, stream->id, component, local, remote_cand, NICE_CHECK_WAITING, use_candidate); | |
1819 | } | |
1820 | else | |
1821 | nice_debug ("Agent %p : Didn't find a matching pair for triggered check (remote-cand=%p).", agent, remote_cand); | |
1822 | } | |
1823 | ||
1824 | return result; | |
1780 | for (i = component->local_candidates; i ; i = i->next) { | |
1781 | local = i->data; | |
1782 | if (local->sockptr == local_socket) | |
1783 | break; | |
1784 | } | |
1785 | ||
1786 | if (i) { | |
1787 | nice_debug ("Agent %p : Adding a triggered check to conn.check list (local=%p).", agent, local); | |
1788 | priv_add_new_check_pair (agent, stream->id, component, local, remote_cand, NICE_CHECK_WAITING, use_candidate); | |
1789 | return TRUE; | |
1790 | } | |
1791 | else { | |
1792 | nice_debug ("Agent %p : Didn't find a matching pair for triggered check (remote-cand=%p).", agent, remote_cand); | |
1793 | return FALSE; | |
1794 | } | |
1825 | 1795 | } |
1826 | 1796 | |
1827 | 1797 | |
1893 | 1863 | } |
1894 | 1864 | |
1895 | 1865 | icheck = g_slice_new0 (IncomingCheck); |
1896 | if (icheck) { | |
1897 | GSList *pending = g_slist_append (component->incoming_checks, icheck); | |
1898 | if (pending) { | |
1899 | component->incoming_checks = pending; | |
1900 | icheck->from = *from; | |
1901 | icheck->local_socket = socket; | |
1902 | icheck->priority = priority; | |
1903 | icheck->use_candidate = use_candidate; | |
1904 | icheck->username_len = username_len; | |
1905 | icheck->username = NULL; | |
1906 | if (username_len > 0) | |
1907 | icheck->username = g_memdup (username, username_len); | |
1908 | return 0; | |
1909 | } | |
1910 | } | |
1911 | ||
1912 | return -1; | |
1866 | component->incoming_checks = g_slist_append (component->incoming_checks, icheck); | |
1867 | icheck->from = *from; | |
1868 | icheck->local_socket = socket; | |
1869 | icheck->priority = priority; | |
1870 | icheck->use_candidate = use_candidate; | |
1871 | icheck->username_len = username_len; | |
1872 | icheck->username = NULL; | |
1873 | if (username_len > 0) | |
1874 | icheck->username = g_memdup (username, username_len); | |
1875 | ||
1876 | return 0; | |
1913 | 1877 | } |
1914 | 1878 | |
1915 | 1879 | /* |
1921 | 1885 | static CandidateCheckPair *priv_add_peer_reflexive_pair (NiceAgent *agent, guint stream_id, guint component_id, NiceCandidate *local_cand, CandidateCheckPair *parent_pair) |
1922 | 1886 | { |
1923 | 1887 | CandidateCheckPair *pair = g_slice_new0 (CandidateCheckPair); |
1924 | if (pair) { | |
1925 | Stream *stream = agent_find_stream (agent, stream_id); | |
1926 | GSList *modified_list = g_slist_append (stream->conncheck_list, pair); | |
1927 | if (modified_list) { | |
1928 | stream->conncheck_list = modified_list; | |
1929 | pair->agent = agent; | |
1930 | pair->stream_id = stream_id; | |
1931 | pair->component_id = component_id;; | |
1932 | pair->local = local_cand; | |
1933 | pair->remote = parent_pair->remote; | |
1934 | pair->state = NICE_CHECK_DISCOVERED; | |
1935 | nice_debug ("Agent %p : pair %p state DISCOVERED", agent, pair); | |
1936 | g_snprintf (pair->foundation, NICE_CANDIDATE_PAIR_MAX_FOUNDATION, "%s:%s", local_cand->foundation, parent_pair->remote->foundation); | |
1937 | if (agent->controlling_mode == TRUE) | |
1938 | pair->priority = nice_candidate_pair_priority (local_cand->priority, parent_pair->priority); | |
1939 | else | |
1940 | pair->priority = nice_candidate_pair_priority (parent_pair->priority, local_cand->priority); | |
1941 | pair->nominated = FALSE; | |
1942 | pair->controlling = agent->controlling_mode; | |
1943 | nice_debug ("Agent %p : added a new peer-discovered pair with foundation of '%s'.", agent, pair->foundation); | |
1944 | return pair; | |
1945 | } | |
1946 | } | |
1947 | ||
1948 | return NULL; | |
1888 | Stream *stream = agent_find_stream (agent, stream_id); | |
1889 | ||
1890 | stream->conncheck_list = g_slist_append (stream->conncheck_list, pair); | |
1891 | pair->agent = agent; | |
1892 | pair->stream_id = stream_id; | |
1893 | pair->component_id = component_id;; | |
1894 | pair->local = local_cand; | |
1895 | pair->remote = parent_pair->remote; | |
1896 | pair->state = NICE_CHECK_DISCOVERED; | |
1897 | nice_debug ("Agent %p : pair %p state DISCOVERED", agent, pair); | |
1898 | g_snprintf (pair->foundation, NICE_CANDIDATE_PAIR_MAX_FOUNDATION, "%s:%s", | |
1899 | local_cand->foundation, parent_pair->remote->foundation); | |
1900 | if (agent->controlling_mode == TRUE) | |
1901 | pair->priority = nice_candidate_pair_priority (local_cand->priority, | |
1902 | parent_pair->priority); | |
1903 | else | |
1904 | pair->priority = nice_candidate_pair_priority (parent_pair->priority, | |
1905 | local_cand->priority); | |
1906 | pair->nominated = FALSE; | |
1907 | pair->controlling = agent->controlling_mode; | |
1908 | nice_debug ("Agent %p : added a new peer-discovered pair with foundation of '%s'.", agent, pair->foundation); | |
1909 | ||
1910 | return pair; | |
1949 | 1911 | } |
1950 | 1912 | |
1951 | 1913 | /* |
2252 | 2214 | { |
2253 | 2215 | CandidateRefresh *cand; |
2254 | 2216 | NiceAgent *agent = cdisco->agent; |
2255 | GSList *modified_list; | |
2256 | 2217 | |
2257 | 2218 | cand = g_slice_new0 (CandidateRefresh); |
2258 | if (cand) { | |
2259 | modified_list = g_slist_append (agent->refresh_list, cand); | |
2260 | ||
2261 | if (modified_list) { | |
2262 | cand->nicesock = cdisco->nicesock; | |
2263 | cand->relay_socket = relay_cand->sockptr; | |
2264 | cand->server = cdisco->server; | |
2265 | cand->turn = cdisco->turn; | |
2266 | cand->stream = cdisco->stream; | |
2267 | cand->component = cdisco->component; | |
2268 | cand->agent = cdisco->agent; | |
2269 | memcpy (&cand->stun_agent, &cdisco->stun_agent, sizeof(StunAgent)); | |
2270 | nice_debug ("Agent %p : Adding new refresh candidate %p with timeout %d", | |
2271 | agent, cand, (lifetime - 60) * 1000); | |
2272 | agent->refresh_list = modified_list; | |
2273 | ||
2274 | /* step: also start the refresh timer */ | |
2275 | /* refresh should be sent 1 minute before it expires */ | |
2276 | cand->timer_source = | |
2277 | agent_timeout_add_with_context (agent, (lifetime - 60) * 1000, | |
2278 | priv_turn_allocate_refresh_tick, cand); | |
2279 | ||
2280 | nice_debug ("timer source is : %d", cand->timer_source); | |
2281 | } | |
2282 | } | |
2219 | agent->refresh_list = g_slist_append (agent->refresh_list, cand); | |
2220 | ||
2221 | cand->nicesock = cdisco->nicesock; | |
2222 | cand->relay_socket = relay_cand->sockptr; | |
2223 | cand->server = cdisco->server; | |
2224 | cand->turn = cdisco->turn; | |
2225 | cand->stream = cdisco->stream; | |
2226 | cand->component = cdisco->component; | |
2227 | cand->agent = cdisco->agent; | |
2228 | memcpy (&cand->stun_agent, &cdisco->stun_agent, sizeof(StunAgent)); | |
2229 | nice_debug ("Agent %p : Adding new refresh candidate %p with timeout %d", | |
2230 | agent, cand, (lifetime - 60) * 1000); | |
2231 | ||
2232 | /* step: also start the refresh timer */ | |
2233 | /* refresh should be sent 1 minute before it expires */ | |
2234 | cand->timer_source = | |
2235 | agent_timeout_add_with_context (agent, (lifetime - 60) * 1000, | |
2236 | priv_turn_allocate_refresh_tick, cand); | |
2237 | ||
2238 | nice_debug ("timer source is : %d", cand->timer_source); | |
2283 | 2239 | |
2284 | 2240 | return cand; |
2285 | 2241 | } |
2381 | 2337 | STUN_ATTRIBUTE_REALM, &recv_realm_len); |
2382 | 2338 | |
2383 | 2339 | /* check for unauthorized error response */ |
2384 | if (agent->compatibility == NICE_COMPATIBILITY_DRAFT19 && | |
2340 | if (agent->compatibility == NICE_COMPATIBILITY_RFC5245 && | |
2385 | 2341 | stun_message_get_class (resp) == STUN_ERROR && |
2386 | 2342 | stun_message_find_error (resp, &code) == |
2387 | 2343 | STUN_MESSAGE_RETURN_SUCCESS && |
2469 | 2425 | STUN_ATTRIBUTE_REALM, &recv_realm_len); |
2470 | 2426 | |
2471 | 2427 | /* check for unauthorized error response */ |
2472 | if (cand->agent->compatibility == NICE_COMPATIBILITY_DRAFT19 && | |
2428 | if (cand->agent->compatibility == NICE_COMPATIBILITY_RFC5245 && | |
2473 | 2429 | stun_message_get_class (resp) == STUN_ERROR && |
2474 | 2430 | stun_message_find_error (resp, &code) == |
2475 | 2431 | STUN_MESSAGE_RETURN_SUCCESS && |
2575 | 2531 | |
2576 | 2532 | if (cand->password) |
2577 | 2533 | pass = cand->password; |
2578 | else if(data->stream->local_password) | |
2534 | else if(data->stream->local_password[0]) | |
2579 | 2535 | pass = data->stream->local_password; |
2580 | 2536 | |
2581 | 2537 | if (pass) { |
2698 | 2654 | } |
2699 | 2655 | } |
2700 | 2656 | |
2701 | ||
2702 | if (validater_data.password) | |
2703 | g_free (validater_data.password); | |
2657 | g_free (validater_data.password); | |
2704 | 2658 | |
2705 | 2659 | if (valid == STUN_VALIDATION_NOT_STUN || |
2706 | 2660 | valid == STUN_VALIDATION_INCOMPLETE_STUN || |
86 | 86 | */ |
87 | 87 | void discovery_free (NiceAgent *agent) |
88 | 88 | { |
89 | if (agent->discovery_list) { | |
90 | GSList *tmp = agent->discovery_list; | |
91 | agent->discovery_list = NULL; | |
92 | ||
93 | g_slist_foreach (tmp, discovery_free_item, NULL); | |
94 | g_slist_free (tmp); | |
95 | ||
96 | agent->discovery_unsched_items = 0; | |
97 | } | |
89 | ||
90 | g_slist_foreach (agent->discovery_list, discovery_free_item, NULL); | |
91 | g_slist_free (agent->discovery_list); | |
92 | agent->discovery_list = NULL; | |
93 | agent->discovery_unsched_items = 0; | |
94 | ||
98 | 95 | if (agent->discovery_timer_source != NULL) { |
99 | 96 | g_source_destroy (agent->discovery_timer_source); |
100 | 97 | g_source_unref (agent->discovery_timer_source); |
203 | 200 | */ |
204 | 201 | void refresh_free (NiceAgent *agent) |
205 | 202 | { |
206 | if (agent->refresh_list) { | |
207 | GSList *tmp = agent->refresh_list; | |
208 | agent->refresh_list = NULL; | |
209 | ||
210 | g_slist_foreach (tmp, refresh_free_item, NULL); | |
211 | g_slist_free (tmp); | |
212 | ||
213 | } | |
203 | g_slist_foreach (agent->refresh_list, refresh_free_item, NULL); | |
204 | g_slist_free (agent->refresh_list); | |
205 | agent->refresh_list = NULL; | |
214 | 206 | } |
215 | 207 | |
216 | 208 | /* |
251 | 243 | */ |
252 | 244 | static gboolean priv_add_local_candidate_pruned (Component *component, NiceCandidate *candidate) |
253 | 245 | { |
254 | GSList *modified_list, *i; | |
246 | GSList *i; | |
255 | 247 | |
256 | 248 | for (i = component->local_candidates; i ; i = i->next) { |
257 | 249 | NiceCandidate *c = i->data; |
258 | ||
250 | ||
259 | 251 | if (nice_address_equal (&c->base_addr, &candidate->base_addr) && |
260 | 252 | nice_address_equal (&c->addr, &candidate->addr)) { |
261 | 253 | nice_debug ("Candidate %p (component-id %u) redundant, ignoring.", candidate, component->id); |
263 | 255 | } |
264 | 256 | } |
265 | 257 | |
266 | modified_list = g_slist_append (component->local_candidates, | |
267 | candidate); | |
268 | if (modified_list) { | |
269 | component->local_candidates = modified_list; | |
270 | } | |
258 | component->local_candidates = g_slist_append (component->local_candidates, | |
259 | candidate); | |
271 | 260 | |
272 | 261 | return TRUE; |
273 | 262 | } |
417 | 406 | guchar username[32]; |
418 | 407 | guchar password[16]; |
419 | 408 | |
420 | if (candidate->username) | |
421 | g_free (candidate->username); | |
422 | if (candidate->password) | |
423 | g_free (candidate->password); | |
409 | g_free (candidate->username); | |
410 | g_free (candidate->password); | |
424 | 411 | |
425 | 412 | nice_rng_generate_bytes (agent->rng, 32, (gchar *)username); |
426 | 413 | nice_rng_generate_bytes (agent->rng, 16, (gchar *)password); |
431 | 418 | } else if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE) { |
432 | 419 | gchar username[16]; |
433 | 420 | |
434 | if (candidate->username) | |
435 | g_free (candidate->username); | |
436 | if (candidate->password) | |
437 | g_free (candidate->password); | |
421 | g_free (candidate->username); | |
422 | g_free (candidate->password); | |
438 | 423 | candidate->password = NULL; |
439 | 424 | |
440 | 425 | nice_rng_generate_bytes_print (agent->rng, 16, (gchar *)username); |
461 | 446 | Component *component; |
462 | 447 | Stream *stream; |
463 | 448 | NiceSocket *udp_socket = NULL; |
464 | gboolean errors = FALSE; | |
465 | 449 | |
466 | 450 | if (!agent_find_component (agent, stream_id, component_id, &stream, &component)) |
467 | 451 | return NULL; |
468 | 452 | |
469 | 453 | candidate = nice_candidate_new (NICE_CANDIDATE_TYPE_HOST); |
470 | if (candidate) { | |
471 | candidate->stream_id = stream_id; | |
472 | candidate->component_id = component_id; | |
473 | candidate->addr = *address; | |
474 | candidate->base_addr = *address; | |
475 | if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE) { | |
476 | candidate->priority = nice_candidate_jingle_priority (candidate); | |
477 | } else if (agent->compatibility == NICE_COMPATIBILITY_MSN) { | |
478 | candidate->priority = nice_candidate_msn_priority (candidate); | |
479 | } else { | |
480 | candidate->priority = nice_candidate_ice_priority (candidate); | |
481 | } | |
482 | ||
483 | priv_generate_candidate_credentials (agent, candidate); | |
484 | priv_assign_foundation (agent, candidate); | |
485 | ||
486 | /* note: candidate username and password are left NULL as stream | |
487 | level ufrag/password are used */ | |
488 | udp_socket = nice_udp_bsd_socket_new (address); | |
489 | if (udp_socket) { | |
490 | gboolean result; | |
491 | ||
492 | _priv_set_socket_tos (agent, udp_socket, stream->tos); | |
493 | agent_attach_stream_component_socket (agent, stream, | |
494 | component, udp_socket); | |
495 | ||
496 | candidate->sockptr = udp_socket; | |
497 | candidate->addr = udp_socket->addr; | |
498 | candidate->base_addr = udp_socket->addr; | |
499 | ||
500 | result = priv_add_local_candidate_pruned (component, candidate); | |
501 | ||
502 | if (result == TRUE) { | |
503 | GSList *modified_list = g_slist_append (component->sockets, udp_socket); | |
504 | if (modified_list) { | |
505 | /* success: store a pointer to the sockaddr */ | |
506 | component->sockets = modified_list; | |
507 | agent_signal_new_candidate (agent, candidate); | |
508 | } else { /* error: list memory allocation */ | |
509 | candidate = NULL; /* note: candidate already owned by component */ | |
510 | } | |
511 | } else { | |
512 | /* error: memory allocation, or duplicate candidates */ | |
513 | errors = TRUE; | |
514 | } | |
515 | } else { | |
516 | /* error: socket new */ | |
517 | errors = TRUE; | |
518 | } | |
519 | } | |
520 | ||
521 | /* clean up after errors */ | |
522 | if (errors) { | |
523 | if (candidate) | |
524 | nice_candidate_free (candidate), candidate = NULL; | |
525 | if (udp_socket) | |
526 | nice_socket_free (udp_socket); | |
527 | } | |
454 | candidate->stream_id = stream_id; | |
455 | candidate->component_id = component_id; | |
456 | candidate->addr = *address; | |
457 | candidate->base_addr = *address; | |
458 | if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE) { | |
459 | candidate->priority = nice_candidate_jingle_priority (candidate); | |
460 | } else if (agent->compatibility == NICE_COMPATIBILITY_MSN) { | |
461 | candidate->priority = nice_candidate_msn_priority (candidate); | |
462 | } else { | |
463 | candidate->priority = nice_candidate_ice_priority (candidate); | |
464 | } | |
465 | ||
466 | priv_generate_candidate_credentials (agent, candidate); | |
467 | priv_assign_foundation (agent, candidate); | |
468 | ||
469 | /* note: candidate username and password are left NULL as stream | |
470 | level ufrag/password are used */ | |
471 | udp_socket = nice_udp_bsd_socket_new (address); | |
472 | if (!udp_socket) | |
473 | goto errors; | |
474 | ||
475 | ||
476 | _priv_set_socket_tos (agent, udp_socket, stream->tos); | |
477 | agent_attach_stream_component_socket (agent, stream, | |
478 | component, udp_socket); | |
479 | ||
480 | candidate->sockptr = udp_socket; | |
481 | candidate->addr = udp_socket->addr; | |
482 | candidate->base_addr = udp_socket->addr; | |
483 | ||
484 | if (!priv_add_local_candidate_pruned (component, candidate)) | |
485 | goto errors; | |
486 | ||
487 | component->sockets = g_slist_append (component->sockets, udp_socket); | |
488 | agent_signal_new_candidate (agent, candidate); | |
528 | 489 | |
529 | 490 | return candidate; |
491 | ||
492 | errors: | |
493 | nice_candidate_free (candidate); | |
494 | if (udp_socket) | |
495 | nice_socket_free (udp_socket); | |
496 | return NULL; | |
530 | 497 | } |
531 | 498 | |
532 | 499 | /* |
552 | 519 | return NULL; |
553 | 520 | |
554 | 521 | candidate = nice_candidate_new (NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE); |
555 | if (candidate) { | |
556 | if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE) { | |
557 | candidate->priority = nice_candidate_jingle_priority (candidate); | |
558 | } else if (agent->compatibility == NICE_COMPATIBILITY_MSN) { | |
559 | candidate->priority = nice_candidate_msn_priority (candidate); | |
560 | } else { | |
561 | candidate->priority = nice_candidate_ice_priority_full | |
522 | ||
523 | if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE) { | |
524 | candidate->priority = nice_candidate_jingle_priority (candidate); | |
525 | } else if (agent->compatibility == NICE_COMPATIBILITY_MSN) { | |
526 | candidate->priority = nice_candidate_msn_priority (candidate); | |
527 | } else { | |
528 | candidate->priority = nice_candidate_ice_priority_full | |
562 | 529 | (NICE_CANDIDATE_TYPE_PREF_SERVER_REFLEXIVE, 0, component_id); |
563 | } | |
564 | candidate->stream_id = stream_id; | |
565 | candidate->component_id = component_id; | |
566 | candidate->addr = *address; | |
567 | ||
568 | /* step: link to the base candidate+socket */ | |
569 | candidate->sockptr = base_socket; | |
570 | candidate->base_addr = base_socket->addr; | |
571 | ||
572 | priv_generate_candidate_credentials (agent, candidate); | |
573 | priv_assign_foundation (agent, candidate); | |
574 | ||
575 | result = priv_add_local_candidate_pruned (component, candidate); | |
576 | if (result) { | |
577 | agent_signal_new_candidate (agent, candidate); | |
578 | } | |
579 | else { | |
580 | /* error: memory allocation, or duplicate candidatet */ | |
581 | nice_candidate_free (candidate), candidate = NULL; | |
582 | } | |
530 | } | |
531 | candidate->stream_id = stream_id; | |
532 | candidate->component_id = component_id; | |
533 | candidate->addr = *address; | |
534 | ||
535 | /* step: link to the base candidate+socket */ | |
536 | candidate->sockptr = base_socket; | |
537 | candidate->base_addr = base_socket->addr; | |
538 | ||
539 | priv_generate_candidate_credentials (agent, candidate); | |
540 | priv_assign_foundation (agent, candidate); | |
541 | ||
542 | result = priv_add_local_candidate_pruned (component, candidate); | |
543 | if (result) { | |
544 | agent_signal_new_candidate (agent, candidate); | |
545 | } | |
546 | else { | |
547 | /* error: duplicate candidate */ | |
548 | nice_candidate_free (candidate), candidate = NULL; | |
583 | 549 | } |
584 | 550 | |
585 | 551 | return candidate; |
604 | 570 | NiceCandidate *candidate; |
605 | 571 | Component *component; |
606 | 572 | Stream *stream; |
607 | gboolean result = FALSE; | |
608 | gboolean errors = FALSE; | |
609 | 573 | NiceSocket *relay_socket = NULL; |
610 | 574 | |
611 | 575 | if (!agent_find_component (agent, stream_id, component_id, &stream, &component)) |
612 | 576 | return NULL; |
613 | 577 | |
614 | 578 | candidate = nice_candidate_new (NICE_CANDIDATE_TYPE_RELAYED); |
615 | if (candidate) { | |
616 | if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE) { | |
617 | candidate->priority = nice_candidate_jingle_priority (candidate); | |
618 | } else if (agent->compatibility == NICE_COMPATIBILITY_MSN) { | |
619 | candidate->priority = nice_candidate_msn_priority (candidate); | |
620 | } else { | |
621 | candidate->priority = nice_candidate_ice_priority_full | |
622 | (NICE_CANDIDATE_TYPE_PREF_RELAYED, 0, component_id); | |
623 | } | |
624 | candidate->stream_id = stream_id; | |
625 | candidate->component_id = component_id; | |
626 | candidate->addr = *address; | |
627 | candidate->turn = turn; | |
628 | ||
629 | /* step: link to the base candidate+socket */ | |
630 | relay_socket = nice_turn_socket_new (agent, address, | |
631 | base_socket, &turn->server, | |
632 | turn->username, turn->password, | |
633 | agent_to_turn_socket_compatibility (agent)); | |
634 | if (relay_socket) { | |
635 | candidate->sockptr = relay_socket; | |
636 | candidate->base_addr = base_socket->addr; | |
637 | ||
638 | priv_generate_candidate_credentials (agent, candidate); | |
639 | ||
640 | /* Google uses the turn username as the candidate username */ | |
641 | if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE) { | |
642 | g_free (candidate->username); | |
643 | candidate->username = g_strdup (turn->username); | |
644 | } | |
645 | ||
646 | priv_assign_foundation (agent, candidate); | |
647 | ||
648 | result = priv_add_local_candidate_pruned (component, candidate); | |
649 | if (result) { | |
650 | GSList *modified_list = g_slist_append (component->sockets, relay_socket); | |
651 | if (modified_list) { | |
652 | /* success: store a pointer to the sockaddr */ | |
653 | component->sockets = modified_list; | |
654 | } | |
655 | agent_signal_new_candidate (agent, candidate); | |
656 | } else { | |
657 | /* error: memory allocation, or duplicate candidate */ | |
658 | errors = TRUE; | |
659 | } | |
660 | } else { | |
661 | /* error: socket factory make */ | |
662 | errors = TRUE; | |
663 | } | |
579 | ||
580 | if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE) { | |
581 | candidate->priority = nice_candidate_jingle_priority (candidate); | |
582 | } else if (agent->compatibility == NICE_COMPATIBILITY_MSN) { | |
583 | candidate->priority = nice_candidate_msn_priority (candidate); | |
664 | 584 | } else { |
665 | /* error: udp socket memory allocation */ | |
666 | errors = TRUE; | |
667 | } | |
668 | ||
669 | /* clean up after errors */ | |
670 | if (errors) { | |
671 | if (candidate) | |
672 | nice_candidate_free (candidate), candidate = NULL; | |
673 | if (relay_socket) | |
674 | nice_socket_free (relay_socket); | |
675 | } | |
585 | candidate->priority = nice_candidate_ice_priority_full | |
586 | (NICE_CANDIDATE_TYPE_PREF_RELAYED, 0, component_id); | |
587 | } | |
588 | candidate->stream_id = stream_id; | |
589 | candidate->component_id = component_id; | |
590 | candidate->addr = *address; | |
591 | candidate->turn = turn; | |
592 | ||
593 | /* step: link to the base candidate+socket */ | |
594 | relay_socket = nice_turn_socket_new (agent, address, | |
595 | base_socket, &turn->server, | |
596 | turn->username, turn->password, | |
597 | agent_to_turn_socket_compatibility (agent)); | |
598 | if (!relay_socket) | |
599 | goto errors; | |
600 | ||
601 | candidate->sockptr = relay_socket; | |
602 | candidate->base_addr = base_socket->addr; | |
603 | ||
604 | priv_generate_candidate_credentials (agent, candidate); | |
605 | ||
606 | /* Google uses the turn username as the candidate username */ | |
607 | if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE) { | |
608 | g_free (candidate->username); | |
609 | candidate->username = g_strdup (turn->username); | |
610 | } | |
611 | ||
612 | priv_assign_foundation (agent, candidate); | |
613 | ||
614 | if (!priv_add_local_candidate_pruned (component, candidate)) | |
615 | goto errors; | |
616 | ||
617 | component->sockets = g_slist_append (component->sockets, relay_socket); | |
618 | agent_signal_new_candidate (agent, candidate); | |
619 | ||
676 | 620 | return candidate; |
621 | ||
622 | errors: | |
623 | nice_candidate_free (candidate); | |
624 | if (relay_socket) | |
625 | nice_socket_free (relay_socket); | |
626 | return NULL; | |
677 | 627 | } |
678 | 628 | |
679 | 629 | /* |
682 | 632 | * |
683 | 633 | * @return pointer to the created candidate, or NULL on error |
684 | 634 | */ |
685 | NiceCandidate* | |
635 | NiceCandidate* | |
686 | 636 | discovery_add_peer_reflexive_candidate ( |
687 | 637 | NiceAgent *agent, |
688 | 638 | guint stream_id, |
695 | 645 | NiceCandidate *candidate; |
696 | 646 | Component *component; |
697 | 647 | Stream *stream; |
648 | gboolean result; | |
698 | 649 | |
699 | 650 | if (!agent_find_component (agent, stream_id, component_id, &stream, &component)) |
700 | 651 | return NULL; |
701 | 652 | |
702 | 653 | candidate = nice_candidate_new (NICE_CANDIDATE_TYPE_PEER_REFLEXIVE); |
703 | if (candidate) { | |
704 | gboolean result; | |
705 | ||
706 | candidate->transport = NICE_CANDIDATE_TRANSPORT_UDP; | |
707 | if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE) { | |
708 | candidate->priority = nice_candidate_jingle_priority (candidate); | |
709 | } else if (agent->compatibility == NICE_COMPATIBILITY_MSN) { | |
710 | candidate->priority = nice_candidate_msn_priority (candidate); | |
711 | } else { | |
712 | candidate->priority = nice_candidate_ice_priority_full | |
654 | ||
655 | candidate->transport = NICE_CANDIDATE_TRANSPORT_UDP; | |
656 | if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE) { | |
657 | candidate->priority = nice_candidate_jingle_priority (candidate); | |
658 | } else if (agent->compatibility == NICE_COMPATIBILITY_MSN) { | |
659 | candidate->priority = nice_candidate_msn_priority (candidate); | |
660 | } else { | |
661 | candidate->priority = nice_candidate_ice_priority_full | |
713 | 662 | (NICE_CANDIDATE_TYPE_PREF_PEER_REFLEXIVE, 0, component_id); |
714 | } | |
715 | candidate->stream_id = stream_id; | |
716 | candidate->component_id = component_id; | |
717 | candidate->addr = *address; | |
718 | candidate->base_addr = base_socket->addr; | |
719 | ||
720 | ||
721 | priv_assign_foundation (agent, candidate); | |
722 | ||
723 | if (agent->compatibility == NICE_COMPATIBILITY_MSN && | |
724 | remote && local) { | |
725 | guchar *new_username = NULL; | |
726 | guchar *decoded_local = NULL; | |
727 | guchar *decoded_remote = NULL; | |
728 | gsize local_size; | |
729 | gsize remote_size; | |
730 | g_free(candidate->username); | |
731 | g_free(candidate->password); | |
732 | ||
733 | decoded_local = g_base64_decode (local->username, &local_size); | |
734 | decoded_remote = g_base64_decode (remote->username, &remote_size); | |
735 | ||
736 | new_username = g_new0(guchar, local_size + remote_size); | |
737 | memcpy(new_username, decoded_local, local_size); | |
738 | memcpy(new_username + local_size, decoded_remote, remote_size); | |
739 | ||
740 | candidate->username = g_base64_encode (new_username, local_size + remote_size); | |
741 | g_free(new_username); | |
742 | g_free(decoded_local); | |
743 | g_free(decoded_remote); | |
744 | ||
745 | candidate->password = g_strdup(local->password); | |
746 | } else if (local) { | |
747 | g_free(candidate->username); | |
748 | g_free(candidate->password); | |
749 | ||
750 | candidate->username = g_strdup(local->username); | |
751 | candidate->password = g_strdup(local->password); | |
752 | } | |
753 | ||
754 | /* step: link to the base candidate+socket */ | |
755 | candidate->sockptr = base_socket; | |
756 | candidate->base_addr = base_socket->addr; | |
757 | ||
758 | result = priv_add_local_candidate_pruned (component, candidate); | |
759 | if (result != TRUE) { | |
760 | /* error: memory allocation, or duplicate candidatet */ | |
761 | nice_candidate_free (candidate), candidate = NULL; | |
762 | } | |
663 | } | |
664 | candidate->stream_id = stream_id; | |
665 | candidate->component_id = component_id; | |
666 | candidate->addr = *address; | |
667 | candidate->base_addr = base_socket->addr; | |
668 | ||
669 | ||
670 | priv_assign_foundation (agent, candidate); | |
671 | ||
672 | if (agent->compatibility == NICE_COMPATIBILITY_MSN && | |
673 | remote && local) { | |
674 | guchar *new_username = NULL; | |
675 | guchar *decoded_local = NULL; | |
676 | guchar *decoded_remote = NULL; | |
677 | gsize local_size; | |
678 | gsize remote_size; | |
679 | g_free(candidate->username); | |
680 | g_free(candidate->password); | |
681 | ||
682 | decoded_local = g_base64_decode (local->username, &local_size); | |
683 | decoded_remote = g_base64_decode (remote->username, &remote_size); | |
684 | ||
685 | new_username = g_new0(guchar, local_size + remote_size); | |
686 | memcpy(new_username, decoded_local, local_size); | |
687 | memcpy(new_username + local_size, decoded_remote, remote_size); | |
688 | ||
689 | candidate->username = g_base64_encode (new_username, local_size + remote_size); | |
690 | g_free(new_username); | |
691 | g_free(decoded_local); | |
692 | g_free(decoded_remote); | |
693 | ||
694 | candidate->password = g_strdup(local->password); | |
695 | } else if (local) { | |
696 | g_free(candidate->username); | |
697 | g_free(candidate->password); | |
698 | ||
699 | candidate->username = g_strdup(local->username); | |
700 | candidate->password = g_strdup(local->password); | |
701 | } | |
702 | ||
703 | /* step: link to the base candidate+socket */ | |
704 | candidate->sockptr = base_socket; | |
705 | candidate->base_addr = base_socket->addr; | |
706 | ||
707 | result = priv_add_local_candidate_pruned (component, candidate); | |
708 | if (result != TRUE) { | |
709 | /* error: memory allocation, or duplicate candidatet */ | |
710 | nice_candidate_free (candidate), candidate = NULL; | |
763 | 711 | } |
764 | 712 | |
765 | 713 | return candidate; |
791 | 739 | (void)udp_socket; |
792 | 740 | |
793 | 741 | candidate = nice_candidate_new (NICE_CANDIDATE_TYPE_PEER_REFLEXIVE); |
794 | if (candidate) { | |
795 | GSList *modified_list; | |
796 | ||
797 | candidate->transport = NICE_CANDIDATE_TRANSPORT_UDP; | |
798 | candidate->addr = *remote_address; | |
799 | candidate->base_addr = *remote_address; | |
800 | ||
801 | /* if the check didn't contain the PRIORITY attribute, then the priority will | |
802 | * be 0, which is invalid... */ | |
803 | if (priority != 0) { | |
804 | candidate->priority = priority; | |
805 | } else if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE) { | |
806 | candidate->priority = nice_candidate_jingle_priority (candidate); | |
807 | } else if (agent->compatibility == NICE_COMPATIBILITY_MSN) { | |
808 | candidate->priority = nice_candidate_msn_priority (candidate); | |
809 | } else { | |
810 | candidate->priority = nice_candidate_ice_priority_full | |
742 | ||
743 | candidate->transport = NICE_CANDIDATE_TRANSPORT_UDP; | |
744 | candidate->addr = *remote_address; | |
745 | candidate->base_addr = *remote_address; | |
746 | ||
747 | /* if the check didn't contain the PRIORITY attribute, then the priority will | |
748 | * be 0, which is invalid... */ | |
749 | if (priority != 0) { | |
750 | candidate->priority = priority; | |
751 | } else if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE) { | |
752 | candidate->priority = nice_candidate_jingle_priority (candidate); | |
753 | } else if (agent->compatibility == NICE_COMPATIBILITY_MSN) { | |
754 | candidate->priority = nice_candidate_msn_priority (candidate); | |
755 | } else { | |
756 | candidate->priority = nice_candidate_ice_priority_full | |
811 | 757 | (NICE_CANDIDATE_TYPE_PREF_PEER_REFLEXIVE, 0, component->id); |
812 | } | |
813 | candidate->stream_id = stream->id; | |
814 | candidate->component_id = component->id; | |
815 | ||
816 | ||
817 | priv_assign_remote_foundation (agent, candidate); | |
818 | ||
819 | if (agent->compatibility == NICE_COMPATIBILITY_MSN && | |
820 | remote && local) { | |
821 | guchar *new_username = NULL; | |
822 | guchar *decoded_local = NULL; | |
823 | guchar *decoded_remote = NULL; | |
824 | gsize local_size; | |
825 | gsize remote_size; | |
826 | g_free(candidate->username); | |
827 | g_free (candidate->password); | |
828 | ||
829 | decoded_local = g_base64_decode (local->username, &local_size); | |
830 | decoded_remote = g_base64_decode (remote->username, &remote_size); | |
831 | ||
832 | new_username = g_new0(guchar, local_size + remote_size); | |
833 | memcpy(new_username, decoded_remote, remote_size); | |
834 | memcpy(new_username + remote_size, decoded_local, local_size); | |
835 | ||
836 | candidate->username = g_base64_encode (new_username, local_size + remote_size); | |
837 | g_free(new_username); | |
838 | g_free(decoded_local); | |
839 | g_free(decoded_remote); | |
840 | ||
841 | candidate->password = g_strdup(remote->password); | |
842 | } else if (remote) { | |
843 | g_free (candidate->username); | |
844 | g_free (candidate->password); | |
845 | candidate->username = g_strdup(remote->username); | |
846 | candidate->password = g_strdup(remote->password); | |
847 | } | |
848 | ||
849 | ||
850 | candidate->sockptr = NULL; /* not stored for remote candidates */ | |
851 | /* note: candidate username and password are left NULL as stream | |
852 | level ufrag/password are used */ | |
853 | ||
854 | modified_list = g_slist_append (component->remote_candidates, | |
855 | candidate); | |
856 | if (modified_list) { | |
857 | component->remote_candidates = modified_list; | |
858 | agent_signal_new_remote_candidate (agent, candidate); | |
859 | } | |
860 | else { /* error: memory alloc / list */ | |
861 | nice_candidate_free (candidate), candidate = NULL; | |
862 | } | |
863 | } | |
758 | } | |
759 | candidate->stream_id = stream->id; | |
760 | candidate->component_id = component->id; | |
761 | ||
762 | ||
763 | priv_assign_remote_foundation (agent, candidate); | |
764 | ||
765 | if (agent->compatibility == NICE_COMPATIBILITY_MSN && | |
766 | remote && local) { | |
767 | guchar *new_username = NULL; | |
768 | guchar *decoded_local = NULL; | |
769 | guchar *decoded_remote = NULL; | |
770 | gsize local_size; | |
771 | gsize remote_size; | |
772 | g_free(candidate->username); | |
773 | g_free (candidate->password); | |
774 | ||
775 | decoded_local = g_base64_decode (local->username, &local_size); | |
776 | decoded_remote = g_base64_decode (remote->username, &remote_size); | |
777 | ||
778 | new_username = g_new0(guchar, local_size + remote_size); | |
779 | memcpy(new_username, decoded_remote, remote_size); | |
780 | memcpy(new_username + remote_size, decoded_local, local_size); | |
781 | ||
782 | candidate->username = g_base64_encode (new_username, local_size + remote_size); | |
783 | g_free(new_username); | |
784 | g_free(decoded_local); | |
785 | g_free(decoded_remote); | |
786 | ||
787 | candidate->password = g_strdup(remote->password); | |
788 | } else if (remote) { | |
789 | g_free (candidate->username); | |
790 | g_free (candidate->password); | |
791 | candidate->username = g_strdup(remote->username); | |
792 | candidate->password = g_strdup(remote->password); | |
793 | } | |
794 | ||
795 | candidate->sockptr = NULL; /* not stored for remote candidates */ | |
796 | /* note: candidate username and password are left NULL as stream | |
797 | level ufrag/password are used */ | |
798 | ||
799 | component->remote_candidates = g_slist_append (component->remote_candidates, | |
800 | candidate); | |
801 | ||
802 | agent_signal_new_remote_candidate (agent, candidate); | |
864 | 803 | |
865 | 804 | return candidate; |
866 | 805 | } |
67 | 67 | if ((ifa->ifa_flags & IFF_UP) == 0) |
68 | 68 | continue; |
69 | 69 | |
70 | if (ifa->ifa_addr == NULL || ifa->ifa_addr->sa_family != AF_INET) | |
70 | if (ifa->ifa_addr == NULL) | |
71 | 71 | continue; |
72 | 72 | |
73 | nice_debug ("Found interface : %s", ifa->ifa_name); | |
74 | interfaces = g_list_prepend (interfaces, g_strdup (ifa->ifa_name)); | |
73 | if (ifa->ifa_addr->sa_family == AF_INET || ifa->ifa_addr->sa_family == AF_INET6) { | |
74 | nice_debug ("Found interface : %s", ifa->ifa_name); | |
75 | interfaces = g_list_prepend (interfaces, g_strdup (ifa->ifa_name)); | |
76 | } | |
75 | 77 | } |
76 | 78 | |
77 | 79 | freeifaddrs (results); |
136 | 138 | |
137 | 139 | |
138 | 140 | static gboolean |
139 | nice_interfaces_is_private_ip (const struct in_addr in) | |
140 | { | |
141 | /* 10.x.x.x/8 */ | |
142 | if (in.s_addr >> 24 == 0x0A) | |
143 | return TRUE; | |
144 | ||
145 | /* 172.16.0.0 - 172.31.255.255 = 172.16.0.0/10 */ | |
146 | if (in.s_addr >> 20 == 0xAC1) | |
147 | return TRUE; | |
148 | ||
149 | /* 192.168.x.x/16 */ | |
150 | if (in.s_addr >> 16 == 0xC0A8) | |
151 | return TRUE; | |
152 | ||
153 | /* 169.254.x.x/16 (for APIPA) */ | |
154 | if (in.s_addr >> 16 == 0xA9FE) | |
155 | return TRUE; | |
156 | ||
141 | nice_interfaces_is_private_ip (const struct sockaddr *sa) | |
142 | { | |
143 | if (sa->sa_family == AF_INET) { | |
144 | struct sockaddr_in *sa4 = (struct sockaddr_in *) sa; | |
145 | ||
146 | /* 10.x.x.x/8 */ | |
147 | if (sa4->sin_addr.s_addr >> 24 == 0x0A) | |
148 | return TRUE; | |
149 | ||
150 | /* 172.16.0.0 - 172.31.255.255 = 172.16.0.0/10 */ | |
151 | if (sa4->sin_addr.s_addr >> 20 == 0xAC1) | |
152 | return TRUE; | |
153 | ||
154 | /* 192.168.x.x/16 */ | |
155 | if (sa4->sin_addr.s_addr >> 16 == 0xC0A8) | |
156 | return TRUE; | |
157 | ||
158 | /* 169.254.x.x/16 (for APIPA) */ | |
159 | if (sa4->sin_addr.s_addr >> 16 == 0xA9FE) | |
160 | return TRUE; | |
161 | } | |
162 | ||
157 | 163 | return FALSE; |
158 | 164 | } |
159 | 165 | |
163 | 169 | nice_interfaces_get_local_ips (gboolean include_loopback) |
164 | 170 | { |
165 | 171 | GList *ips = NULL; |
166 | struct sockaddr_in *sa; | |
167 | 172 | struct ifaddrs *ifa, *results; |
168 | gchar *loopback = NULL; | |
173 | GList *loopbacks = NULL; | |
169 | 174 | |
170 | 175 | |
171 | 176 | if (getifaddrs (&results) < 0) |
173 | 178 | |
174 | 179 | /* Loop through the interface list and get the IP address of each IF */ |
175 | 180 | for (ifa = results; ifa; ifa = ifa->ifa_next) { |
181 | char addr_as_string[INET6_ADDRSTRLEN+1]; | |
182 | int ret; | |
183 | ||
176 | 184 | /* no ip address from interface that is down */ |
177 | 185 | if ((ifa->ifa_flags & IFF_UP) == 0) |
178 | 186 | continue; |
179 | 187 | |
180 | if (ifa->ifa_addr == NULL || ifa->ifa_addr->sa_family != AF_INET) | |
188 | if (ifa->ifa_addr == NULL) { | |
181 | 189 | continue; |
182 | ||
183 | sa = (struct sockaddr_in *) ifa->ifa_addr; | |
190 | } else if (ifa->ifa_addr->sa_family == AF_INET) { | |
191 | struct sockaddr_in *sa4 = (struct sockaddr_in *) ifa->ifa_addr; | |
192 | ||
193 | if (inet_ntop (AF_INET, &sa4->sin_addr, addr_as_string, | |
194 | INET6_ADDRSTRLEN) == NULL) | |
195 | continue; | |
196 | } else if (ifa->ifa_addr->sa_family == AF_INET6) { | |
197 | struct sockaddr_in6 *sa6 = (struct sockaddr_in6 *)ifa->ifa_addr; | |
198 | ||
199 | /* Skip link-local addresses, they require a scope */ | |
200 | if (IN6_IS_ADDR_LINKLOCAL (sa6->sin6_addr.s6_addr)) | |
201 | continue; | |
202 | ||
203 | if (inet_ntop (AF_INET6, &sa6->sin6_addr, addr_as_string, | |
204 | INET6_ADDRSTRLEN) == NULL) | |
205 | continue; | |
206 | } else | |
207 | continue; | |
208 | ||
184 | 209 | |
185 | 210 | nice_debug ("Interface: %s", ifa->ifa_name); |
186 | nice_debug ("IP Address: %s", inet_ntoa (sa->sin_addr)); | |
211 | nice_debug ("IP Address: %s", addr_as_string); | |
187 | 212 | if ((ifa->ifa_flags & IFF_LOOPBACK) == IFF_LOOPBACK) { |
188 | 213 | if (include_loopback) |
189 | loopback = g_strdup (inet_ntoa (sa->sin_addr)); | |
214 | loopbacks = g_list_append (loopbacks, g_strdup (addr_as_string)); | |
190 | 215 | else |
191 | 216 | nice_debug ("Ignoring loopback interface"); |
192 | 217 | } else { |
193 | if (nice_interfaces_is_private_ip (sa->sin_addr)) | |
194 | ips = g_list_append (ips, g_strdup (inet_ntoa (sa->sin_addr))); | |
218 | if (nice_interfaces_is_private_ip (ifa->ifa_addr)) | |
219 | ips = g_list_append (ips, g_strdup (addr_as_string)); | |
195 | 220 | else |
196 | ips = g_list_prepend (ips, g_strdup (inet_ntoa (sa->sin_addr))); | |
221 | ips = g_list_prepend (ips, g_strdup (addr_as_string)); | |
197 | 222 | } |
198 | 223 | } |
199 | 224 | |
200 | 225 | freeifaddrs (results); |
201 | 226 | |
202 | if (loopback) | |
203 | ips = g_list_append (ips, loopback); | |
227 | if (loopbacks) | |
228 | ips = g_list_concat (ips, loopbacks); | |
204 | 229 | |
205 | 230 | return ips; |
206 | 231 | } |
266 | 291 | else |
267 | 292 | nice_debug ("Ignoring loopback interface"); |
268 | 293 | } else { |
269 | if (nice_interfaces_is_private_ip (sa->sin_addr)) { | |
294 | if (nice_interfaces_is_private_ip (sa)) { | |
270 | 295 | ips = g_list_append (ips, g_strdup (inet_ntoa (sa->sin_addr))); |
271 | 296 | } else { |
272 | 297 | ips = g_list_prepend (ips, g_strdup (inet_ntoa (sa->sin_addr))); |
803 | 803 | *((uint32_t *) (buffer + 20)) = htonl(priv->ts_recent); |
804 | 804 | priv->ts_lastack = priv->rcv_nxt; |
805 | 805 | |
806 | memcpy(buffer + HEADER_SIZE, data, len); | |
806 | if (data != NULL) | |
807 | memcpy(buffer + HEADER_SIZE, data, len); | |
807 | 808 | |
808 | 809 | DEBUG (PSEUDO_TCP_DEBUG_VERBOSE, "<-- <CONV=%d><FLG=%d><SEQ=%d:%d><ACK=%d>" |
809 | 810 | "<WND=%d><TS=%d><TSR=%d><LEN=%d>", |
51 | 51 | { |
52 | 52 | Stream *stream; |
53 | 53 | guint n; |
54 | gboolean errors = FALSE; | |
55 | GSList *modified_list; | |
56 | 54 | Component *component; |
57 | 55 | |
58 | 56 | stream = g_slice_new0 (Stream); |
59 | 57 | for (n = 0; n < n_components; n++) { |
60 | 58 | component = component_new (n + 1); |
61 | if (component) { | |
62 | modified_list = g_slist_append (stream->components, component); | |
63 | if (modified_list) | |
64 | stream->components = modified_list; | |
65 | else | |
66 | errors = TRUE; | |
67 | } | |
68 | else | |
69 | errors = TRUE; | |
70 | } | |
71 | ||
72 | if (errors) { | |
73 | stream_free (stream); | |
74 | return NULL; | |
59 | stream->components = g_slist_append (stream->components, component); | |
75 | 60 | } |
76 | 61 | |
77 | 62 | stream->n_components = n_components; |
0 | 0 | #! /bin/sh |
1 | 1 | # Attempt to guess a canonical system name. |
2 | 2 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
3 | # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 | |
3 | # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 | |
4 | 4 | # Free Software Foundation, Inc. |
5 | 5 | |
6 | timestamp='2009-06-10' | |
6 | timestamp='2009-12-30' | |
7 | 7 | |
8 | 8 | # This file is free software; you can redistribute it and/or modify it |
9 | 9 | # under the terms of the GNU General Public License as published by |
26 | 26 | # the same distribution terms that you use for the rest of that program. |
27 | 27 | |
28 | 28 | |
29 | # Originally written by Per Bothner <per@bothner.com>. | |
30 | # Please send patches to <config-patches@gnu.org>. Submit a context | |
31 | # diff and a properly formatted ChangeLog entry. | |
29 | # Originally written by Per Bothner. Please send patches (context | |
30 | # diff format) to <config-patches@gnu.org> and include a ChangeLog | |
31 | # entry. | |
32 | 32 | # |
33 | 33 | # This script attempts to guess a canonical system name similar to |
34 | 34 | # config.sub. If it succeeds, it prints the system name on stdout, and |
35 | 35 | # exits with 0. Otherwise, it exits with 1. |
36 | 36 | # |
37 | # The plan is that this can be called by configure scripts if you | |
38 | # don't specify an explicit build system type. | |
37 | # You can get the latest version of this script from: | |
38 | # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD | |
39 | 39 | |
40 | 40 | me=`echo "$0" | sed -e 's,.*/,,'` |
41 | 41 | |
55 | 55 | GNU config.guess ($timestamp) |
56 | 56 | |
57 | 57 | Originally written by Per Bothner. |
58 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, | |
59 | 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. | |
58 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, | |
59 | 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free | |
60 | Software Foundation, Inc. | |
60 | 61 | |
61 | 62 | This is free software; see the source for copying conditions. There is NO |
62 | 63 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
332 | 333 | sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) |
333 | 334 | echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` |
334 | 335 | exit ;; |
336 | i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) | |
337 | echo i386-pc-auroraux${UNAME_RELEASE} | |
338 | exit ;; | |
335 | 339 | i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) |
336 | 340 | eval $set_cc_for_build |
337 | 341 | SUN_ARCH="i386" |
806 | 810 | i*:PW*:*) |
807 | 811 | echo ${UNAME_MACHINE}-pc-pw32 |
808 | 812 | exit ;; |
809 | *:Interix*:[3456]*) | |
813 | *:Interix*:*) | |
810 | 814 | case ${UNAME_MACHINE} in |
811 | 815 | x86) |
812 | 816 | echo i586-pc-interix${UNAME_RELEASE} |
813 | 817 | exit ;; |
814 | EM64T | authenticamd | genuineintel) | |
818 | authenticamd | genuineintel | EM64T) | |
815 | 819 | echo x86_64-unknown-interix${UNAME_RELEASE} |
816 | 820 | exit ;; |
817 | 821 | IA64) |
853 | 857 | i*86:Minix:*:*) |
854 | 858 | echo ${UNAME_MACHINE}-pc-minix |
855 | 859 | exit ;; |
860 | alpha:Linux:*:*) | |
861 | case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in | |
862 | EV5) UNAME_MACHINE=alphaev5 ;; | |
863 | EV56) UNAME_MACHINE=alphaev56 ;; | |
864 | PCA56) UNAME_MACHINE=alphapca56 ;; | |
865 | PCA57) UNAME_MACHINE=alphapca56 ;; | |
866 | EV6) UNAME_MACHINE=alphaev6 ;; | |
867 | EV67) UNAME_MACHINE=alphaev67 ;; | |
868 | EV68*) UNAME_MACHINE=alphaev68 ;; | |
869 | esac | |
870 | objdump --private-headers /bin/sh | grep -q ld.so.1 | |
871 | if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi | |
872 | echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} | |
873 | exit ;; | |
856 | 874 | arm*:Linux:*:*) |
857 | 875 | eval $set_cc_for_build |
858 | 876 | if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ |
874 | 892 | exit ;; |
875 | 893 | frv:Linux:*:*) |
876 | 894 | echo frv-unknown-linux-gnu |
895 | exit ;; | |
896 | i*86:Linux:*:*) | |
897 | LIBC=gnu | |
898 | eval $set_cc_for_build | |
899 | sed 's/^ //' << EOF >$dummy.c | |
900 | #ifdef __dietlibc__ | |
901 | LIBC=dietlibc | |
902 | #endif | |
903 | EOF | |
904 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` | |
905 | echo "${UNAME_MACHINE}-pc-linux-${LIBC}" | |
877 | 906 | exit ;; |
878 | 907 | ia64:Linux:*:*) |
879 | 908 | echo ${UNAME_MACHINE}-unknown-linux-gnu |
900 | 929 | #endif |
901 | 930 | #endif |
902 | 931 | EOF |
903 | eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' | |
904 | /^CPU/{ | |
905 | s: ::g | |
906 | p | |
907 | }'`" | |
932 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` | |
908 | 933 | test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } |
909 | 934 | ;; |
910 | 935 | or32:Linux:*:*) |
911 | 936 | echo or32-unknown-linux-gnu |
912 | 937 | exit ;; |
913 | ppc:Linux:*:*) | |
914 | echo powerpc-unknown-linux-gnu | |
915 | exit ;; | |
916 | ppc64:Linux:*:*) | |
917 | echo powerpc64-unknown-linux-gnu | |
918 | exit ;; | |
919 | alpha:Linux:*:*) | |
920 | case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in | |
921 | EV5) UNAME_MACHINE=alphaev5 ;; | |
922 | EV56) UNAME_MACHINE=alphaev56 ;; | |
923 | PCA56) UNAME_MACHINE=alphapca56 ;; | |
924 | PCA57) UNAME_MACHINE=alphapca56 ;; | |
925 | EV6) UNAME_MACHINE=alphaev6 ;; | |
926 | EV67) UNAME_MACHINE=alphaev67 ;; | |
927 | EV68*) UNAME_MACHINE=alphaev68 ;; | |
928 | esac | |
929 | objdump --private-headers /bin/sh | grep -q ld.so.1 | |
930 | if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi | |
931 | echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} | |
932 | exit ;; | |
933 | 938 | padre:Linux:*:*) |
934 | 939 | echo sparc-unknown-linux-gnu |
940 | exit ;; | |
941 | parisc64:Linux:*:* | hppa64:Linux:*:*) | |
942 | echo hppa64-unknown-linux-gnu | |
935 | 943 | exit ;; |
936 | 944 | parisc:Linux:*:* | hppa:Linux:*:*) |
937 | 945 | # Look for CPU level |
941 | 949 | *) echo hppa-unknown-linux-gnu ;; |
942 | 950 | esac |
943 | 951 | exit ;; |
944 | parisc64:Linux:*:* | hppa64:Linux:*:*) | |
945 | echo hppa64-unknown-linux-gnu | |
952 | ppc64:Linux:*:*) | |
953 | echo powerpc64-unknown-linux-gnu | |
954 | exit ;; | |
955 | ppc:Linux:*:*) | |
956 | echo powerpc-unknown-linux-gnu | |
946 | 957 | exit ;; |
947 | 958 | s390:Linux:*:* | s390x:Linux:*:*) |
948 | 959 | echo ${UNAME_MACHINE}-ibm-linux |
965 | 976 | xtensa*:Linux:*:*) |
966 | 977 | echo ${UNAME_MACHINE}-unknown-linux-gnu |
967 | 978 | exit ;; |
968 | i*86:Linux:*:*) | |
969 | # The BFD linker knows what the default object file format is, so | |
970 | # first see if it will tell us. cd to the root directory to prevent | |
971 | # problems with other programs or directories called `ld' in the path. | |
972 | # Set LC_ALL=C to ensure ld outputs messages in English. | |
973 | ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | |
974 | | sed -ne '/supported targets:/!d | |
975 | s/[ ][ ]*/ /g | |
976 | s/.*supported targets: *// | |
977 | s/ .*// | |
978 | p'` | |
979 | case "$ld_supported_targets" in | |
980 | elf32-i386) | |
981 | TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" | |
982 | ;; | |
983 | esac | |
984 | # Determine whether the default compiler is a.out or elf | |
985 | eval $set_cc_for_build | |
986 | sed 's/^ //' << EOF >$dummy.c | |
987 | #include <features.h> | |
988 | #ifdef __ELF__ | |
989 | # ifdef __GLIBC__ | |
990 | # if __GLIBC__ >= 2 | |
991 | LIBC=gnu | |
992 | # else | |
993 | LIBC=gnulibc1 | |
994 | # endif | |
995 | # else | |
996 | LIBC=gnulibc1 | |
997 | # endif | |
998 | #else | |
999 | #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) | |
1000 | LIBC=gnu | |
1001 | #else | |
1002 | LIBC=gnuaout | |
1003 | #endif | |
1004 | #endif | |
1005 | #ifdef __dietlibc__ | |
1006 | LIBC=dietlibc | |
1007 | #endif | |
1008 | EOF | |
1009 | eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' | |
1010 | /^LIBC/{ | |
1011 | s: ::g | |
1012 | p | |
1013 | }'`" | |
1014 | test x"${LIBC}" != x && { | |
1015 | echo "${UNAME_MACHINE}-pc-linux-${LIBC}" | |
1016 | exit | |
1017 | } | |
1018 | test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } | |
1019 | ;; | |
1020 | 979 | i*86:DYNIX/ptx:4*:*) |
1021 | 980 | # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. |
1022 | 981 | # earlier versions are messed up and put the nodename in both |
1246 | 1205 | *:Darwin:*:*) |
1247 | 1206 | UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown |
1248 | 1207 | case $UNAME_PROCESSOR in |
1208 | i386) | |
1209 | eval $set_cc_for_build | |
1210 | if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then | |
1211 | if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ | |
1212 | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ | |
1213 | grep IS_64BIT_ARCH >/dev/null | |
1214 | then | |
1215 | UNAME_PROCESSOR="x86_64" | |
1216 | fi | |
1217 | fi ;; | |
1249 | 1218 | unknown) UNAME_PROCESSOR=powerpc ;; |
1250 | 1219 | esac |
1251 | 1220 | echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} |
0 | 0 | #! /bin/sh |
1 | 1 | # Configuration validation subroutine script. |
2 | 2 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
3 | # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 | |
3 | # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 | |
4 | 4 | # Free Software Foundation, Inc. |
5 | 5 | |
6 | timestamp='2009-06-11' | |
6 | timestamp='2010-01-22' | |
7 | 7 | |
8 | 8 | # This file is (in principle) common to ALL GNU software. |
9 | 9 | # The presence of a machine in this file suggests that SOME GNU software |
31 | 31 | |
32 | 32 | |
33 | 33 | # Please send patches to <config-patches@gnu.org>. Submit a context |
34 | # diff and a properly formatted ChangeLog entry. | |
34 | # diff and a properly formatted GNU ChangeLog entry. | |
35 | 35 | # |
36 | 36 | # Configuration subroutine to validate and canonicalize a configuration type. |
37 | 37 | # Supply the specified configuration type as an argument. |
38 | 38 | # If it is invalid, we print an error message on stderr and exit with code 1. |
39 | 39 | # Otherwise, we print the canonical config type on stdout and succeed. |
40 | ||
41 | # You can get the latest version of this script from: | |
42 | # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD | |
40 | 43 | |
41 | 44 | # This file is supposed to be the same for all GNU packages |
42 | 45 | # and recognize all the CPU types, system types and aliases |
71 | 74 | version="\ |
72 | 75 | GNU config.sub ($timestamp) |
73 | 76 | |
74 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, | |
75 | 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. | |
77 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, | |
78 | 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free | |
79 | Software Foundation, Inc. | |
76 | 80 | |
77 | 81 | This is free software; see the source for copying conditions. There is NO |
78 | 82 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." |
148 | 152 | -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ |
149 | 153 | -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ |
150 | 154 | -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ |
151 | -apple | -axis | -knuth | -cray) | |
155 | -apple | -axis | -knuth | -cray | -microblaze) | |
152 | 156 | os= |
153 | 157 | basic_machine=$1 |
154 | 158 | ;; |
283 | 287 | | pdp10 | pdp11 | pj | pjl \ |
284 | 288 | | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ |
285 | 289 | | pyramid \ |
290 | | rx \ | |
286 | 291 | | score \ |
287 | 292 | | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ |
288 | 293 | | sh64 | sh64le \ |
290 | 295 | | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ |
291 | 296 | | spu | strongarm \ |
292 | 297 | | tahoe | thumb | tic4x | tic80 | tron \ |
298 | | ubicom32 \ | |
293 | 299 | | v850 | v850e \ |
294 | 300 | | we32k \ |
295 | 301 | | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ |
296 | 302 | | z8k | z80) |
297 | 303 | basic_machine=$basic_machine-unknown |
298 | 304 | ;; |
299 | m6811 | m68hc11 | m6812 | m68hc12) | |
305 | m6811 | m68hc11 | m6812 | m68hc12 | picochip) | |
300 | 306 | # Motorola 68HC11/12. |
301 | 307 | basic_machine=$basic_machine-unknown |
302 | 308 | os=-none |
339 | 345 | | lm32-* \ |
340 | 346 | | m32c-* | m32r-* | m32rle-* \ |
341 | 347 | | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ |
342 | | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | |
348 | | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | |
343 | 349 | | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ |
344 | 350 | | mips16-* \ |
345 | 351 | | mips64-* | mips64el-* \ |
367 | 373 | | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ |
368 | 374 | | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ |
369 | 375 | | pyramid-* \ |
370 | | romp-* | rs6000-* \ | |
376 | | romp-* | rs6000-* | rx-* \ | |
371 | 377 | | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ |
372 | 378 | | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ |
373 | 379 | | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ |
374 | 380 | | sparclite-* \ |
375 | 381 | | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ |
376 | 382 | | tahoe-* | thumb-* \ |
377 | | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | |
383 | | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | |
384 | | tile-* | tilegx-* \ | |
378 | 385 | | tron-* \ |
386 | | ubicom32-* \ | |
379 | 387 | | v850-* | v850e-* | vax-* \ |
380 | 388 | | we32k-* \ |
381 | 389 | | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ |
724 | 732 | merlin) |
725 | 733 | basic_machine=ns32k-utek |
726 | 734 | os=-sysv |
735 | ;; | |
736 | microblaze) | |
737 | basic_machine=microblaze-xilinx | |
727 | 738 | ;; |
728 | 739 | mingw32) |
729 | 740 | basic_machine=i386-pc |
1075 | 1086 | basic_machine=tic6x-unknown |
1076 | 1087 | os=-coff |
1077 | 1088 | ;; |
1089 | # This must be matched before tile*. | |
1090 | tilegx*) | |
1091 | basic_machine=tilegx-unknown | |
1092 | os=-linux-gnu | |
1093 | ;; | |
1078 | 1094 | tile*) |
1079 | 1095 | basic_machine=tile-unknown |
1080 | 1096 | os=-linux-gnu |
1246 | 1262 | # First match some system type aliases |
1247 | 1263 | # that might get confused with valid system types. |
1248 | 1264 | # -solaris* is a basic system type, with this one exception. |
1265 | -auroraux) | |
1266 | os=-auroraux | |
1267 | ;; | |
1249 | 1268 | -solaris1 | -solaris1.*) |
1250 | 1269 | os=`echo $os | sed -e 's|solaris1|sunos4|'` |
1251 | 1270 | ;; |
1267 | 1286 | # -sysv* is not here because it comes later, after sysvr4. |
1268 | 1287 | -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ |
1269 | 1288 | | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ |
1270 | | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | |
1271 | | -kopensolaris* \ | |
1289 | | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | |
1290 | | -sym* | -kopensolaris* \ | |
1272 | 1291 | | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ |
1273 | 1292 | | -aos* | -aros* \ |
1274 | 1293 | | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ |
1289 | 1308 | | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ |
1290 | 1309 | | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ |
1291 | 1310 | | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ |
1292 | | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) | |
1311 | | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) | |
1293 | 1312 | # Remember, each alternative MUST END IN *, to match a version number. |
1294 | 1313 | ;; |
1295 | 1314 | -qnx*) |
1422 | 1441 | -dicos*) |
1423 | 1442 | os=-dicos |
1424 | 1443 | ;; |
1444 | -nacl*) | |
1445 | ;; | |
1425 | 1446 | -none) |
1426 | 1447 | ;; |
1427 | 1448 | *) |
0 | 0 | #! /bin/sh |
1 | 1 | # Guess values for system-dependent variables and create Makefiles. |
2 | # Generated by GNU Autoconf 2.65 for libnice 0.0.11. | |
2 | # Generated by GNU Autoconf 2.65 for libnice 0.0.13. | |
3 | 3 | # |
4 | 4 | # |
5 | 5 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, |
697 | 697 | # Identity of this package. |
698 | 698 | PACKAGE_NAME='libnice' |
699 | 699 | PACKAGE_TARNAME='libnice' |
700 | PACKAGE_VERSION='0.0.11' | |
701 | PACKAGE_STRING='libnice 0.0.11' | |
700 | PACKAGE_VERSION='0.0.13' | |
701 | PACKAGE_STRING='libnice 0.0.13' | |
702 | 702 | PACKAGE_BUGREPORT='' |
703 | 703 | PACKAGE_URL='' |
704 | 704 | |
768 | 768 | GST_CFLAGS |
769 | 769 | GLIB_LIBS |
770 | 770 | GLIB_CFLAGS |
771 | PKG_CONFIG_LIBDIR | |
772 | PKG_CONFIG_PATH | |
771 | 773 | PKG_CONFIG |
772 | 774 | LIBRT |
773 | 775 | LIBNICE_CFLAGS |
906 | 908 | CPPFLAGS |
907 | 909 | CPP |
908 | 910 | PKG_CONFIG |
911 | PKG_CONFIG_PATH | |
912 | PKG_CONFIG_LIBDIR | |
909 | 913 | GLIB_CFLAGS |
910 | 914 | GLIB_LIBS |
911 | 915 | GST_CFLAGS |
1453 | 1457 | # Omit some internal or obsolete options to make the list less imposing. |
1454 | 1458 | # This message is too long to be a string in the A/UX 3.1 sh. |
1455 | 1459 | cat <<_ACEOF |
1456 | \`configure' configures libnice 0.0.11 to adapt to many kinds of systems. | |
1460 | \`configure' configures libnice 0.0.13 to adapt to many kinds of systems. | |
1457 | 1461 | |
1458 | 1462 | Usage: $0 [OPTION]... [VAR=VALUE]... |
1459 | 1463 | |
1523 | 1527 | |
1524 | 1528 | if test -n "$ac_init_help"; then |
1525 | 1529 | case $ac_init_help in |
1526 | short | recursive ) echo "Configuration of libnice 0.0.11:";; | |
1530 | short | recursive ) echo "Configuration of libnice 0.0.13:";; | |
1527 | 1531 | esac |
1528 | 1532 | cat <<\_ACEOF |
1529 | 1533 | |
1564 | 1568 | you have headers in a nonstandard directory <include dir> |
1565 | 1569 | CPP C preprocessor |
1566 | 1570 | PKG_CONFIG path to pkg-config utility |
1571 | PKG_CONFIG_PATH | |
1572 | directories to add to pkg-config's search path | |
1573 | PKG_CONFIG_LIBDIR | |
1574 | path overriding pkg-config's built-in search path | |
1567 | 1575 | GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config |
1568 | 1576 | GLIB_LIBS linker flags for GLIB, overriding pkg-config |
1569 | 1577 | GST_CFLAGS C compiler flags for GST, overriding pkg-config |
1638 | 1646 | test -n "$ac_init_help" && exit $ac_status |
1639 | 1647 | if $ac_init_version; then |
1640 | 1648 | cat <<\_ACEOF |
1641 | libnice configure 0.0.11 | |
1649 | libnice configure 0.0.13 | |
1642 | 1650 | generated by GNU Autoconf 2.65 |
1643 | 1651 | |
1644 | 1652 | Copyright (C) 2009 Free Software Foundation, Inc. |
2057 | 2065 | This file contains any messages produced by compilers while |
2058 | 2066 | running configure, to aid debugging if configure makes a mistake. |
2059 | 2067 | |
2060 | It was created by libnice $as_me 0.0.11, which was | |
2068 | It was created by libnice $as_me 0.0.13, which was | |
2061 | 2069 | generated by GNU Autoconf 2.65. Invocation command line was |
2062 | 2070 | |
2063 | 2071 | $ $0 $@ |
2870 | 2878 | |
2871 | 2879 | # Define the identity of the package. |
2872 | 2880 | PACKAGE='libnice' |
2873 | VERSION='0.0.11' | |
2881 | VERSION='0.0.13' | |
2874 | 2882 | |
2875 | 2883 | |
2876 | 2884 | cat >>confdefs.h <<_ACEOF |
2920 | 2928 | # Increment CURRENT and AGE. Set REVISION to 0 |
2921 | 2929 | # If there was an incompatible interface change: |
2922 | 2930 | # Increment CURRENT. Set AGE and REVISION to 0 |
2923 | LIBNICE_CURRENT=7 | |
2931 | LIBNICE_CURRENT=9 | |
2924 | 2932 | LIBNICE_REVISION=0 |
2925 | LIBNICE_AGE=7 | |
2933 | LIBNICE_AGE=9 | |
2926 | 2934 | LIBNICE_LIBVERSION=${LIBNICE_CURRENT}:${LIBNICE_REVISION}:${LIBNICE_AGE} |
2927 | 2935 | LIBNICE_LT_LDFLAGS="-version-info ${LIBNICE_LIBVERSION}" |
2928 | 2936 | |
4920 | 4928 | else |
4921 | 4929 | lt_cv_nm_interface="BSD nm" |
4922 | 4930 | echo "int some_variable = 0;" > conftest.$ac_ext |
4923 | (eval echo "\"\$as_me:4924: $ac_compile\"" >&5) | |
4931 | (eval echo "\"\$as_me:4932: $ac_compile\"" >&5) | |
4924 | 4932 | (eval "$ac_compile" 2>conftest.err) |
4925 | 4933 | cat conftest.err >&5 |
4926 | (eval echo "\"\$as_me:4927: $NM \\\"conftest.$ac_objext\\\"\"" >&5) | |
4934 | (eval echo "\"\$as_me:4935: $NM \\\"conftest.$ac_objext\\\"\"" >&5) | |
4927 | 4935 | (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) |
4928 | 4936 | cat conftest.err >&5 |
4929 | (eval echo "\"\$as_me:4930: output\"" >&5) | |
4937 | (eval echo "\"\$as_me:4938: output\"" >&5) | |
4930 | 4938 | cat conftest.out >&5 |
4931 | 4939 | if $GREP 'External.*some_variable' conftest.out > /dev/null; then |
4932 | 4940 | lt_cv_nm_interface="MS dumpbin" |
6131 | 6139 | ;; |
6132 | 6140 | *-*-irix6*) |
6133 | 6141 | # Find out which ABI we are using. |
6134 | echo '#line 6135 "configure"' > conftest.$ac_ext | |
6142 | echo '#line 6143 "configure"' > conftest.$ac_ext | |
6135 | 6143 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 |
6136 | 6144 | (eval $ac_compile) 2>&5 |
6137 | 6145 | ac_status=$? |
7389 | 7397 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
7390 | 7398 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |
7391 | 7399 | -e 's:$: $lt_compiler_flag:'` |
7392 | (eval echo "\"\$as_me:7393: $lt_compile\"" >&5) | |
7400 | (eval echo "\"\$as_me:7401: $lt_compile\"" >&5) | |
7393 | 7401 | (eval "$lt_compile" 2>conftest.err) |
7394 | 7402 | ac_status=$? |
7395 | 7403 | cat conftest.err >&5 |
7396 | echo "$as_me:7397: \$? = $ac_status" >&5 | |
7404 | echo "$as_me:7405: \$? = $ac_status" >&5 | |
7397 | 7405 | if (exit $ac_status) && test -s "$ac_outfile"; then |
7398 | 7406 | # The compiler can only warn and ignore the option if not recognized |
7399 | 7407 | # So say no if there are warnings other than the usual output. |
7728 | 7736 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
7729 | 7737 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |
7730 | 7738 | -e 's:$: $lt_compiler_flag:'` |
7731 | (eval echo "\"\$as_me:7732: $lt_compile\"" >&5) | |
7739 | (eval echo "\"\$as_me:7740: $lt_compile\"" >&5) | |
7732 | 7740 | (eval "$lt_compile" 2>conftest.err) |
7733 | 7741 | ac_status=$? |
7734 | 7742 | cat conftest.err >&5 |
7735 | echo "$as_me:7736: \$? = $ac_status" >&5 | |
7743 | echo "$as_me:7744: \$? = $ac_status" >&5 | |
7736 | 7744 | if (exit $ac_status) && test -s "$ac_outfile"; then |
7737 | 7745 | # The compiler can only warn and ignore the option if not recognized |
7738 | 7746 | # So say no if there are warnings other than the usual output. |
7833 | 7841 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
7834 | 7842 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |
7835 | 7843 | -e 's:$: $lt_compiler_flag:'` |
7836 | (eval echo "\"\$as_me:7837: $lt_compile\"" >&5) | |
7844 | (eval echo "\"\$as_me:7845: $lt_compile\"" >&5) | |
7837 | 7845 | (eval "$lt_compile" 2>out/conftest.err) |
7838 | 7846 | ac_status=$? |
7839 | 7847 | cat out/conftest.err >&5 |
7840 | echo "$as_me:7841: \$? = $ac_status" >&5 | |
7848 | echo "$as_me:7849: \$? = $ac_status" >&5 | |
7841 | 7849 | if (exit $ac_status) && test -s out/conftest2.$ac_objext |
7842 | 7850 | then |
7843 | 7851 | # The compiler can only warn and ignore the option if not recognized |
7888 | 7896 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
7889 | 7897 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |
7890 | 7898 | -e 's:$: $lt_compiler_flag:'` |
7891 | (eval echo "\"\$as_me:7892: $lt_compile\"" >&5) | |
7899 | (eval echo "\"\$as_me:7900: $lt_compile\"" >&5) | |
7892 | 7900 | (eval "$lt_compile" 2>out/conftest.err) |
7893 | 7901 | ac_status=$? |
7894 | 7902 | cat out/conftest.err >&5 |
7895 | echo "$as_me:7896: \$? = $ac_status" >&5 | |
7903 | echo "$as_me:7904: \$? = $ac_status" >&5 | |
7896 | 7904 | if (exit $ac_status) && test -s out/conftest2.$ac_objext |
7897 | 7905 | then |
7898 | 7906 | # The compiler can only warn and ignore the option if not recognized |
10272 | 10280 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
10273 | 10281 | lt_status=$lt_dlunknown |
10274 | 10282 | cat > conftest.$ac_ext <<_LT_EOF |
10275 | #line 10276 "configure" | |
10283 | #line 10284 "configure" | |
10276 | 10284 | #include "confdefs.h" |
10277 | 10285 | |
10278 | 10286 | #if HAVE_DLFCN_H |
10368 | 10376 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
10369 | 10377 | lt_status=$lt_dlunknown |
10370 | 10378 | cat > conftest.$ac_ext <<_LT_EOF |
10371 | #line 10372 "configure" | |
10379 | #line 10380 "configure" | |
10372 | 10380 | #include "confdefs.h" |
10373 | 10381 | |
10374 | 10382 | #if HAVE_DLFCN_H |
10900 | 10908 | |
10901 | 10909 | |
10902 | 10910 | |
10911 | ||
10912 | ||
10913 | ||
10914 | ||
10903 | 10915 | if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then |
10904 | 10916 | if test -n "$ac_tool_prefix"; then |
10905 | 10917 | # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. |
11012 | 11024 | $as_echo "no" >&6; } |
11013 | 11025 | PKG_CONFIG="" |
11014 | 11026 | fi |
11015 | ||
11016 | 11027 | fi |
11017 | 11028 | |
11018 | 11029 | pkg_failed=no |
11019 | 11030 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5 |
11020 | 11031 | $as_echo_n "checking for GLIB... " >&6; } |
11021 | 11032 | |
11022 | if test -n "$PKG_CONFIG"; then | |
11023 | if test -n "$GLIB_CFLAGS"; then | |
11024 | pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" | |
11025 | else | |
11026 | if test -n "$PKG_CONFIG" && \ | |
11033 | if test -n "$GLIB_CFLAGS"; then | |
11034 | pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" | |
11035 | elif test -n "$PKG_CONFIG"; then | |
11036 | if test -n "$PKG_CONFIG" && \ | |
11027 | 11037 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" glib-2.0 >= 2.10 gobject-2.0 >= 2.10 gthread-2.0 >= 2.10 \""; } >&5 |
11028 | 11038 | ($PKG_CONFIG --exists --print-errors " glib-2.0 >= 2.10 gobject-2.0 >= 2.10 gthread-2.0 >= 2.10 ") 2>&5 |
11029 | 11039 | ac_status=$? |
11033 | 11043 | else |
11034 | 11044 | pkg_failed=yes |
11035 | 11045 | fi |
11036 | fi | |
11037 | else | |
11038 | pkg_failed=untried | |
11039 | fi | |
11040 | if test -n "$PKG_CONFIG"; then | |
11041 | if test -n "$GLIB_LIBS"; then | |
11042 | pkg_cv_GLIB_LIBS="$GLIB_LIBS" | |
11043 | else | |
11044 | if test -n "$PKG_CONFIG" && \ | |
11046 | else | |
11047 | pkg_failed=untried | |
11048 | fi | |
11049 | if test -n "$GLIB_LIBS"; then | |
11050 | pkg_cv_GLIB_LIBS="$GLIB_LIBS" | |
11051 | elif test -n "$PKG_CONFIG"; then | |
11052 | if test -n "$PKG_CONFIG" && \ | |
11045 | 11053 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" glib-2.0 >= 2.10 gobject-2.0 >= 2.10 gthread-2.0 >= 2.10 \""; } >&5 |
11046 | 11054 | ($PKG_CONFIG --exists --print-errors " glib-2.0 >= 2.10 gobject-2.0 >= 2.10 gthread-2.0 >= 2.10 ") 2>&5 |
11047 | 11055 | ac_status=$? |
11051 | 11059 | else |
11052 | 11060 | pkg_failed=yes |
11053 | 11061 | fi |
11054 | fi | |
11055 | else | |
11056 | pkg_failed=untried | |
11062 | else | |
11063 | pkg_failed=untried | |
11057 | 11064 | fi |
11058 | 11065 | |
11059 | 11066 | |
11060 | 11067 | |
11061 | 11068 | if test $pkg_failed = yes; then |
11069 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11070 | $as_echo "no" >&6; } | |
11062 | 11071 | |
11063 | 11072 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then |
11064 | 11073 | _pkg_short_errors_supported=yes |
11066 | 11075 | _pkg_short_errors_supported=no |
11067 | 11076 | fi |
11068 | 11077 | if test $_pkg_short_errors_supported = yes; then |
11069 | GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors " glib-2.0 >= 2.10 gobject-2.0 >= 2.10 gthread-2.0 >= 2.10 "` | |
11078 | GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors " glib-2.0 >= 2.10 gobject-2.0 >= 2.10 gthread-2.0 >= 2.10 " 2>&1` | |
11070 | 11079 | else |
11071 | GLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors " glib-2.0 >= 2.10 gobject-2.0 >= 2.10 gthread-2.0 >= 2.10 "` | |
11080 | GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors " glib-2.0 >= 2.10 gobject-2.0 >= 2.10 gthread-2.0 >= 2.10 " 2>&1` | |
11072 | 11081 | fi |
11073 | 11082 | # Put the nasty error message in config.log where it belongs |
11074 | 11083 | echo "$GLIB_PKG_ERRORS" >&5 |
11082 | 11091 | |
11083 | 11092 | Alternatively, you may set the environment variables GLIB_CFLAGS |
11084 | 11093 | and GLIB_LIBS to avoid the need to call pkg-config. |
11085 | See the pkg-config man page for more details. | |
11086 | " "$LINENO" 5 | |
11094 | See the pkg-config man page for more details." "$LINENO" 5 | |
11087 | 11095 | elif test $pkg_failed = untried; then |
11096 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11097 | $as_echo "no" >&6; } | |
11088 | 11098 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
11089 | 11099 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
11090 | 11100 | as_fn_error "The pkg-config script could not be found or is too old. Make sure it |
11102 | 11112 | GLIB_LIBS=$pkg_cv_GLIB_LIBS |
11103 | 11113 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
11104 | 11114 | $as_echo "yes" >&6; } |
11105 | : | |
11115 | ||
11106 | 11116 | fi |
11107 | 11117 | |
11108 | 11118 | |
11122 | 11132 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GST" >&5 |
11123 | 11133 | $as_echo_n "checking for GST... " >&6; } |
11124 | 11134 | |
11125 | if test -n "$PKG_CONFIG"; then | |
11126 | if test -n "$GST_CFLAGS"; then | |
11127 | pkg_cv_GST_CFLAGS="$GST_CFLAGS" | |
11128 | else | |
11129 | if test -n "$PKG_CONFIG" && \ | |
11135 | if test -n "$GST_CFLAGS"; then | |
11136 | pkg_cv_GST_CFLAGS="$GST_CFLAGS" | |
11137 | elif test -n "$PKG_CONFIG"; then | |
11138 | if test -n "$PKG_CONFIG" && \ | |
11130 | 11139 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" |
11131 | 11140 | gstreamer-0.10 >= 0.10.0 |
11132 | 11141 | gstreamer-base-0.10 >= 0.10.0 |
11145 | 11154 | else |
11146 | 11155 | pkg_failed=yes |
11147 | 11156 | fi |
11148 | fi | |
11149 | else | |
11150 | pkg_failed=untried | |
11151 | fi | |
11152 | if test -n "$PKG_CONFIG"; then | |
11153 | if test -n "$GST_LIBS"; then | |
11154 | pkg_cv_GST_LIBS="$GST_LIBS" | |
11155 | else | |
11156 | if test -n "$PKG_CONFIG" && \ | |
11157 | else | |
11158 | pkg_failed=untried | |
11159 | fi | |
11160 | if test -n "$GST_LIBS"; then | |
11161 | pkg_cv_GST_LIBS="$GST_LIBS" | |
11162 | elif test -n "$PKG_CONFIG"; then | |
11163 | if test -n "$PKG_CONFIG" && \ | |
11157 | 11164 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" |
11158 | 11165 | gstreamer-0.10 >= 0.10.0 |
11159 | 11166 | gstreamer-base-0.10 >= 0.10.0 |
11172 | 11179 | else |
11173 | 11180 | pkg_failed=yes |
11174 | 11181 | fi |
11175 | fi | |
11176 | else | |
11177 | pkg_failed=untried | |
11182 | else | |
11183 | pkg_failed=untried | |
11178 | 11184 | fi |
11179 | 11185 | |
11180 | 11186 | |
11181 | 11187 | |
11182 | 11188 | if test $pkg_failed = yes; then |
11189 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11190 | $as_echo "no" >&6; } | |
11183 | 11191 | |
11184 | 11192 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then |
11185 | 11193 | _pkg_short_errors_supported=yes |
11187 | 11195 | _pkg_short_errors_supported=no |
11188 | 11196 | fi |
11189 | 11197 | if test $_pkg_short_errors_supported = yes; then |
11190 | GST_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors " | |
11198 | GST_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors " | |
11191 | 11199 | gstreamer-0.10 >= 0.10.0 |
11192 | 11200 | gstreamer-base-0.10 >= 0.10.0 |
11193 | "` | |
11201 | " 2>&1` | |
11194 | 11202 | else |
11195 | GST_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors " | |
11203 | GST_PKG_ERRORS=`$PKG_CONFIG --print-errors " | |
11196 | 11204 | gstreamer-0.10 >= 0.10.0 |
11197 | 11205 | gstreamer-base-0.10 >= 0.10.0 |
11198 | "` | |
11206 | " 2>&1` | |
11199 | 11207 | fi |
11200 | 11208 | # Put the nasty error message in config.log where it belongs |
11201 | 11209 | echo "$GST_PKG_ERRORS" >&5 |
11202 | 11210 | |
11203 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11211 | ||
11212 | if test "$with_gstreamer" = yes; then : | |
11213 | ||
11214 | as_fn_error "GStreamer support was requested but GStreamer libraries are not available" "$LINENO" 5 | |
11215 | ||
11216 | fi | |
11217 | ||
11218 | with_gstreamer=no | |
11219 | ||
11220 | elif test $pkg_failed = untried; then | |
11221 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11204 | 11222 | $as_echo "no" >&6; } |
11205 | ||
11206 | if test "$with_gstreamer" = yes; then : | |
11207 | ||
11208 | as_fn_error "GStreamer support was requested but GStreamer libraries are not available" "$LINENO" 5 | |
11209 | ||
11210 | fi | |
11211 | ||
11212 | with_gstreamer=no | |
11213 | ||
11214 | elif test $pkg_failed = untried; then | |
11215 | 11223 | |
11216 | 11224 | if test "$with_gstreamer" = yes; then : |
11217 | 11225 | |
11267 | 11275 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUPNP" >&5 |
11268 | 11276 | $as_echo_n "checking for GUPNP... " >&6; } |
11269 | 11277 | |
11270 | if test -n "$PKG_CONFIG"; then | |
11271 | if test -n "$GUPNP_CFLAGS"; then | |
11272 | pkg_cv_GUPNP_CFLAGS="$GUPNP_CFLAGS" | |
11273 | else | |
11274 | if test -n "$PKG_CONFIG" && \ | |
11278 | if test -n "$GUPNP_CFLAGS"; then | |
11279 | pkg_cv_GUPNP_CFLAGS="$GUPNP_CFLAGS" | |
11280 | elif test -n "$PKG_CONFIG"; then | |
11281 | if test -n "$PKG_CONFIG" && \ | |
11275 | 11282 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gupnp-igd-1.0 >= \$GUPNP_IGD_REQUIRED\""; } >&5 |
11276 | 11283 | ($PKG_CONFIG --exists --print-errors "gupnp-igd-1.0 >= $GUPNP_IGD_REQUIRED") 2>&5 |
11277 | 11284 | ac_status=$? |
11281 | 11288 | else |
11282 | 11289 | pkg_failed=yes |
11283 | 11290 | fi |
11284 | fi | |
11285 | else | |
11286 | pkg_failed=untried | |
11287 | fi | |
11288 | if test -n "$PKG_CONFIG"; then | |
11289 | if test -n "$GUPNP_LIBS"; then | |
11290 | pkg_cv_GUPNP_LIBS="$GUPNP_LIBS" | |
11291 | else | |
11292 | if test -n "$PKG_CONFIG" && \ | |
11291 | else | |
11292 | pkg_failed=untried | |
11293 | fi | |
11294 | if test -n "$GUPNP_LIBS"; then | |
11295 | pkg_cv_GUPNP_LIBS="$GUPNP_LIBS" | |
11296 | elif test -n "$PKG_CONFIG"; then | |
11297 | if test -n "$PKG_CONFIG" && \ | |
11293 | 11298 | { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gupnp-igd-1.0 >= \$GUPNP_IGD_REQUIRED\""; } >&5 |
11294 | 11299 | ($PKG_CONFIG --exists --print-errors "gupnp-igd-1.0 >= $GUPNP_IGD_REQUIRED") 2>&5 |
11295 | 11300 | ac_status=$? |
11299 | 11304 | else |
11300 | 11305 | pkg_failed=yes |
11301 | 11306 | fi |
11302 | fi | |
11303 | else | |
11304 | pkg_failed=untried | |
11307 | else | |
11308 | pkg_failed=untried | |
11305 | 11309 | fi |
11306 | 11310 | |
11307 | 11311 | |
11308 | 11312 | |
11309 | 11313 | if test $pkg_failed = yes; then |
11314 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11315 | $as_echo "no" >&6; } | |
11310 | 11316 | |
11311 | 11317 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then |
11312 | 11318 | _pkg_short_errors_supported=yes |
11314 | 11320 | _pkg_short_errors_supported=no |
11315 | 11321 | fi |
11316 | 11322 | if test $_pkg_short_errors_supported = yes; then |
11317 | GUPNP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gupnp-igd-1.0 >= $GUPNP_IGD_REQUIRED"` | |
11323 | GUPNP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gupnp-igd-1.0 >= $GUPNP_IGD_REQUIRED" 2>&1` | |
11318 | 11324 | else |
11319 | GUPNP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gupnp-igd-1.0 >= $GUPNP_IGD_REQUIRED"` | |
11325 | GUPNP_PKG_ERRORS=`$PKG_CONFIG --print-errors "gupnp-igd-1.0 >= $GUPNP_IGD_REQUIRED" 2>&1` | |
11320 | 11326 | fi |
11321 | 11327 | # Put the nasty error message in config.log where it belongs |
11322 | 11328 | echo "$GUPNP_PKG_ERRORS" >&5 |
11323 | 11329 | |
11324 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11330 | HAVE_GUPNP=no | |
11331 | elif test $pkg_failed = untried; then | |
11332 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
11325 | 11333 | $as_echo "no" >&6; } |
11326 | HAVE_GUPNP=no | |
11327 | elif test $pkg_failed = untried; then | |
11328 | 11334 | HAVE_GUPNP=no |
11329 | 11335 | else |
11330 | 11336 | GUPNP_CFLAGS=$pkg_cv_GUPNP_CFLAGS |
12137 | 12143 | # report actual input values of CONFIG_FILES etc. instead of their |
12138 | 12144 | # values after options handling. |
12139 | 12145 | ac_log=" |
12140 | This file was extended by libnice $as_me 0.0.11, which was | |
12146 | This file was extended by libnice $as_me 0.0.13, which was | |
12141 | 12147 | generated by GNU Autoconf 2.65. Invocation command line was |
12142 | 12148 | |
12143 | 12149 | CONFIG_FILES = $CONFIG_FILES |
12203 | 12209 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
12204 | 12210 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
12205 | 12211 | ac_cs_version="\\ |
12206 | libnice config.status 0.0.11 | |
12212 | libnice config.status 0.0.13 | |
12207 | 12213 | configured by $0, generated by GNU Autoconf 2.65, |
12208 | 12214 | with options \\"\$ac_cs_config\\" |
12209 | 12215 |
2 | 2 | |
3 | 3 | dnl releases only do -Wall, cvs and prerelease does -Werror too |
4 | 4 | dnl use a three digit version number for releases, and four for cvs/prerelease |
5 | AC_INIT(libnice, 0.0.11) | |
5 | AC_INIT(libnice, 0.0.13) | |
6 | 6 | LIBNICE_RELEASE="yes" |
7 | 7 | |
8 | 8 | AC_CONFIG_SRCDIR([agent/agent.c]) |
32 | 32 | # Increment CURRENT and AGE. Set REVISION to 0 |
33 | 33 | # If there was an incompatible interface change: |
34 | 34 | # Increment CURRENT. Set AGE and REVISION to 0 |
35 | LIBNICE_CURRENT=7 | |
35 | LIBNICE_CURRENT=9 | |
36 | 36 | LIBNICE_REVISION=0 |
37 | LIBNICE_AGE=7 | |
37 | LIBNICE_AGE=9 | |
38 | 38 | LIBNICE_LIBVERSION=${LIBNICE_CURRENT}:${LIBNICE_REVISION}:${LIBNICE_AGE} |
39 | 39 | LIBNICE_LT_LDFLAGS="-version-info ${LIBNICE_LIBVERSION}" |
40 | 40 | AC_SUBST(LIBNICE_LT_LDFLAGS) |
154 | 154 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
155 | 155 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
156 | 156 | PKG_CONFIG = @PKG_CONFIG@ |
157 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | |
158 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | |
157 | 159 | RANLIB = @RANLIB@ |
158 | 160 | SED = @SED@ |
159 | 161 | SET_MAKE = @SET_MAKE@ |
154 | 154 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
155 | 155 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
156 | 156 | PKG_CONFIG = @PKG_CONFIG@ |
157 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | |
158 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | |
157 | 159 | RANLIB = @RANLIB@ |
158 | 160 | SED = @SED@ |
159 | 161 | SET_MAKE = @SET_MAKE@ |
121 | 121 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
122 | 122 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
123 | 123 | PKG_CONFIG = @PKG_CONFIG@ |
124 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | |
125 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | |
124 | 126 | RANLIB = @RANLIB@ |
125 | 127 | SED = @SED@ |
126 | 128 | SET_MAKE = @SET_MAKE@ |
512 | 514 | scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) |
513 | 515 | @echo 'gtk-doc: Scanning header files' |
514 | 516 | @-chmod -R u+w $(srcdir) |
515 | @cd $(srcdir) && \ | |
516 | gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) | |
517 | @_source_dir='' ; for i in $(DOC_SOURCE_DIR) ; do \ | |
518 | _source_dir="$${_source_dir} --source-dir=$$i" ; \ | |
519 | done ; \ | |
520 | cd $(srcdir) && \ | |
521 | gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) | |
517 | 522 | @if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ |
518 | 523 | CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ |
519 | 524 | else \ |
546 | 551 | sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) |
547 | 552 | @echo 'gtk-doc: Building XML' |
548 | 553 | @-chmod -R u+w $(srcdir) |
549 | @cd $(srcdir) && \ | |
550 | gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS) | |
554 | @_source_dir='' ; for i in $(DOC_SOURCE_DIR) ; do \ | |
555 | _source_dir="$${_source_dir} --source-dir=$$i" ; \ | |
556 | done ; \ | |
557 | cd $(srcdir) && \ | |
558 | gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) | |
551 | 559 | @touch sgml-build.stamp |
552 | 560 | |
553 | 561 | sgml.stamp: sgml-build.stamp |
7 | 7 | <link rel="up" href="ch01.html" title=""> |
8 | 8 | <link rel="prev" href="ch01.html" title=""> |
9 | 9 | <link rel="next" href="libnice-NiceAddress.html" title="NiceAddress"> |
10 | <meta name="generator" content="GTK-Doc V1.13 (XML mode)"> | |
10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> | |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | <link rel="part" href="pt01.html" title="Part I. ICE Library"> | |
13 | <link rel="chapter" href="ch01.html" title=""> | |
14 | <link rel="chapter" href="ch02.html" title="Libnice helper functions"> | |
15 | <link rel="part" href="pt02.html" title="Part II. STUN Library"> | |
16 | <link rel="chapter" href="ch03.html" title=""> | |
17 | <link rel="chapter" href="ch04.html" title="STUN usages"> | |
18 | <link rel="part" href="pt03.html" title="Part III. Pseudo TCP Socket implementation"> | |
19 | <link rel="chapter" href="ch05.html" title=""> | |
20 | 12 | </head> |
21 | 13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
22 | 14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
62 | 54 | enum <a class="link" href="NiceAgent.html#NiceComponentType" title="enum NiceComponentType">NiceComponentType</a>; |
63 | 55 | enum <a class="link" href="NiceAgent.html#NiceProxyType" title="enum NiceProxyType">NiceProxyType</a>; |
64 | 56 | enum <a class="link" href="NiceAgent.html#NiceCompatibility" title="enum NiceCompatibility">NiceCompatibility</a>; |
65 | <span class="returnvalue">void</span> (<a class="link" href="NiceAgent.html#NiceAgentRecvFunc" title="NiceAgentRecvFunc ()">*NiceAgentRecvFunc</a>) (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
66 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id, | |
67 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> component_id, | |
68 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> len, | |
69 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *buf, | |
70 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> user_data); | |
57 | <span class="returnvalue">void</span> (<a class="link" href="NiceAgent.html#NiceAgentRecvFunc" title="NiceAgentRecvFunc ()">*NiceAgentRecvFunc</a>) (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
58 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>, | |
59 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>, | |
60 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>, | |
61 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buf</code></em>, | |
62 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>); | |
71 | 63 | #define <a class="link" href="NiceAgent.html#NICE-AGENT-MAX-REMOTE-CANDIDATES:CAPS" title="NICE_AGENT_MAX_REMOTE_CANDIDATES">NICE_AGENT_MAX_REMOTE_CANDIDATES</a> |
72 | <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> * <a class="link" href="NiceAgent.html#nice-agent-new" title="nice_agent_new ()">nice_agent_new</a> (<a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="returnvalue">GMainContext</span></a> *ctx, | |
73 | <a class="link" href="NiceAgent.html#NiceCompatibility" title="enum NiceCompatibility"><span class="returnvalue">NiceCompatibility</span></a> compat); | |
74 | <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> * <a class="link" href="NiceAgent.html#nice-agent-new-reliable" title="nice_agent_new_reliable ()">nice_agent_new_reliable</a> (<a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="returnvalue">GMainContext</span></a> *ctx, | |
75 | <a class="link" href="NiceAgent.html#NiceCompatibility" title="enum NiceCompatibility"><span class="returnvalue">NiceCompatibility</span></a> compat); | |
76 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NiceAgent.html#nice-agent-add-local-address" title="nice_agent_add_local_address ()">nice_agent_add_local_address</a> (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
77 | <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr); | |
78 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="NiceAgent.html#nice-agent-add-stream" title="nice_agent_add_stream ()">nice_agent_add_stream</a> (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
79 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> n_components); | |
80 | <span class="returnvalue">void</span> <a class="link" href="NiceAgent.html#nice-agent-remove-stream" title="nice_agent_remove_stream ()">nice_agent_remove_stream</a> (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
81 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id); | |
82 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NiceAgent.html#nice-agent-set-relay-info" title="nice_agent_set_relay_info ()">nice_agent_set_relay_info</a> (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
83 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id, | |
84 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> component_id, | |
85 | const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *server_ip, | |
86 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> server_port, | |
87 | const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *username, | |
88 | const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *password, | |
89 | <a class="link" href="libnice-NiceCandidate.html#NiceRelayType" title="enum NiceRelayType"><span class="returnvalue">NiceRelayType</span></a> type); | |
90 | <span class="returnvalue">void</span> <a class="link" href="NiceAgent.html#nice-agent-gather-candidates" title="nice_agent_gather_candidates ()">nice_agent_gather_candidates</a> (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
91 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id); | |
92 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NiceAgent.html#nice-agent-set-remote-credentials" title="nice_agent_set_remote_credentials ()">nice_agent_set_remote_credentials</a> (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
93 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id, | |
94 | const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *ufrag, | |
95 | const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *pwd); | |
96 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NiceAgent.html#nice-agent-get-local-credentials" title="nice_agent_get_local_credentials ()">nice_agent_get_local_credentials</a> (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
97 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id, | |
98 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **ufrag, | |
99 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **pwd); | |
100 | <span class="returnvalue">int</span> <a class="link" href="NiceAgent.html#nice-agent-set-remote-candidates" title="nice_agent_set_remote_candidates ()">nice_agent_set_remote_candidates</a> (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
101 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id, | |
102 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> component_id, | |
103 | const <a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> *candidates); | |
104 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> * <a class="link" href="NiceAgent.html#nice-agent-get-remote-candidates" title="nice_agent_get_remote_candidates ()">nice_agent_get_remote_candidates</a> (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
105 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id, | |
106 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> component_id); | |
107 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> * <a class="link" href="NiceAgent.html#nice-agent-get-local-candidates" title="nice_agent_get_local_candidates ()">nice_agent_get_local_candidates</a> (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
108 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id, | |
109 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> component_id); | |
110 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="NiceAgent.html#nice-agent-send" title="nice_agent_send ()">nice_agent_send</a> (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
111 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id, | |
112 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> component_id, | |
113 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> len, | |
114 | const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *buf); | |
115 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NiceAgent.html#nice-agent-attach-recv" title="nice_agent_attach_recv ()">nice_agent_attach_recv</a> (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
116 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id, | |
117 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> component_id, | |
118 | <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="returnvalue">GMainContext</span></a> *ctx, | |
119 | <a class="link" href="NiceAgent.html#NiceAgentRecvFunc" title="NiceAgentRecvFunc ()"><span class="returnvalue">NiceAgentRecvFunc</span></a> func, | |
120 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> data); | |
121 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NiceAgent.html#nice-agent-set-selected-pair" title="nice_agent_set_selected_pair ()">nice_agent_set_selected_pair</a> (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
122 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id, | |
123 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> component_id, | |
124 | const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *lfoundation, | |
125 | const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *rfoundation); | |
126 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NiceAgent.html#nice-agent-set-selected-remote-candidate" title="nice_agent_set_selected_remote_candidate ()">nice_agent_set_selected_remote_candidate</a> | |
127 | (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
128 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id, | |
129 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> component_id, | |
130 | <a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="returnvalue">NiceCandidate</span></a> *candidate); | |
131 | <span class="returnvalue">void</span> <a class="link" href="NiceAgent.html#nice-agent-set-stream-tos" title="nice_agent_set_stream_tos ()">nice_agent_set_stream_tos</a> (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
132 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id, | |
133 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> tos); | |
134 | <span class="returnvalue">void</span> <a class="link" href="NiceAgent.html#nice-agent-set-software" title="nice_agent_set_software ()">nice_agent_set_software</a> (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
135 | const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *software); | |
136 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NiceAgent.html#nice-agent-restart" title="nice_agent_restart ()">nice_agent_restart</a> (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent); | |
64 | <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> * <a class="link" href="NiceAgent.html#nice-agent-new" title="nice_agent_new ()">nice_agent_new</a> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> *ctx</code></em>, | |
65 | <em class="parameter"><code><a class="link" href="NiceAgent.html#NiceCompatibility" title="enum NiceCompatibility"><span class="type">NiceCompatibility</span></a> compat</code></em>); | |
66 | <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> * <a class="link" href="NiceAgent.html#nice-agent-new-reliable" title="nice_agent_new_reliable ()">nice_agent_new_reliable</a> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> *ctx</code></em>, | |
67 | <em class="parameter"><code><a class="link" href="NiceAgent.html#NiceCompatibility" title="enum NiceCompatibility"><span class="type">NiceCompatibility</span></a> compat</code></em>); | |
68 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NiceAgent.html#nice-agent-add-local-address" title="nice_agent_add_local_address ()">nice_agent_add_local_address</a> (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
69 | <em class="parameter"><code><a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>); | |
70 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="NiceAgent.html#nice-agent-add-stream" title="nice_agent_add_stream ()">nice_agent_add_stream</a> (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
71 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_components</code></em>); | |
72 | <span class="returnvalue">void</span> <a class="link" href="NiceAgent.html#nice-agent-remove-stream" title="nice_agent_remove_stream ()">nice_agent_remove_stream</a> (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
73 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>); | |
74 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NiceAgent.html#nice-agent-set-relay-info" title="nice_agent_set_relay_info ()">nice_agent_set_relay_info</a> (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
75 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>, | |
76 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>, | |
77 | <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *server_ip</code></em>, | |
78 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> server_port</code></em>, | |
79 | <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *username</code></em>, | |
80 | <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *password</code></em>, | |
81 | <em class="parameter"><code><a class="link" href="libnice-NiceCandidate.html#NiceRelayType" title="enum NiceRelayType"><span class="type">NiceRelayType</span></a> type</code></em>); | |
82 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NiceAgent.html#nice-agent-gather-candidates" title="nice_agent_gather_candidates ()">nice_agent_gather_candidates</a> (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
83 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>); | |
84 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NiceAgent.html#nice-agent-set-remote-credentials" title="nice_agent_set_remote_credentials ()">nice_agent_set_remote_credentials</a> (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
85 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>, | |
86 | <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *ufrag</code></em>, | |
87 | <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *pwd</code></em>); | |
88 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NiceAgent.html#nice-agent-get-local-credentials" title="nice_agent_get_local_credentials ()">nice_agent_get_local_credentials</a> (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
89 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>, | |
90 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **ufrag</code></em>, | |
91 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **pwd</code></em>); | |
92 | <span class="returnvalue">int</span> <a class="link" href="NiceAgent.html#nice-agent-set-remote-candidates" title="nice_agent_set_remote_candidates ()">nice_agent_set_remote_candidates</a> (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
93 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>, | |
94 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>, | |
95 | <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *candidates</code></em>); | |
96 | <a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> * <a class="link" href="NiceAgent.html#nice-agent-get-remote-candidates" title="nice_agent_get_remote_candidates ()">nice_agent_get_remote_candidates</a> (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
97 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>, | |
98 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>); | |
99 | <a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> * <a class="link" href="NiceAgent.html#nice-agent-get-local-candidates" title="nice_agent_get_local_candidates ()">nice_agent_get_local_candidates</a> (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
100 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>, | |
101 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>); | |
102 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="NiceAgent.html#nice-agent-send" title="nice_agent_send ()">nice_agent_send</a> (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
103 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>, | |
104 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>, | |
105 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>, | |
106 | <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buf</code></em>); | |
107 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NiceAgent.html#nice-agent-attach-recv" title="nice_agent_attach_recv ()">nice_agent_attach_recv</a> (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
108 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>, | |
109 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>, | |
110 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> *ctx</code></em>, | |
111 | <em class="parameter"><code><a class="link" href="NiceAgent.html#NiceAgentRecvFunc" title="NiceAgentRecvFunc ()"><span class="type">NiceAgentRecvFunc</span></a> func</code></em>, | |
112 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>); | |
113 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NiceAgent.html#nice-agent-set-selected-pair" title="nice_agent_set_selected_pair ()">nice_agent_set_selected_pair</a> (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
114 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>, | |
115 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>, | |
116 | <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *lfoundation</code></em>, | |
117 | <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *rfoundation</code></em>); | |
118 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NiceAgent.html#nice-agent-set-selected-remote-candidate" title="nice_agent_set_selected_remote_candidate ()">nice_agent_set_selected_remote_candidate</a> | |
119 | (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
120 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>, | |
121 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>, | |
122 | <em class="parameter"><code><a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="type">NiceCandidate</span></a> *candidate</code></em>); | |
123 | <span class="returnvalue">void</span> <a class="link" href="NiceAgent.html#nice-agent-set-stream-tos" title="nice_agent_set_stream_tos ()">nice_agent_set_stream_tos</a> (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
124 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>, | |
125 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> tos</code></em>); | |
126 | <span class="returnvalue">void</span> <a class="link" href="NiceAgent.html#nice-agent-set-software" title="nice_agent_set_software ()">nice_agent_set_software</a> (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
127 | <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *software</code></em>); | |
128 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="NiceAgent.html#nice-agent-restart" title="nice_agent_restart ()">nice_agent_restart</a> (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>); | |
137 | 129 | </pre> |
138 | 130 | </div> |
139 | 131 | <div class="refsect1" title="Object Hierarchy"> |
140 | 132 | <a name="NiceAgent.object-hierarchy"></a><h2>Object Hierarchy</h2> |
141 | 133 | <pre class="synopsis"> |
142 | <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a> | |
134 | <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a> | |
143 | 135 | +----NiceAgent |
144 | 136 | </pre> |
145 | 137 | </div> |
146 | 138 | <div class="refsect1" title="Properties"> |
147 | 139 | <a name="NiceAgent.properties"></a><h2>Properties</h2> |
148 | 140 | <pre class="synopsis"> |
149 | "<a class="link" href="NiceAgent.html#NiceAgent--compatibility" title='The "compatibility" property'>compatibility</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write / Construct Only | |
150 | "<a class="link" href="NiceAgent.html#NiceAgent--controlling-mode" title='The "controlling-mode" property'>controlling-mode</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write | |
151 | "<a class="link" href="NiceAgent.html#NiceAgent--full-mode" title='The "full-mode" property'>full-mode</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct Only | |
152 | "<a class="link" href="NiceAgent.html#NiceAgent--main-context" title='The "main-context" property'>main-context</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> : Read / Write / Construct Only | |
153 | "<a class="link" href="NiceAgent.html#NiceAgent--max-connectivity-checks" title='The "max-connectivity-checks" property'>max-connectivity-checks</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write | |
154 | "<a class="link" href="NiceAgent.html#NiceAgent--proxy-ip" title='The "proxy-ip" property'>proxy-ip</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write | |
155 | "<a class="link" href="NiceAgent.html#NiceAgent--proxy-password" title='The "proxy-password" property'>proxy-password</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write | |
156 | "<a class="link" href="NiceAgent.html#NiceAgent--proxy-port" title='The "proxy-port" property'>proxy-port</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write | |
157 | "<a class="link" href="NiceAgent.html#NiceAgent--proxy-type" title='The "proxy-type" property'>proxy-type</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write | |
158 | "<a class="link" href="NiceAgent.html#NiceAgent--proxy-username" title='The "proxy-username" property'>proxy-username</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write | |
159 | "<a class="link" href="NiceAgent.html#NiceAgent--reliable" title='The "reliable" property'>reliable</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct Only | |
160 | "<a class="link" href="NiceAgent.html#NiceAgent--stun-pacing-timer" title='The "stun-pacing-timer" property'>stun-pacing-timer</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write / Construct Only | |
161 | "<a class="link" href="NiceAgent.html#NiceAgent--stun-server" title='The "stun-server" property'>stun-server</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write | |
162 | "<a class="link" href="NiceAgent.html#NiceAgent--stun-server-port" title='The "stun-server-port" property'>stun-server-port</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write | |
163 | "<a class="link" href="NiceAgent.html#NiceAgent--upnp" title='The "upnp" property'>upnp</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct | |
164 | "<a class="link" href="NiceAgent.html#NiceAgent--upnp-timeout" title='The "upnp-timeout" property'>upnp-timeout</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write / Construct | |
141 | "<a class="link" href="NiceAgent.html#NiceAgent--compatibility" title='The "compatibility" property'>compatibility</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write / Construct Only | |
142 | "<a class="link" href="NiceAgent.html#NiceAgent--controlling-mode" title='The "controlling-mode" property'>controlling-mode</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write | |
143 | "<a class="link" href="NiceAgent.html#NiceAgent--full-mode" title='The "full-mode" property'>full-mode</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct Only | |
144 | "<a class="link" href="NiceAgent.html#NiceAgent--main-context" title='The "main-context" property'>main-context</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> : Read / Write / Construct Only | |
145 | "<a class="link" href="NiceAgent.html#NiceAgent--max-connectivity-checks" title='The "max-connectivity-checks" property'>max-connectivity-checks</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write | |
146 | "<a class="link" href="NiceAgent.html#NiceAgent--proxy-ip" title='The "proxy-ip" property'>proxy-ip</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write | |
147 | "<a class="link" href="NiceAgent.html#NiceAgent--proxy-password" title='The "proxy-password" property'>proxy-password</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write | |
148 | "<a class="link" href="NiceAgent.html#NiceAgent--proxy-port" title='The "proxy-port" property'>proxy-port</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write | |
149 | "<a class="link" href="NiceAgent.html#NiceAgent--proxy-type" title='The "proxy-type" property'>proxy-type</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write | |
150 | "<a class="link" href="NiceAgent.html#NiceAgent--proxy-username" title='The "proxy-username" property'>proxy-username</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write | |
151 | "<a class="link" href="NiceAgent.html#NiceAgent--reliable" title='The "reliable" property'>reliable</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct Only | |
152 | "<a class="link" href="NiceAgent.html#NiceAgent--stun-pacing-timer" title='The "stun-pacing-timer" property'>stun-pacing-timer</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write / Construct Only | |
153 | "<a class="link" href="NiceAgent.html#NiceAgent--stun-server" title='The "stun-server" property'>stun-server</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write | |
154 | "<a class="link" href="NiceAgent.html#NiceAgent--stun-server-port" title='The "stun-server-port" property'>stun-server-port</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write | |
155 | "<a class="link" href="NiceAgent.html#NiceAgent--upnp" title='The "upnp" property'>upnp</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct | |
156 | "<a class="link" href="NiceAgent.html#NiceAgent--upnp-timeout" title='The "upnp-timeout" property'>upnp-timeout</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write / Construct | |
165 | 157 | </pre> |
166 | 158 | </div> |
167 | 159 | <div class="refsect1" title="Signals"> |
187 | 179 | <p> |
188 | 180 | </p> |
189 | 181 | <div class="example"> |
190 | <a name="id2657324"></a><p class="title"><b>Example 1. Simple example on how to use libnice</b></p> | |
182 | <a name="id2679137"></a><p class="title"><b>Example 1. Simple example on how to use libnice</b></p> | |
191 | 183 | <div class="example-contents"> |
192 | 184 | <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> |
193 | 185 | <tbody> |
234 | 226 | GSList <span class="symbol">*</span>lcands <span class="symbol">=</span> NULL<span class="symbol">;</span> |
235 | 227 | |
236 | 228 | <span class="gtkdoc slc">// Create a nice agent</span> |
237 | NiceAgent <span class="symbol">*</span>agent <span class="symbol">=</span> <span class="function"><a href="NiceAgent.html#nice-agent-new">nice_agent_new</a></span> <span class="symbol">(</span>NULL<span class="symbol">,</span> NICE_COMPATIBILITY_DRAFT19<span class="symbol">);</span> | |
229 | NiceAgent <span class="symbol">*</span>agent <span class="symbol">=</span> <span class="function"><a href="NiceAgent.html#nice-agent-new">nice_agent_new</a></span> <span class="symbol">(</span>NULL<span class="symbol">,</span> NICE_COMPATIBILITY_RFC5245<span class="symbol">);</span> | |
238 | 230 | |
239 | 231 | <span class="gtkdoc slc">// Connect the signals</span> |
240 | <span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-connect">g_signal_connect</a></span> <span class="symbol">(</span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#G-OBJECT:CAPS">G_OBJECT</a></span> <span class="symbol">(</span>agent<span class="symbol">),</span> <span class="string">"candidate-gathering-done"</span><span class="symbol">,</span> | |
241 | <span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span> <span class="symbol">(</span>cb_candidate_gathering_done<span class="symbol">),</span> NULL<span class="symbol">);</span> | |
242 | <span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-connect">g_signal_connect</a></span> <span class="symbol">(</span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#G-OBJECT:CAPS">G_OBJECT</a></span> <span class="symbol">(</span>agent<span class="symbol">),</span> <span class="string">"component-state-changed"</span><span class="symbol">,</span> | |
243 | <span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span> <span class="symbol">(</span>cb_component_state_changed<span class="symbol">),</span> NULL<span class="symbol">);</span> | |
244 | <span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#g-signal-connect">g_signal_connect</a></span> <span class="symbol">(</span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#G-OBJECT:CAPS">G_OBJECT</a></span> <span class="symbol">(</span>agent<span class="symbol">),</span> <span class="string">"new-selected-pair"</span><span class="symbol">,</span> | |
245 | <span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span> <span class="symbol">(</span>cb_new_selected_pair<span class="symbol">),</span> NULL<span class="symbol">);</span> | |
232 | <span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#g-signal-connect">g_signal_connect</a></span> <span class="symbol">(</span><span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#G-OBJECT:CAPS">G_OBJECT</a></span> <span class="symbol">(</span>agent<span class="symbol">),</span> <span class="string">"candidate-gathering-done"</span><span class="symbol">,</span> | |
233 | <span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span> <span class="symbol">(</span>cb_candidate_gathering_done<span class="symbol">),</span> NULL<span class="symbol">);</span> | |
234 | <span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#g-signal-connect">g_signal_connect</a></span> <span class="symbol">(</span><span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#G-OBJECT:CAPS">G_OBJECT</a></span> <span class="symbol">(</span>agent<span class="symbol">),</span> <span class="string">"component-state-changed"</span><span class="symbol">,</span> | |
235 | <span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span> <span class="symbol">(</span>cb_component_state_changed<span class="symbol">),</span> NULL<span class="symbol">);</span> | |
236 | <span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#g-signal-connect">g_signal_connect</a></span> <span class="symbol">(</span><span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#G-OBJECT:CAPS">G_OBJECT</a></span> <span class="symbol">(</span>agent<span class="symbol">),</span> <span class="string">"new-selected-pair"</span><span class="symbol">,</span> | |
237 | <span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span> <span class="symbol">(</span>cb_new_selected_pair<span class="symbol">),</span> NULL<span class="symbol">);</span> | |
246 | 238 | |
247 | 239 | <span class="gtkdoc slc">// Create a new stream with one component and start gathering candidates</span> |
248 | 240 | stream_id <span class="symbol">=</span> <span class="function"><a href="NiceAgent.html#nice-agent-add-stream">nice_agent_add_stream</a></span> <span class="symbol">(</span>agent<span class="symbol">,</span> <span class="number">1</span><span class="symbol">);</span> |
265 | 257 | <span class="gtkdoc slc">// Anything received will be received through the cb_nice_recv callback</span> |
266 | 258 | |
267 | 259 | <span class="gtkdoc slc">// Destroy the object</span> |
268 | <span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="symbol">(</span>agent<span class="symbol">);</span></pre></td> | |
260 | <span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="symbol">(</span>agent<span class="symbol">);</span></pre></td> | |
269 | 261 | </tr> |
270 | 262 | </tbody> |
271 | 263 | </table> |
272 | 264 | </div> |
273 | 265 | |
274 | 266 | </div> |
275 | <p><br class="example-break"></p> | |
267 | <p><br class="example-break"> | |
268 | </p> | |
276 | 269 | </div> |
277 | 270 | <div class="refsect1" title="Details"> |
278 | 271 | <a name="NiceAgent.details"></a><h2>Details</h2> |
281 | 274 | <pre class="programlisting">typedef struct _NiceAgent NiceAgent;</pre> |
282 | 275 | <p> |
283 | 276 | The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> is the main GObject of the libnice library and represents |
284 | the ICE agent.</p> | |
277 | the ICE agent. | |
278 | </p> | |
285 | 279 | </div> |
286 | 280 | <hr> |
287 | 281 | <div class="refsect2" title="enum NiceComponentState"> |
301 | 295 | An enum representing the state of a component. |
302 | 296 | </p> |
303 | 297 | <p> See also: <a class="link" href="NiceAgent.html#NiceAgent-component-state-changed" title='The "component-state-changed" signal'><span class="type">"component-state-changed"</span></a> </p> |
298 | <p> | |
299 | </p> | |
304 | 300 | <div class="variablelist"><table border="0"> |
305 | 301 | <col align="left" valign="top"> |
306 | 302 | <tbody> |
307 | 303 | <tr> |
308 | 304 | <td><p><a name="NICE-COMPONENT-STATE-DISCONNECTED:CAPS"></a><span class="term"><code class="literal">NICE_COMPONENT_STATE_DISCONNECTED</code></span></p></td> |
309 | <td> No activity scheduled | |
305 | <td>No activity scheduled | |
310 | 306 | </td> |
311 | 307 | </tr> |
312 | 308 | <tr> |
313 | 309 | <td><p><a name="NICE-COMPONENT-STATE-GATHERING:CAPS"></a><span class="term"><code class="literal">NICE_COMPONENT_STATE_GATHERING</code></span></p></td> |
314 | <td> Gathering local candidates | |
310 | <td>Gathering local candidates | |
315 | 311 | </td> |
316 | 312 | </tr> |
317 | 313 | <tr> |
318 | 314 | <td><p><a name="NICE-COMPONENT-STATE-CONNECTING:CAPS"></a><span class="term"><code class="literal">NICE_COMPONENT_STATE_CONNECTING</code></span></p></td> |
319 | <td> Establishing connectivity | |
315 | <td>Establishing connectivity | |
320 | 316 | </td> |
321 | 317 | </tr> |
322 | 318 | <tr> |
323 | 319 | <td><p><a name="NICE-COMPONENT-STATE-CONNECTED:CAPS"></a><span class="term"><code class="literal">NICE_COMPONENT_STATE_CONNECTED</code></span></p></td> |
324 | <td> At least one working candidate pair | |
320 | <td>At least one working candidate pair | |
325 | 321 | </td> |
326 | 322 | </tr> |
327 | 323 | <tr> |
328 | 324 | <td><p><a name="NICE-COMPONENT-STATE-READY:CAPS"></a><span class="term"><code class="literal">NICE_COMPONENT_STATE_READY</code></span></p></td> |
329 | <td> ICE concluded, candidate pair selection | |
325 | <td>ICE concluded, candidate pair selection | |
330 | 326 | is now final |
331 | 327 | </td> |
332 | 328 | </tr> |
333 | 329 | <tr> |
334 | 330 | <td><p><a name="NICE-COMPONENT-STATE-FAILED:CAPS"></a><span class="term"><code class="literal">NICE_COMPONENT_STATE_FAILED</code></span></p></td> |
335 | <td> Connectivity checks have been completed, | |
331 | <td>Connectivity checks have been completed, | |
336 | 332 | but connectivity was not established |
337 | 333 | </td> |
338 | 334 | </tr> |
339 | 335 | <tr> |
340 | 336 | <td><p><a name="NICE-COMPONENT-STATE-LAST:CAPS"></a><span class="term"><code class="literal">NICE_COMPONENT_STATE_LAST</code></span></p></td> |
341 | <td> Dummy state | |
337 | <td>Dummy state | |
342 | 338 | </td> |
343 | 339 | </tr> |
344 | 340 | </tbody> |
358 | 354 | component_id for RTP/RTCP usages. |
359 | 355 | </p> |
360 | 356 | <div class="example"> |
361 | <a name="id2657649"></a><p class="title"><b>Example 2. Example of use.</b></p> | |
357 | <a name="id2679463"></a><p class="title"><b>Example 2. Example of use.</b></p> | |
362 | 358 | <div class="example-contents"> |
363 | 359 | <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> |
364 | 360 | <tbody> |
371 | 367 | </div> |
372 | 368 | |
373 | 369 | </div> |
374 | <p><br class="example-break"></p> | |
370 | <p><br class="example-break"> | |
371 | </p> | |
375 | 372 | <div class="variablelist"><table border="0"> |
376 | 373 | <col align="left" valign="top"> |
377 | 374 | <tbody> |
378 | 375 | <tr> |
379 | 376 | <td><p><a name="NICE-COMPONENT-TYPE-RTP:CAPS"></a><span class="term"><code class="literal">NICE_COMPONENT_TYPE_RTP</code></span></p></td> |
380 | <td> RTP Component type | |
377 | <td>RTP Component type | |
381 | 378 | </td> |
382 | 379 | </tr> |
383 | 380 | <tr> |
384 | 381 | <td><p><a name="NICE-COMPONENT-TYPE-RTCP:CAPS"></a><span class="term"><code class="literal">NICE_COMPONENT_TYPE_RTCP</code></span></p></td> |
385 | <td> RTCP Component type | |
382 | <td>RTCP Component type | |
386 | 383 | </td> |
387 | 384 | </tr> |
388 | 385 | </tbody> |
404 | 401 | Note that the proxies will only be used with TCP TURN relaying. |
405 | 402 | </p> |
406 | 403 | <p> See also: <a class="link" href="NiceAgent.html#NiceAgent--proxy-type" title='The "proxy-type" property'><span class="type">"proxy-type"</span></a> </p> |
404 | <p> | |
405 | </p> | |
407 | 406 | <div class="variablelist"><table border="0"> |
408 | 407 | <col align="left" valign="top"> |
409 | 408 | <tbody> |
410 | 409 | <tr> |
411 | 410 | <td><p><a name="NICE-PROXY-TYPE-NONE:CAPS"></a><span class="term"><code class="literal">NICE_PROXY_TYPE_NONE</code></span></p></td> |
412 | <td> Do not use a proxy | |
411 | <td>Do not use a proxy | |
413 | 412 | </td> |
414 | 413 | </tr> |
415 | 414 | <tr> |
416 | 415 | <td><p><a name="NICE-PROXY-TYPE-SOCKS5:CAPS"></a><span class="term"><code class="literal">NICE_PROXY_TYPE_SOCKS5</code></span></p></td> |
417 | <td> Use a SOCKS5 proxy | |
416 | <td>Use a SOCKS5 proxy | |
418 | 417 | </td> |
419 | 418 | </tr> |
420 | 419 | <tr> |
421 | 420 | <td><p><a name="NICE-PROXY-TYPE-HTTP:CAPS"></a><span class="term"><code class="literal">NICE_PROXY_TYPE_HTTP</code></span></p></td> |
422 | <td> Use an HTTP proxy | |
421 | <td>Use an HTTP proxy | |
423 | 422 | </td> |
424 | 423 | </tr> |
425 | 424 | <tr> |
426 | 425 | <td><p><a name="NICE-PROXY-TYPE-LAST:CAPS"></a><span class="term"><code class="literal">NICE_PROXY_TYPE_LAST</code></span></p></td> |
427 | <td> Dummy last proxy type | |
426 | <td>Dummy last proxy type | |
428 | 427 | </td> |
429 | 428 | </tr> |
430 | 429 | </tbody> |
436 | 435 | <a name="NiceCompatibility"></a><h3>enum NiceCompatibility</h3> |
437 | 436 | <pre class="programlisting">typedef enum |
438 | 437 | { |
439 | NICE_COMPATIBILITY_DRAFT19 = 0, | |
438 | NICE_COMPATIBILITY_RFC5245 = 0, | |
440 | 439 | NICE_COMPATIBILITY_GOOGLE, |
441 | 440 | NICE_COMPATIBILITY_MSN, |
442 | 441 | NICE_COMPATIBILITY_WLM2009, |
443 | NICE_COMPATIBILITY_LAST = NICE_COMPATIBILITY_WLM2009 | |
442 | NICE_COMPATIBILITY_DRAFT19 = NICE_COMPATIBILITY_RFC5245, | |
443 | NICE_COMPATIBILITY_LAST = NICE_COMPATIBILITY_WLM2009, | |
444 | 444 | } NiceCompatibility; |
445 | 445 | </pre> |
446 | 446 | <p> |
447 | 447 | An enum to specify which compatible specifications the <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> should use. |
448 | Use with <a class="link" href="NiceAgent.html#nice-agent-new" title="nice_agent_new ()"><code class="function">nice_agent_new()</code></a></p> | |
449 | <div class="variablelist"><table border="0"> | |
450 | <col align="left" valign="top"> | |
451 | <tbody> | |
448 | Use with <a class="link" href="NiceAgent.html#nice-agent-new" title="nice_agent_new ()"><code class="function">nice_agent_new()</code></a> | |
449 | </p> | |
450 | <p> | |
451 | </p> | |
452 | <div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;"> | |
453 | <h3 class="title">Warning</h3> | |
454 | <em class="parameter"><code>NICE_COMPATIBILITY_DRAFT19</code></em> is deprecated and should not be used | |
455 | in newly-written code. It is kept for compatibility reasons and | |
456 | represents the same compatibility as <em class="parameter"><code>NICE_COMPATIBILITY_RFC5245</code></em> | |
457 | </div> | |
458 | <p> | |
459 | </p> | |
460 | <div class="variablelist"><table border="0"> | |
461 | <col align="left" valign="top"> | |
462 | <tbody> | |
463 | <tr> | |
464 | <td><p><a name="NICE-COMPATIBILITY-RFC5245:CAPS"></a><span class="term"><code class="literal">NICE_COMPATIBILITY_RFC5245</code></span></p></td> | |
465 | <td>Use compatibility with the RFC5245 ICE specs | |
466 | </td> | |
467 | </tr> | |
468 | <tr> | |
469 | <td><p><a name="NICE-COMPATIBILITY-GOOGLE:CAPS"></a><span class="term"><code class="literal">NICE_COMPATIBILITY_GOOGLE</code></span></p></td> | |
470 | <td>Use compatibility for Google Talk specs | |
471 | </td> | |
472 | </tr> | |
473 | <tr> | |
474 | <td><p><a name="NICE-COMPATIBILITY-MSN:CAPS"></a><span class="term"><code class="literal">NICE_COMPATIBILITY_MSN</code></span></p></td> | |
475 | <td>Use compatibility for MSN Messenger specs | |
476 | </td> | |
477 | </tr> | |
478 | <tr> | |
479 | <td><p><a name="NICE-COMPATIBILITY-WLM2009:CAPS"></a><span class="term"><code class="literal">NICE_COMPATIBILITY_WLM2009</code></span></p></td> | |
480 | <td>Use compatibility with Windows Live Messenger | |
481 | 2009 | |
482 | </td> | |
483 | </tr> | |
452 | 484 | <tr> |
453 | 485 | <td><p><a name="NICE-COMPATIBILITY-DRAFT19:CAPS"></a><span class="term"><code class="literal">NICE_COMPATIBILITY_DRAFT19</code></span></p></td> |
454 | <td> Use compatibility for ICE Draft 19 specs | |
455 | </td> | |
456 | </tr> | |
457 | <tr> | |
458 | <td><p><a name="NICE-COMPATIBILITY-GOOGLE:CAPS"></a><span class="term"><code class="literal">NICE_COMPATIBILITY_GOOGLE</code></span></p></td> | |
459 | <td> Use compatibility for Google Talk specs | |
460 | </td> | |
461 | </tr> | |
462 | <tr> | |
463 | <td><p><a name="NICE-COMPATIBILITY-MSN:CAPS"></a><span class="term"><code class="literal">NICE_COMPATIBILITY_MSN</code></span></p></td> | |
464 | <td> Use compatibility for MSN Messenger specs | |
465 | </td> | |
466 | </tr> | |
467 | <tr> | |
468 | <td><p><a name="NICE-COMPATIBILITY-WLM2009:CAPS"></a><span class="term"><code class="literal">NICE_COMPATIBILITY_WLM2009</code></span></p></td> | |
469 | <td> Use compatibility with Windows Live Messenger | |
470 | 2009 | |
486 | <td>Use compatibility for ICE Draft 19 specs | |
471 | 487 | </td> |
472 | 488 | </tr> |
473 | 489 | <tr> |
474 | 490 | <td><p><a name="NICE-COMPATIBILITY-LAST:CAPS"></a><span class="term"><code class="literal">NICE_COMPATIBILITY_LAST</code></span></p></td> |
475 | <td> Dummy last compatibility mode | |
491 | <td>Dummy last compatibility mode | |
476 | 492 | </td> |
477 | 493 | </tr> |
478 | 494 | </tbody> |
481 | 497 | <hr> |
482 | 498 | <div class="refsect2" title="NiceAgentRecvFunc ()"> |
483 | 499 | <a name="NiceAgentRecvFunc"></a><h3>NiceAgentRecvFunc ()</h3> |
484 | <pre class="programlisting"><span class="returnvalue">void</span> (*NiceAgentRecvFunc) (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
485 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id, | |
486 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> component_id, | |
487 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> len, | |
488 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *buf, | |
489 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> user_data);</pre> | |
490 | <p> | |
491 | Callback function when data is received on a component</p> | |
492 | <div class="variablelist"><table border="0"> | |
493 | <col align="left" valign="top"> | |
494 | <tbody> | |
495 | <tr> | |
496 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
497 | <td> The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
498 | </td> | |
499 | </tr> | |
500 | <tr> | |
501 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
502 | <td> The id of the stream | |
500 | <pre class="programlisting"><span class="returnvalue">void</span> (*NiceAgentRecvFunc) (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
501 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>, | |
502 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>, | |
503 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>, | |
504 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buf</code></em>, | |
505 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre> | |
506 | <p> | |
507 | Callback function when data is received on a component | |
508 | </p> | |
509 | <div class="variablelist"><table border="0"> | |
510 | <col align="left" valign="top"> | |
511 | <tbody> | |
512 | <tr> | |
513 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
514 | <td>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
515 | </td> | |
516 | </tr> | |
517 | <tr> | |
518 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
519 | <td>The id of the stream | |
503 | 520 | </td> |
504 | 521 | </tr> |
505 | 522 | <tr> |
506 | 523 | <td><p><span class="term"><em class="parameter"><code>component_id</code></em> :</span></p></td> |
507 | <td> The id of the component of the stream | |
524 | <td>The id of the component of the stream | |
508 | 525 | which received the data |
509 | 526 | </td> |
510 | 527 | </tr> |
511 | 528 | <tr> |
512 | 529 | <td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td> |
513 | <td> The length of the data | |
530 | <td>The length of the data | |
514 | 531 | </td> |
515 | 532 | </tr> |
516 | 533 | <tr> |
517 | 534 | <td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td> |
518 | <td> The buffer containing the data received | |
535 | <td>The buffer containing the data received | |
519 | 536 | </td> |
520 | 537 | </tr> |
521 | 538 | <tr> |
522 | 539 | <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td> |
523 | <td> The user data set in <a class="link" href="NiceAgent.html#nice-agent-attach-recv" title="nice_agent_attach_recv ()"><code class="function">nice_agent_attach_recv()</code></a> | |
540 | <td>The user data set in <a class="link" href="NiceAgent.html#nice-agent-attach-recv" title="nice_agent_attach_recv ()"><code class="function">nice_agent_attach_recv()</code></a> | |
524 | 541 | </td> |
525 | 542 | </tr> |
526 | 543 | </tbody> |
534 | 551 | <p> |
535 | 552 | A hard limit for the number of remote candidates. This |
536 | 553 | limit is enforced to protect against malevolent remote |
537 | clients.</p> | |
554 | clients. | |
555 | </p> | |
538 | 556 | </div> |
539 | 557 | <hr> |
540 | 558 | <div class="refsect2" title="nice_agent_new ()"> |
541 | 559 | <a name="nice-agent-new"></a><h3>nice_agent_new ()</h3> |
542 | <pre class="programlisting"><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> * nice_agent_new (<a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="returnvalue">GMainContext</span></a> *ctx, | |
543 | <a class="link" href="NiceAgent.html#NiceCompatibility" title="enum NiceCompatibility"><span class="returnvalue">NiceCompatibility</span></a> compat);</pre> | |
560 | <pre class="programlisting"><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> * nice_agent_new (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> *ctx</code></em>, | |
561 | <em class="parameter"><code><a class="link" href="NiceAgent.html#NiceCompatibility" title="enum NiceCompatibility"><span class="type">NiceCompatibility</span></a> compat</code></em>);</pre> | |
544 | 562 | <p> |
545 | 563 | Create a new <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a>. |
546 | The returned object must be freed with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a></p> | |
564 | The returned object must be freed with <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> | |
565 | </p> | |
547 | 566 | <div class="variablelist"><table border="0"> |
548 | 567 | <col align="left" valign="top"> |
549 | 568 | <tbody> |
550 | 569 | <tr> |
551 | 570 | <td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td> |
552 | <td> The Glib Mainloop Context to use for timers | |
571 | <td>The Glib Mainloop Context to use for timers | |
553 | 572 | </td> |
554 | 573 | </tr> |
555 | 574 | <tr> |
556 | 575 | <td><p><span class="term"><em class="parameter"><code>compat</code></em> :</span></p></td> |
557 | <td> The compatibility mode of the agent | |
576 | <td>The compatibility mode of the agent | |
558 | 577 | </td> |
559 | 578 | </tr> |
560 | 579 | <tr> |
568 | 587 | <hr> |
569 | 588 | <div class="refsect2" title="nice_agent_new_reliable ()"> |
570 | 589 | <a name="nice-agent-new-reliable"></a><h3>nice_agent_new_reliable ()</h3> |
571 | <pre class="programlisting"><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> * nice_agent_new_reliable (<a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="returnvalue">GMainContext</span></a> *ctx, | |
572 | <a class="link" href="NiceAgent.html#NiceCompatibility" title="enum NiceCompatibility"><span class="returnvalue">NiceCompatibility</span></a> compat);</pre> | |
590 | <pre class="programlisting"><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> * nice_agent_new_reliable (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> *ctx</code></em>, | |
591 | <em class="parameter"><code><a class="link" href="NiceAgent.html#NiceCompatibility" title="enum NiceCompatibility"><span class="type">NiceCompatibility</span></a> compat</code></em>);</pre> | |
573 | 592 | <p> |
574 | 593 | Create a new <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> in reliable mode, which uses <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> to |
575 | 594 | assure reliability of the messages. |
576 | The returned object must be freed with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> | |
595 | The returned object must be freed with <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> | |
577 | 596 | </p> |
578 | 597 | <p> See also: <a class="link" href="NiceAgent.html#NiceAgent-reliable-transport-writable" title='The "reliable-transport-writable" signal'><span class="type">"reliable-transport-writable"</span></a> </p> |
598 | <p> | |
599 | </p> | |
579 | 600 | <div class="variablelist"><table border="0"> |
580 | 601 | <col align="left" valign="top"> |
581 | 602 | <tbody> |
582 | 603 | <tr> |
583 | 604 | <td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td> |
584 | <td> The Glib Mainloop Context to use for timers | |
605 | <td>The Glib Mainloop Context to use for timers | |
585 | 606 | </td> |
586 | 607 | </tr> |
587 | 608 | <tr> |
588 | 609 | <td><p><span class="term"><em class="parameter"><code>compat</code></em> :</span></p></td> |
589 | <td> The compatibility mode of the agent | |
610 | <td>The compatibility mode of the agent | |
590 | 611 | </td> |
591 | 612 | </tr> |
592 | 613 | <tr> |
601 | 622 | <hr> |
602 | 623 | <div class="refsect2" title="nice_agent_add_local_address ()"> |
603 | 624 | <a name="nice-agent-add-local-address"></a><h3>nice_agent_add_local_address ()</h3> |
604 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nice_agent_add_local_address (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
605 | <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr);</pre> | |
625 | <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nice_agent_add_local_address (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
626 | <em class="parameter"><code><a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>);</pre> | |
606 | 627 | <p> |
607 | 628 | Add a local address from which to derive local host candidates for |
608 | 629 | candidate gathering. |
614 | 635 | <p> |
615 | 636 | </p> |
616 | 637 | <p> |
617 | See also: <a class="link" href="NiceAgent.html#nice-agent-gather-candidates" title="nice_agent_gather_candidates ()"><code class="function">nice_agent_gather_candidates()</code></a></p> | |
618 | <div class="variablelist"><table border="0"> | |
619 | <col align="left" valign="top"> | |
620 | <tbody> | |
621 | <tr> | |
622 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
623 | <td> The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
638 | See also: <a class="link" href="NiceAgent.html#nice-agent-gather-candidates" title="nice_agent_gather_candidates ()"><code class="function">nice_agent_gather_candidates()</code></a> | |
639 | </p> | |
640 | <div class="variablelist"><table border="0"> | |
641 | <col align="left" valign="top"> | |
642 | <tbody> | |
643 | <tr> | |
644 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
645 | <td>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
624 | 646 | </td> |
625 | 647 | </tr> |
626 | 648 | <tr> |
627 | 649 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> |
628 | <td> The address to listen to | |
650 | <td>The address to listen to | |
629 | 651 | If the port is 0, then a random port will be chosen by the system |
630 | 652 | </td> |
631 | 653 | </tr> |
632 | 654 | <tr> |
633 | 655 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
634 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on fatal (memory allocation) errors | |
656 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on fatal (memory allocation) errors | |
635 | 657 | </td> |
636 | 658 | </tr> |
637 | 659 | </tbody> |
640 | 662 | <hr> |
641 | 663 | <div class="refsect2" title="nice_agent_add_stream ()"> |
642 | 664 | <a name="nice-agent-add-stream"></a><h3>nice_agent_add_stream ()</h3> |
643 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> nice_agent_add_stream (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
644 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> n_components);</pre> | |
645 | <p> | |
646 | Adds a data stream to <em class="parameter"><code>agent</code></em> containing <em class="parameter"><code>n_components</code></em> components.</p> | |
647 | <div class="variablelist"><table border="0"> | |
648 | <col align="left" valign="top"> | |
649 | <tbody> | |
650 | <tr> | |
651 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
652 | <td> The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
665 | <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> nice_agent_add_stream (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
666 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_components</code></em>);</pre> | |
667 | <p> | |
668 | Adds a data stream to <em class="parameter"><code>agent</code></em> containing <em class="parameter"><code>n_components</code></em> components. | |
669 | </p> | |
670 | <div class="variablelist"><table border="0"> | |
671 | <col align="left" valign="top"> | |
672 | <tbody> | |
673 | <tr> | |
674 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
675 | <td>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
653 | 676 | </td> |
654 | 677 | </tr> |
655 | 678 | <tr> |
656 | 679 | <td><p><span class="term"><em class="parameter"><code>n_components</code></em> :</span></p></td> |
657 | <td> The number of components to add to the stream | |
680 | <td>The number of components to add to the stream | |
658 | 681 | </td> |
659 | 682 | </tr> |
660 | 683 | <tr> |
668 | 691 | <hr> |
669 | 692 | <div class="refsect2" title="nice_agent_remove_stream ()"> |
670 | 693 | <a name="nice-agent-remove-stream"></a><h3>nice_agent_remove_stream ()</h3> |
671 | <pre class="programlisting"><span class="returnvalue">void</span> nice_agent_remove_stream (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
672 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id);</pre> | |
673 | <p> | |
674 | Remove and free a previously created data stream from <em class="parameter"><code>agent</code></em></p> | |
675 | <div class="variablelist"><table border="0"> | |
676 | <col align="left" valign="top"> | |
677 | <tbody> | |
678 | <tr> | |
679 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
680 | <td> The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
681 | </td> | |
682 | </tr> | |
683 | <tr> | |
684 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
685 | <td> The ID of the stream to remove | |
694 | <pre class="programlisting"><span class="returnvalue">void</span> nice_agent_remove_stream (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
695 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>);</pre> | |
696 | <p> | |
697 | Remove and free a previously created data stream from <em class="parameter"><code>agent</code></em> | |
698 | </p> | |
699 | <div class="variablelist"><table border="0"> | |
700 | <col align="left" valign="top"> | |
701 | <tbody> | |
702 | <tr> | |
703 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
704 | <td>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
705 | </td> | |
706 | </tr> | |
707 | <tr> | |
708 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
709 | <td>The ID of the stream to remove | |
686 | 710 | </td> |
687 | 711 | </tr> |
688 | 712 | </tbody> |
691 | 715 | <hr> |
692 | 716 | <div class="refsect2" title="nice_agent_set_relay_info ()"> |
693 | 717 | <a name="nice-agent-set-relay-info"></a><h3>nice_agent_set_relay_info ()</h3> |
694 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nice_agent_set_relay_info (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
695 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id, | |
696 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> component_id, | |
697 | const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *server_ip, | |
698 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> server_port, | |
699 | const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *username, | |
700 | const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *password, | |
701 | <a class="link" href="libnice-NiceCandidate.html#NiceRelayType" title="enum NiceRelayType"><span class="returnvalue">NiceRelayType</span></a> type);</pre> | |
702 | <p> | |
703 | Sets the settings for using a relay server during the candidate discovery.</p> | |
704 | <div class="variablelist"><table border="0"> | |
705 | <col align="left" valign="top"> | |
706 | <tbody> | |
707 | <tr> | |
708 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
709 | <td> The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
710 | </td> | |
711 | </tr> | |
712 | <tr> | |
713 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
714 | <td> The ID of the stream | |
718 | <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nice_agent_set_relay_info (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
719 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>, | |
720 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>, | |
721 | <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *server_ip</code></em>, | |
722 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> server_port</code></em>, | |
723 | <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *username</code></em>, | |
724 | <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *password</code></em>, | |
725 | <em class="parameter"><code><a class="link" href="libnice-NiceCandidate.html#NiceRelayType" title="enum NiceRelayType"><span class="type">NiceRelayType</span></a> type</code></em>);</pre> | |
726 | <p> | |
727 | Sets the settings for using a relay server during the candidate discovery. | |
728 | </p> | |
729 | <div class="variablelist"><table border="0"> | |
730 | <col align="left" valign="top"> | |
731 | <tbody> | |
732 | <tr> | |
733 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
734 | <td>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
735 | </td> | |
736 | </tr> | |
737 | <tr> | |
738 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
739 | <td>The ID of the stream | |
715 | 740 | </td> |
716 | 741 | </tr> |
717 | 742 | <tr> |
718 | 743 | <td><p><span class="term"><em class="parameter"><code>component_id</code></em> :</span></p></td> |
719 | <td> The ID of the component | |
744 | <td>The ID of the component | |
720 | 745 | </td> |
721 | 746 | </tr> |
722 | 747 | <tr> |
723 | 748 | <td><p><span class="term"><em class="parameter"><code>server_ip</code></em> :</span></p></td> |
724 | <td> The IP address of the TURN server | |
749 | <td>The IP address of the TURN server | |
725 | 750 | </td> |
726 | 751 | </tr> |
727 | 752 | <tr> |
728 | 753 | <td><p><span class="term"><em class="parameter"><code>server_port</code></em> :</span></p></td> |
729 | <td> The port of the TURN server | |
754 | <td>The port of the TURN server | |
730 | 755 | </td> |
731 | 756 | </tr> |
732 | 757 | <tr> |
733 | 758 | <td><p><span class="term"><em class="parameter"><code>username</code></em> :</span></p></td> |
734 | <td> The TURN username to use for the allocate | |
759 | <td>The TURN username to use for the allocate | |
735 | 760 | </td> |
736 | 761 | </tr> |
737 | 762 | <tr> |
738 | 763 | <td><p><span class="term"><em class="parameter"><code>password</code></em> :</span></p></td> |
739 | <td> The TURN password to use for the allocate | |
764 | <td>The TURN password to use for the allocate | |
740 | 765 | </td> |
741 | 766 | </tr> |
742 | 767 | <tr> |
743 | 768 | <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> |
744 | <td> The type of relay to use | |
769 | <td>The type of relay to use | |
745 | 770 | </td> |
746 | 771 | </tr> |
747 | 772 | <tr> |
748 | 773 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
749 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the TURN settings were accepted. | |
750 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the address was invalid. | |
774 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the TURN settings were accepted. | |
775 | <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the address was invalid. | |
751 | 776 | </td> |
752 | 777 | </tr> |
753 | 778 | </tbody> |
756 | 781 | <hr> |
757 | 782 | <div class="refsect2" title="nice_agent_gather_candidates ()"> |
758 | 783 | <a name="nice-agent-gather-candidates"></a><h3>nice_agent_gather_candidates ()</h3> |
759 | <pre class="programlisting"><span class="returnvalue">void</span> nice_agent_gather_candidates (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
760 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id);</pre> | |
784 | <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nice_agent_gather_candidates (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
785 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>);</pre> | |
761 | 786 | <p> |
762 | 787 | Start the candidate gathering process. |
763 | 788 | Once done, <a class="link" href="NiceAgent.html#NiceAgent-candidate-gathering-done" title='The "candidate-gathering-done" signal'><span class="type">"candidate-gathering-done"</span></a> is called for the stream |
764 | 789 | </p> |
765 | <p> | |
790 | <div class="variablelist"><table border="0"> | |
791 | <col align="left" valign="top"> | |
792 | <tbody> | |
793 | <tr> | |
794 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
795 | <td>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
796 | </td> | |
797 | </tr> | |
798 | <tr> | |
799 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
800 | <td>The id of the stream to start | |
801 | </td> | |
802 | </tr> | |
803 | <tr> | |
804 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> | |
805 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if there were no local addresses and they couldn't be discovered. In this case, call <a class="link" href="NiceAgent.html#nice-agent-add-local-address" title="nice_agent_add_local_address ()"><code class="function">nice_agent_add_local_address()</code></a> first. | |
806 | ||
766 | 807 | See also: <a class="link" href="NiceAgent.html#nice-agent-add-local-address" title="nice_agent_add_local_address ()"><code class="function">nice_agent_add_local_address()</code></a> |
767 | </p> | |
768 | <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"> | |
808 | <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"> | |
769 | 809 | <h3 class="title">Note</h3> |
770 | 810 | <p> |
771 | 811 | Local addresses can be previously set with <a class="link" href="NiceAgent.html#nice-agent-add-local-address" title="nice_agent_add_local_address ()"><code class="function">nice_agent_add_local_address()</code></a> |
776 | 816 | <a class="link" href="libnice-Network-interfaces-discovery.html#nice-interfaces-get-local-ips" title="nice_interfaces_get_local_ips ()"><code class="function">nice_interfaces_get_local_ips()</code></a> |
777 | 817 | </p> |
778 | 818 | </div> |
779 | <div class="variablelist"><table border="0"> | |
780 | <col align="left" valign="top"> | |
781 | <tbody> | |
782 | <tr> | |
783 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
784 | <td> The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
785 | </td> | |
786 | </tr> | |
787 | <tr> | |
788 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
789 | <td> The id of the stream to start | |
790 | 819 | </td> |
791 | 820 | </tr> |
792 | 821 | </tbody> |
795 | 824 | <hr> |
796 | 825 | <div class="refsect2" title="nice_agent_set_remote_credentials ()"> |
797 | 826 | <a name="nice-agent-set-remote-credentials"></a><h3>nice_agent_set_remote_credentials ()</h3> |
798 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nice_agent_set_remote_credentials (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
799 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id, | |
800 | const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *ufrag, | |
801 | const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *pwd);</pre> | |
827 | <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nice_agent_set_remote_credentials (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
828 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>, | |
829 | <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *ufrag</code></em>, | |
830 | <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *pwd</code></em>);</pre> | |
802 | 831 | <p> |
803 | 832 | Sets the remote credentials for stream <em class="parameter"><code>stream_id</code></em>. |
804 | 833 | </p> |
810 | 839 | Stream credentials do not override per-candidate credentials if set |
811 | 840 | </p> |
812 | 841 | </div> |
813 | <div class="variablelist"><table border="0"> | |
814 | <col align="left" valign="top"> | |
815 | <tbody> | |
816 | <tr> | |
817 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
818 | <td> The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
819 | </td> | |
820 | </tr> | |
821 | <tr> | |
822 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
823 | <td> The ID of the stream | |
842 | <p> | |
843 | </p> | |
844 | <div class="variablelist"><table border="0"> | |
845 | <col align="left" valign="top"> | |
846 | <tbody> | |
847 | <tr> | |
848 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
849 | <td>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
850 | </td> | |
851 | </tr> | |
852 | <tr> | |
853 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
854 | <td>The ID of the stream | |
824 | 855 | </td> |
825 | 856 | </tr> |
826 | 857 | <tr> |
827 | 858 | <td><p><span class="term"><em class="parameter"><code>ufrag</code></em> :</span></p></td> |
828 | <td> NULL-terminated string containing an ICE username fragment | |
859 | <td>NULL-terminated string containing an ICE username fragment | |
829 | 860 | (length must be between 22 and 256 chars) |
830 | 861 | </td> |
831 | 862 | </tr> |
832 | 863 | <tr> |
833 | 864 | <td><p><span class="term"><em class="parameter"><code>pwd</code></em> :</span></p></td> |
834 | <td> NULL-terminated string containing an ICE password | |
865 | <td>NULL-terminated string containing an ICE password | |
835 | 866 | (length must be between 4 and 256 chars) |
836 | 867 | </td> |
837 | 868 | </tr> |
838 | 869 | <tr> |
839 | 870 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
840 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error. | |
871 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error. | |
841 | 872 | </td> |
842 | 873 | </tr> |
843 | 874 | </tbody> |
846 | 877 | <hr> |
847 | 878 | <div class="refsect2" title="nice_agent_get_local_credentials ()"> |
848 | 879 | <a name="nice-agent-get-local-credentials"></a><h3>nice_agent_get_local_credentials ()</h3> |
849 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nice_agent_get_local_credentials (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
850 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id, | |
851 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **ufrag, | |
852 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> **pwd);</pre> | |
853 | <p> | |
854 | Gets the local credentials for stream <em class="parameter"><code>stream_id</code></em>.</p> | |
855 | <div class="variablelist"><table border="0"> | |
856 | <col align="left" valign="top"> | |
857 | <tbody> | |
858 | <tr> | |
859 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
860 | <td> The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
861 | </td> | |
862 | </tr> | |
863 | <tr> | |
864 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
865 | <td> The ID of the stream | |
880 | <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nice_agent_get_local_credentials (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
881 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>, | |
882 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **ufrag</code></em>, | |
883 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **pwd</code></em>);</pre> | |
884 | <p> | |
885 | Gets the local credentials for stream <em class="parameter"><code>stream_id</code></em>. | |
886 | </p> | |
887 | <div class="variablelist"><table border="0"> | |
888 | <col align="left" valign="top"> | |
889 | <tbody> | |
890 | <tr> | |
891 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
892 | <td>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
893 | </td> | |
894 | </tr> | |
895 | <tr> | |
896 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
897 | <td>The ID of the stream | |
866 | 898 | </td> |
867 | 899 | </tr> |
868 | 900 | <tr> |
869 | 901 | <td><p><span class="term"><em class="parameter"><code>ufrag</code></em> :</span></p></td> |
870 | <td> a pointer to a NULL-terminated string containing | |
902 | <td>a pointer to a NULL-terminated string containing | |
871 | 903 | an ICE username fragment [OUT]. |
872 | This string must be freed with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> | |
904 | This string must be freed with <a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> | |
873 | 905 | </td> |
874 | 906 | </tr> |
875 | 907 | <tr> |
876 | 908 | <td><p><span class="term"><em class="parameter"><code>pwd</code></em> :</span></p></td> |
877 | <td> a pointer to a NULL-terminated string containing an ICE | |
909 | <td>a pointer to a NULL-terminated string containing an ICE | |
878 | 910 | password [OUT] |
879 | This string must be freed with <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> | |
911 | This string must be freed with <a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> | |
880 | 912 | </td> |
881 | 913 | </tr> |
882 | 914 | <tr> |
883 | 915 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
884 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error. | |
916 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error. | |
885 | 917 | </td> |
886 | 918 | </tr> |
887 | 919 | </tbody> |
890 | 922 | <hr> |
891 | 923 | <div class="refsect2" title="nice_agent_set_remote_candidates ()"> |
892 | 924 | <a name="nice-agent-set-remote-candidates"></a><h3>nice_agent_set_remote_candidates ()</h3> |
893 | <pre class="programlisting"><span class="returnvalue">int</span> nice_agent_set_remote_candidates (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
894 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id, | |
895 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> component_id, | |
896 | const <a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> *candidates);</pre> | |
925 | <pre class="programlisting"><span class="returnvalue">int</span> nice_agent_set_remote_candidates (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
926 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>, | |
927 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>, | |
928 | <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *candidates</code></em>);</pre> | |
897 | 929 | <p> |
898 | 930 | Sets, adds or updates the remote candidates for a component of a stream. |
899 | 931 | </p> |
911 | 943 | calling <a class="link" href="NiceAgent.html#nice-agent-set-remote-candidates" title="nice_agent_set_remote_candidates ()"><code class="function">nice_agent_set_remote_candidates()</code></a> |
912 | 944 | </p> |
913 | 945 | </div> |
914 | <div class="variablelist"><table border="0"> | |
915 | <col align="left" valign="top"> | |
916 | <tbody> | |
917 | <tr> | |
918 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
919 | <td> The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
920 | </td> | |
921 | </tr> | |
922 | <tr> | |
923 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
924 | <td> The ID of the stream the candidates are for | |
946 | <p> | |
947 | </p> | |
948 | <div class="variablelist"><table border="0"> | |
949 | <col align="left" valign="top"> | |
950 | <tbody> | |
951 | <tr> | |
952 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
953 | <td>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
954 | </td> | |
955 | </tr> | |
956 | <tr> | |
957 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
958 | <td>The ID of the stream the candidates are for | |
925 | 959 | </td> |
926 | 960 | </tr> |
927 | 961 | <tr> |
928 | 962 | <td><p><span class="term"><em class="parameter"><code>component_id</code></em> :</span></p></td> |
929 | <td> The ID of the component the candidates are for | |
963 | <td>The ID of the component the candidates are for | |
930 | 964 | </td> |
931 | 965 | </tr> |
932 | 966 | <tr> |
933 | 967 | <td><p><span class="term"><em class="parameter"><code>candidates</code></em> :</span></p></td> |
934 | <td> a <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="type">NiceCandidate</span></a> items describing each candidate to add | |
968 | <td>a <a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="type">NiceCandidate</span></a> items describing each candidate to add | |
935 | 969 | </td> |
936 | 970 | </tr> |
937 | 971 | <tr> |
946 | 980 | <hr> |
947 | 981 | <div class="refsect2" title="nice_agent_get_remote_candidates ()"> |
948 | 982 | <a name="nice-agent-get-remote-candidates"></a><h3>nice_agent_get_remote_candidates ()</h3> |
949 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> * nice_agent_get_remote_candidates (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
950 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id, | |
951 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> component_id);</pre> | |
983 | <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> * nice_agent_get_remote_candidates (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
984 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>, | |
985 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>);</pre> | |
952 | 986 | <p> |
953 | 987 | Get a list of the remote candidates set on a stream's component |
954 | 988 | </p> |
966 | 1000 | to get notified of new remote candidates. |
967 | 1001 | </p> |
968 | 1002 | </div> |
969 | <div class="variablelist"><table border="0"> | |
970 | <col align="left" valign="top"> | |
971 | <tbody> | |
972 | <tr> | |
973 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
974 | <td> The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
975 | </td> | |
976 | </tr> | |
977 | <tr> | |
978 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
979 | <td> The ID of the stream | |
1003 | <p> | |
1004 | </p> | |
1005 | <div class="variablelist"><table border="0"> | |
1006 | <col align="left" valign="top"> | |
1007 | <tbody> | |
1008 | <tr> | |
1009 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1010 | <td>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
1011 | </td> | |
1012 | </tr> | |
1013 | <tr> | |
1014 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1015 | <td>The ID of the stream | |
980 | 1016 | </td> |
981 | 1017 | </tr> |
982 | 1018 | <tr> |
983 | 1019 | <td><p><span class="term"><em class="parameter"><code>component_id</code></em> :</span></p></td> |
984 | <td> The ID of the component | |
1020 | <td>The ID of the component | |
985 | 1021 | </td> |
986 | 1022 | </tr> |
987 | 1023 | <tr> |
988 | 1024 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
989 | <td> a <a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> of <a href="libnice-NiceCandidate.html#NiceCandidate"><span class="type">NiceCandidates</span></a> objects representing | |
1025 | <td> a <a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> of <a href="libnice-NiceCandidate.html#NiceCandidate"><span class="type">NiceCandidates</span></a> objects representing | |
990 | 1026 | the remote candidates set on the <em class="parameter"><code>agent</code></em> |
991 | 1027 | </td> |
992 | 1028 | </tr> |
996 | 1032 | <hr> |
997 | 1033 | <div class="refsect2" title="nice_agent_get_local_candidates ()"> |
998 | 1034 | <a name="nice-agent-get-local-candidates"></a><h3>nice_agent_get_local_candidates ()</h3> |
999 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> * nice_agent_get_local_candidates (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
1000 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id, | |
1001 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> component_id);</pre> | |
1035 | <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> * nice_agent_get_local_candidates (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
1036 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>, | |
1037 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>);</pre> | |
1002 | 1038 | <p> |
1003 | 1039 | Retreive from the agent the list of all local candidates |
1004 | 1040 | for a stream's component |
1014 | 1050 | <a class="link" href="NiceAgent.html#NiceAgent-candidate-gathering-done" title='The "candidate-gathering-done" signal'><span class="type">"candidate-gathering-done"</span></a> signal. |
1015 | 1051 | </p> |
1016 | 1052 | </div> |
1017 | <div class="variablelist"><table border="0"> | |
1018 | <col align="left" valign="top"> | |
1019 | <tbody> | |
1020 | <tr> | |
1021 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1022 | <td> The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
1023 | </td> | |
1024 | </tr> | |
1025 | <tr> | |
1026 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1027 | <td> The ID of the stream | |
1053 | <p> | |
1054 | </p> | |
1055 | <div class="variablelist"><table border="0"> | |
1056 | <col align="left" valign="top"> | |
1057 | <tbody> | |
1058 | <tr> | |
1059 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1060 | <td>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
1061 | </td> | |
1062 | </tr> | |
1063 | <tr> | |
1064 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1065 | <td>The ID of the stream | |
1028 | 1066 | </td> |
1029 | 1067 | </tr> |
1030 | 1068 | <tr> |
1031 | 1069 | <td><p><span class="term"><em class="parameter"><code>component_id</code></em> :</span></p></td> |
1032 | <td> The ID of the component | |
1070 | <td>The ID of the component | |
1033 | 1071 | </td> |
1034 | 1072 | </tr> |
1035 | 1073 | <tr> |
1036 | 1074 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
1037 | <td> a <a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> of <a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="type">NiceCandidate</span></a> objects representing | |
1075 | <td> a <a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> of <a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="type">NiceCandidate</span></a> objects representing | |
1038 | 1076 | the local candidates of <em class="parameter"><code>agent</code></em> |
1039 | 1077 | </td> |
1040 | 1078 | </tr> |
1044 | 1082 | <hr> |
1045 | 1083 | <div class="refsect2" title="nice_agent_send ()"> |
1046 | 1084 | <a name="nice-agent-send"></a><h3>nice_agent_send ()</h3> |
1047 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> nice_agent_send (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
1048 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id, | |
1049 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> component_id, | |
1050 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> len, | |
1051 | const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *buf);</pre> | |
1085 | <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> nice_agent_send (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
1086 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>, | |
1087 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>, | |
1088 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>, | |
1089 | <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buf</code></em>);</pre> | |
1052 | 1090 | <p> |
1053 | 1091 | Sends a data payload over a stream's component. |
1054 | 1092 | </p> |
1061 | 1099 | in any state if component was in READY state before and was then restarted |
1062 | 1100 | </p> |
1063 | 1101 | </div> |
1064 | <div class="variablelist"><table border="0"> | |
1065 | <col align="left" valign="top"> | |
1066 | <tbody> | |
1067 | <tr> | |
1068 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1069 | <td> The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
1070 | </td> | |
1071 | </tr> | |
1072 | <tr> | |
1073 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1074 | <td> The ID of the stream to send to | |
1102 | <p> | |
1103 | </p> | |
1104 | <div class="variablelist"><table border="0"> | |
1105 | <col align="left" valign="top"> | |
1106 | <tbody> | |
1107 | <tr> | |
1108 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1109 | <td>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
1110 | </td> | |
1111 | </tr> | |
1112 | <tr> | |
1113 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1114 | <td>The ID of the stream to send to | |
1075 | 1115 | </td> |
1076 | 1116 | </tr> |
1077 | 1117 | <tr> |
1078 | 1118 | <td><p><span class="term"><em class="parameter"><code>component_id</code></em> :</span></p></td> |
1079 | <td> The ID of the component to send to | |
1119 | <td>The ID of the component to send to | |
1080 | 1120 | </td> |
1081 | 1121 | </tr> |
1082 | 1122 | <tr> |
1083 | 1123 | <td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td> |
1084 | <td> The length of the buffer to send | |
1124 | <td>The length of the buffer to send | |
1085 | 1125 | </td> |
1086 | 1126 | </tr> |
1087 | 1127 | <tr> |
1088 | 1128 | <td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td> |
1089 | <td> The buffer of data to send | |
1129 | <td>The buffer of data to send | |
1090 | 1130 | </td> |
1091 | 1131 | </tr> |
1092 | 1132 | <tr> |
1100 | 1140 | <hr> |
1101 | 1141 | <div class="refsect2" title="nice_agent_attach_recv ()"> |
1102 | 1142 | <a name="nice-agent-attach-recv"></a><h3>nice_agent_attach_recv ()</h3> |
1103 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nice_agent_attach_recv (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
1104 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id, | |
1105 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> component_id, | |
1106 | <a href="http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#GMainContext"><span class="returnvalue">GMainContext</span></a> *ctx, | |
1107 | <a class="link" href="NiceAgent.html#NiceAgentRecvFunc" title="NiceAgentRecvFunc ()"><span class="returnvalue">NiceAgentRecvFunc</span></a> func, | |
1108 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> data);</pre> | |
1143 | <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nice_agent_attach_recv (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
1144 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>, | |
1145 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>, | |
1146 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> *ctx</code></em>, | |
1147 | <em class="parameter"><code><a class="link" href="NiceAgent.html#NiceAgentRecvFunc" title="NiceAgentRecvFunc ()"><span class="type">NiceAgentRecvFunc</span></a> func</code></em>, | |
1148 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre> | |
1109 | 1149 | <p> |
1110 | 1150 | Attaches the stream's component's sockets to the Glib Mainloop Context in |
1111 | order to be notified whenever data becomes available for a component.</p> | |
1112 | <div class="variablelist"><table border="0"> | |
1113 | <col align="left" valign="top"> | |
1114 | <tbody> | |
1115 | <tr> | |
1116 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1117 | <td> The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
1118 | </td> | |
1119 | </tr> | |
1120 | <tr> | |
1121 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1122 | <td> The ID of stream | |
1151 | order to be notified whenever data becomes available for a component. | |
1152 | </p> | |
1153 | <div class="variablelist"><table border="0"> | |
1154 | <col align="left" valign="top"> | |
1155 | <tbody> | |
1156 | <tr> | |
1157 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1158 | <td>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
1159 | </td> | |
1160 | </tr> | |
1161 | <tr> | |
1162 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1163 | <td>The ID of stream | |
1123 | 1164 | </td> |
1124 | 1165 | </tr> |
1125 | 1166 | <tr> |
1126 | 1167 | <td><p><span class="term"><em class="parameter"><code>component_id</code></em> :</span></p></td> |
1127 | <td> The ID of the component | |
1168 | <td>The ID of the component | |
1128 | 1169 | </td> |
1129 | 1170 | </tr> |
1130 | 1171 | <tr> |
1131 | 1172 | <td><p><span class="term"><em class="parameter"><code>ctx</code></em> :</span></p></td> |
1132 | <td> The Glib Mainloop Context to use for listening on the component | |
1173 | <td>The Glib Mainloop Context to use for listening on the component | |
1133 | 1174 | </td> |
1134 | 1175 | </tr> |
1135 | 1176 | <tr> |
1136 | 1177 | <td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td> |
1137 | <td> The callback function to be called when data is received on | |
1178 | <td>The callback function to be called when data is received on | |
1138 | 1179 | the stream's component |
1139 | 1180 | </td> |
1140 | 1181 | </tr> |
1141 | 1182 | <tr> |
1142 | 1183 | <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td> |
1143 | <td> user data associated with the callback | |
1184 | <td>user data associated with the callback | |
1144 | 1185 | </td> |
1145 | 1186 | </tr> |
1146 | 1187 | <tr> |
1147 | 1188 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
1148 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the stream or component IDs are invalid. | |
1189 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the stream or component IDs are invalid. | |
1149 | 1190 | </td> |
1150 | 1191 | </tr> |
1151 | 1192 | </tbody> |
1154 | 1195 | <hr> |
1155 | 1196 | <div class="refsect2" title="nice_agent_set_selected_pair ()"> |
1156 | 1197 | <a name="nice-agent-set-selected-pair"></a><h3>nice_agent_set_selected_pair ()</h3> |
1157 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nice_agent_set_selected_pair (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
1158 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id, | |
1159 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> component_id, | |
1160 | const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *lfoundation, | |
1161 | const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *rfoundation);</pre> | |
1198 | <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nice_agent_set_selected_pair (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
1199 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>, | |
1200 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>, | |
1201 | <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *lfoundation</code></em>, | |
1202 | <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *rfoundation</code></em>);</pre> | |
1162 | 1203 | <p> |
1163 | 1204 | Sets the selected candidate pair for media transmission |
1164 | 1205 | for a given stream's component. Calling this function will |
1165 | 1206 | disable all further ICE processing (connection check, |
1166 | 1207 | state machine updates, etc). Note that keepalives will |
1167 | continue to be sent.</p> | |
1168 | <div class="variablelist"><table border="0"> | |
1169 | <col align="left" valign="top"> | |
1170 | <tbody> | |
1171 | <tr> | |
1172 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1173 | <td> The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
1174 | </td> | |
1175 | </tr> | |
1176 | <tr> | |
1177 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1178 | <td> The ID of the stream | |
1208 | continue to be sent. | |
1209 | </p> | |
1210 | <div class="variablelist"><table border="0"> | |
1211 | <col align="left" valign="top"> | |
1212 | <tbody> | |
1213 | <tr> | |
1214 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1215 | <td>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
1216 | </td> | |
1217 | </tr> | |
1218 | <tr> | |
1219 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1220 | <td>The ID of the stream | |
1179 | 1221 | </td> |
1180 | 1222 | </tr> |
1181 | 1223 | <tr> |
1182 | 1224 | <td><p><span class="term"><em class="parameter"><code>component_id</code></em> :</span></p></td> |
1183 | <td> The ID of the component | |
1225 | <td>The ID of the component | |
1184 | 1226 | </td> |
1185 | 1227 | </tr> |
1186 | 1228 | <tr> |
1187 | 1229 | <td><p><span class="term"><em class="parameter"><code>lfoundation</code></em> :</span></p></td> |
1188 | <td> The local foundation of the candidate to use | |
1230 | <td>The local foundation of the candidate to use | |
1189 | 1231 | </td> |
1190 | 1232 | </tr> |
1191 | 1233 | <tr> |
1192 | 1234 | <td><p><span class="term"><em class="parameter"><code>rfoundation</code></em> :</span></p></td> |
1193 | <td> The remote foundation of the candidate to use | |
1235 | <td>The remote foundation of the candidate to use | |
1194 | 1236 | </td> |
1195 | 1237 | </tr> |
1196 | 1238 | <tr> |
1197 | 1239 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
1198 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the candidate pair cannot be found | |
1240 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the candidate pair cannot be found | |
1199 | 1241 | </td> |
1200 | 1242 | </tr> |
1201 | 1243 | </tbody> |
1204 | 1246 | <hr> |
1205 | 1247 | <div class="refsect2" title="nice_agent_set_selected_remote_candidate ()"> |
1206 | 1248 | <a name="nice-agent-set-selected-remote-candidate"></a><h3>nice_agent_set_selected_remote_candidate ()</h3> |
1207 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nice_agent_set_selected_remote_candidate | |
1208 | (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
1209 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id, | |
1210 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> component_id, | |
1211 | <a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="returnvalue">NiceCandidate</span></a> *candidate);</pre> | |
1249 | <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nice_agent_set_selected_remote_candidate | |
1250 | (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
1251 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>, | |
1252 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>, | |
1253 | <em class="parameter"><code><a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="type">NiceCandidate</span></a> *candidate</code></em>);</pre> | |
1212 | 1254 | <p> |
1213 | 1255 | Sets the selected remote candidate for media transmission |
1214 | 1256 | for a given stream's component. This is used to force the selection of |
1216 | 1258 | (e.g. non-ICE compatible candidates). |
1217 | 1259 | Calling this function will disable all further ICE processing |
1218 | 1260 | (connection check, state machine updates, etc). Note that keepalives will |
1219 | continue to be sent.</p> | |
1220 | <div class="variablelist"><table border="0"> | |
1221 | <col align="left" valign="top"> | |
1222 | <tbody> | |
1223 | <tr> | |
1224 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1225 | <td> The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
1226 | </td> | |
1227 | </tr> | |
1228 | <tr> | |
1229 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1230 | <td> The ID of the stream | |
1261 | continue to be sent. | |
1262 | </p> | |
1263 | <div class="variablelist"><table border="0"> | |
1264 | <col align="left" valign="top"> | |
1265 | <tbody> | |
1266 | <tr> | |
1267 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1268 | <td>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
1269 | </td> | |
1270 | </tr> | |
1271 | <tr> | |
1272 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1273 | <td>The ID of the stream | |
1231 | 1274 | </td> |
1232 | 1275 | </tr> |
1233 | 1276 | <tr> |
1234 | 1277 | <td><p><span class="term"><em class="parameter"><code>component_id</code></em> :</span></p></td> |
1235 | <td> The ID of the component | |
1278 | <td>The ID of the component | |
1236 | 1279 | </td> |
1237 | 1280 | </tr> |
1238 | 1281 | <tr> |
1239 | 1282 | <td><p><span class="term"><em class="parameter"><code>candidate</code></em> :</span></p></td> |
1240 | <td> The <a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="type">NiceCandidate</span></a> to select | |
1283 | <td>The <a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="type">NiceCandidate</span></a> to select | |
1241 | 1284 | </td> |
1242 | 1285 | </tr> |
1243 | 1286 | <tr> |
1244 | 1287 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
1245 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on failure | |
1288 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on failure | |
1246 | 1289 | </td> |
1247 | 1290 | </tr> |
1248 | 1291 | </tbody> |
1251 | 1294 | <hr> |
1252 | 1295 | <div class="refsect2" title="nice_agent_set_stream_tos ()"> |
1253 | 1296 | <a name="nice-agent-set-stream-tos"></a><h3>nice_agent_set_stream_tos ()</h3> |
1254 | <pre class="programlisting"><span class="returnvalue">void</span> nice_agent_set_stream_tos (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
1255 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> stream_id, | |
1256 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> tos);</pre> | |
1257 | <p> | |
1258 | Sets the IP_TOS and/or IPV6_TCLASS field on the stream's sockets' options</p> | |
1259 | <div class="variablelist"><table border="0"> | |
1260 | <col align="left" valign="top"> | |
1261 | <tbody> | |
1262 | <tr> | |
1263 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1264 | <td> The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
1265 | </td> | |
1266 | </tr> | |
1267 | <tr> | |
1268 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1269 | <td> The ID of the stream | |
1297 | <pre class="programlisting"><span class="returnvalue">void</span> nice_agent_set_stream_tos (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
1298 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>, | |
1299 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> tos</code></em>);</pre> | |
1300 | <p> | |
1301 | Sets the IP_TOS and/or IPV6_TCLASS field on the stream's sockets' options | |
1302 | </p> | |
1303 | <div class="variablelist"><table border="0"> | |
1304 | <col align="left" valign="top"> | |
1305 | <tbody> | |
1306 | <tr> | |
1307 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1308 | <td>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
1309 | </td> | |
1310 | </tr> | |
1311 | <tr> | |
1312 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1313 | <td>The ID of the stream | |
1270 | 1314 | </td> |
1271 | 1315 | </tr> |
1272 | 1316 | <tr> |
1273 | 1317 | <td><p><span class="term"><em class="parameter"><code>tos</code></em> :</span></p></td> |
1274 | <td> The ToS to set | |
1318 | <td>The ToS to set | |
1275 | 1319 | </td> |
1276 | 1320 | </tr> |
1277 | 1321 | </tbody> |
1281 | 1325 | <hr> |
1282 | 1326 | <div class="refsect2" title="nice_agent_set_software ()"> |
1283 | 1327 | <a name="nice-agent-set-software"></a><h3>nice_agent_set_software ()</h3> |
1284 | <pre class="programlisting"><span class="returnvalue">void</span> nice_agent_set_software (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent, | |
1285 | const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *software);</pre> | |
1328 | <pre class="programlisting"><span class="returnvalue">void</span> nice_agent_set_software (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>, | |
1329 | <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *software</code></em>);</pre> | |
1286 | 1330 | <p> |
1287 | 1331 | This function will set the value of the SOFTWARE attribute to be added to |
1288 | 1332 | STUN requests, responses and error responses sent during connectivity checks. |
1289 | 1333 | </p> |
1290 | 1334 | <p> |
1291 | The SOFTWARE attribute will only be added in the <a class="link" href="NiceAgent.html#NICE-COMPATIBILITY-DRAFT19:CAPS"><span class="type">NICE_COMPATIBILITY_DRAFT19</span></a> | |
1335 | The SOFTWARE attribute will only be added in the <a class="link" href="NiceAgent.html#NICE-COMPATIBILITY-RFC5245:CAPS"><span class="type">NICE_COMPATIBILITY_RFC5245</span></a> | |
1292 | 1336 | and <a class="link" href="NiceAgent.html#NICE-COMPATIBILITY-WLM2009:CAPS"><span class="type">NICE_COMPATIBILITY_WLM2009</span></a> compatibility modes. |
1293 | 1337 | </p> |
1294 | 1338 | <p> |
1308 | 1352 | 128 characters will be sent. |
1309 | 1353 | </p> |
1310 | 1354 | </div> |
1311 | <div class="variablelist"><table border="0"> | |
1312 | <col align="left" valign="top"> | |
1313 | <tbody> | |
1314 | <tr> | |
1315 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1316 | <td> The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
1355 | <p> | |
1356 | </p> | |
1357 | <div class="variablelist"><table border="0"> | |
1358 | <col align="left" valign="top"> | |
1359 | <tbody> | |
1360 | <tr> | |
1361 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1362 | <td>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
1317 | 1363 | </td> |
1318 | 1364 | </tr> |
1319 | 1365 | <tr> |
1320 | 1366 | <td><p><span class="term"><em class="parameter"><code>software</code></em> :</span></p></td> |
1321 | <td> The value of the SOFTWARE attribute to add. | |
1367 | <td>The value of the SOFTWARE attribute to add. | |
1322 | 1368 | </td> |
1323 | 1369 | </tr> |
1324 | 1370 | </tbody> |
1328 | 1374 | <hr> |
1329 | 1375 | <div class="refsect2" title="nice_agent_restart ()"> |
1330 | 1376 | <a name="nice-agent-restart"></a><h3>nice_agent_restart ()</h3> |
1331 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nice_agent_restart (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *agent);</pre> | |
1377 | <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nice_agent_restart (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>);</pre> | |
1332 | 1378 | <p> |
1333 | 1379 | Restarts the session as defined in ICE draft 19. This function |
1334 | 1380 | needs to be called both when initiating (ICE spec section 9.1.1.1. |
1335 | 1381 | "ICE Restarts"), as well as when reacting (spec section 9.2.1.1. |
1336 | "Detecting ICE Restart") to a restart.</p> | |
1337 | <div class="variablelist"><table border="0"> | |
1338 | <col align="left" valign="top"> | |
1339 | <tbody> | |
1340 | <tr> | |
1341 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1342 | <td> The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
1382 | "Detecting ICE Restart") to a restart. | |
1383 | </p> | |
1384 | <div class="variablelist"><table border="0"> | |
1385 | <col align="left" valign="top"> | |
1386 | <tbody> | |
1387 | <tr> | |
1388 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1389 | <td>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object | |
1343 | 1390 | </td> |
1344 | 1391 | </tr> |
1345 | 1392 | <tr> |
1346 | 1393 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
1347 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error | |
1394 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error | |
1348 | 1395 | </td> |
1349 | 1396 | </tr> |
1350 | 1397 | </tbody> |
1355 | 1402 | <a name="NiceAgent.property-details"></a><h2>Property Details</h2> |
1356 | 1403 | <div class="refsect2" title='The "compatibility" property'> |
1357 | 1404 | <a name="NiceAgent--compatibility"></a><h3>The <code class="literal">"compatibility"</code> property</h3> |
1358 | <pre class="programlisting"> "compatibility" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write / Construct Only</pre> | |
1405 | <pre class="programlisting"> "compatibility" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write / Construct Only</pre> | |
1359 | 1406 | <p> |
1360 | 1407 | The Nice agent can work in various compatibility modes depending on |
1361 | 1408 | what the application/peer needs. |
1362 | 1409 | </p> |
1363 | 1410 | <p> See also: <a class="link" href="NiceAgent.html#NiceCompatibility" title="enum NiceCompatibility"><span class="type">NiceCompatibility</span></a></p> |
1411 | <p> | |
1412 | </p> | |
1364 | 1413 | <p>Allowed values: <= 3</p> |
1365 | 1414 | <p>Default value: 0</p> |
1366 | 1415 | </div> |
1367 | 1416 | <hr> |
1368 | 1417 | <div class="refsect2" title='The "controlling-mode" property'> |
1369 | 1418 | <a name="NiceAgent--controlling-mode"></a><h3>The <code class="literal">"controlling-mode"</code> property</h3> |
1370 | <pre class="programlisting"> "controlling-mode" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write</pre> | |
1419 | <pre class="programlisting"> "controlling-mode" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write</pre> | |
1371 | 1420 | <p>Whether the agent is in controlling mode.</p> |
1372 | 1421 | <p>Default value: FALSE</p> |
1373 | 1422 | </div> |
1374 | 1423 | <hr> |
1375 | 1424 | <div class="refsect2" title='The "full-mode" property'> |
1376 | 1425 | <a name="NiceAgent--full-mode"></a><h3>The <code class="literal">"full-mode"</code> property</h3> |
1377 | <pre class="programlisting"> "full-mode" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct Only</pre> | |
1426 | <pre class="programlisting"> "full-mode" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct Only</pre> | |
1378 | 1427 | <p>Whether agent runs in ICE full mode.</p> |
1379 | 1428 | <p>Default value: TRUE</p> |
1380 | 1429 | </div> |
1381 | 1430 | <hr> |
1382 | 1431 | <div class="refsect2" title='The "main-context" property'> |
1383 | 1432 | <a name="NiceAgent--main-context"></a><h3>The <code class="literal">"main-context"</code> property</h3> |
1384 | <pre class="programlisting"> "main-context" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> : Read / Write / Construct Only</pre> | |
1433 | <pre class="programlisting"> "main-context" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> : Read / Write / Construct Only</pre> | |
1385 | 1434 | <p> |
1386 | 1435 | A GLib main context is needed for all timeouts used by libnice. |
1387 | This is a property being set by the <a class="link" href="NiceAgent.html#nice-agent-new" title="nice_agent_new ()"><code class="function">nice_agent_new()</code></a> call.</p> | |
1436 | This is a property being set by the <a class="link" href="NiceAgent.html#nice-agent-new" title="nice_agent_new ()"><code class="function">nice_agent_new()</code></a> call. | |
1437 | </p> | |
1388 | 1438 | </div> |
1389 | 1439 | <hr> |
1390 | 1440 | <div class="refsect2" title='The "max-connectivity-checks" property'> |
1391 | 1441 | <a name="NiceAgent--max-connectivity-checks"></a><h3>The <code class="literal">"max-connectivity-checks"</code> property</h3> |
1392 | <pre class="programlisting"> "max-connectivity-checks" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write</pre> | |
1442 | <pre class="programlisting"> "max-connectivity-checks" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write</pre> | |
1393 | 1443 | <p>Upper limit for the total number of connectivity checks performed.</p> |
1394 | 1444 | <p>Default value: 0</p> |
1395 | 1445 | </div> |
1396 | 1446 | <hr> |
1397 | 1447 | <div class="refsect2" title='The "proxy-ip" property'> |
1398 | 1448 | <a name="NiceAgent--proxy-ip"></a><h3>The <code class="literal">"proxy-ip"</code> property</h3> |
1399 | <pre class="programlisting"> "proxy-ip" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write</pre> | |
1400 | <p> | |
1401 | The proxy server IP used to bypass a proxy firewall</p> | |
1449 | <pre class="programlisting"> "proxy-ip" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write</pre> | |
1450 | <p> | |
1451 | The proxy server IP used to bypass a proxy firewall | |
1452 | </p> | |
1402 | 1453 | <p>Default value: NULL</p> |
1403 | 1454 | <p class="since">Since 0.0.4</p> |
1404 | 1455 | </div> |
1405 | 1456 | <hr> |
1406 | 1457 | <div class="refsect2" title='The "proxy-password" property'> |
1407 | 1458 | <a name="NiceAgent--proxy-password"></a><h3>The <code class="literal">"proxy-password"</code> property</h3> |
1408 | <pre class="programlisting"> "proxy-password" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write</pre> | |
1409 | <p> | |
1410 | The password used to authenticate with the proxy</p> | |
1459 | <pre class="programlisting"> "proxy-password" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write</pre> | |
1460 | <p> | |
1461 | The password used to authenticate with the proxy | |
1462 | </p> | |
1411 | 1463 | <p>Default value: NULL</p> |
1412 | 1464 | <p class="since">Since 0.0.4</p> |
1413 | 1465 | </div> |
1414 | 1466 | <hr> |
1415 | 1467 | <div class="refsect2" title='The "proxy-port" property'> |
1416 | 1468 | <a name="NiceAgent--proxy-port"></a><h3>The <code class="literal">"proxy-port"</code> property</h3> |
1417 | <pre class="programlisting"> "proxy-port" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write</pre> | |
1418 | <p> | |
1419 | The proxy server port used to bypass a proxy firewall</p> | |
1469 | <pre class="programlisting"> "proxy-port" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write</pre> | |
1470 | <p> | |
1471 | The proxy server port used to bypass a proxy firewall | |
1472 | </p> | |
1420 | 1473 | <p>Allowed values: [1,65536]</p> |
1421 | 1474 | <p>Default value: 1</p> |
1422 | 1475 | <p class="since">Since 0.0.4</p> |
1424 | 1477 | <hr> |
1425 | 1478 | <div class="refsect2" title='The "proxy-type" property'> |
1426 | 1479 | <a name="NiceAgent--proxy-type"></a><h3>The <code class="literal">"proxy-type"</code> property</h3> |
1427 | <pre class="programlisting"> "proxy-type" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write</pre> | |
1428 | <p> | |
1429 | The type of proxy set in the proxy-ip property</p> | |
1480 | <pre class="programlisting"> "proxy-type" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write</pre> | |
1481 | <p> | |
1482 | The type of proxy set in the proxy-ip property | |
1483 | </p> | |
1430 | 1484 | <p>Allowed values: <= 2</p> |
1431 | 1485 | <p>Default value: 0</p> |
1432 | 1486 | <p class="since">Since 0.0.4</p> |
1434 | 1488 | <hr> |
1435 | 1489 | <div class="refsect2" title='The "proxy-username" property'> |
1436 | 1490 | <a name="NiceAgent--proxy-username"></a><h3>The <code class="literal">"proxy-username"</code> property</h3> |
1437 | <pre class="programlisting"> "proxy-username" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write</pre> | |
1438 | <p> | |
1439 | The username used to authenticate with the proxy</p> | |
1491 | <pre class="programlisting"> "proxy-username" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write</pre> | |
1492 | <p> | |
1493 | The username used to authenticate with the proxy | |
1494 | </p> | |
1440 | 1495 | <p>Default value: NULL</p> |
1441 | 1496 | <p class="since">Since 0.0.4</p> |
1442 | 1497 | </div> |
1443 | 1498 | <hr> |
1444 | 1499 | <div class="refsect2" title='The "reliable" property'> |
1445 | 1500 | <a name="NiceAgent--reliable"></a><h3>The <code class="literal">"reliable"</code> property</h3> |
1446 | <pre class="programlisting"> "reliable" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct Only</pre> | |
1501 | <pre class="programlisting"> "reliable" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct Only</pre> | |
1447 | 1502 | <p> |
1448 | 1503 | Whether the agent should use PseudoTcp to ensure a reliable transport |
1449 | of messages</p> | |
1504 | of messages | |
1505 | </p> | |
1450 | 1506 | <p>Default value: FALSE</p> |
1451 | 1507 | <p class="since">Since 0.0.11</p> |
1452 | 1508 | </div> |
1453 | 1509 | <hr> |
1454 | 1510 | <div class="refsect2" title='The "stun-pacing-timer" property'> |
1455 | 1511 | <a name="NiceAgent--stun-pacing-timer"></a><h3>The <code class="literal">"stun-pacing-timer"</code> property</h3> |
1456 | <pre class="programlisting"> "stun-pacing-timer" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write / Construct Only</pre> | |
1512 | <pre class="programlisting"> "stun-pacing-timer" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write / Construct Only</pre> | |
1457 | 1513 | <p>Timer 'Ta' (msecs) used in the IETF ICE specification for pacing candidate gathering and sending of connectivity checks.</p> |
1458 | 1514 | <p>Allowed values: >= 1</p> |
1459 | 1515 | <p>Default value: 20</p> |
1461 | 1517 | <hr> |
1462 | 1518 | <div class="refsect2" title='The "stun-server" property'> |
1463 | 1519 | <a name="NiceAgent--stun-server"></a><h3>The <code class="literal">"stun-server"</code> property</h3> |
1464 | <pre class="programlisting"> "stun-server" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write</pre> | |
1520 | <pre class="programlisting"> "stun-server" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>* : Read / Write</pre> | |
1465 | 1521 | <p>The STUN server used to obtain server-reflexive candidates.</p> |
1466 | 1522 | <p>Default value: NULL</p> |
1467 | 1523 | </div> |
1468 | 1524 | <hr> |
1469 | 1525 | <div class="refsect2" title='The "stun-server-port" property'> |
1470 | 1526 | <a name="NiceAgent--stun-server-port"></a><h3>The <code class="literal">"stun-server-port"</code> property</h3> |
1471 | <pre class="programlisting"> "stun-server-port" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write</pre> | |
1527 | <pre class="programlisting"> "stun-server-port" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write</pre> | |
1472 | 1528 | <p>The STUN server used to obtain server-reflexive candidates.</p> |
1473 | 1529 | <p>Allowed values: [1,65536]</p> |
1474 | 1530 | <p>Default value: 1</p> |
1476 | 1532 | <hr> |
1477 | 1533 | <div class="refsect2" title='The "upnp" property'> |
1478 | 1534 | <a name="NiceAgent--upnp"></a><h3>The <code class="literal">"upnp"</code> property</h3> |
1479 | <pre class="programlisting"> "upnp" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct</pre> | |
1535 | <pre class="programlisting"> "upnp" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write / Construct</pre> | |
1480 | 1536 | <p> |
1481 | 1537 | Whether the agent should use UPnP to open a port in the router and |
1482 | get the external IP</p> | |
1538 | get the external IP | |
1539 | </p> | |
1483 | 1540 | <p>Default value: TRUE</p> |
1484 | 1541 | <p class="since">Since 0.0.7</p> |
1485 | 1542 | </div> |
1486 | 1543 | <hr> |
1487 | 1544 | <div class="refsect2" title='The "upnp-timeout" property'> |
1488 | 1545 | <a name="NiceAgent--upnp-timeout"></a><h3>The <code class="literal">"upnp-timeout"</code> property</h3> |
1489 | <pre class="programlisting"> "upnp-timeout" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write / Construct</pre> | |
1546 | <pre class="programlisting"> "upnp-timeout" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write / Construct</pre> | |
1490 | 1547 | <p> |
1491 | 1548 | The maximum amount of time to wait for UPnP discovery to finish before |
1492 | signaling the <a class="link" href="NiceAgent.html#NiceAgent-candidate-gathering-done" title='The "candidate-gathering-done" signal'><span class="type">"candidate-gathering-done"</span></a> signal</p> | |
1549 | signaling the <a class="link" href="NiceAgent.html#NiceAgent-candidate-gathering-done" title='The "candidate-gathering-done" signal'><span class="type">"candidate-gathering-done"</span></a> signal | |
1550 | </p> | |
1493 | 1551 | <p>Allowed values: [100,60000]</p> |
1494 | 1552 | <p>Default value: 200</p> |
1495 | 1553 | <p class="since">Since 0.0.7</p> |
1500 | 1558 | <div class="refsect2" title='The "candidate-gathering-done" signal'> |
1501 | 1559 | <a name="NiceAgent-candidate-gathering-done"></a><h3>The <code class="literal">"candidate-gathering-done"</code> signal</h3> |
1502 | 1560 | <pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent, |
1503 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id, | |
1504 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : Run Last</pre> | |
1561 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id, | |
1562 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : Run Last</pre> | |
1505 | 1563 | <p> |
1506 | 1564 | This signal is fired whenever a stream has finished gathering its |
1507 | candidates after a call to <a class="link" href="NiceAgent.html#nice-agent-gather-candidates" title="nice_agent_gather_candidates ()"><code class="function">nice_agent_gather_candidates()</code></a></p> | |
1508 | <div class="variablelist"><table border="0"> | |
1509 | <col align="left" valign="top"> | |
1510 | <tbody> | |
1511 | <tr> | |
1512 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1513 | <td> The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object | |
1514 | </td> | |
1515 | </tr> | |
1516 | <tr> | |
1517 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1518 | <td> The ID of the stream | |
1565 | candidates after a call to <a class="link" href="NiceAgent.html#nice-agent-gather-candidates" title="nice_agent_gather_candidates ()"><code class="function">nice_agent_gather_candidates()</code></a> | |
1566 | </p> | |
1567 | <div class="variablelist"><table border="0"> | |
1568 | <col align="left" valign="top"> | |
1569 | <tbody> | |
1570 | <tr> | |
1571 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1572 | <td>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object | |
1573 | </td> | |
1574 | </tr> | |
1575 | <tr> | |
1576 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1577 | <td>The ID of the stream | |
1519 | 1578 | </td> |
1520 | 1579 | </tr> |
1521 | 1580 | <tr> |
1529 | 1588 | <div class="refsect2" title='The "component-state-changed" signal'> |
1530 | 1589 | <a name="NiceAgent-component-state-changed"></a><h3>The <code class="literal">"component-state-changed"</code> signal</h3> |
1531 | 1590 | <pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent, |
1532 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id, | |
1533 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id, | |
1534 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> state, | |
1535 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : Run Last</pre> | |
1536 | <p> | |
1537 | This signal is fired whenever a component's state changes</p> | |
1538 | <div class="variablelist"><table border="0"> | |
1539 | <col align="left" valign="top"> | |
1540 | <tbody> | |
1541 | <tr> | |
1542 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1543 | <td> The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object | |
1544 | </td> | |
1545 | </tr> | |
1546 | <tr> | |
1547 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1548 | <td> The ID of the stream | |
1591 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id, | |
1592 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id, | |
1593 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> state, | |
1594 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : Run Last</pre> | |
1595 | <p> | |
1596 | This signal is fired whenever a component's state changes | |
1597 | </p> | |
1598 | <div class="variablelist"><table border="0"> | |
1599 | <col align="left" valign="top"> | |
1600 | <tbody> | |
1601 | <tr> | |
1602 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1603 | <td>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object | |
1604 | </td> | |
1605 | </tr> | |
1606 | <tr> | |
1607 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1608 | <td>The ID of the stream | |
1549 | 1609 | </td> |
1550 | 1610 | </tr> |
1551 | 1611 | <tr> |
1552 | 1612 | <td><p><span class="term"><em class="parameter"><code>component_id</code></em> :</span></p></td> |
1553 | <td> The ID of the component | |
1613 | <td>The ID of the component | |
1554 | 1614 | </td> |
1555 | 1615 | </tr> |
1556 | 1616 | <tr> |
1557 | 1617 | <td><p><span class="term"><em class="parameter"><code>state</code></em> :</span></p></td> |
1558 | <td> The <a class="link" href="NiceAgent.html#NiceComponentState" title="enum NiceComponentState"><span class="type">NiceComponentState</span></a> of the component | |
1618 | <td>The <a class="link" href="NiceAgent.html#NiceComponentState" title="enum NiceComponentState"><span class="type">NiceComponentState</span></a> of the component | |
1559 | 1619 | </td> |
1560 | 1620 | </tr> |
1561 | 1621 | <tr> |
1569 | 1629 | <div class="refsect2" title='The "initial-binding-request-received" signal'> |
1570 | 1630 | <a name="NiceAgent-initial-binding-request-received"></a><h3>The <code class="literal">"initial-binding-request-received"</code> signal</h3> |
1571 | 1631 | <pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent, |
1572 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id, | |
1573 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : Run Last</pre> | |
1632 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id, | |
1633 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : Run Last</pre> | |
1574 | 1634 | <p> |
1575 | 1635 | This signal is fired when we received our first binding request from |
1576 | the peer.</p> | |
1577 | <div class="variablelist"><table border="0"> | |
1578 | <col align="left" valign="top"> | |
1579 | <tbody> | |
1580 | <tr> | |
1581 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1582 | <td> The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object | |
1583 | </td> | |
1584 | </tr> | |
1585 | <tr> | |
1586 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1587 | <td> The ID of the stream | |
1636 | the peer. | |
1637 | </p> | |
1638 | <div class="variablelist"><table border="0"> | |
1639 | <col align="left" valign="top"> | |
1640 | <tbody> | |
1641 | <tr> | |
1642 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1643 | <td>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object | |
1644 | </td> | |
1645 | </tr> | |
1646 | <tr> | |
1647 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1648 | <td>The ID of the stream | |
1588 | 1649 | </td> |
1589 | 1650 | </tr> |
1590 | 1651 | <tr> |
1598 | 1659 | <div class="refsect2" title='The "new-candidate" signal'> |
1599 | 1660 | <a name="NiceAgent-new-candidate"></a><h3>The <code class="literal">"new-candidate"</code> signal</h3> |
1600 | 1661 | <pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent, |
1601 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id, | |
1602 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id, | |
1603 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *foundation, | |
1604 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : Run Last</pre> | |
1662 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id, | |
1663 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id, | |
1664 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *foundation, | |
1665 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : Run Last</pre> | |
1605 | 1666 | <p> |
1606 | 1667 | This signal is fired when the agent discovers a new candidate |
1607 | 1668 | </p> |
1608 | 1669 | <p> See also: <a class="link" href="NiceAgent.html#NiceAgent-candidate-gathering-done" title='The "candidate-gathering-done" signal'><span class="type">"candidate-gathering-done"</span></a> </p> |
1609 | <div class="variablelist"><table border="0"> | |
1610 | <col align="left" valign="top"> | |
1611 | <tbody> | |
1612 | <tr> | |
1613 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1614 | <td> The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object | |
1615 | </td> | |
1616 | </tr> | |
1617 | <tr> | |
1618 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1619 | <td> The ID of the stream | |
1670 | <p> | |
1671 | </p> | |
1672 | <div class="variablelist"><table border="0"> | |
1673 | <col align="left" valign="top"> | |
1674 | <tbody> | |
1675 | <tr> | |
1676 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1677 | <td>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object | |
1678 | </td> | |
1679 | </tr> | |
1680 | <tr> | |
1681 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1682 | <td>The ID of the stream | |
1620 | 1683 | </td> |
1621 | 1684 | </tr> |
1622 | 1685 | <tr> |
1623 | 1686 | <td><p><span class="term"><em class="parameter"><code>component_id</code></em> :</span></p></td> |
1624 | <td> The ID of the component | |
1687 | <td>The ID of the component | |
1625 | 1688 | </td> |
1626 | 1689 | </tr> |
1627 | 1690 | <tr> |
1628 | 1691 | <td><p><span class="term"><em class="parameter"><code>foundation</code></em> :</span></p></td> |
1629 | <td> The foundation of the new candidate | |
1692 | <td>The foundation of the new candidate | |
1630 | 1693 | </td> |
1631 | 1694 | </tr> |
1632 | 1695 | <tr> |
1640 | 1703 | <div class="refsect2" title='The "new-remote-candidate" signal'> |
1641 | 1704 | <a name="NiceAgent-new-remote-candidate"></a><h3>The <code class="literal">"new-remote-candidate"</code> signal</h3> |
1642 | 1705 | <pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent, |
1643 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id, | |
1644 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id, | |
1645 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *foundation, | |
1646 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : Run Last</pre> | |
1706 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id, | |
1707 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id, | |
1708 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *foundation, | |
1709 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : Run Last</pre> | |
1647 | 1710 | <p> |
1648 | 1711 | This signal is fired when the agent discovers a new remote candidate. |
1649 | This can happen with peer reflexive candidates.</p> | |
1650 | <div class="variablelist"><table border="0"> | |
1651 | <col align="left" valign="top"> | |
1652 | <tbody> | |
1653 | <tr> | |
1654 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1655 | <td> The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object | |
1656 | </td> | |
1657 | </tr> | |
1658 | <tr> | |
1659 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1660 | <td> The ID of the stream | |
1712 | This can happen with peer reflexive candidates. | |
1713 | </p> | |
1714 | <div class="variablelist"><table border="0"> | |
1715 | <col align="left" valign="top"> | |
1716 | <tbody> | |
1717 | <tr> | |
1718 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1719 | <td>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object | |
1720 | </td> | |
1721 | </tr> | |
1722 | <tr> | |
1723 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1724 | <td>The ID of the stream | |
1661 | 1725 | </td> |
1662 | 1726 | </tr> |
1663 | 1727 | <tr> |
1664 | 1728 | <td><p><span class="term"><em class="parameter"><code>component_id</code></em> :</span></p></td> |
1665 | <td> The ID of the component | |
1729 | <td>The ID of the component | |
1666 | 1730 | </td> |
1667 | 1731 | </tr> |
1668 | 1732 | <tr> |
1669 | 1733 | <td><p><span class="term"><em class="parameter"><code>foundation</code></em> :</span></p></td> |
1670 | <td> The foundation of the new candidate | |
1734 | <td>The foundation of the new candidate | |
1671 | 1735 | </td> |
1672 | 1736 | </tr> |
1673 | 1737 | <tr> |
1681 | 1745 | <div class="refsect2" title='The "new-selected-pair" signal'> |
1682 | 1746 | <a name="NiceAgent-new-selected-pair"></a><h3>The <code class="literal">"new-selected-pair"</code> signal</h3> |
1683 | 1747 | <pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent, |
1684 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id, | |
1685 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id, | |
1686 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *lfoundation, | |
1687 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *rfoundation, | |
1688 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : Run Last</pre> | |
1748 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id, | |
1749 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id, | |
1750 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *lfoundation, | |
1751 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *rfoundation, | |
1752 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : Run Last</pre> | |
1689 | 1753 | <p> |
1690 | 1754 | This signal is fired once a candidate pair is selected for data transfer for |
1691 | a stream's component</p> | |
1692 | <div class="variablelist"><table border="0"> | |
1693 | <col align="left" valign="top"> | |
1694 | <tbody> | |
1695 | <tr> | |
1696 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1697 | <td> The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object | |
1698 | </td> | |
1699 | </tr> | |
1700 | <tr> | |
1701 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1702 | <td> The ID of the stream | |
1755 | a stream's component | |
1756 | </p> | |
1757 | <div class="variablelist"><table border="0"> | |
1758 | <col align="left" valign="top"> | |
1759 | <tbody> | |
1760 | <tr> | |
1761 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1762 | <td>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object | |
1763 | </td> | |
1764 | </tr> | |
1765 | <tr> | |
1766 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1767 | <td>The ID of the stream | |
1703 | 1768 | </td> |
1704 | 1769 | </tr> |
1705 | 1770 | <tr> |
1706 | 1771 | <td><p><span class="term"><em class="parameter"><code>component_id</code></em> :</span></p></td> |
1707 | <td> The ID of the component | |
1772 | <td>The ID of the component | |
1708 | 1773 | </td> |
1709 | 1774 | </tr> |
1710 | 1775 | <tr> |
1711 | 1776 | <td><p><span class="term"><em class="parameter"><code>lfoundation</code></em> :</span></p></td> |
1712 | <td> The local foundation of the selected candidate pair | |
1777 | <td>The local foundation of the selected candidate pair | |
1713 | 1778 | </td> |
1714 | 1779 | </tr> |
1715 | 1780 | <tr> |
1716 | 1781 | <td><p><span class="term"><em class="parameter"><code>rfoundation</code></em> :</span></p></td> |
1717 | <td> The remote foundation of the selected candidate pair | |
1782 | <td>The remote foundation of the selected candidate pair | |
1718 | 1783 | </td> |
1719 | 1784 | </tr> |
1720 | 1785 | <tr> |
1728 | 1793 | <div class="refsect2" title='The "reliable-transport-writable" signal'> |
1729 | 1794 | <a name="NiceAgent-reliable-transport-writable"></a><h3>The <code class="literal">"reliable-transport-writable"</code> signal</h3> |
1730 | 1795 | <pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent, |
1731 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id, | |
1732 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id, | |
1733 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : Run Last</pre> | |
1796 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id, | |
1797 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id, | |
1798 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : Run Last</pre> | |
1734 | 1799 | <p> |
1735 | 1800 | This signal is fired on the reliable <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> when the underlying reliable |
1736 | 1801 | transport becomes writable. |
1737 | 1802 | This signal is only emitted when the <a class="link" href="NiceAgent.html#nice-agent-send" title="nice_agent_send ()"><code class="function">nice_agent_send()</code></a> function returns less |
1738 | 1803 | bytes than requested to send (or -1) and once when the connection |
1739 | is established.</p> | |
1740 | <div class="variablelist"><table border="0"> | |
1741 | <col align="left" valign="top"> | |
1742 | <tbody> | |
1743 | <tr> | |
1744 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1745 | <td> The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object | |
1746 | </td> | |
1747 | </tr> | |
1748 | <tr> | |
1749 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1750 | <td> The ID of the stream | |
1804 | is established. | |
1805 | </p> | |
1806 | <div class="variablelist"><table border="0"> | |
1807 | <col align="left" valign="top"> | |
1808 | <tbody> | |
1809 | <tr> | |
1810 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1811 | <td>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object | |
1812 | </td> | |
1813 | </tr> | |
1814 | <tr> | |
1815 | <td><p><span class="term"><em class="parameter"><code>stream_id</code></em> :</span></p></td> | |
1816 | <td>The ID of the stream | |
1751 | 1817 | </td> |
1752 | 1818 | </tr> |
1753 | 1819 | <tr> |
1754 | 1820 | <td><p><span class="term"><em class="parameter"><code>component_id</code></em> :</span></p></td> |
1755 | <td> The ID of the component | |
1821 | <td>The ID of the component | |
1756 | 1822 | </td> |
1757 | 1823 | </tr> |
1758 | 1824 | <tr> |
1771 | 1837 | </div> |
1772 | 1838 | <div class="footer"> |
1773 | 1839 | <hr> |
1774 | Generated by GTK-Doc V1.13</div> | |
1840 | Generated by GTK-Doc V1.15</div> | |
1775 | 1841 | </body> |
1776 | 1842 | </html>⏎ |
7 | 7 | <link rel="up" href="pt01.html" title="Part I. ICE Library"> |
8 | 8 | <link rel="prev" href="pt01.html" title="Part I. ICE Library"> |
9 | 9 | <link rel="next" href="NiceAgent.html" title="NiceAgent"> |
10 | <meta name="generator" content="GTK-Doc V1.13 (XML mode)"> | |
10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> | |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | <link rel="part" href="pt01.html" title="Part I. ICE Library"> | |
13 | <link rel="chapter" href="ch01.html" title=""> | |
14 | <link rel="chapter" href="ch02.html" title="Libnice helper functions"> | |
15 | <link rel="part" href="pt02.html" title="Part II. STUN Library"> | |
16 | <link rel="chapter" href="ch03.html" title=""> | |
17 | <link rel="chapter" href="ch04.html" title="STUN usages"> | |
18 | <link rel="part" href="pt03.html" title="Part III. Pseudo TCP Socket implementation"> | |
19 | <link rel="chapter" href="ch05.html" title=""> | |
20 | 12 | </head> |
21 | 13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
22 | 14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"> |
42 | 34 | </div> |
43 | 35 | <div class="footer"> |
44 | 36 | <hr> |
45 | Generated by GTK-Doc V1.13</div> | |
37 | Generated by GTK-Doc V1.15</div> | |
46 | 38 | </body> |
47 | 39 | </html>⏎ |
7 | 7 | <link rel="up" href="pt01.html" title="Part I. ICE Library"> |
8 | 8 | <link rel="prev" href="libnice-NiceCandidate.html" title="NiceCandidate"> |
9 | 9 | <link rel="next" href="libnice-Debug-messages.html" title="Debug messages"> |
10 | <meta name="generator" content="GTK-Doc V1.13 (XML mode)"> | |
10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> | |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | <link rel="part" href="pt01.html" title="Part I. ICE Library"> | |
13 | <link rel="chapter" href="ch01.html" title=""> | |
14 | <link rel="chapter" href="ch02.html" title="Libnice helper functions"> | |
15 | <link rel="part" href="pt02.html" title="Part II. STUN Library"> | |
16 | <link rel="chapter" href="ch03.html" title=""> | |
17 | <link rel="chapter" href="ch04.html" title="STUN usages"> | |
18 | <link rel="part" href="pt03.html" title="Part III. Pseudo TCP Socket implementation"> | |
19 | <link rel="chapter" href="ch05.html" title=""> | |
20 | 12 | </head> |
21 | 13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
22 | 14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"> |
28 | 20 | </tr></table> |
29 | 21 | <div class="chapter" title="Libnice helper functions"> |
30 | 22 | <div class="titlepage"><div><div><h2 class="title"> |
31 | <a name="id2591130"></a>Libnice helper functions </h2></div></div></div> | |
23 | <a name="id2621746"></a>Libnice helper functions </h2></div></div></div> | |
32 | 24 | <div class="toc"><dl> |
33 | 25 | <dt> |
34 | 26 | <span class="refentrytitle"><a href="libnice-Debug-messages.html">Debug messages</a></span><span class="refpurpose"> — Debug messages utility functions</span> |
40 | 32 | </div> |
41 | 33 | <div class="footer"> |
42 | 34 | <hr> |
43 | Generated by GTK-Doc V1.13</div> | |
35 | Generated by GTK-Doc V1.15</div> | |
44 | 36 | </body> |
45 | 37 | </html>⏎ |
7 | 7 | <link rel="up" href="pt02.html" title="Part II. STUN Library"> |
8 | 8 | <link rel="prev" href="pt02.html" title="Part II. STUN Library"> |
9 | 9 | <link rel="next" href="libnice-StunAgent.html" title="StunAgent"> |
10 | <meta name="generator" content="GTK-Doc V1.13 (XML mode)"> | |
10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> | |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | <link rel="part" href="pt01.html" title="Part I. ICE Library"> | |
13 | <link rel="chapter" href="ch01.html" title=""> | |
14 | <link rel="chapter" href="ch02.html" title="Libnice helper functions"> | |
15 | <link rel="part" href="pt02.html" title="Part II. STUN Library"> | |
16 | <link rel="chapter" href="ch03.html" title=""> | |
17 | <link rel="chapter" href="ch04.html" title="STUN usages"> | |
18 | <link rel="part" href="pt03.html" title="Part III. Pseudo TCP Socket implementation"> | |
19 | <link rel="chapter" href="ch05.html" title=""> | |
20 | 12 | </head> |
21 | 13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
22 | 14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"> |
39 | 31 | </div> |
40 | 32 | <div class="footer"> |
41 | 33 | <hr> |
42 | Generated by GTK-Doc V1.13</div> | |
34 | Generated by GTK-Doc V1.15</div> | |
43 | 35 | </body> |
44 | 36 | </html>⏎ |
7 | 7 | <link rel="up" href="pt02.html" title="Part II. STUN Library"> |
8 | 8 | <link rel="prev" href="libnice-StunMessage.html" title="StunMessage"> |
9 | 9 | <link rel="next" href="libnice-Bind.html" title="Bind"> |
10 | <meta name="generator" content="GTK-Doc V1.13 (XML mode)"> | |
10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> | |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | <link rel="part" href="pt01.html" title="Part I. ICE Library"> | |
13 | <link rel="chapter" href="ch01.html" title=""> | |
14 | <link rel="chapter" href="ch02.html" title="Libnice helper functions"> | |
15 | <link rel="part" href="pt02.html" title="Part II. STUN Library"> | |
16 | <link rel="chapter" href="ch03.html" title=""> | |
17 | <link rel="chapter" href="ch04.html" title="STUN usages"> | |
18 | <link rel="part" href="pt03.html" title="Part III. Pseudo TCP Socket implementation"> | |
19 | <link rel="chapter" href="ch05.html" title=""> | |
20 | 12 | </head> |
21 | 13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
22 | 14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"> |
28 | 20 | </tr></table> |
29 | 21 | <div class="chapter" title="STUN usages"> |
30 | 22 | <div class="titlepage"><div><div><h2 class="title"> |
31 | <a name="id2600291"></a>STUN usages</h2></div></div></div> | |
23 | <a name="id2621780"></a>STUN usages</h2></div></div></div> | |
32 | 24 | <div class="toc"><dl> |
33 | 25 | <dt> |
34 | 26 | <span class="refentrytitle"><a href="libnice-Bind.html">Bind</a></span><span class="refpurpose"> — STUN Binding Usage</span> |
46 | 38 | </div> |
47 | 39 | <div class="footer"> |
48 | 40 | <hr> |
49 | Generated by GTK-Doc V1.13</div> | |
41 | Generated by GTK-Doc V1.15</div> | |
50 | 42 | </body> |
51 | 43 | </html>⏎ |
7 | 7 | <link rel="up" href="pt03.html" title="Part III. Pseudo TCP Socket implementation"> |
8 | 8 | <link rel="prev" href="pt03.html" title="Part III. Pseudo TCP Socket implementation"> |
9 | 9 | <link rel="next" href="libnice-Pseudo-TCP-Socket.html" title="Pseudo TCP Socket"> |
10 | <meta name="generator" content="GTK-Doc V1.13 (XML mode)"> | |
10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> | |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | <link rel="part" href="pt01.html" title="Part I. ICE Library"> | |
13 | <link rel="chapter" href="ch01.html" title=""> | |
14 | <link rel="chapter" href="ch02.html" title="Libnice helper functions"> | |
15 | <link rel="part" href="pt02.html" title="Part II. STUN Library"> | |
16 | <link rel="chapter" href="ch03.html" title=""> | |
17 | <link rel="chapter" href="ch04.html" title="STUN usages"> | |
18 | <link rel="part" href="pt03.html" title="Part III. Pseudo TCP Socket implementation"> | |
19 | <link rel="chapter" href="ch05.html" title=""> | |
20 | 12 | </head> |
21 | 13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
22 | 14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"> |
34 | 26 | </div> |
35 | 27 | <div class="footer"> |
36 | 28 | <hr> |
37 | Generated by GTK-Doc V1.13</div> | |
29 | Generated by GTK-Doc V1.15</div> | |
38 | 30 | </body> |
39 | 31 | </html>⏎ |
5 | 5 | <meta name="generator" content="DocBook XSL Stylesheets V1.75.2"> |
6 | 6 | <link rel="home" href="index.html" title="libnice Reference Manual"> |
7 | 7 | <link rel="next" href="pt01.html" title="Part I. ICE Library"> |
8 | <meta name="generator" content="GTK-Doc V1.13 (XML mode)"> | |
8 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> | |
9 | 9 | <link rel="stylesheet" href="style.css" type="text/css"> |
10 | <link rel="part" href="pt01.html" title="Part I. ICE Library"> | |
11 | <link rel="chapter" href="ch01.html" title=""> | |
12 | <link rel="chapter" href="ch02.html" title="Libnice helper functions"> | |
13 | <link rel="part" href="pt02.html" title="Part II. STUN Library"> | |
14 | <link rel="chapter" href="ch03.html" title=""> | |
15 | <link rel="chapter" href="ch04.html" title="STUN usages"> | |
16 | <link rel="part" href="pt03.html" title="Part III. Pseudo TCP Socket implementation"> | |
17 | <link rel="chapter" href="ch05.html" title=""> | |
18 | 10 | </head> |
19 | 11 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
20 | 12 | <div class="book" title="libnice Reference Manual"> |
94 | 86 | </div> |
95 | 87 | <div class="footer"> |
96 | 88 | <hr> |
97 | Generated by GTK-Doc V1.13</div> | |
89 | Generated by GTK-Doc V1.15</div> | |
98 | 90 | </body> |
99 | 91 | </html>⏎ |
24 | 24 | <ANCHOR id="NICE-PROXY-TYPE-HTTP:CAPS" href="libnice/NiceAgent.html#NICE-PROXY-TYPE-HTTP:CAPS"> |
25 | 25 | <ANCHOR id="NICE-PROXY-TYPE-LAST:CAPS" href="libnice/NiceAgent.html#NICE-PROXY-TYPE-LAST:CAPS"> |
26 | 26 | <ANCHOR id="NiceCompatibility" href="libnice/NiceAgent.html#NiceCompatibility"> |
27 | <ANCHOR id="NICE-COMPATIBILITY-DRAFT19:CAPS" href="libnice/NiceAgent.html#NICE-COMPATIBILITY-DRAFT19:CAPS"> | |
27 | <ANCHOR id="NICE-COMPATIBILITY-RFC5245:CAPS" href="libnice/NiceAgent.html#NICE-COMPATIBILITY-RFC5245:CAPS"> | |
28 | 28 | <ANCHOR id="NICE-COMPATIBILITY-GOOGLE:CAPS" href="libnice/NiceAgent.html#NICE-COMPATIBILITY-GOOGLE:CAPS"> |
29 | 29 | <ANCHOR id="NICE-COMPATIBILITY-MSN:CAPS" href="libnice/NiceAgent.html#NICE-COMPATIBILITY-MSN:CAPS"> |
30 | 30 | <ANCHOR id="NICE-COMPATIBILITY-WLM2009:CAPS" href="libnice/NiceAgent.html#NICE-COMPATIBILITY-WLM2009:CAPS"> |
31 | <ANCHOR id="NICE-COMPATIBILITY-DRAFT19:CAPS" href="libnice/NiceAgent.html#NICE-COMPATIBILITY-DRAFT19:CAPS"> | |
31 | 32 | <ANCHOR id="NICE-COMPATIBILITY-LAST:CAPS" href="libnice/NiceAgent.html#NICE-COMPATIBILITY-LAST:CAPS"> |
32 | 33 | <ANCHOR id="NiceAgentRecvFunc" href="libnice/NiceAgent.html#NiceAgentRecvFunc"> |
33 | 34 | <ANCHOR id="NICE-AGENT-MAX-REMOTE-CANDIDATES:CAPS" href="libnice/NiceAgent.html#NICE-AGENT-MAX-REMOTE-CANDIDATES:CAPS"> |
332 | 333 | <ANCHOR id="libnice-ICE.description" href="libnice/libnice-ICE.html#libnice-ICE.description"> |
333 | 334 | <ANCHOR id="libnice-ICE.details" href="libnice/libnice-ICE.html#libnice-ICE.details"> |
334 | 335 | <ANCHOR id="StunUsageIceCompatibility" href="libnice/libnice-ICE.html#StunUsageIceCompatibility"> |
335 | <ANCHOR id="STUN-USAGE-ICE-COMPATIBILITY-DRAFT19:CAPS" href="libnice/libnice-ICE.html#STUN-USAGE-ICE-COMPATIBILITY-DRAFT19:CAPS"> | |
336 | <ANCHOR id="STUN-USAGE-ICE-COMPATIBILITY-RFC5245:CAPS" href="libnice/libnice-ICE.html#STUN-USAGE-ICE-COMPATIBILITY-RFC5245:CAPS"> | |
336 | 337 | <ANCHOR id="STUN-USAGE-ICE-COMPATIBILITY-GOOGLE:CAPS" href="libnice/libnice-ICE.html#STUN-USAGE-ICE-COMPATIBILITY-GOOGLE:CAPS"> |
337 | 338 | <ANCHOR id="STUN-USAGE-ICE-COMPATIBILITY-MSN:CAPS" href="libnice/libnice-ICE.html#STUN-USAGE-ICE-COMPATIBILITY-MSN:CAPS"> |
339 | <ANCHOR id="STUN-USAGE-ICE-COMPATIBILITY-DRAFT19:CAPS" href="libnice/libnice-ICE.html#STUN-USAGE-ICE-COMPATIBILITY-DRAFT19:CAPS"> | |
338 | 340 | <ANCHOR id="StunUsageIceReturn" href="libnice/libnice-ICE.html#StunUsageIceReturn"> |
339 | 341 | <ANCHOR id="STUN-USAGE-ICE-RETURN-SUCCESS:CAPS" href="libnice/libnice-ICE.html#STUN-USAGE-ICE-RETURN-SUCCESS:CAPS"> |
340 | 342 | <ANCHOR id="STUN-USAGE-ICE-RETURN-ERROR:CAPS" href="libnice/libnice-ICE.html#STUN-USAGE-ICE-RETURN-ERROR:CAPS"> |
7 | 7 | <link rel="up" href="ch04.html" title="STUN usages"> |
8 | 8 | <link rel="prev" href="ch04.html" title="STUN usages"> |
9 | 9 | <link rel="next" href="libnice-ICE.html" title="ICE"> |
10 | <meta name="generator" content="GTK-Doc V1.13 (XML mode)"> | |
10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> | |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | <link rel="part" href="pt01.html" title="Part I. ICE Library"> | |
13 | <link rel="chapter" href="ch01.html" title=""> | |
14 | <link rel="chapter" href="ch02.html" title="Libnice helper functions"> | |
15 | <link rel="part" href="pt02.html" title="Part II. STUN Library"> | |
16 | <link rel="chapter" href="ch03.html" title=""> | |
17 | <link rel="chapter" href="ch04.html" title="STUN usages"> | |
18 | <link rel="part" href="pt03.html" title="Part III. Pseudo TCP Socket implementation"> | |
19 | <link rel="chapter" href="ch05.html" title=""> | |
20 | 12 | </head> |
21 | 13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
22 | 14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
52 | 44 | #include <stun/usages/bind.h> |
53 | 45 | |
54 | 46 | enum <a class="link" href="libnice-Bind.html#StunUsageBindReturn" title="enum StunUsageBindReturn">StunUsageBindReturn</a>; |
55 | <span class="returnvalue">size_t</span> <a class="link" href="libnice-Bind.html#stun-usage-bind-create" title="stun_usage_bind_create ()">stun_usage_bind_create</a> (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
56 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
57 | <span class="returnvalue">uint8_t</span> *buffer, | |
58 | <span class="returnvalue">size_t</span> buffer_len); | |
59 | <a class="link" href="libnice-Bind.html#StunUsageBindReturn" title="enum StunUsageBindReturn"><span class="returnvalue">StunUsageBindReturn</span></a> <a class="link" href="libnice-Bind.html#stun-usage-bind-process" title="stun_usage_bind_process ()">stun_usage_bind_process</a> (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
60 | <span class="returnvalue">struct sockaddr</span> *addr, | |
61 | <span class="returnvalue">socklen_t</span> *addrlen, | |
62 | <span class="returnvalue">struct sockaddr</span> *alternate_server, | |
63 | <span class="returnvalue">socklen_t</span> *alternate_server_len); | |
64 | <span class="returnvalue">size_t</span> <a class="link" href="libnice-Bind.html#stun-usage-bind-keepalive" title="stun_usage_bind_keepalive ()">stun_usage_bind_keepalive</a> (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
65 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
66 | <span class="returnvalue">uint8_t</span> *buf, | |
67 | <span class="returnvalue">size_t</span> len); | |
68 | <a class="link" href="libnice-Bind.html#StunUsageBindReturn" title="enum StunUsageBindReturn"><span class="returnvalue">StunUsageBindReturn</span></a> <a class="link" href="libnice-Bind.html#stun-usage-bind-run" title="stun_usage_bind_run ()">stun_usage_bind_run</a> (const <span class="returnvalue">struct sockaddr</span> *srv, | |
69 | <span class="returnvalue">socklen_t</span> srvlen, | |
70 | <span class="returnvalue">struct sockaddr</span> *addr, | |
71 | <span class="returnvalue">socklen_t</span> *addrlen); | |
47 | <span class="returnvalue">size_t</span> <a class="link" href="libnice-Bind.html#stun-usage-bind-create" title="stun_usage_bind_create ()">stun_usage_bind_create</a> (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
48 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
49 | <em class="parameter"><code><span class="type">uint8_t</span> *buffer</code></em>, | |
50 | <em class="parameter"><code><span class="type">size_t</span> buffer_len</code></em>); | |
51 | <a class="link" href="libnice-Bind.html#StunUsageBindReturn" title="enum StunUsageBindReturn"><span class="returnvalue">StunUsageBindReturn</span></a> <a class="link" href="libnice-Bind.html#stun-usage-bind-process" title="stun_usage_bind_process ()">stun_usage_bind_process</a> (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
52 | <em class="parameter"><code><span class="type">struct sockaddr</span> *addr</code></em>, | |
53 | <em class="parameter"><code><span class="type">socklen_t</span> *addrlen</code></em>, | |
54 | <em class="parameter"><code><span class="type">struct sockaddr</span> *alternate_server</code></em>, | |
55 | <em class="parameter"><code><span class="type">socklen_t</span> *alternate_server_len</code></em>); | |
56 | <span class="returnvalue">size_t</span> <a class="link" href="libnice-Bind.html#stun-usage-bind-keepalive" title="stun_usage_bind_keepalive ()">stun_usage_bind_keepalive</a> (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
57 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
58 | <em class="parameter"><code><span class="type">uint8_t</span> *buf</code></em>, | |
59 | <em class="parameter"><code><span class="type">size_t</span> len</code></em>); | |
60 | <a class="link" href="libnice-Bind.html#StunUsageBindReturn" title="enum StunUsageBindReturn"><span class="returnvalue">StunUsageBindReturn</span></a> <a class="link" href="libnice-Bind.html#stun-usage-bind-run" title="stun_usage_bind_run ()">stun_usage_bind_run</a> (<em class="parameter"><code>const <span class="type">struct sockaddr</span> *srv</code></em>, | |
61 | <em class="parameter"><code><span class="type">socklen_t</span> srvlen</code></em>, | |
62 | <em class="parameter"><code><span class="type">struct sockaddr</span> *addr</code></em>, | |
63 | <em class="parameter"><code><span class="type">socklen_t</span> *addrlen</code></em>); | |
72 | 64 | </pre> |
73 | 65 | </div> |
74 | 66 | <div class="refsect1" title="Description"> |
76 | 68 | <p> |
77 | 69 | The STUN Binding usage allows for easily creating and parsing STUN Binding |
78 | 70 | requests and responses. It offers both an asynchronous and a synchronous API |
79 | that uses the STUN timer usage.</p> | |
71 | that uses the STUN timer usage. | |
72 | </p> | |
80 | 73 | </div> |
81 | 74 | <div class="refsect1" title="Details"> |
82 | 75 | <a name="libnice-Bind.details"></a><h2>Details</h2> |
92 | 85 | </pre> |
93 | 86 | <p> |
94 | 87 | Return value of <a class="link" href="libnice-Bind.html#stun-usage-bind-process" title="stun_usage_bind_process ()"><code class="function">stun_usage_bind_process()</code></a> and <a class="link" href="libnice-Bind.html#stun-usage-bind-run" title="stun_usage_bind_run ()"><code class="function">stun_usage_bind_run()</code></a> which |
95 | allows you to see what status the function call returned.</p> | |
88 | allows you to see what status the function call returned. | |
89 | </p> | |
96 | 90 | <div class="variablelist"><table border="0"> |
97 | 91 | <col align="left" valign="top"> |
98 | 92 | <tbody> |
99 | 93 | <tr> |
100 | 94 | <td><p><a name="STUN-USAGE-BIND-RETURN-SUCCESS:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_BIND_RETURN_SUCCESS</code></span></p></td> |
101 | <td> The binding usage succeeded | |
95 | <td>The binding usage succeeded | |
102 | 96 | </td> |
103 | 97 | </tr> |
104 | 98 | <tr> |
105 | 99 | <td><p><a name="STUN-USAGE-BIND-RETURN-ERROR:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_BIND_RETURN_ERROR</code></span></p></td> |
106 | <td> There was an unknown error in the bind usage | |
100 | <td>There was an unknown error in the bind usage | |
107 | 101 | </td> |
108 | 102 | </tr> |
109 | 103 | <tr> |
110 | 104 | <td><p><a name="STUN-USAGE-BIND-RETURN-INVALID:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_BIND_RETURN_INVALID</code></span></p></td> |
111 | <td> The message is invalid and should be ignored | |
105 | <td>The message is invalid and should be ignored | |
112 | 106 | </td> |
113 | 107 | </tr> |
114 | 108 | <tr> |
115 | 109 | <td><p><a name="STUN-USAGE-BIND-RETURN-ALTERNATE-SERVER:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_BIND_RETURN_ALTERNATE_SERVER</code></span></p></td> |
116 | <td> The binding request has an | |
110 | <td>The binding request has an | |
117 | 111 | ALTERNATE-SERVER attribute |
118 | 112 | </td> |
119 | 113 | </tr> |
120 | 114 | <tr> |
121 | 115 | <td><p><a name="STUN-USAGE-BIND-RETURN-TIMEOUT:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_BIND_RETURN_TIMEOUT</code></span></p></td> |
122 | <td> The binding was unsuccessful because it has | |
116 | <td>The binding was unsuccessful because it has | |
123 | 117 | timed out. |
124 | 118 | </td> |
125 | 119 | </tr> |
129 | 123 | <hr> |
130 | 124 | <div class="refsect2" title="stun_usage_bind_create ()"> |
131 | 125 | <a name="stun-usage-bind-create"></a><h3>stun_usage_bind_create ()</h3> |
132 | <pre class="programlisting"><span class="returnvalue">size_t</span> stun_usage_bind_create (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
133 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
134 | <span class="returnvalue">uint8_t</span> *buffer, | |
135 | <span class="returnvalue">size_t</span> buffer_len);</pre> | |
136 | <p> | |
137 | Create a new STUN binding request to use with a STUN server.</p> | |
126 | <pre class="programlisting"><span class="returnvalue">size_t</span> stun_usage_bind_create (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
127 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
128 | <em class="parameter"><code><span class="type">uint8_t</span> *buffer</code></em>, | |
129 | <em class="parameter"><code><span class="type">size_t</span> buffer_len</code></em>);</pre> | |
130 | <p> | |
131 | Create a new STUN binding request to use with a STUN server. | |
132 | </p> | |
138 | 133 | <div class="variablelist"><table border="0"> |
139 | 134 | <col align="left" valign="top"> |
140 | 135 | <tbody> |
141 | 136 | <tr> |
142 | 137 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> |
143 | <td> The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> to use to create the binding request | |
138 | <td>The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> to use to create the binding request | |
144 | 139 | </td> |
145 | 140 | </tr> |
146 | 141 | <tr> |
147 | 142 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> |
148 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build | |
143 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build | |
149 | 144 | </td> |
150 | 145 | </tr> |
151 | 146 | <tr> |
152 | 147 | <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
153 | <td> The buffer to use for creating the <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
148 | <td>The buffer to use for creating the <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
154 | 149 | </td> |
155 | 150 | </tr> |
156 | 151 | <tr> |
157 | 152 | <td><p><span class="term"><em class="parameter"><code>buffer_len</code></em> :</span></p></td> |
158 | <td> The size of the <em class="parameter"><code>buffer</code></em> | |
153 | <td>The size of the <em class="parameter"><code>buffer</code></em> | |
159 | 154 | </td> |
160 | 155 | </tr> |
161 | 156 | <tr> |
169 | 164 | <hr> |
170 | 165 | <div class="refsect2" title="stun_usage_bind_process ()"> |
171 | 166 | <a name="stun-usage-bind-process"></a><h3>stun_usage_bind_process ()</h3> |
172 | <pre class="programlisting"><a class="link" href="libnice-Bind.html#StunUsageBindReturn" title="enum StunUsageBindReturn"><span class="returnvalue">StunUsageBindReturn</span></a> stun_usage_bind_process (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
173 | <span class="returnvalue">struct sockaddr</span> *addr, | |
174 | <span class="returnvalue">socklen_t</span> *addrlen, | |
175 | <span class="returnvalue">struct sockaddr</span> *alternate_server, | |
176 | <span class="returnvalue">socklen_t</span> *alternate_server_len);</pre> | |
167 | <pre class="programlisting"><a class="link" href="libnice-Bind.html#StunUsageBindReturn" title="enum StunUsageBindReturn"><span class="returnvalue">StunUsageBindReturn</span></a> stun_usage_bind_process (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
168 | <em class="parameter"><code><span class="type">struct sockaddr</span> *addr</code></em>, | |
169 | <em class="parameter"><code><span class="type">socklen_t</span> *addrlen</code></em>, | |
170 | <em class="parameter"><code><span class="type">struct sockaddr</span> *alternate_server</code></em>, | |
171 | <em class="parameter"><code><span class="type">socklen_t</span> *alternate_server_len</code></em>);</pre> | |
177 | 172 | <p> |
178 | 173 | Process a STUN binding response and extracts the mapped address from the STUN |
179 | message. Also checks for the ALTERNATE-SERVER attribute.</p> | |
174 | message. Also checks for the ALTERNATE-SERVER attribute. | |
175 | </p> | |
180 | 176 | <div class="variablelist"><table border="0"> |
181 | 177 | <col align="left" valign="top"> |
182 | 178 | <tbody> |
183 | 179 | <tr> |
184 | 180 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> |
185 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to process | |
181 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to process | |
186 | 182 | </td> |
187 | 183 | </tr> |
188 | 184 | <tr> |
189 | 185 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> |
190 | <td> A pointer to a <span class="type">sockaddr</span> structure to fill with the mapped address | |
186 | <td>A pointer to a <span class="type">sockaddr</span> structure to fill with the mapped address | |
191 | 187 | that the STUN server gives us |
192 | 188 | </td> |
193 | 189 | </tr> |
194 | 190 | <tr> |
195 | 191 | <td><p><span class="term"><em class="parameter"><code>addrlen</code></em> :</span></p></td> |
196 | <td> The length of <em class="parameter"><code>add</code></em>. rMust be set to the size of the <em class="parameter"><code>addr</code></em> socket | |
192 | <td>The length of <em class="parameter"><code>add</code></em>. rMust be set to the size of the <em class="parameter"><code>addr</code></em> socket | |
197 | 193 | address and will be set to the actual length of the socket address. |
198 | 194 | </td> |
199 | 195 | </tr> |
200 | 196 | <tr> |
201 | 197 | <td><p><span class="term"><em class="parameter"><code>alternate_server</code></em> :</span></p></td> |
202 | <td> A pointer to a <span class="type">sockaddr</span> structure to fill with the | |
198 | <td>A pointer to a <span class="type">sockaddr</span> structure to fill with the | |
203 | 199 | address of an alternate server to which we should send our new STUN |
204 | 200 | binding request, in case the currently used STUN server is requesting the use |
205 | 201 | of an alternate server. This argument will only be filled if the return value |
208 | 204 | </tr> |
209 | 205 | <tr> |
210 | 206 | <td><p><span class="term"><em class="parameter"><code>alternate_server_len</code></em> :</span></p></td> |
211 | <td> The length of <em class="parameter"><code>alternate_server</code></em>. Must be set to | |
207 | <td>The length of <em class="parameter"><code>alternate_server</code></em>. Must be set to | |
212 | 208 | the size of the <em class="parameter"><code>alternate_server</code></em> socket address and will be set to the |
213 | 209 | actual length of the socket address. |
214 | 210 | </td> |
225 | 221 | <hr> |
226 | 222 | <div class="refsect2" title="stun_usage_bind_keepalive ()"> |
227 | 223 | <a name="stun-usage-bind-keepalive"></a><h3>stun_usage_bind_keepalive ()</h3> |
228 | <pre class="programlisting"><span class="returnvalue">size_t</span> stun_usage_bind_keepalive (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
229 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
230 | <span class="returnvalue">uint8_t</span> *buf, | |
231 | <span class="returnvalue">size_t</span> len);</pre> | |
224 | <pre class="programlisting"><span class="returnvalue">size_t</span> stun_usage_bind_keepalive (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
225 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
226 | <em class="parameter"><code><span class="type">uint8_t</span> *buf</code></em>, | |
227 | <em class="parameter"><code><span class="type">size_t</span> len</code></em>);</pre> | |
232 | 228 | <p> |
233 | 229 | Creates a STUN binding indication that can be used for a keepalive. |
234 | 230 | Since this is an indication message, no STUN response will be generated |
235 | and it can only be used as a keepalive message.</p> | |
231 | and it can only be used as a keepalive message. | |
232 | </p> | |
236 | 233 | <div class="variablelist"><table border="0"> |
237 | 234 | <col align="left" valign="top"> |
238 | 235 | <tbody> |
239 | 236 | <tr> |
240 | 237 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> |
241 | <td> The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> to use to build the message | |
238 | <td>The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> to use to build the message | |
242 | 239 | </td> |
243 | 240 | </tr> |
244 | 241 | <tr> |
245 | 242 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> |
246 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build | |
243 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build | |
247 | 244 | </td> |
248 | 245 | </tr> |
249 | 246 | <tr> |
250 | 247 | <td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td> |
251 | <td> The buffer to use for creating the <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
248 | <td>The buffer to use for creating the <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
252 | 249 | </td> |
253 | 250 | </tr> |
254 | 251 | <tr> |
255 | 252 | <td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td> |
256 | <td> The size of the <em class="parameter"><code>buf</code></em> | |
253 | <td>The size of the <em class="parameter"><code>buf</code></em> | |
257 | 254 | </td> |
258 | 255 | </tr> |
259 | 256 | <tr> |
267 | 264 | <hr> |
268 | 265 | <div class="refsect2" title="stun_usage_bind_run ()"> |
269 | 266 | <a name="stun-usage-bind-run"></a><h3>stun_usage_bind_run ()</h3> |
270 | <pre class="programlisting"><a class="link" href="libnice-Bind.html#StunUsageBindReturn" title="enum StunUsageBindReturn"><span class="returnvalue">StunUsageBindReturn</span></a> stun_usage_bind_run (const <span class="returnvalue">struct sockaddr</span> *srv, | |
271 | <span class="returnvalue">socklen_t</span> srvlen, | |
272 | <span class="returnvalue">struct sockaddr</span> *addr, | |
273 | <span class="returnvalue">socklen_t</span> *addrlen);</pre> | |
267 | <pre class="programlisting"><a class="link" href="libnice-Bind.html#StunUsageBindReturn" title="enum StunUsageBindReturn"><span class="returnvalue">StunUsageBindReturn</span></a> stun_usage_bind_run (<em class="parameter"><code>const <span class="type">struct sockaddr</span> *srv</code></em>, | |
268 | <em class="parameter"><code><span class="type">socklen_t</span> srvlen</code></em>, | |
269 | <em class="parameter"><code><span class="type">struct sockaddr</span> *addr</code></em>, | |
270 | <em class="parameter"><code><span class="type">socklen_t</span> *addrlen</code></em>);</pre> | |
274 | 271 | <p> |
275 | 272 | This is a convenience function that will do a synchronous Binding request to |
276 | 273 | a server and wait for its answer. It will create the socket transports and |
277 | use the <a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer"><span class="type">StunTimer</span></a> usage to send the request and handle the response.</p> | |
274 | use the <a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer"><span class="type">StunTimer</span></a> usage to send the request and handle the response. | |
275 | </p> | |
278 | 276 | <div class="variablelist"><table border="0"> |
279 | 277 | <col align="left" valign="top"> |
280 | 278 | <tbody> |
281 | 279 | <tr> |
282 | 280 | <td><p><span class="term"><em class="parameter"><code>srv</code></em> :</span></p></td> |
283 | <td> A pointer to the <span class="type">sockaddr</span> structure representing the STUN server's | |
281 | <td>A pointer to the <span class="type">sockaddr</span> structure representing the STUN server's | |
284 | 282 | address |
285 | 283 | </td> |
286 | 284 | </tr> |
287 | 285 | <tr> |
288 | 286 | <td><p><span class="term"><em class="parameter"><code>srvlen</code></em> :</span></p></td> |
289 | <td> The length of <em class="parameter"><code>srv</code></em> | |
287 | <td>The length of <em class="parameter"><code>srv</code></em> | |
290 | 288 | </td> |
291 | 289 | </tr> |
292 | 290 | <tr> |
293 | 291 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> |
294 | <td> A pointer to a <span class="type">sockaddr</span> structure to fill with the mapped address | |
292 | <td>A pointer to a <span class="type">sockaddr</span> structure to fill with the mapped address | |
295 | 293 | that the STUN server gives us |
296 | 294 | </td> |
297 | 295 | </tr> |
298 | 296 | <tr> |
299 | 297 | <td><p><span class="term"><em class="parameter"><code>addrlen</code></em> :</span></p></td> |
300 | <td> The length of <em class="parameter"><code>addr</code></em> | |
298 | <td>The length of <em class="parameter"><code>addr</code></em> | |
301 | 299 | </td> |
302 | 300 | </tr> |
303 | 301 | <tr> |
314 | 312 | </div> |
315 | 313 | <div class="footer"> |
316 | 314 | <hr> |
317 | Generated by GTK-Doc V1.13</div> | |
315 | Generated by GTK-Doc V1.15</div> | |
318 | 316 | </body> |
319 | 317 | </html>⏎ |
7 | 7 | <link rel="up" href="ch02.html" title="Libnice helper functions"> |
8 | 8 | <link rel="prev" href="ch02.html" title="Libnice helper functions"> |
9 | 9 | <link rel="next" href="libnice-Network-interfaces-discovery.html" title="Network interfaces discovery"> |
10 | <meta name="generator" content="GTK-Doc V1.13 (XML mode)"> | |
10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> | |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | <link rel="part" href="pt01.html" title="Part I. ICE Library"> | |
13 | <link rel="chapter" href="ch01.html" title=""> | |
14 | <link rel="chapter" href="ch02.html" title="Libnice helper functions"> | |
15 | <link rel="part" href="pt02.html" title="Part II. STUN Library"> | |
16 | <link rel="chapter" href="ch03.html" title=""> | |
17 | <link rel="chapter" href="ch04.html" title="STUN usages"> | |
18 | <link rel="part" href="pt03.html" title="Part III. Pseudo TCP Socket implementation"> | |
19 | <link rel="chapter" href="ch05.html" title=""> | |
20 | 12 | </head> |
21 | 13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
22 | 14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
48 | 40 | </div> |
49 | 41 | <div class="refsynopsisdiv" title="Synopsis"> |
50 | 42 | <a name="libnice-Debug-messages.synopsis"></a><h2>Synopsis</h2> |
51 | <pre class="synopsis"><span class="returnvalue">void</span> <a class="link" href="libnice-Debug-messages.html#nice-debug-enable" title="nice_debug_enable ()">nice_debug_enable</a> (<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> with_stun); | |
52 | <span class="returnvalue">void</span> <a class="link" href="libnice-Debug-messages.html#nice-debug-disable" title="nice_debug_disable ()">nice_debug_disable</a> (<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> with_stun); | |
43 | <pre class="synopsis"><span class="returnvalue">void</span> <a class="link" href="libnice-Debug-messages.html#nice-debug-enable" title="nice_debug_enable ()">nice_debug_enable</a> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> with_stun</code></em>); | |
44 | <span class="returnvalue">void</span> <a class="link" href="libnice-Debug-messages.html#nice-debug-disable" title="nice_debug_disable ()">nice_debug_disable</a> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> with_stun</code></em>); | |
53 | 45 | </pre> |
54 | 46 | </div> |
55 | 47 | <div class="refsect1" title="Description"> |
91 | 83 | <p>This API is unstable and is subject to change at any time... |
92 | 84 | More flags are to come and a better API to enable/disable each flag |
93 | 85 | should be added.</p> |
86 | <p> | |
87 | </p> | |
94 | 88 | </div> |
95 | 89 | <div class="refsect1" title="Details"> |
96 | 90 | <a name="libnice-Debug-messages.details"></a><h2>Details</h2> |
97 | 91 | <div class="refsect2" title="nice_debug_enable ()"> |
98 | 92 | <a name="nice-debug-enable"></a><h3>nice_debug_enable ()</h3> |
99 | <pre class="programlisting"><span class="returnvalue">void</span> nice_debug_enable (<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> with_stun);</pre> | |
93 | <pre class="programlisting"><span class="returnvalue">void</span> nice_debug_enable (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> with_stun</code></em>);</pre> | |
100 | 94 | <p> |
101 | Enables libnice debug output to the terminal</p> | |
95 | Enables libnice debug output to the terminal | |
96 | </p> | |
102 | 97 | <div class="variablelist"><table border="0"> |
103 | 98 | <col align="left" valign="top"> |
104 | 99 | <tbody><tr> |
105 | 100 | <td><p><span class="term"><em class="parameter"><code>with_stun</code></em> :</span></p></td> |
106 | <td> Also enable stun debugging messages | |
101 | <td>Also enable stun debugging messages | |
107 | 102 | </td> |
108 | 103 | </tr></tbody> |
109 | 104 | </table></div> |
111 | 106 | <hr> |
112 | 107 | <div class="refsect2" title="nice_debug_disable ()"> |
113 | 108 | <a name="nice-debug-disable"></a><h3>nice_debug_disable ()</h3> |
114 | <pre class="programlisting"><span class="returnvalue">void</span> nice_debug_disable (<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> with_stun);</pre> | |
109 | <pre class="programlisting"><span class="returnvalue">void</span> nice_debug_disable (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> with_stun</code></em>);</pre> | |
115 | 110 | <p> |
116 | Disables libnice debug output to the terminal</p> | |
111 | Disables libnice debug output to the terminal | |
112 | </p> | |
117 | 113 | <div class="variablelist"><table border="0"> |
118 | 114 | <col align="left" valign="top"> |
119 | 115 | <tbody><tr> |
120 | 116 | <td><p><span class="term"><em class="parameter"><code>with_stun</code></em> :</span></p></td> |
121 | <td> Also disable stun debugging messages | |
117 | <td>Also disable stun debugging messages | |
122 | 118 | </td> |
123 | 119 | </tr></tbody> |
124 | 120 | </table></div> |
127 | 123 | </div> |
128 | 124 | <div class="footer"> |
129 | 125 | <hr> |
130 | Generated by GTK-Doc V1.13</div> | |
126 | Generated by GTK-Doc V1.15</div> | |
131 | 127 | </body> |
132 | 128 | </html>⏎ |
7 | 7 | <link rel="up" href="ch04.html" title="STUN usages"> |
8 | 8 | <link rel="prev" href="libnice-Bind.html" title="Bind"> |
9 | 9 | <link rel="next" href="libnice-TURN.html" title="TURN"> |
10 | <meta name="generator" content="GTK-Doc V1.13 (XML mode)"> | |
10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> | |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | <link rel="part" href="pt01.html" title="Part I. ICE Library"> | |
13 | <link rel="chapter" href="ch01.html" title=""> | |
14 | <link rel="chapter" href="ch02.html" title="Libnice helper functions"> | |
15 | <link rel="part" href="pt02.html" title="Part II. STUN Library"> | |
16 | <link rel="chapter" href="ch03.html" title=""> | |
17 | <link rel="chapter" href="ch04.html" title="STUN usages"> | |
18 | <link rel="part" href="pt03.html" title="Part III. Pseudo TCP Socket implementation"> | |
19 | <link rel="chapter" href="ch05.html" title=""> | |
20 | 12 | </head> |
21 | 13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
22 | 14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
53 | 45 | |
54 | 46 | enum <a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility">StunUsageIceCompatibility</a>; |
55 | 47 | enum <a class="link" href="libnice-ICE.html#StunUsageIceReturn" title="enum StunUsageIceReturn">StunUsageIceReturn</a>; |
56 | <span class="returnvalue">size_t</span> <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-create" title="stun_usage_ice_conncheck_create ()">stun_usage_ice_conncheck_create</a> (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
57 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
58 | <span class="returnvalue">uint8_t</span> *buffer, | |
59 | <span class="returnvalue">size_t</span> buffer_len, | |
60 | const <span class="returnvalue">uint8_t</span> *username, | |
61 | const <span class="returnvalue">size_t</span> username_len, | |
62 | const <span class="returnvalue">uint8_t</span> *password, | |
63 | const <span class="returnvalue">size_t</span> password_len, | |
64 | <span class="returnvalue">bool</span> cand_use, | |
65 | <span class="returnvalue">bool</span> controlling, | |
66 | <span class="returnvalue">uint32_t</span> priority, | |
67 | <span class="returnvalue">uint64_t</span> tie, | |
68 | <a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility"><span class="returnvalue">StunUsageIceCompatibility</span></a> compatibility); | |
69 | <a class="link" href="libnice-ICE.html#StunUsageIceReturn" title="enum StunUsageIceReturn"><span class="returnvalue">StunUsageIceReturn</span></a> <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-process" title="stun_usage_ice_conncheck_process ()">stun_usage_ice_conncheck_process</a> (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
70 | <span class="returnvalue">struct sockaddr</span> *addr, | |
71 | <span class="returnvalue">socklen_t</span> *addrlen, | |
72 | <a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility"><span class="returnvalue">StunUsageIceCompatibility</span></a> compatibility); | |
48 | <span class="returnvalue">size_t</span> <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-create" title="stun_usage_ice_conncheck_create ()">stun_usage_ice_conncheck_create</a> (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
49 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
50 | <em class="parameter"><code><span class="type">uint8_t</span> *buffer</code></em>, | |
51 | <em class="parameter"><code><span class="type">size_t</span> buffer_len</code></em>, | |
52 | <em class="parameter"><code>const <span class="type">uint8_t</span> *username</code></em>, | |
53 | <em class="parameter"><code>const <span class="type">size_t</span> username_len</code></em>, | |
54 | <em class="parameter"><code>const <span class="type">uint8_t</span> *password</code></em>, | |
55 | <em class="parameter"><code>const <span class="type">size_t</span> password_len</code></em>, | |
56 | <em class="parameter"><code><span class="type">bool</span> cand_use</code></em>, | |
57 | <em class="parameter"><code><span class="type">bool</span> controlling</code></em>, | |
58 | <em class="parameter"><code><span class="type">uint32_t</span> priority</code></em>, | |
59 | <em class="parameter"><code><span class="type">uint64_t</span> tie</code></em>, | |
60 | <em class="parameter"><code><a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility"><span class="type">StunUsageIceCompatibility</span></a> compatibility</code></em>); | |
61 | <a class="link" href="libnice-ICE.html#StunUsageIceReturn" title="enum StunUsageIceReturn"><span class="returnvalue">StunUsageIceReturn</span></a> <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-process" title="stun_usage_ice_conncheck_process ()">stun_usage_ice_conncheck_process</a> (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
62 | <em class="parameter"><code><span class="type">struct sockaddr</span> *addr</code></em>, | |
63 | <em class="parameter"><code><span class="type">socklen_t</span> *addrlen</code></em>, | |
64 | <em class="parameter"><code><a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility"><span class="type">StunUsageIceCompatibility</span></a> compatibility</code></em>); | |
73 | 65 | <a class="link" href="libnice-ICE.html#StunUsageIceReturn" title="enum StunUsageIceReturn"><span class="returnvalue">StunUsageIceReturn</span></a> <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-create-reply" title="stun_usage_ice_conncheck_create_reply ()">stun_usage_ice_conncheck_create_reply</a> |
74 | (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
75 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *req, | |
76 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
77 | <span class="returnvalue">uint8_t</span> *buf, | |
78 | <span class="returnvalue">size_t</span> *plen, | |
79 | const <span class="returnvalue">struct sockaddr</span> *src, | |
80 | <span class="returnvalue">socklen_t</span> srclen, | |
81 | <span class="returnvalue">bool</span> *control, | |
82 | <span class="returnvalue">uint64_t</span> tie, | |
83 | <a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility"><span class="returnvalue">StunUsageIceCompatibility</span></a> compatibility); | |
84 | <span class="returnvalue">uint32_t</span> <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-priority" title="stun_usage_ice_conncheck_priority ()">stun_usage_ice_conncheck_priority</a> (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg); | |
66 | (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
67 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *req</code></em>, | |
68 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
69 | <em class="parameter"><code><span class="type">uint8_t</span> *buf</code></em>, | |
70 | <em class="parameter"><code><span class="type">size_t</span> *plen</code></em>, | |
71 | <em class="parameter"><code>const <span class="type">struct sockaddr</span> *src</code></em>, | |
72 | <em class="parameter"><code><span class="type">socklen_t</span> srclen</code></em>, | |
73 | <em class="parameter"><code><span class="type">bool</span> *control</code></em>, | |
74 | <em class="parameter"><code><span class="type">uint64_t</span> tie</code></em>, | |
75 | <em class="parameter"><code><a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility"><span class="type">StunUsageIceCompatibility</span></a> compatibility</code></em>); | |
76 | <span class="returnvalue">uint32_t</span> <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-priority" title="stun_usage_ice_conncheck_priority ()">stun_usage_ice_conncheck_priority</a> (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>); | |
85 | 77 | <span class="returnvalue">bool</span> <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-use-candidate" title="stun_usage_ice_conncheck_use_candidate ()">stun_usage_ice_conncheck_use_candidate</a> |
86 | (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg); | |
78 | (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>); | |
87 | 79 | </pre> |
88 | 80 | </div> |
89 | 81 | <div class="refsect1" title="Description"> |
92 | 84 | The STUN ICE usage allows for easily creating and parsing STUN Binding |
93 | 85 | requests and responses used for ICE connectivity checks. The API allows you |
94 | 86 | to create a connectivity check message, parse a response or create a reply |
95 | to an incoming connectivity check request.</p> | |
87 | to an incoming connectivity check request. | |
88 | </p> | |
96 | 89 | </div> |
97 | 90 | <div class="refsect1" title="Details"> |
98 | 91 | <a name="libnice-ICE.details"></a><h2>Details</h2> |
99 | 92 | <div class="refsect2" title="enum StunUsageIceCompatibility"> |
100 | 93 | <a name="StunUsageIceCompatibility"></a><h3>enum StunUsageIceCompatibility</h3> |
101 | 94 | <pre class="programlisting">typedef enum { |
102 | STUN_USAGE_ICE_COMPATIBILITY_DRAFT19, | |
95 | STUN_USAGE_ICE_COMPATIBILITY_RFC5245, | |
103 | 96 | STUN_USAGE_ICE_COMPATIBILITY_GOOGLE, |
104 | 97 | STUN_USAGE_ICE_COMPATIBILITY_MSN, |
98 | STUN_USAGE_ICE_COMPATIBILITY_DRAFT19 = STUN_USAGE_ICE_COMPATIBILITY_RFC5245, | |
105 | 99 | } StunUsageIceCompatibility; |
106 | 100 | </pre> |
107 | 101 | <p> |
108 | This enum defines which compatibility modes this ICE usage can use</p> | |
109 | <div class="variablelist"><table border="0"> | |
110 | <col align="left" valign="top"> | |
111 | <tbody> | |
102 | This enum defines which compatibility modes this ICE usage can use | |
103 | </p> | |
104 | <p> | |
105 | </p> | |
106 | <div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;"> | |
107 | <h3 class="title">Warning</h3> | |
108 | <em class="parameter"><code>STUN_USAGE_ICE_COMPATIBILITY_DRAFT19</code></em> is deprecated and should not | |
109 | be used in newly-written code. It is kept for compatibility reasons and | |
110 | represents the same compatibility as <em class="parameter"><code>STUN_USAGE_ICE_COMPATIBILITY_RFC5245</code></em> | |
111 | </div> | |
112 | <p> | |
113 | </p> | |
114 | <div class="variablelist"><table border="0"> | |
115 | <col align="left" valign="top"> | |
116 | <tbody> | |
117 | <tr> | |
118 | <td><p><a name="STUN-USAGE-ICE-COMPATIBILITY-RFC5245:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_COMPATIBILITY_RFC5245</code></span></p></td> | |
119 | <td>The ICE compatibility with RFC 5245 | |
120 | </td> | |
121 | </tr> | |
122 | <tr> | |
123 | <td><p><a name="STUN-USAGE-ICE-COMPATIBILITY-GOOGLE:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_COMPATIBILITY_GOOGLE</code></span></p></td> | |
124 | <td>The ICE compatibility with Google's | |
125 | implementation of ICE | |
126 | </td> | |
127 | </tr> | |
128 | <tr> | |
129 | <td><p><a name="STUN-USAGE-ICE-COMPATIBILITY-MSN:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_COMPATIBILITY_MSN</code></span></p></td> | |
130 | <td>The ICE compatibility with MSN's | |
131 | implementation of ICE | |
132 | </td> | |
133 | </tr> | |
112 | 134 | <tr> |
113 | 135 | <td><p><a name="STUN-USAGE-ICE-COMPATIBILITY-DRAFT19:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_COMPATIBILITY_DRAFT19</code></span></p></td> |
114 | <td> The ICE compatibility with draft 19 | |
115 | </td> | |
116 | </tr> | |
117 | <tr> | |
118 | <td><p><a name="STUN-USAGE-ICE-COMPATIBILITY-GOOGLE:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_COMPATIBILITY_GOOGLE</code></span></p></td> | |
119 | <td> The ICE compatibility with Google's | |
120 | implementation of ICE | |
121 | </td> | |
122 | </tr> | |
123 | <tr> | |
124 | <td><p><a name="STUN-USAGE-ICE-COMPATIBILITY-MSN:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_COMPATIBILITY_MSN</code></span></p></td> | |
125 | <td> The ICE compatibility with MSN's | |
126 | implementation of ICE | |
136 | <td>The ICE compatibility with draft 19 | |
127 | 137 | </td> |
128 | 138 | </tr> |
129 | 139 | </tbody> |
147 | 157 | <p> |
148 | 158 | Return value of <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-process" title="stun_usage_ice_conncheck_process ()"><code class="function">stun_usage_ice_conncheck_process()</code></a> and |
149 | 159 | <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-create-reply" title="stun_usage_ice_conncheck_create_reply ()"><code class="function">stun_usage_ice_conncheck_create_reply()</code></a> which allows you to see what |
150 | status the function call returned.</p> | |
160 | status the function call returned. | |
161 | </p> | |
151 | 162 | <div class="variablelist"><table border="0"> |
152 | 163 | <col align="left" valign="top"> |
153 | 164 | <tbody> |
154 | 165 | <tr> |
155 | 166 | <td><p><a name="STUN-USAGE-ICE-RETURN-SUCCESS:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_RETURN_SUCCESS</code></span></p></td> |
156 | <td> The function succeeded | |
167 | <td>The function succeeded | |
157 | 168 | </td> |
158 | 169 | </tr> |
159 | 170 | <tr> |
160 | 171 | <td><p><a name="STUN-USAGE-ICE-RETURN-ERROR:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_RETURN_ERROR</code></span></p></td> |
161 | <td> There was an unspecified error | |
172 | <td>There was an unspecified error | |
162 | 173 | </td> |
163 | 174 | </tr> |
164 | 175 | <tr> |
165 | 176 | <td><p><a name="STUN-USAGE-ICE-RETURN-INVALID:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_RETURN_INVALID</code></span></p></td> |
166 | <td> The message is invalid for processing | |
177 | <td>The message is invalid for processing | |
167 | 178 | </td> |
168 | 179 | </tr> |
169 | 180 | <tr> |
170 | 181 | <td><p><a name="STUN-USAGE-ICE-RETURN-ROLE-CONFLICT:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_RETURN_ROLE_CONFLICT</code></span></p></td> |
171 | <td> A role conflict was detected | |
182 | <td>A role conflict was detected | |
172 | 183 | </td> |
173 | 184 | </tr> |
174 | 185 | <tr> |
175 | 186 | <td><p><a name="STUN-USAGE-ICE-RETURN-INVALID-REQUEST:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_RETURN_INVALID_REQUEST</code></span></p></td> |
176 | <td> The message is an not a request | |
187 | <td>The message is an not a request | |
177 | 188 | </td> |
178 | 189 | </tr> |
179 | 190 | <tr> |
180 | 191 | <td><p><a name="STUN-USAGE-ICE-RETURN-INVALID-METHOD:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_RETURN_INVALID_METHOD</code></span></p></td> |
181 | <td> The method of the request is invalid | |
192 | <td>The method of the request is invalid | |
182 | 193 | </td> |
183 | 194 | </tr> |
184 | 195 | <tr> |
185 | 196 | <td><p><a name="STUN-USAGE-ICE-RETURN-MEMORY-ERROR:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_RETURN_MEMORY_ERROR</code></span></p></td> |
186 | <td> The buffer size is too small to hold | |
197 | <td>The buffer size is too small to hold | |
187 | 198 | the STUN reply |
188 | 199 | </td> |
189 | 200 | </tr> |
190 | 201 | <tr> |
191 | 202 | <td><p><a name="STUN-USAGE-ICE-RETURN-INVALID-ADDRESS:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_RETURN_INVALID_ADDRESS</code></span></p></td> |
192 | <td> The mapped address argument has | |
203 | <td>The mapped address argument has | |
193 | 204 | an invalid address family |
194 | 205 | </td> |
195 | 206 | </tr> |
196 | 207 | <tr> |
197 | 208 | <td><p><a name="STUN-USAGE-ICE-RETURN-NO-MAPPED-ADDRESS:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_ICE_RETURN_NO_MAPPED_ADDRESS</code></span></p></td> |
198 | <td> The response is valid but no | |
209 | <td>The response is valid but no | |
199 | 210 | MAPPED-ADDRESS or XOR-MAPPED-ADDRESS attribute was found |
200 | 211 | </td> |
201 | 212 | </tr> |
205 | 216 | <hr> |
206 | 217 | <div class="refsect2" title="stun_usage_ice_conncheck_create ()"> |
207 | 218 | <a name="stun-usage-ice-conncheck-create"></a><h3>stun_usage_ice_conncheck_create ()</h3> |
208 | <pre class="programlisting"><span class="returnvalue">size_t</span> stun_usage_ice_conncheck_create (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
209 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
210 | <span class="returnvalue">uint8_t</span> *buffer, | |
211 | <span class="returnvalue">size_t</span> buffer_len, | |
212 | const <span class="returnvalue">uint8_t</span> *username, | |
213 | const <span class="returnvalue">size_t</span> username_len, | |
214 | const <span class="returnvalue">uint8_t</span> *password, | |
215 | const <span class="returnvalue">size_t</span> password_len, | |
216 | <span class="returnvalue">bool</span> cand_use, | |
217 | <span class="returnvalue">bool</span> controlling, | |
218 | <span class="returnvalue">uint32_t</span> priority, | |
219 | <span class="returnvalue">uint64_t</span> tie, | |
220 | <a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility"><span class="returnvalue">StunUsageIceCompatibility</span></a> compatibility);</pre> | |
219 | <pre class="programlisting"><span class="returnvalue">size_t</span> stun_usage_ice_conncheck_create (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
220 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
221 | <em class="parameter"><code><span class="type">uint8_t</span> *buffer</code></em>, | |
222 | <em class="parameter"><code><span class="type">size_t</span> buffer_len</code></em>, | |
223 | <em class="parameter"><code>const <span class="type">uint8_t</span> *username</code></em>, | |
224 | <em class="parameter"><code>const <span class="type">size_t</span> username_len</code></em>, | |
225 | <em class="parameter"><code>const <span class="type">uint8_t</span> *password</code></em>, | |
226 | <em class="parameter"><code>const <span class="type">size_t</span> password_len</code></em>, | |
227 | <em class="parameter"><code><span class="type">bool</span> cand_use</code></em>, | |
228 | <em class="parameter"><code><span class="type">bool</span> controlling</code></em>, | |
229 | <em class="parameter"><code><span class="type">uint32_t</span> priority</code></em>, | |
230 | <em class="parameter"><code><span class="type">uint64_t</span> tie</code></em>, | |
231 | <em class="parameter"><code><a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility"><span class="type">StunUsageIceCompatibility</span></a> compatibility</code></em>);</pre> | |
221 | 232 | <p> |
222 | 233 | Builds an ICE connectivity check STUN message. |
223 | If the compatibility is not <a class="link" href="libnice-ICE.html#STUN-USAGE-ICE-COMPATIBILITY-DRAFT19:CAPS"><span class="type">STUN_USAGE_ICE_COMPATIBILITY_DRAFT19</span></a>, the | |
224 | <em class="parameter"><code>cand_use</code></em>, <em class="parameter"><code>controlling</code></em>, <em class="parameter"><code>priority</code></em> and <em class="parameter"><code>tie</code></em> arguments are not used.</p> | |
234 | If the compatibility is not <a class="link" href="libnice-ICE.html#STUN-USAGE-ICE-COMPATIBILITY-RFC5245:CAPS"><span class="type">STUN_USAGE_ICE_COMPATIBILITY_RFC5245</span></a>, the | |
235 | <em class="parameter"><code>cand_use</code></em>, <em class="parameter"><code>controlling</code></em>, <em class="parameter"><code>priority</code></em> and <em class="parameter"><code>tie</code></em> arguments are not used. | |
236 | </p> | |
225 | 237 | <div class="variablelist"><table border="0"> |
226 | 238 | <col align="left" valign="top"> |
227 | 239 | <tbody> |
228 | 240 | <tr> |
229 | 241 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> |
230 | <td> The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> to use to build the request | |
242 | <td>The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> to use to build the request | |
231 | 243 | </td> |
232 | 244 | </tr> |
233 | 245 | <tr> |
234 | 246 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> |
235 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build | |
247 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build | |
236 | 248 | </td> |
237 | 249 | </tr> |
238 | 250 | <tr> |
239 | 251 | <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
240 | <td> The buffer to use for creating the <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
252 | <td>The buffer to use for creating the <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
241 | 253 | </td> |
242 | 254 | </tr> |
243 | 255 | <tr> |
244 | 256 | <td><p><span class="term"><em class="parameter"><code>buffer_len</code></em> :</span></p></td> |
245 | <td> The size of the <em class="parameter"><code>buffer</code></em> | |
257 | <td>The size of the <em class="parameter"><code>buffer</code></em> | |
246 | 258 | </td> |
247 | 259 | </tr> |
248 | 260 | <tr> |
249 | 261 | <td><p><span class="term"><em class="parameter"><code>username</code></em> :</span></p></td> |
250 | <td> The username to use in the request | |
262 | <td>The username to use in the request | |
251 | 263 | </td> |
252 | 264 | </tr> |
253 | 265 | <tr> |
254 | 266 | <td><p><span class="term"><em class="parameter"><code>username_len</code></em> :</span></p></td> |
255 | <td> The length of <em class="parameter"><code>username</code></em> | |
267 | <td>The length of <em class="parameter"><code>username</code></em> | |
256 | 268 | </td> |
257 | 269 | </tr> |
258 | 270 | <tr> |
259 | 271 | <td><p><span class="term"><em class="parameter"><code>password</code></em> :</span></p></td> |
260 | <td> The key to use for building the MESSAGE-INTEGRITY | |
272 | <td>The key to use for building the MESSAGE-INTEGRITY | |
261 | 273 | </td> |
262 | 274 | </tr> |
263 | 275 | <tr> |
264 | 276 | <td><p><span class="term"><em class="parameter"><code>password_len</code></em> :</span></p></td> |
265 | <td> The length of <em class="parameter"><code>password</code></em> | |
277 | <td>The length of <em class="parameter"><code>password</code></em> | |
266 | 278 | </td> |
267 | 279 | </tr> |
268 | 280 | <tr> |
269 | 281 | <td><p><span class="term"><em class="parameter"><code>cand_use</code></em> :</span></p></td> |
270 | <td> Set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to append the USE-CANDIDATE flag to the request | |
282 | <td>Set to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to append the USE-CANDIDATE flag to the request | |
271 | 283 | </td> |
272 | 284 | </tr> |
273 | 285 | <tr> |
274 | 286 | <td><p><span class="term"><em class="parameter"><code>controlling</code></em> :</span></p></td> |
275 | <td> Set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if you are the controlling agent or set to | |
276 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if you are the controlled agent. | |
287 | <td>Set to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if you are the controlling agent or set to | |
288 | <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if you are the controlled agent. | |
277 | 289 | </td> |
278 | 290 | </tr> |
279 | 291 | <tr> |
280 | 292 | <td><p><span class="term"><em class="parameter"><code>priority</code></em> :</span></p></td> |
281 | <td> The value of the PRIORITY attribute | |
293 | <td>The value of the PRIORITY attribute | |
282 | 294 | </td> |
283 | 295 | </tr> |
284 | 296 | <tr> |
285 | 297 | <td><p><span class="term"><em class="parameter"><code>tie</code></em> :</span></p></td> |
286 | <td> The value of the tie-breaker to put in the ICE-CONTROLLED or | |
298 | <td>The value of the tie-breaker to put in the ICE-CONTROLLED or | |
287 | 299 | ICE-CONTROLLING attribute |
288 | 300 | </td> |
289 | 301 | </tr> |
290 | 302 | <tr> |
291 | 303 | <td><p><span class="term"><em class="parameter"><code>compatibility</code></em> :</span></p></td> |
292 | <td> The compatibility mode to use for building the conncheck | |
304 | <td>The compatibility mode to use for building the conncheck | |
293 | 305 | request |
294 | 306 | </td> |
295 | 307 | </tr> |
304 | 316 | <hr> |
305 | 317 | <div class="refsect2" title="stun_usage_ice_conncheck_process ()"> |
306 | 318 | <a name="stun-usage-ice-conncheck-process"></a><h3>stun_usage_ice_conncheck_process ()</h3> |
307 | <pre class="programlisting"><a class="link" href="libnice-ICE.html#StunUsageIceReturn" title="enum StunUsageIceReturn"><span class="returnvalue">StunUsageIceReturn</span></a> stun_usage_ice_conncheck_process (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
308 | <span class="returnvalue">struct sockaddr</span> *addr, | |
309 | <span class="returnvalue">socklen_t</span> *addrlen, | |
310 | <a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility"><span class="returnvalue">StunUsageIceCompatibility</span></a> compatibility);</pre> | |
319 | <pre class="programlisting"><a class="link" href="libnice-ICE.html#StunUsageIceReturn" title="enum StunUsageIceReturn"><span class="returnvalue">StunUsageIceReturn</span></a> stun_usage_ice_conncheck_process (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
320 | <em class="parameter"><code><span class="type">struct sockaddr</span> *addr</code></em>, | |
321 | <em class="parameter"><code><span class="type">socklen_t</span> *addrlen</code></em>, | |
322 | <em class="parameter"><code><a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility"><span class="type">StunUsageIceCompatibility</span></a> compatibility</code></em>);</pre> | |
311 | 323 | <p> |
312 | 324 | Process an ICE connectivity check STUN message and retreive the |
313 | 325 | mapped address from the message |
314 | 326 | </p> |
315 | 327 | <p> See also <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-priority" title="stun_usage_ice_conncheck_priority ()"><code class="function">stun_usage_ice_conncheck_priority()</code></a> and |
316 | 328 | <a class="link" href="libnice-ICE.html#stun-usage-ice-conncheck-use-candidate" title="stun_usage_ice_conncheck_use_candidate ()"><code class="function">stun_usage_ice_conncheck_use_candidate()</code></a> </p> |
329 | <p> | |
330 | </p> | |
317 | 331 | <div class="variablelist"><table border="0"> |
318 | 332 | <col align="left" valign="top"> |
319 | 333 | <tbody> |
320 | 334 | <tr> |
321 | 335 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> |
322 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to process | |
336 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to process | |
323 | 337 | </td> |
324 | 338 | </tr> |
325 | 339 | <tr> |
326 | 340 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> |
327 | <td> A pointer to a <span class="type">sockaddr</span> structure to fill with the mapped address | |
341 | <td>A pointer to a <span class="type">sockaddr</span> structure to fill with the mapped address | |
328 | 342 | that the STUN connectivity check response contains |
329 | 343 | </td> |
330 | 344 | </tr> |
331 | 345 | <tr> |
332 | 346 | <td><p><span class="term"><em class="parameter"><code>addrlen</code></em> :</span></p></td> |
333 | <td> The length of <em class="parameter"><code>addr</code></em> | |
347 | <td>The length of <em class="parameter"><code>addr</code></em> | |
334 | 348 | </td> |
335 | 349 | </tr> |
336 | 350 | <tr> |
337 | 351 | <td><p><span class="term"><em class="parameter"><code>compatibility</code></em> :</span></p></td> |
338 | <td> The compatibility mode to use for processing the conncheck | |
352 | <td>The compatibility mode to use for processing the conncheck | |
339 | 353 | response |
340 | 354 | </td> |
341 | 355 | </tr> |
351 | 365 | <div class="refsect2" title="stun_usage_ice_conncheck_create_reply ()"> |
352 | 366 | <a name="stun-usage-ice-conncheck-create-reply"></a><h3>stun_usage_ice_conncheck_create_reply ()</h3> |
353 | 367 | <pre class="programlisting"><a class="link" href="libnice-ICE.html#StunUsageIceReturn" title="enum StunUsageIceReturn"><span class="returnvalue">StunUsageIceReturn</span></a> stun_usage_ice_conncheck_create_reply |
354 | (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
355 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *req, | |
356 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
357 | <span class="returnvalue">uint8_t</span> *buf, | |
358 | <span class="returnvalue">size_t</span> *plen, | |
359 | const <span class="returnvalue">struct sockaddr</span> *src, | |
360 | <span class="returnvalue">socklen_t</span> srclen, | |
361 | <span class="returnvalue">bool</span> *control, | |
362 | <span class="returnvalue">uint64_t</span> tie, | |
363 | <a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility"><span class="returnvalue">StunUsageIceCompatibility</span></a> compatibility);</pre> | |
368 | (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
369 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *req</code></em>, | |
370 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
371 | <em class="parameter"><code><span class="type">uint8_t</span> *buf</code></em>, | |
372 | <em class="parameter"><code><span class="type">size_t</span> *plen</code></em>, | |
373 | <em class="parameter"><code>const <span class="type">struct sockaddr</span> *src</code></em>, | |
374 | <em class="parameter"><code><span class="type">socklen_t</span> srclen</code></em>, | |
375 | <em class="parameter"><code><span class="type">bool</span> *control</code></em>, | |
376 | <em class="parameter"><code><span class="type">uint64_t</span> tie</code></em>, | |
377 | <em class="parameter"><code><a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility"><span class="type">StunUsageIceCompatibility</span></a> compatibility</code></em>);</pre> | |
364 | 378 | <p> |
365 | 379 | Tries to parse a STUN connectivity check request and builds a |
366 | 380 | response accordingly. |
373 | 387 | If <em class="parameter"><code>plen</code></em> has a size of 0, then no error response should be sent. |
374 | 388 | </p> |
375 | 389 | </div> |
390 | <p> | |
391 | </p> | |
376 | 392 | <div class="variablelist"><table border="0"> |
377 | 393 | <col align="left" valign="top"> |
378 | 394 | <tbody> |
379 | 395 | <tr> |
380 | 396 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> |
381 | <td> The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> to use to build the response | |
397 | <td>The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> to use to build the response | |
382 | 398 | </td> |
383 | 399 | </tr> |
384 | 400 | <tr> |
385 | 401 | <td><p><span class="term"><em class="parameter"><code>req</code></em> :</span></p></td> |
386 | <td> The original STUN request to reply to | |
402 | <td>The original STUN request to reply to | |
387 | 403 | </td> |
388 | 404 | </tr> |
389 | 405 | <tr> |
390 | 406 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> |
391 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build | |
407 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build | |
392 | 408 | </td> |
393 | 409 | </tr> |
394 | 410 | <tr> |
395 | 411 | <td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td> |
396 | <td> The buffer to use for creating the <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
412 | <td>The buffer to use for creating the <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
397 | 413 | </td> |
398 | 414 | </tr> |
399 | 415 | <tr> |
400 | 416 | <td><p><span class="term"><em class="parameter"><code>plen</code></em> :</span></p></td> |
401 | <td> A pointer containing the size of the <em class="parameter"><code>buffer</code></em> on input. | |
417 | <td>A pointer containing the size of the <em class="parameter"><code>buffer</code></em> on input. | |
402 | 418 | Will contain the length of the message built on output. |
403 | 419 | </td> |
404 | 420 | </tr> |
405 | 421 | <tr> |
406 | 422 | <td><p><span class="term"><em class="parameter"><code>src</code></em> :</span></p></td> |
407 | <td> A pointer to a <span class="type">sockaddr</span> structure containing the source address from | |
423 | <td>A pointer to a <span class="type">sockaddr</span> structure containing the source address from | |
408 | 424 | which the request was received. Will be used as the mapped address in the |
409 | 425 | response |
410 | 426 | </td> |
411 | 427 | </tr> |
412 | 428 | <tr> |
413 | 429 | <td><p><span class="term"><em class="parameter"><code>srclen</code></em> :</span></p></td> |
414 | <td> The length of <em class="parameter"><code>addr</code></em> | |
430 | <td>The length of <em class="parameter"><code>addr</code></em> | |
415 | 431 | </td> |
416 | 432 | </tr> |
417 | 433 | <tr> |
418 | 434 | <td><p><span class="term"><em class="parameter"><code>control</code></em> :</span></p></td> |
419 | <td> Set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if you are the controlling agent or set to | |
420 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if you are the controlled agent. | |
435 | <td>Set to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if you are the controlling agent or set to | |
436 | <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if you are the controlled agent. | |
421 | 437 | </td> |
422 | 438 | </tr> |
423 | 439 | <tr> |
424 | 440 | <td><p><span class="term"><em class="parameter"><code>tie</code></em> :</span></p></td> |
425 | <td> The value of the tie-breaker to put in the ICE-CONTROLLED or | |
441 | <td>The value of the tie-breaker to put in the ICE-CONTROLLED or | |
426 | 442 | ICE-CONTROLLING attribute |
427 | 443 | </td> |
428 | 444 | </tr> |
429 | 445 | <tr> |
430 | 446 | <td><p><span class="term"><em class="parameter"><code>compatibility</code></em> :</span></p></td> |
431 | <td> The compatibility mode to use for building the conncheck | |
447 | <td>The compatibility mode to use for building the conncheck | |
432 | 448 | response |
433 | 449 | </td> |
434 | 450 | </tr> |
443 | 459 | <hr> |
444 | 460 | <div class="refsect2" title="stun_usage_ice_conncheck_priority ()"> |
445 | 461 | <a name="stun-usage-ice-conncheck-priority"></a><h3>stun_usage_ice_conncheck_priority ()</h3> |
446 | <pre class="programlisting"><span class="returnvalue">uint32_t</span> stun_usage_ice_conncheck_priority (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg);</pre> | |
447 | <p> | |
448 | Extracts the priority from a STUN message.</p> | |
462 | <pre class="programlisting"><span class="returnvalue">uint32_t</span> stun_usage_ice_conncheck_priority (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>);</pre> | |
463 | <p> | |
464 | Extracts the priority from a STUN message. | |
465 | </p> | |
449 | 466 | <div class="variablelist"><table border="0"> |
450 | 467 | <col align="left" valign="top"> |
451 | 468 | <tbody> |
452 | 469 | <tr> |
453 | 470 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> |
454 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to parse | |
471 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to parse | |
455 | 472 | </td> |
456 | 473 | </tr> |
457 | 474 | <tr> |
466 | 483 | <div class="refsect2" title="stun_usage_ice_conncheck_use_candidate ()"> |
467 | 484 | <a name="stun-usage-ice-conncheck-use-candidate"></a><h3>stun_usage_ice_conncheck_use_candidate ()</h3> |
468 | 485 | <pre class="programlisting"><span class="returnvalue">bool</span> stun_usage_ice_conncheck_use_candidate |
469 | (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg);</pre> | |
470 | <p> | |
471 | Extracts the USE-CANDIDATE attribute flag from a STUN message.</p> | |
486 | (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>);</pre> | |
487 | <p> | |
488 | Extracts the USE-CANDIDATE attribute flag from a STUN message. | |
489 | </p> | |
472 | 490 | <div class="variablelist"><table border="0"> |
473 | 491 | <col align="left" valign="top"> |
474 | 492 | <tbody> |
475 | 493 | <tr> |
476 | 494 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> |
477 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to parse | |
495 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to parse | |
478 | 496 | </td> |
479 | 497 | </tr> |
480 | 498 | <tr> |
481 | 499 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
482 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the flag is set, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not. | |
500 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the flag is set, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not. | |
483 | 501 | </td> |
484 | 502 | </tr> |
485 | 503 | </tbody> |
489 | 507 | </div> |
490 | 508 | <div class="footer"> |
491 | 509 | <hr> |
492 | Generated by GTK-Doc V1.13</div> | |
510 | Generated by GTK-Doc V1.15</div> | |
493 | 511 | </body> |
494 | 512 | </html>⏎ |
7 | 7 | <link rel="up" href="ch02.html" title="Libnice helper functions"> |
8 | 8 | <link rel="prev" href="libnice-Debug-messages.html" title="Debug messages"> |
9 | 9 | <link rel="next" href="pt02.html" title="Part II. STUN Library"> |
10 | <meta name="generator" content="GTK-Doc V1.13 (XML mode)"> | |
10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> | |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | <link rel="part" href="pt01.html" title="Part I. ICE Library"> | |
13 | <link rel="chapter" href="ch01.html" title=""> | |
14 | <link rel="chapter" href="ch02.html" title="Libnice helper functions"> | |
15 | <link rel="part" href="pt02.html" title="Part II. STUN Library"> | |
16 | <link rel="chapter" href="ch03.html" title=""> | |
17 | <link rel="chapter" href="ch04.html" title="STUN usages"> | |
18 | <link rel="part" href="pt03.html" title="Part III. Pseudo TCP Socket implementation"> | |
19 | <link rel="chapter" href="ch05.html" title=""> | |
20 | 12 | </head> |
21 | 13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
22 | 14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
51 | 43 | <pre class="synopsis"> |
52 | 44 | #include <interfaces.h> |
53 | 45 | |
54 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="libnice-Network-interfaces-discovery.html#nice-interfaces-get-ip-for-interface" title="nice_interfaces_get_ip_for_interface ()">nice_interfaces_get_ip_for_interface</a> | |
55 | (<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *interface_name); | |
56 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * <a class="link" href="libnice-Network-interfaces-discovery.html#nice-interfaces-get-local-interfaces" title="nice_interfaces_get_local_interfaces ()">nice_interfaces_get_local_interfaces</a> | |
57 | (void); | |
58 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * <a class="link" href="libnice-Network-interfaces-discovery.html#nice-interfaces-get-local-ips" title="nice_interfaces_get_local_ips ()">nice_interfaces_get_local_ips</a> (<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> include_loopback); | |
46 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="libnice-Network-interfaces-discovery.html#nice-interfaces-get-ip-for-interface" title="nice_interfaces_get_ip_for_interface ()">nice_interfaces_get_ip_for_interface</a> | |
47 | (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>); | |
48 | <a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * <a class="link" href="libnice-Network-interfaces-discovery.html#nice-interfaces-get-local-interfaces" title="nice_interfaces_get_local_interfaces ()">nice_interfaces_get_local_interfaces</a> | |
49 | (<em class="parameter"><code><span class="type">void</span></code></em>); | |
50 | <a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * <a class="link" href="libnice-Network-interfaces-discovery.html#nice-interfaces-get-local-ips" title="nice_interfaces_get_local_ips ()">nice_interfaces_get_local_ips</a> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> include_loopback</code></em>); | |
59 | 51 | </pre> |
60 | 52 | </div> |
61 | 53 | <div class="refsect1" title="Description"> |
63 | 55 | <p> |
64 | 56 | These utility functions allow the discovery of local network interfaces |
65 | 57 | in a portable manner, they also allow finding the local ip addresses or |
66 | the address allocated to a network interface.</p> | |
58 | the address allocated to a network interface. | |
59 | </p> | |
67 | 60 | </div> |
68 | 61 | <div class="refsect1" title="Details"> |
69 | 62 | <a name="libnice-Network-interfaces-discovery.details"></a><h2>Details</h2> |
70 | 63 | <div class="refsect2" title="nice_interfaces_get_ip_for_interface ()"> |
71 | 64 | <a name="nice-interfaces-get-ip-for-interface"></a><h3>nice_interfaces_get_ip_for_interface ()</h3> |
72 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * nice_interfaces_get_ip_for_interface | |
73 | (<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *interface_name);</pre> | |
65 | <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * nice_interfaces_get_ip_for_interface | |
66 | (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interface_name</code></em>);</pre> | |
74 | 67 | <p> |
75 | Retreives the IPv4 address of an interface by its name</p> | |
68 | Retreives the IPv4 address of an interface by its name | |
69 | </p> | |
76 | 70 | <div class="variablelist"><table border="0"> |
77 | 71 | <col align="left" valign="top"> |
78 | 72 | <tbody> |
79 | 73 | <tr> |
80 | 74 | <td><p><span class="term"><em class="parameter"><code>interface_name</code></em> :</span></p></td> |
81 | <td> name of local interface | |
75 | <td>name of local interface | |
82 | 76 | </td> |
83 | 77 | </tr> |
84 | 78 | <tr> |
92 | 86 | <hr> |
93 | 87 | <div class="refsect2" title="nice_interfaces_get_local_interfaces ()"> |
94 | 88 | <a name="nice-interfaces-get-local-interfaces"></a><h3>nice_interfaces_get_local_interfaces ()</h3> |
95 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * nice_interfaces_get_local_interfaces | |
96 | (void);</pre> | |
89 | <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * nice_interfaces_get_local_interfaces | |
90 | (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> | |
97 | 91 | <p> |
98 | Get the list of local interfaces</p> | |
92 | Get the list of local interfaces | |
93 | </p> | |
99 | 94 | <div class="variablelist"><table border="0"> |
100 | 95 | <col align="left" valign="top"> |
101 | 96 | <tbody><tr> |
102 | 97 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
103 | <td> a newly-allocated <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of strings. The caller must free it. | |
98 | <td> a newly-allocated <a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of strings. The caller must free it. | |
104 | 99 | </td> |
105 | 100 | </tr></tbody> |
106 | 101 | </table></div> |
108 | 103 | <hr> |
109 | 104 | <div class="refsect2" title="nice_interfaces_get_local_ips ()"> |
110 | 105 | <a name="nice-interfaces-get-local-ips"></a><h3>nice_interfaces_get_local_ips ()</h3> |
111 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * nice_interfaces_get_local_ips (<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> include_loopback);</pre> | |
106 | <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * nice_interfaces_get_local_ips (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> include_loopback</code></em>);</pre> | |
112 | 107 | <p> |
113 | Get a list of local ipv4 interface addresses</p> | |
108 | Get a list of local ipv4 interface addresses | |
109 | </p> | |
114 | 110 | <div class="variablelist"><table border="0"> |
115 | 111 | <col align="left" valign="top"> |
116 | 112 | <tbody> |
117 | 113 | <tr> |
118 | 114 | <td><p><span class="term"><em class="parameter"><code>include_loopback</code></em> :</span></p></td> |
119 | <td> Include any loopback devices | |
115 | <td>Include any loopback devices | |
120 | 116 | </td> |
121 | 117 | </tr> |
122 | 118 | <tr> |
123 | 119 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
124 | <td> a newly-allocated <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of strings. The caller must free it. | |
120 | <td> a newly-allocated <a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of strings. The caller must free it. | |
125 | 121 | </td> |
126 | 122 | </tr> |
127 | 123 | </tbody> |
131 | 127 | </div> |
132 | 128 | <div class="footer"> |
133 | 129 | <hr> |
134 | Generated by GTK-Doc V1.13</div> | |
130 | Generated by GTK-Doc V1.15</div> | |
135 | 131 | </body> |
136 | 132 | </html>⏎ |
7 | 7 | <link rel="up" href="ch01.html" title=""> |
8 | 8 | <link rel="prev" href="NiceAgent.html" title="NiceAgent"> |
9 | 9 | <link rel="next" href="libnice-NiceCandidate.html" title="NiceCandidate"> |
10 | <meta name="generator" content="GTK-Doc V1.13 (XML mode)"> | |
10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> | |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | <link rel="part" href="pt01.html" title="Part I. ICE Library"> | |
13 | <link rel="chapter" href="ch01.html" title=""> | |
14 | <link rel="chapter" href="ch02.html" title="Libnice helper functions"> | |
15 | <link rel="part" href="pt02.html" title="Part II. STUN Library"> | |
16 | <link rel="chapter" href="ch03.html" title=""> | |
17 | <link rel="chapter" href="ch04.html" title="STUN usages"> | |
18 | <link rel="part" href="pt03.html" title="Part III. Pseudo TCP Socket implementation"> | |
19 | <link rel="chapter" href="ch05.html" title=""> | |
20 | 12 | </head> |
21 | 13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
22 | 14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
50 | 42 | <a name="libnice-NiceAddress.synopsis"></a><h2>Synopsis</h2> |
51 | 43 | <pre class="synopsis"> <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress">NiceAddress</a>; |
52 | 44 | #define <a class="link" href="libnice-NiceAddress.html#NICE-ADDRESS-STRING-LEN:CAPS" title="NICE_ADDRESS_STRING_LEN">NICE_ADDRESS_STRING_LEN</a> |
53 | <span class="returnvalue">void</span> <a class="link" href="libnice-NiceAddress.html#nice-address-init" title="nice_address_init ()">nice_address_init</a> (<a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr); | |
54 | <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> * <a class="link" href="libnice-NiceAddress.html#nice-address-new" title="nice_address_new ()">nice_address_new</a> (void); | |
55 | <span class="returnvalue">void</span> <a class="link" href="libnice-NiceAddress.html#nice-address-free" title="nice_address_free ()">nice_address_free</a> (<a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr); | |
56 | <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> * <a class="link" href="libnice-NiceAddress.html#nice-address-dup" title="nice_address_dup ()">nice_address_dup</a> (const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr); | |
57 | <span class="returnvalue">void</span> <a class="link" href="libnice-NiceAddress.html#nice-address-set-ipv4" title="nice_address_set_ipv4 ()">nice_address_set_ipv4</a> (<a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr, | |
58 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> addr_ipv4); | |
59 | <span class="returnvalue">void</span> <a class="link" href="libnice-NiceAddress.html#nice-address-set-ipv6" title="nice_address_set_ipv6 ()">nice_address_set_ipv6</a> (<a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr, | |
60 | const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="returnvalue">guchar</span></a> *addr_ipv6); | |
61 | <span class="returnvalue">void</span> <a class="link" href="libnice-NiceAddress.html#nice-address-set-port" title="nice_address_set_port ()">nice_address_set_port</a> (<a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr, | |
62 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> port); | |
63 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="libnice-NiceAddress.html#nice-address-get-port" title="nice_address_get_port ()">nice_address_get_port</a> (const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr); | |
64 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnice-NiceAddress.html#nice-address-set-from-string" title="nice_address_set_from_string ()">nice_address_set_from_string</a> (<a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr, | |
65 | const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *str); | |
66 | <span class="returnvalue">void</span> <a class="link" href="libnice-NiceAddress.html#nice-address-set-from-sockaddr" title="nice_address_set_from_sockaddr ()">nice_address_set_from_sockaddr</a> (<a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr, | |
67 | const <span class="returnvalue">struct sockaddr</span> *sin); | |
68 | <span class="returnvalue">void</span> <a class="link" href="libnice-NiceAddress.html#nice-address-copy-to-sockaddr" title="nice_address_copy_to_sockaddr ()">nice_address_copy_to_sockaddr</a> (const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr, | |
69 | <span class="returnvalue">struct sockaddr</span> *sin); | |
70 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnice-NiceAddress.html#nice-address-equal" title="nice_address_equal ()">nice_address_equal</a> (const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *a, | |
71 | const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *b); | |
72 | <span class="returnvalue">void</span> <a class="link" href="libnice-NiceAddress.html#nice-address-to-string" title="nice_address_to_string ()">nice_address_to_string</a> (const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr, | |
73 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *dst); | |
74 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnice-NiceAddress.html#nice-address-is-private" title="nice_address_is_private ()">nice_address_is_private</a> (const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr); | |
75 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnice-NiceAddress.html#nice-address-is-valid" title="nice_address_is_valid ()">nice_address_is_valid</a> (const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr); | |
45 | <span class="returnvalue">void</span> <a class="link" href="libnice-NiceAddress.html#nice-address-init" title="nice_address_init ()">nice_address_init</a> (<em class="parameter"><code><a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>); | |
46 | <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> * <a class="link" href="libnice-NiceAddress.html#nice-address-new" title="nice_address_new ()">nice_address_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>); | |
47 | <span class="returnvalue">void</span> <a class="link" href="libnice-NiceAddress.html#nice-address-free" title="nice_address_free ()">nice_address_free</a> (<em class="parameter"><code><a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>); | |
48 | <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> * <a class="link" href="libnice-NiceAddress.html#nice-address-dup" title="nice_address_dup ()">nice_address_dup</a> (<em class="parameter"><code>const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>); | |
49 | <span class="returnvalue">void</span> <a class="link" href="libnice-NiceAddress.html#nice-address-set-ipv4" title="nice_address_set_ipv4 ()">nice_address_set_ipv4</a> (<em class="parameter"><code><a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>, | |
50 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> addr_ipv4</code></em>); | |
51 | <span class="returnvalue">void</span> <a class="link" href="libnice-NiceAddress.html#nice-address-set-ipv6" title="nice_address_set_ipv6 ()">nice_address_set_ipv6</a> (<em class="parameter"><code><a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>, | |
52 | <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *addr_ipv6</code></em>); | |
53 | <span class="returnvalue">void</span> <a class="link" href="libnice-NiceAddress.html#nice-address-set-port" title="nice_address_set_port ()">nice_address_set_port</a> (<em class="parameter"><code><a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>, | |
54 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> port</code></em>); | |
55 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="libnice-NiceAddress.html#nice-address-get-port" title="nice_address_get_port ()">nice_address_get_port</a> (<em class="parameter"><code>const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>); | |
56 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnice-NiceAddress.html#nice-address-set-from-string" title="nice_address_set_from_string ()">nice_address_set_from_string</a> (<em class="parameter"><code><a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>, | |
57 | <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *str</code></em>); | |
58 | <span class="returnvalue">void</span> <a class="link" href="libnice-NiceAddress.html#nice-address-set-from-sockaddr" title="nice_address_set_from_sockaddr ()">nice_address_set_from_sockaddr</a> (<em class="parameter"><code><a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>, | |
59 | <em class="parameter"><code>const <span class="type">struct sockaddr</span> *sin</code></em>); | |
60 | <span class="returnvalue">void</span> <a class="link" href="libnice-NiceAddress.html#nice-address-copy-to-sockaddr" title="nice_address_copy_to_sockaddr ()">nice_address_copy_to_sockaddr</a> (<em class="parameter"><code>const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>, | |
61 | <em class="parameter"><code><span class="type">struct sockaddr</span> *sin</code></em>); | |
62 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnice-NiceAddress.html#nice-address-equal" title="nice_address_equal ()">nice_address_equal</a> (<em class="parameter"><code>const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *a</code></em>, | |
63 | <em class="parameter"><code>const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *b</code></em>); | |
64 | <span class="returnvalue">void</span> <a class="link" href="libnice-NiceAddress.html#nice-address-to-string" title="nice_address_to_string ()">nice_address_to_string</a> (<em class="parameter"><code>const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>, | |
65 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dst</code></em>); | |
66 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnice-NiceAddress.html#nice-address-is-private" title="nice_address_is_private ()">nice_address_is_private</a> (<em class="parameter"><code>const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>); | |
67 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnice-NiceAddress.html#nice-address-is-valid" title="nice_address_is_valid ()">nice_address_is_valid</a> (<em class="parameter"><code>const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>); | |
76 | 68 | </pre> |
77 | 69 | </div> |
78 | 70 | <div class="refsect1" title="Description"> |
79 | 71 | <a name="libnice-NiceAddress.description"></a><h2>Description</h2> |
80 | 72 | <p> |
81 | 73 | The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> structure will allow you to easily set/get and modify an IPv4 |
82 | or IPv6 address in order to communicate with the <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a>.</p> | |
74 | or IPv6 address in order to communicate with the <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a>. | |
75 | </p> | |
83 | 76 | </div> |
84 | 77 | <div class="refsect1" title="Details"> |
85 | 78 | <a name="libnice-NiceAddress.details"></a><h2>Details</h2> |
95 | 88 | } NiceAddress; |
96 | 89 | </pre> |
97 | 90 | <p> |
98 | The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> structure that represents an IPv4 or IPv6 address.</p> | |
91 | The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> structure that represents an IPv4 or IPv6 address. | |
92 | </p> | |
99 | 93 | <div class="variablelist"><table border="0"> |
100 | 94 | <col align="left" valign="top"> |
101 | 95 | <tbody></tbody> |
109 | 103 | <p> |
110 | 104 | The maximum string length representation of an address. |
111 | 105 | When using <a class="link" href="libnice-NiceAddress.html#nice-address-to-string" title="nice_address_to_string ()"><code class="function">nice_address_to_string()</code></a> make sure the string has a size of |
112 | at least <a class="link" href="libnice-NiceAddress.html#NICE-ADDRESS-STRING-LEN:CAPS" title="NICE_ADDRESS_STRING_LEN"><code class="literal">NICE_ADDRESS_STRING_LEN</code></a></p> | |
106 | at least <a class="link" href="libnice-NiceAddress.html#NICE-ADDRESS-STRING-LEN:CAPS" title="NICE_ADDRESS_STRING_LEN"><code class="literal">NICE_ADDRESS_STRING_LEN</code></a> | |
107 | </p> | |
113 | 108 | </div> |
114 | 109 | <hr> |
115 | 110 | <div class="refsect2" title="nice_address_init ()"> |
116 | 111 | <a name="nice-address-init"></a><h3>nice_address_init ()</h3> |
117 | <pre class="programlisting"><span class="returnvalue">void</span> nice_address_init (<a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr);</pre> | |
118 | <p> | |
119 | Initialize a <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> into an undefined address</p> | |
112 | <pre class="programlisting"><span class="returnvalue">void</span> nice_address_init (<em class="parameter"><code><a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>);</pre> | |
113 | <p> | |
114 | Initialize a <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> into an undefined address | |
115 | </p> | |
120 | 116 | <div class="variablelist"><table border="0"> |
121 | 117 | <col align="left" valign="top"> |
122 | 118 | <tbody><tr> |
123 | 119 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> |
124 | <td> The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to init | |
120 | <td>The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to init | |
125 | 121 | </td> |
126 | 122 | </tr></tbody> |
127 | 123 | </table></div> |
129 | 125 | <hr> |
130 | 126 | <div class="refsect2" title="nice_address_new ()"> |
131 | 127 | <a name="nice-address-new"></a><h3>nice_address_new ()</h3> |
132 | <pre class="programlisting"><a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> * nice_address_new (void);</pre> | |
128 | <pre class="programlisting"><a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> * nice_address_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> | |
133 | 129 | <p> |
134 | 130 | Create a new <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> with undefined address |
135 | You must free it with <a class="link" href="libnice-NiceAddress.html#nice-address-free" title="nice_address_free ()"><code class="function">nice_address_free()</code></a></p> | |
131 | You must free it with <a class="link" href="libnice-NiceAddress.html#nice-address-free" title="nice_address_free ()"><code class="function">nice_address_free()</code></a> | |
132 | </p> | |
136 | 133 | <div class="variablelist"><table border="0"> |
137 | 134 | <col align="left" valign="top"> |
138 | 135 | <tbody><tr> |
145 | 142 | <hr> |
146 | 143 | <div class="refsect2" title="nice_address_free ()"> |
147 | 144 | <a name="nice-address-free"></a><h3>nice_address_free ()</h3> |
148 | <pre class="programlisting"><span class="returnvalue">void</span> nice_address_free (<a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr);</pre> | |
149 | <p> | |
150 | Frees a <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> created with <a class="link" href="libnice-NiceAddress.html#nice-address-new" title="nice_address_new ()"><code class="function">nice_address_new()</code></a> or <a class="link" href="libnice-NiceAddress.html#nice-address-dup" title="nice_address_dup ()"><code class="function">nice_address_dup()</code></a></p> | |
145 | <pre class="programlisting"><span class="returnvalue">void</span> nice_address_free (<em class="parameter"><code><a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>);</pre> | |
146 | <p> | |
147 | Frees a <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> created with <a class="link" href="libnice-NiceAddress.html#nice-address-new" title="nice_address_new ()"><code class="function">nice_address_new()</code></a> or <a class="link" href="libnice-NiceAddress.html#nice-address-dup" title="nice_address_dup ()"><code class="function">nice_address_dup()</code></a> | |
148 | </p> | |
151 | 149 | <div class="variablelist"><table border="0"> |
152 | 150 | <col align="left" valign="top"> |
153 | 151 | <tbody><tr> |
154 | 152 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> |
155 | <td> The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to free | |
153 | <td>The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to free | |
156 | 154 | </td> |
157 | 155 | </tr></tbody> |
158 | 156 | </table></div> |
160 | 158 | <hr> |
161 | 159 | <div class="refsect2" title="nice_address_dup ()"> |
162 | 160 | <a name="nice-address-dup"></a><h3>nice_address_dup ()</h3> |
163 | <pre class="programlisting"><a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> * nice_address_dup (const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr);</pre> | |
164 | <p> | |
165 | Creates a new <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> with the same address as <em class="parameter"><code>addr</code></em></p> | |
166 | <div class="variablelist"><table border="0"> | |
167 | <col align="left" valign="top"> | |
168 | <tbody> | |
169 | <tr> | |
170 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> | |
171 | <td> The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to dup | |
161 | <pre class="programlisting"><a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> * nice_address_dup (<em class="parameter"><code>const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>);</pre> | |
162 | <p> | |
163 | Creates a new <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> with the same address as <em class="parameter"><code>addr</code></em> | |
164 | </p> | |
165 | <div class="variablelist"><table border="0"> | |
166 | <col align="left" valign="top"> | |
167 | <tbody> | |
168 | <tr> | |
169 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> | |
170 | <td>The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to dup | |
172 | 171 | </td> |
173 | 172 | </tr> |
174 | 173 | <tr> |
182 | 181 | <hr> |
183 | 182 | <div class="refsect2" title="nice_address_set_ipv4 ()"> |
184 | 183 | <a name="nice-address-set-ipv4"></a><h3>nice_address_set_ipv4 ()</h3> |
185 | <pre class="programlisting"><span class="returnvalue">void</span> nice_address_set_ipv4 (<a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr, | |
186 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> addr_ipv4);</pre> | |
184 | <pre class="programlisting"><span class="returnvalue">void</span> nice_address_set_ipv4 (<em class="parameter"><code><a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>, | |
185 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> addr_ipv4</code></em>);</pre> | |
187 | 186 | <p> |
188 | 187 | Set <em class="parameter"><code>addr</code></em> to an IPv4 address using the data from <em class="parameter"><code>addr_ipv4</code></em> |
189 | 188 | </p> |
196 | 195 | <a class="link" href="libnice-NiceAddress.html#nice-address-set-port" title="nice_address_set_port ()"><code class="function">nice_address_set_port()</code></a> |
197 | 196 | </p> |
198 | 197 | </div> |
199 | <div class="variablelist"><table border="0"> | |
200 | <col align="left" valign="top"> | |
201 | <tbody> | |
202 | <tr> | |
203 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> | |
204 | <td> The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to modify | |
198 | <p> | |
199 | </p> | |
200 | <div class="variablelist"><table border="0"> | |
201 | <col align="left" valign="top"> | |
202 | <tbody> | |
203 | <tr> | |
204 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> | |
205 | <td>The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to modify | |
205 | 206 | </td> |
206 | 207 | </tr> |
207 | 208 | <tr> |
208 | 209 | <td><p><span class="term"><em class="parameter"><code>addr_ipv4</code></em> :</span></p></td> |
209 | <td> The IPv4 address | |
210 | <td>The IPv4 address | |
210 | 211 | </td> |
211 | 212 | </tr> |
212 | 213 | </tbody> |
215 | 216 | <hr> |
216 | 217 | <div class="refsect2" title="nice_address_set_ipv6 ()"> |
217 | 218 | <a name="nice-address-set-ipv6"></a><h3>nice_address_set_ipv6 ()</h3> |
218 | <pre class="programlisting"><span class="returnvalue">void</span> nice_address_set_ipv6 (<a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr, | |
219 | const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guchar"><span class="returnvalue">guchar</span></a> *addr_ipv6);</pre> | |
219 | <pre class="programlisting"><span class="returnvalue">void</span> nice_address_set_ipv6 (<em class="parameter"><code><a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>, | |
220 | <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *addr_ipv6</code></em>);</pre> | |
220 | 221 | <p> |
221 | 222 | Set <em class="parameter"><code>addr</code></em> to an IPv6 address using the data from <em class="parameter"><code>addr_ipv6</code></em> |
222 | 223 | </p> |
229 | 230 | <a class="link" href="libnice-NiceAddress.html#nice-address-set-port" title="nice_address_set_port ()"><code class="function">nice_address_set_port()</code></a> |
230 | 231 | </p> |
231 | 232 | </div> |
232 | <div class="variablelist"><table border="0"> | |
233 | <col align="left" valign="top"> | |
234 | <tbody> | |
235 | <tr> | |
236 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> | |
237 | <td> The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to modify | |
233 | <p> | |
234 | </p> | |
235 | <div class="variablelist"><table border="0"> | |
236 | <col align="left" valign="top"> | |
237 | <tbody> | |
238 | <tr> | |
239 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> | |
240 | <td>The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to modify | |
238 | 241 | </td> |
239 | 242 | </tr> |
240 | 243 | <tr> |
241 | 244 | <td><p><span class="term"><em class="parameter"><code>addr_ipv6</code></em> :</span></p></td> |
242 | <td> The IPv6 address | |
245 | <td>The IPv6 address | |
243 | 246 | </td> |
244 | 247 | </tr> |
245 | 248 | </tbody> |
248 | 251 | <hr> |
249 | 252 | <div class="refsect2" title="nice_address_set_port ()"> |
250 | 253 | <a name="nice-address-set-port"></a><h3>nice_address_set_port ()</h3> |
251 | <pre class="programlisting"><span class="returnvalue">void</span> nice_address_set_port (<a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr, | |
252 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> port);</pre> | |
253 | <p> | |
254 | Set the port of <em class="parameter"><code>addr</code></em> to <em class="parameter"><code>port</code></em></p> | |
255 | <div class="variablelist"><table border="0"> | |
256 | <col align="left" valign="top"> | |
257 | <tbody> | |
258 | <tr> | |
259 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> | |
260 | <td> The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to modify | |
254 | <pre class="programlisting"><span class="returnvalue">void</span> nice_address_set_port (<em class="parameter"><code><a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>, | |
255 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> port</code></em>);</pre> | |
256 | <p> | |
257 | Set the port of <em class="parameter"><code>addr</code></em> to <em class="parameter"><code>port</code></em> | |
258 | </p> | |
259 | <div class="variablelist"><table border="0"> | |
260 | <col align="left" valign="top"> | |
261 | <tbody> | |
262 | <tr> | |
263 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> | |
264 | <td>The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to modify | |
261 | 265 | </td> |
262 | 266 | </tr> |
263 | 267 | <tr> |
264 | 268 | <td><p><span class="term"><em class="parameter"><code>port</code></em> :</span></p></td> |
265 | <td> The port to set | |
269 | <td>The port to set | |
266 | 270 | </td> |
267 | 271 | </tr> |
268 | 272 | </tbody> |
271 | 275 | <hr> |
272 | 276 | <div class="refsect2" title="nice_address_get_port ()"> |
273 | 277 | <a name="nice-address-get-port"></a><h3>nice_address_get_port ()</h3> |
274 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> nice_address_get_port (const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr);</pre> | |
275 | <p> | |
276 | Retreive the port of <em class="parameter"><code>addr</code></em></p> | |
277 | <div class="variablelist"><table border="0"> | |
278 | <col align="left" valign="top"> | |
279 | <tbody> | |
280 | <tr> | |
281 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> | |
282 | <td> The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to query | |
278 | <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> nice_address_get_port (<em class="parameter"><code>const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>);</pre> | |
279 | <p> | |
280 | Retreive the port of <em class="parameter"><code>addr</code></em> | |
281 | </p> | |
282 | <div class="variablelist"><table border="0"> | |
283 | <col align="left" valign="top"> | |
284 | <tbody> | |
285 | <tr> | |
286 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> | |
287 | <td>The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to query | |
283 | 288 | </td> |
284 | 289 | </tr> |
285 | 290 | <tr> |
293 | 298 | <hr> |
294 | 299 | <div class="refsect2" title="nice_address_set_from_string ()"> |
295 | 300 | <a name="nice-address-set-from-string"></a><h3>nice_address_set_from_string ()</h3> |
296 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nice_address_set_from_string (<a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr, | |
297 | const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *str);</pre> | |
298 | <p> | |
299 | Sets an IPv4 or IPv6 address from the string <em class="parameter"><code>str</code></em></p> | |
300 | <div class="variablelist"><table border="0"> | |
301 | <col align="left" valign="top"> | |
302 | <tbody> | |
303 | <tr> | |
304 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> | |
305 | <td> The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to modify | |
301 | <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nice_address_set_from_string (<em class="parameter"><code><a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>, | |
302 | <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *str</code></em>);</pre> | |
303 | <p> | |
304 | Sets an IPv4 or IPv6 address from the string <em class="parameter"><code>str</code></em> | |
305 | </p> | |
306 | <div class="variablelist"><table border="0"> | |
307 | <col align="left" valign="top"> | |
308 | <tbody> | |
309 | <tr> | |
310 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> | |
311 | <td>The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to modify | |
306 | 312 | </td> |
307 | 313 | </tr> |
308 | 314 | <tr> |
309 | 315 | <td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td> |
310 | <td> The string to set | |
311 | </td> | |
312 | </tr> | |
313 | <tr> | |
314 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> | |
315 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if success, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error | |
316 | <td>The string to set | |
317 | </td> | |
318 | </tr> | |
319 | <tr> | |
320 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> | |
321 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if success, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error | |
316 | 322 | </td> |
317 | 323 | </tr> |
318 | 324 | </tbody> |
321 | 327 | <hr> |
322 | 328 | <div class="refsect2" title="nice_address_set_from_sockaddr ()"> |
323 | 329 | <a name="nice-address-set-from-sockaddr"></a><h3>nice_address_set_from_sockaddr ()</h3> |
324 | <pre class="programlisting"><span class="returnvalue">void</span> nice_address_set_from_sockaddr (<a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr, | |
325 | const <span class="returnvalue">struct sockaddr</span> *sin);</pre> | |
326 | <p> | |
327 | Sets an IPv4 or IPv6 address from the sockaddr structure <em class="parameter"><code>sin</code></em></p> | |
328 | <div class="variablelist"><table border="0"> | |
329 | <col align="left" valign="top"> | |
330 | <tbody> | |
331 | <tr> | |
332 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> | |
333 | <td> The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to modify | |
330 | <pre class="programlisting"><span class="returnvalue">void</span> nice_address_set_from_sockaddr (<em class="parameter"><code><a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>, | |
331 | <em class="parameter"><code>const <span class="type">struct sockaddr</span> *sin</code></em>);</pre> | |
332 | <p> | |
333 | Sets an IPv4 or IPv6 address from the sockaddr structure <em class="parameter"><code>sin</code></em> | |
334 | </p> | |
335 | <div class="variablelist"><table border="0"> | |
336 | <col align="left" valign="top"> | |
337 | <tbody> | |
338 | <tr> | |
339 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> | |
340 | <td>The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to modify | |
334 | 341 | </td> |
335 | 342 | </tr> |
336 | 343 | <tr> |
337 | 344 | <td><p><span class="term"><em class="parameter"><code>sin</code></em> :</span></p></td> |
338 | <td> The sockaddr to set | |
345 | <td>The sockaddr to set | |
339 | 346 | </td> |
340 | 347 | </tr> |
341 | 348 | </tbody> |
344 | 351 | <hr> |
345 | 352 | <div class="refsect2" title="nice_address_copy_to_sockaddr ()"> |
346 | 353 | <a name="nice-address-copy-to-sockaddr"></a><h3>nice_address_copy_to_sockaddr ()</h3> |
347 | <pre class="programlisting"><span class="returnvalue">void</span> nice_address_copy_to_sockaddr (const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr, | |
348 | <span class="returnvalue">struct sockaddr</span> *sin);</pre> | |
349 | <p> | |
350 | Fills the sockaddr structure <em class="parameter"><code>sin</code></em> with the address contained in <em class="parameter"><code>addr</code></em></p> | |
351 | <div class="variablelist"><table border="0"> | |
352 | <col align="left" valign="top"> | |
353 | <tbody> | |
354 | <tr> | |
355 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> | |
356 | <td> The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to query | |
354 | <pre class="programlisting"><span class="returnvalue">void</span> nice_address_copy_to_sockaddr (<em class="parameter"><code>const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>, | |
355 | <em class="parameter"><code><span class="type">struct sockaddr</span> *sin</code></em>);</pre> | |
356 | <p> | |
357 | Fills the sockaddr structure <em class="parameter"><code>sin</code></em> with the address contained in <em class="parameter"><code>addr</code></em> | |
358 | </p> | |
359 | <div class="variablelist"><table border="0"> | |
360 | <col align="left" valign="top"> | |
361 | <tbody> | |
362 | <tr> | |
363 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> | |
364 | <td>The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to query | |
357 | 365 | </td> |
358 | 366 | </tr> |
359 | 367 | <tr> |
360 | 368 | <td><p><span class="term"><em class="parameter"><code>sin</code></em> :</span></p></td> |
361 | <td> The sockaddr to fill | |
369 | <td>The sockaddr to fill | |
362 | 370 | </td> |
363 | 371 | </tr> |
364 | 372 | </tbody> |
367 | 375 | <hr> |
368 | 376 | <div class="refsect2" title="nice_address_equal ()"> |
369 | 377 | <a name="nice-address-equal"></a><h3>nice_address_equal ()</h3> |
370 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nice_address_equal (const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *a, | |
371 | const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *b);</pre> | |
372 | <p> | |
373 | Compares two <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> structures to see if they contain the same address</p> | |
378 | <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nice_address_equal (<em class="parameter"><code>const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *a</code></em>, | |
379 | <em class="parameter"><code>const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *b</code></em>);</pre> | |
380 | <p> | |
381 | Compares two <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> structures to see if they contain the same address | |
382 | </p> | |
374 | 383 | <div class="variablelist"><table border="0"> |
375 | 384 | <col align="left" valign="top"> |
376 | 385 | <tbody> |
377 | 386 | <tr> |
378 | 387 | <td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td> |
379 | <td> First <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to compare | |
388 | <td>First <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to compare | |
380 | 389 | </td> |
381 | 390 | </tr> |
382 | 391 | <tr> |
383 | 392 | <td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td> |
384 | <td> Second <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to compare | |
385 | </td> | |
386 | </tr> | |
387 | <tr> | |
388 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> | |
389 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>a</code></em> and <em class="parameter"><code>b</code></em> are the same address, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if they are different | |
393 | <td>Second <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to compare | |
394 | </td> | |
395 | </tr> | |
396 | <tr> | |
397 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> | |
398 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>a</code></em> and <em class="parameter"><code>b</code></em> are the same address, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if they are different | |
390 | 399 | </td> |
391 | 400 | </tr> |
392 | 401 | </tbody> |
395 | 404 | <hr> |
396 | 405 | <div class="refsect2" title="nice_address_to_string ()"> |
397 | 406 | <a name="nice-address-to-string"></a><h3>nice_address_to_string ()</h3> |
398 | <pre class="programlisting"><span class="returnvalue">void</span> nice_address_to_string (const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr, | |
399 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *dst);</pre> | |
400 | <p> | |
401 | Transforms the address <em class="parameter"><code>addr</code></em> into a human readable string</p> | |
402 | <div class="variablelist"><table border="0"> | |
403 | <col align="left" valign="top"> | |
404 | <tbody> | |
405 | <tr> | |
406 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> | |
407 | <td> The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to query | |
407 | <pre class="programlisting"><span class="returnvalue">void</span> nice_address_to_string (<em class="parameter"><code>const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>, | |
408 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dst</code></em>);</pre> | |
409 | <p> | |
410 | Transforms the address <em class="parameter"><code>addr</code></em> into a human readable string | |
411 | </p> | |
412 | <div class="variablelist"><table border="0"> | |
413 | <col align="left" valign="top"> | |
414 | <tbody> | |
415 | <tr> | |
416 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> | |
417 | <td>The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to query | |
408 | 418 | </td> |
409 | 419 | </tr> |
410 | 420 | <tr> |
411 | 421 | <td><p><span class="term"><em class="parameter"><code>dst</code></em> :</span></p></td> |
412 | <td> The string to fill | |
422 | <td>The string to fill | |
413 | 423 | </td> |
414 | 424 | </tr> |
415 | 425 | </tbody> |
418 | 428 | <hr> |
419 | 429 | <div class="refsect2" title="nice_address_is_private ()"> |
420 | 430 | <a name="nice-address-is-private"></a><h3>nice_address_is_private ()</h3> |
421 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nice_address_is_private (const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr);</pre> | |
422 | <p> | |
423 | Verifies if the address in <em class="parameter"><code>addr</code></em> is a private address or not</p> | |
424 | <div class="variablelist"><table border="0"> | |
425 | <col align="left" valign="top"> | |
426 | <tbody> | |
427 | <tr> | |
428 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> | |
429 | <td> The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to query | |
430 | </td> | |
431 | </tr> | |
432 | <tr> | |
433 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> | |
434 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>addr</code></em> is a private address, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise | |
431 | <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nice_address_is_private (<em class="parameter"><code>const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>);</pre> | |
432 | <p> | |
433 | Verifies if the address in <em class="parameter"><code>addr</code></em> is a private address or not | |
434 | </p> | |
435 | <div class="variablelist"><table border="0"> | |
436 | <col align="left" valign="top"> | |
437 | <tbody> | |
438 | <tr> | |
439 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> | |
440 | <td>The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to query | |
441 | </td> | |
442 | </tr> | |
443 | <tr> | |
444 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> | |
445 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>addr</code></em> is a private address, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise | |
435 | 446 | </td> |
436 | 447 | </tr> |
437 | 448 | </tbody> |
440 | 451 | <hr> |
441 | 452 | <div class="refsect2" title="nice_address_is_valid ()"> |
442 | 453 | <a name="nice-address-is-valid"></a><h3>nice_address_is_valid ()</h3> |
443 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nice_address_is_valid (const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="returnvalue">NiceAddress</span></a> *addr);</pre> | |
444 | <p> | |
445 | Validate whether the <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> <em class="parameter"><code>addr</code></em> is a valid IPv4 or IPv6 address</p> | |
446 | <div class="variablelist"><table border="0"> | |
447 | <col align="left" valign="top"> | |
448 | <tbody> | |
449 | <tr> | |
450 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> | |
451 | <td> The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to query | |
452 | </td> | |
453 | </tr> | |
454 | <tr> | |
455 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> | |
456 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>addr</code></em> is valid, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise | |
454 | <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> nice_address_is_valid (<em class="parameter"><code>const <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>);</pre> | |
455 | <p> | |
456 | Validate whether the <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> <em class="parameter"><code>addr</code></em> is a valid IPv4 or IPv6 address | |
457 | </p> | |
458 | <div class="variablelist"><table border="0"> | |
459 | <col align="left" valign="top"> | |
460 | <tbody> | |
461 | <tr> | |
462 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> | |
463 | <td>The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> to query | |
464 | </td> | |
465 | </tr> | |
466 | <tr> | |
467 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> | |
468 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>addr</code></em> is valid, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise | |
457 | 469 | </td> |
458 | 470 | </tr> |
459 | 471 | </tbody> |
463 | 475 | </div> |
464 | 476 | <div class="footer"> |
465 | 477 | <hr> |
466 | Generated by GTK-Doc V1.13</div> | |
478 | Generated by GTK-Doc V1.15</div> | |
467 | 479 | </body> |
468 | 480 | </html>⏎ |
7 | 7 | <link rel="up" href="ch01.html" title=""> |
8 | 8 | <link rel="prev" href="libnice-NiceAddress.html" title="NiceAddress"> |
9 | 9 | <link rel="next" href="ch02.html" title="Libnice helper functions"> |
10 | <meta name="generator" content="GTK-Doc V1.13 (XML mode)"> | |
10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> | |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | <link rel="part" href="pt01.html" title="Part I. ICE Library"> | |
13 | <link rel="chapter" href="ch01.html" title=""> | |
14 | <link rel="chapter" href="ch02.html" title="Libnice helper functions"> | |
15 | <link rel="part" href="pt02.html" title="Part II. STUN Library"> | |
16 | <link rel="chapter" href="ch03.html" title=""> | |
17 | <link rel="chapter" href="ch04.html" title="STUN usages"> | |
18 | <link rel="part" href="pt03.html" title="Part III. Pseudo TCP Socket implementation"> | |
19 | <link rel="chapter" href="ch05.html" title=""> | |
20 | 12 | </head> |
21 | 13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
22 | 14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
54 | 46 | <a class="link" href="libnice-NiceCandidate.html#TurnServer" title="TurnServer">TurnServer</a>; |
55 | 47 | enum <a class="link" href="libnice-NiceCandidate.html#NiceRelayType" title="enum NiceRelayType">NiceRelayType</a>; |
56 | 48 | #define <a class="link" href="libnice-NiceCandidate.html#NICE-CANDIDATE-MAX-FOUNDATION:CAPS" title="NICE_CANDIDATE_MAX_FOUNDATION">NICE_CANDIDATE_MAX_FOUNDATION</a> |
57 | <a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="returnvalue">NiceCandidate</span></a> * <a class="link" href="libnice-NiceCandidate.html#nice-candidate-new" title="nice_candidate_new ()">nice_candidate_new</a> (<a class="link" href="libnice-NiceCandidate.html#NiceCandidateType" title="enum NiceCandidateType"><span class="returnvalue">NiceCandidateType</span></a> type); | |
58 | <span class="returnvalue">void</span> <a class="link" href="libnice-NiceCandidate.html#nice-candidate-free" title="nice_candidate_free ()">nice_candidate_free</a> (<a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="returnvalue">NiceCandidate</span></a> *candidate); | |
59 | <a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="returnvalue">NiceCandidate</span></a> * <a class="link" href="libnice-NiceCandidate.html#nice-candidate-copy" title="nice_candidate_copy ()">nice_candidate_copy</a> (const <a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="returnvalue">NiceCandidate</span></a> *candidate); | |
49 | <a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="returnvalue">NiceCandidate</span></a> * <a class="link" href="libnice-NiceCandidate.html#nice-candidate-new" title="nice_candidate_new ()">nice_candidate_new</a> (<em class="parameter"><code><a class="link" href="libnice-NiceCandidate.html#NiceCandidateType" title="enum NiceCandidateType"><span class="type">NiceCandidateType</span></a> type</code></em>); | |
50 | <span class="returnvalue">void</span> <a class="link" href="libnice-NiceCandidate.html#nice-candidate-free" title="nice_candidate_free ()">nice_candidate_free</a> (<em class="parameter"><code><a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="type">NiceCandidate</span></a> *candidate</code></em>); | |
51 | <a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="returnvalue">NiceCandidate</span></a> * <a class="link" href="libnice-NiceCandidate.html#nice-candidate-copy" title="nice_candidate_copy ()">nice_candidate_copy</a> (<em class="parameter"><code>const <a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="type">NiceCandidate</span></a> *candidate</code></em>); | |
60 | 52 | </pre> |
61 | 53 | </div> |
62 | 54 | <div class="refsect1" title="Description"> |
66 | 58 | understand correctly the concept of ICE candidates. |
67 | 59 | </p> |
68 | 60 | <p> |
69 | [1] http://tools.ietf.org/wg/mmusic/draft-ietf-mmusic-ice/</p> | |
61 | [1] http://tools.ietf.org/wg/mmusic/draft-ietf-mmusic-ice/ | |
62 | </p> | |
70 | 63 | </div> |
71 | 64 | <div class="refsect1" title="Details"> |
72 | 65 | <a name="libnice-NiceCandidate.details"></a><h2>Details</h2> |
99 | 92 | value will represent the qvalue multiplied by 1000. |
100 | 93 | </p> |
101 | 94 | </div> |
95 | <p> | |
96 | </p> | |
102 | 97 | <div class="variablelist"><table border="0"> |
103 | 98 | <col align="left" valign="top"> |
104 | 99 | <tbody> |
105 | 100 | <tr> |
106 | 101 | <td><p><span class="term"><a class="link" href="libnice-NiceCandidate.html#NiceCandidateType" title="enum NiceCandidateType"><span class="type">NiceCandidateType</span></a> <em class="structfield"><code><a name="NiceCandidate.type"></a>type</code></em>;</span></p></td> |
107 | <td> The type of candidate | |
102 | <td>The type of candidate | |
108 | 103 | </td> |
109 | 104 | </tr> |
110 | 105 | <tr> |
111 | 106 | <td><p><span class="term"><a class="link" href="libnice-NiceCandidate.html#NiceCandidateTransport" title="enum NiceCandidateTransport"><span class="type">NiceCandidateTransport</span></a> <em class="structfield"><code><a name="NiceCandidate.transport"></a>transport</code></em>;</span></p></td> |
112 | <td> The transport being used for the candidate | |
107 | <td>The transport being used for the candidate | |
113 | 108 | </td> |
114 | 109 | </tr> |
115 | 110 | <tr> |
116 | 111 | <td><p><span class="term"><a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> <em class="structfield"><code><a name="NiceCandidate.addr"></a>addr</code></em>;</span></p></td> |
117 | <td> The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> of the candidate | |
112 | <td>The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> of the candidate | |
118 | 113 | </td> |
119 | 114 | </tr> |
120 | 115 | <tr> |
121 | 116 | <td><p><span class="term"><a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> <em class="structfield"><code><a name="NiceCandidate.base-addr"></a>base_addr</code></em>;</span></p></td> |
122 | <td> The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> of the base address used by the candidate | |
123 | </td> | |
124 | </tr> | |
125 | <tr> | |
126 | <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> <em class="structfield"><code><a name="NiceCandidate.priority"></a>priority</code></em>;</span></p></td> | |
127 | <td> The priority of the candidate <span class="emphasis"><em> see note </em></span> | |
128 | </td> | |
129 | </tr> | |
130 | <tr> | |
131 | <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="NiceCandidate.stream-id"></a>stream_id</code></em>;</span></p></td> | |
132 | <td> The ID of the stream to which belongs the candidate | |
133 | </td> | |
134 | </tr> | |
135 | <tr> | |
136 | <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="NiceCandidate.component-id"></a>component_id</code></em>;</span></p></td> | |
137 | <td> The ID of the component to which belongs the candidate | |
138 | </td> | |
139 | </tr> | |
140 | <tr> | |
141 | <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> <em class="structfield"><code><a name="NiceCandidate.foundation"></a>foundation</code></em>[NICE_CANDIDATE_MAX_FOUNDATION];</span></p></td> | |
142 | <td> The foundation of the candidate | |
143 | </td> | |
144 | </tr> | |
145 | <tr> | |
146 | <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="NiceCandidate.username"></a>username</code></em>;</span></p></td> | |
147 | <td> The candidate-specific username to use (overrides the one set | |
117 | <td>The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> of the base address used by the candidate | |
118 | </td> | |
119 | </tr> | |
120 | <tr> | |
121 | <td><p><span class="term"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> <em class="structfield"><code><a name="NiceCandidate.priority"></a>priority</code></em>;</span></p></td> | |
122 | <td>The priority of the candidate <span class="emphasis"><em> see note </em></span> | |
123 | </td> | |
124 | </tr> | |
125 | <tr> | |
126 | <td><p><span class="term"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="NiceCandidate.stream-id"></a>stream_id</code></em>;</span></p></td> | |
127 | <td>The ID of the stream to which belongs the candidate | |
128 | </td> | |
129 | </tr> | |
130 | <tr> | |
131 | <td><p><span class="term"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="NiceCandidate.component-id"></a>component_id</code></em>;</span></p></td> | |
132 | <td>The ID of the component to which belongs the candidate | |
133 | </td> | |
134 | </tr> | |
135 | <tr> | |
136 | <td><p><span class="term"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> <em class="structfield"><code><a name="NiceCandidate.foundation"></a>foundation</code></em>[NICE_CANDIDATE_MAX_FOUNDATION];</span></p></td> | |
137 | <td>The foundation of the candidate | |
138 | </td> | |
139 | </tr> | |
140 | <tr> | |
141 | <td><p><span class="term"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="NiceCandidate.username"></a>username</code></em>;</span></p></td> | |
142 | <td>The candidate-specific username to use (overrides the one set | |
148 | 143 | by <code class="function">nice_agent_set_local_credentials()</code> or <a class="link" href="NiceAgent.html#nice-agent-set-remote-credentials" title="nice_agent_set_remote_credentials ()"><code class="function">nice_agent_set_remote_credentials()</code></a>) |
149 | 144 | </td> |
150 | 145 | </tr> |
151 | 146 | <tr> |
152 | <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="NiceCandidate.password"></a>password</code></em>;</span></p></td> | |
153 | <td> The candidate-specific password to use (overrides the one set | |
147 | <td><p><span class="term"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="NiceCandidate.password"></a>password</code></em>;</span></p></td> | |
148 | <td>The candidate-specific password to use (overrides the one set | |
154 | 149 | by <code class="function">nice_agent_set_local_credentials()</code> or <a class="link" href="NiceAgent.html#nice-agent-set-remote-credentials" title="nice_agent_set_remote_credentials ()"><code class="function">nice_agent_set_remote_credentials()</code></a>) |
155 | 150 | </td> |
156 | 151 | </tr> |
157 | 152 | <tr> |
158 | 153 | <td><p><span class="term"><a class="link" href="libnice-NiceCandidate.html#TurnServer" title="TurnServer"><span class="type">TurnServer</span></a> *<em class="structfield"><code><a name="NiceCandidate.turn"></a>turn</code></em>;</span></p></td> |
159 | <td> The <a class="link" href="libnice-NiceCandidate.html#TurnServer" title="TurnServer"><span class="type">TurnServer</span></a> settings if the candidate is | |
154 | <td>The <a class="link" href="libnice-NiceCandidate.html#TurnServer" title="TurnServer"><span class="type">TurnServer</span></a> settings if the candidate is | |
160 | 155 | of type <a class="link" href="libnice-NiceCandidate.html#NICE-CANDIDATE-TYPE-RELAYED:CAPS"><code class="literal">NICE_CANDIDATE_TYPE_RELAYED</code></a> |
161 | 156 | </td> |
162 | 157 | </tr> |
163 | 158 | <tr> |
164 | <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> <em class="structfield"><code><a name="NiceCandidate.sockptr"></a>sockptr</code></em>;</span></p></td> | |
165 | <td> The underlying socket | |
159 | <td><p><span class="term"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> <em class="structfield"><code><a name="NiceCandidate.sockptr"></a>sockptr</code></em>;</span></p></td> | |
160 | <td>The underlying socket | |
166 | 161 | </td> |
167 | 162 | </tr> |
168 | 163 | </tbody> |
180 | 175 | } NiceCandidateType; |
181 | 176 | </pre> |
182 | 177 | <p> |
183 | An enum represneting the type of a candidate</p> | |
178 | An enum represneting the type of a candidate | |
179 | </p> | |
184 | 180 | <div class="variablelist"><table border="0"> |
185 | 181 | <col align="left" valign="top"> |
186 | 182 | <tbody> |
187 | 183 | <tr> |
188 | 184 | <td><p><a name="NICE-CANDIDATE-TYPE-HOST:CAPS"></a><span class="term"><code class="literal">NICE_CANDIDATE_TYPE_HOST</code></span></p></td> |
189 | <td> A host candidate | |
185 | <td>A host candidate | |
190 | 186 | </td> |
191 | 187 | </tr> |
192 | 188 | <tr> |
193 | 189 | <td><p><a name="NICE-CANDIDATE-TYPE-SERVER-REFLEXIVE:CAPS"></a><span class="term"><code class="literal">NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE</code></span></p></td> |
194 | <td> A server reflexive candidate | |
190 | <td>A server reflexive candidate | |
195 | 191 | </td> |
196 | 192 | </tr> |
197 | 193 | <tr> |
198 | 194 | <td><p><a name="NICE-CANDIDATE-TYPE-PEER-REFLEXIVE:CAPS"></a><span class="term"><code class="literal">NICE_CANDIDATE_TYPE_PEER_REFLEXIVE</code></span></p></td> |
199 | <td> A peer reflexive candidate | |
195 | <td>A peer reflexive candidate | |
200 | 196 | </td> |
201 | 197 | </tr> |
202 | 198 | <tr> |
203 | 199 | <td><p><a name="NICE-CANDIDATE-TYPE-RELAYED:CAPS"></a><span class="term"><code class="literal">NICE_CANDIDATE_TYPE_RELAYED</code></span></p></td> |
204 | <td> A relay candidate | |
200 | <td>A relay candidate | |
205 | 201 | </td> |
206 | 202 | </tr> |
207 | 203 | </tbody> |
216 | 212 | } NiceCandidateTransport; |
217 | 213 | </pre> |
218 | 214 | <p> |
219 | An enum representing the type of transport to use</p> | |
215 | An enum representing the type of transport to use | |
216 | </p> | |
220 | 217 | <div class="variablelist"><table border="0"> |
221 | 218 | <col align="left" valign="top"> |
222 | 219 | <tbody><tr> |
223 | 220 | <td><p><a name="NICE-CANDIDATE-TRANSPORT-UDP:CAPS"></a><span class="term"><code class="literal">NICE_CANDIDATE_TRANSPORT_UDP</code></span></p></td> |
224 | <td> UDP transport | |
221 | <td>UDP transport | |
225 | 222 | </td> |
226 | 223 | </tr></tbody> |
227 | 224 | </table></div> |
237 | 234 | } TurnServer; |
238 | 235 | </pre> |
239 | 236 | <p> |
240 | A structure to store the TURN relay settings</p> | |
237 | A structure to store the TURN relay settings | |
238 | </p> | |
241 | 239 | <div class="variablelist"><table border="0"> |
242 | 240 | <col align="left" valign="top"> |
243 | 241 | <tbody> |
244 | 242 | <tr> |
245 | 243 | <td><p><span class="term"><a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> <em class="structfield"><code><a name="TurnServer.server"></a>server</code></em>;</span></p></td> |
246 | <td> The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> of the TURN server | |
247 | </td> | |
248 | </tr> | |
249 | <tr> | |
250 | <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="TurnServer.username"></a>username</code></em>;</span></p></td> | |
251 | <td> The TURN username | |
252 | </td> | |
253 | </tr> | |
254 | <tr> | |
255 | <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="TurnServer.password"></a>password</code></em>;</span></p></td> | |
256 | <td> The TURN password | |
244 | <td>The <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> of the TURN server | |
245 | </td> | |
246 | </tr> | |
247 | <tr> | |
248 | <td><p><span class="term"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="TurnServer.username"></a>username</code></em>;</span></p></td> | |
249 | <td>The TURN username | |
250 | </td> | |
251 | </tr> | |
252 | <tr> | |
253 | <td><p><span class="term"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="TurnServer.password"></a>password</code></em>;</span></p></td> | |
254 | <td>The TURN password | |
257 | 255 | </td> |
258 | 256 | </tr> |
259 | 257 | <tr> |
260 | 258 | <td><p><span class="term"><a class="link" href="libnice-NiceCandidate.html#NiceRelayType" title="enum NiceRelayType"><span class="type">NiceRelayType</span></a> <em class="structfield"><code><a name="TurnServer.type"></a>type</code></em>;</span></p></td> |
261 | <td> The <a class="link" href="libnice-NiceCandidate.html#NiceRelayType" title="enum NiceRelayType"><span class="type">NiceRelayType</span></a> of the server | |
259 | <td>The <a class="link" href="libnice-NiceCandidate.html#NiceRelayType" title="enum NiceRelayType"><span class="type">NiceRelayType</span></a> of the server | |
262 | 260 | </td> |
263 | 261 | </tr> |
264 | 262 | </tbody> |
274 | 272 | } NiceRelayType; |
275 | 273 | </pre> |
276 | 274 | <p> |
277 | An enum representing the type of relay to use</p> | |
275 | An enum representing the type of relay to use | |
276 | </p> | |
278 | 277 | <div class="variablelist"><table border="0"> |
279 | 278 | <col align="left" valign="top"> |
280 | 279 | <tbody> |
281 | 280 | <tr> |
282 | 281 | <td><p><a name="NICE-RELAY-TYPE-TURN-UDP:CAPS"></a><span class="term"><code class="literal">NICE_RELAY_TYPE_TURN_UDP</code></span></p></td> |
283 | <td> A TURN relay using UDP | |
282 | <td>A TURN relay using UDP | |
284 | 283 | </td> |
285 | 284 | </tr> |
286 | 285 | <tr> |
287 | 286 | <td><p><a name="NICE-RELAY-TYPE-TURN-TCP:CAPS"></a><span class="term"><code class="literal">NICE_RELAY_TYPE_TURN_TCP</code></span></p></td> |
288 | <td> A TURN relay using TCP | |
287 | <td>A TURN relay using TCP | |
289 | 288 | </td> |
290 | 289 | </tr> |
291 | 290 | <tr> |
292 | 291 | <td><p><a name="NICE-RELAY-TYPE-TURN-TLS:CAPS"></a><span class="term"><code class="literal">NICE_RELAY_TYPE_TURN_TLS</code></span></p></td> |
293 | <td> A TURN relay using TLS over TCP | |
292 | <td>A TURN relay using TLS over TCP | |
294 | 293 | </td> |
295 | 294 | </tr> |
296 | 295 | </tbody> |
302 | 301 | <pre class="programlisting">#define NICE_CANDIDATE_MAX_FOUNDATION 32+1 |
303 | 302 | </pre> |
304 | 303 | <p> |
305 | The maximum size a candidate foundation can have.</p> | |
304 | The maximum size a candidate foundation can have. | |
305 | </p> | |
306 | 306 | </div> |
307 | 307 | <hr> |
308 | 308 | <div class="refsect2" title="nice_candidate_new ()"> |
309 | 309 | <a name="nice-candidate-new"></a><h3>nice_candidate_new ()</h3> |
310 | <pre class="programlisting"><a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="returnvalue">NiceCandidate</span></a> * nice_candidate_new (<a class="link" href="libnice-NiceCandidate.html#NiceCandidateType" title="enum NiceCandidateType"><span class="returnvalue">NiceCandidateType</span></a> type);</pre> | |
311 | <p> | |
312 | Creates a new candidate. Must be freed with <a class="link" href="libnice-NiceCandidate.html#nice-candidate-free" title="nice_candidate_free ()"><code class="function">nice_candidate_free()</code></a></p> | |
310 | <pre class="programlisting"><a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="returnvalue">NiceCandidate</span></a> * nice_candidate_new (<em class="parameter"><code><a class="link" href="libnice-NiceCandidate.html#NiceCandidateType" title="enum NiceCandidateType"><span class="type">NiceCandidateType</span></a> type</code></em>);</pre> | |
311 | <p> | |
312 | Creates a new candidate. Must be freed with <a class="link" href="libnice-NiceCandidate.html#nice-candidate-free" title="nice_candidate_free ()"><code class="function">nice_candidate_free()</code></a> | |
313 | </p> | |
313 | 314 | <div class="variablelist"><table border="0"> |
314 | 315 | <col align="left" valign="top"> |
315 | 316 | <tbody> |
316 | 317 | <tr> |
317 | 318 | <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> |
318 | <td> The <a class="link" href="libnice-NiceCandidate.html#NiceCandidateType" title="enum NiceCandidateType"><span class="type">NiceCandidateType</span></a> of the candidate to create | |
319 | <td>The <a class="link" href="libnice-NiceCandidate.html#NiceCandidateType" title="enum NiceCandidateType"><span class="type">NiceCandidateType</span></a> of the candidate to create | |
319 | 320 | </td> |
320 | 321 | </tr> |
321 | 322 | <tr> |
329 | 330 | <hr> |
330 | 331 | <div class="refsect2" title="nice_candidate_free ()"> |
331 | 332 | <a name="nice-candidate-free"></a><h3>nice_candidate_free ()</h3> |
332 | <pre class="programlisting"><span class="returnvalue">void</span> nice_candidate_free (<a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="returnvalue">NiceCandidate</span></a> *candidate);</pre> | |
333 | <p> | |
334 | Frees a <a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="type">NiceCandidate</span></a></p> | |
333 | <pre class="programlisting"><span class="returnvalue">void</span> nice_candidate_free (<em class="parameter"><code><a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="type">NiceCandidate</span></a> *candidate</code></em>);</pre> | |
334 | <p> | |
335 | Frees a <a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="type">NiceCandidate</span></a> | |
336 | </p> | |
335 | 337 | <div class="variablelist"><table border="0"> |
336 | 338 | <col align="left" valign="top"> |
337 | 339 | <tbody><tr> |
338 | 340 | <td><p><span class="term"><em class="parameter"><code>candidate</code></em> :</span></p></td> |
339 | <td> The candidate to free | |
341 | <td>The candidate to free | |
340 | 342 | </td> |
341 | 343 | </tr></tbody> |
342 | 344 | </table></div> |
344 | 346 | <hr> |
345 | 347 | <div class="refsect2" title="nice_candidate_copy ()"> |
346 | 348 | <a name="nice-candidate-copy"></a><h3>nice_candidate_copy ()</h3> |
347 | <pre class="programlisting"><a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="returnvalue">NiceCandidate</span></a> * nice_candidate_copy (const <a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="returnvalue">NiceCandidate</span></a> *candidate);</pre> | |
348 | <p> | |
349 | Makes a copy of a <a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="type">NiceCandidate</span></a></p> | |
349 | <pre class="programlisting"><a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="returnvalue">NiceCandidate</span></a> * nice_candidate_copy (<em class="parameter"><code>const <a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="type">NiceCandidate</span></a> *candidate</code></em>);</pre> | |
350 | <p> | |
351 | Makes a copy of a <a class="link" href="libnice-NiceCandidate.html#NiceCandidate" title="NiceCandidate"><span class="type">NiceCandidate</span></a> | |
352 | </p> | |
350 | 353 | <div class="variablelist"><table border="0"> |
351 | 354 | <col align="left" valign="top"> |
352 | 355 | <tbody> |
353 | 356 | <tr> |
354 | 357 | <td><p><span class="term"><em class="parameter"><code>candidate</code></em> :</span></p></td> |
355 | <td> The candidate to copy | |
358 | <td>The candidate to copy | |
356 | 359 | </td> |
357 | 360 | </tr> |
358 | 361 | <tr> |
371 | 374 | </div> |
372 | 375 | <div class="footer"> |
373 | 376 | <hr> |
374 | Generated by GTK-Doc V1.13</div> | |
377 | Generated by GTK-Doc V1.15</div> | |
375 | 378 | </body> |
376 | 379 | </html>⏎ |
6 | 6 | <link rel="home" href="index.html" title="libnice Reference Manual"> |
7 | 7 | <link rel="up" href="ch05.html" title=""> |
8 | 8 | <link rel="prev" href="ch05.html" title=""> |
9 | <meta name="generator" content="GTK-Doc V1.13 (XML mode)"> | |
9 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> | |
10 | 10 | <link rel="stylesheet" href="style.css" type="text/css"> |
11 | <link rel="part" href="pt01.html" title="Part I. ICE Library"> | |
12 | <link rel="chapter" href="ch01.html" title=""> | |
13 | <link rel="chapter" href="ch02.html" title="Libnice helper functions"> | |
14 | <link rel="part" href="pt02.html" title="Part II. STUN Library"> | |
15 | <link rel="chapter" href="ch03.html" title=""> | |
16 | <link rel="chapter" href="ch04.html" title="STUN usages"> | |
17 | <link rel="part" href="pt03.html" title="Part III. Pseudo TCP Socket implementation"> | |
18 | <link rel="chapter" href="ch05.html" title=""> | |
19 | 11 | </head> |
20 | 12 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
21 | 13 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
59 | 51 | enum <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpWriteResult" title="enum PseudoTcpWriteResult">PseudoTcpWriteResult</a>; |
60 | 52 | <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpCallbacks" title="PseudoTcpCallbacks">PseudoTcpCallbacks</a>; |
61 | 53 | enum <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpDebugLevel" title="enum PseudoTcpDebugLevel">PseudoTcpDebugLevel</a>; |
62 | <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="returnvalue">PseudoTcpSocket</span></a> * <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-new" title="pseudo_tcp_socket_new ()">pseudo_tcp_socket_new</a> (<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> conversation, | |
63 | <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpCallbacks" title="PseudoTcpCallbacks"><span class="returnvalue">PseudoTcpCallbacks</span></a> *callbacks); | |
64 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-connect" title="pseudo_tcp_socket_connect ()">pseudo_tcp_socket_connect</a> (<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="returnvalue">PseudoTcpSocket</span></a> *self); | |
65 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-recv" title="pseudo_tcp_socket_recv ()">pseudo_tcp_socket_recv</a> (<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="returnvalue">PseudoTcpSocket</span></a> *self, | |
66 | <span class="returnvalue">char</span> *buffer, | |
67 | <span class="returnvalue">size_t</span> len); | |
68 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-send" title="pseudo_tcp_socket_send ()">pseudo_tcp_socket_send</a> (<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="returnvalue">PseudoTcpSocket</span></a> *self, | |
69 | const <span class="returnvalue">char</span> *buffer, | |
70 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> len); | |
71 | <span class="returnvalue">void</span> <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-close" title="pseudo_tcp_socket_close ()">pseudo_tcp_socket_close</a> (<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="returnvalue">PseudoTcpSocket</span></a> *self, | |
72 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> force); | |
73 | <span class="returnvalue">int</span> <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-get-error" title="pseudo_tcp_socket_get_error ()">pseudo_tcp_socket_get_error</a> (<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="returnvalue">PseudoTcpSocket</span></a> *self); | |
74 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-get-next-clock" title="pseudo_tcp_socket_get_next_clock ()">pseudo_tcp_socket_get_next_clock</a> (<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="returnvalue">PseudoTcpSocket</span></a> *self, | |
75 | <span class="returnvalue">long</span> *timeout); | |
76 | <span class="returnvalue">void</span> <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-notify-clock" title="pseudo_tcp_socket_notify_clock ()">pseudo_tcp_socket_notify_clock</a> (<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="returnvalue">PseudoTcpSocket</span></a> *self); | |
77 | <span class="returnvalue">void</span> <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-notify-mtu" title="pseudo_tcp_socket_notify_mtu ()">pseudo_tcp_socket_notify_mtu</a> (<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="returnvalue">PseudoTcpSocket</span></a> *self, | |
78 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint16"><span class="returnvalue">guint16</span></a> mtu); | |
79 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-notify-packet" title="pseudo_tcp_socket_notify_packet ()">pseudo_tcp_socket_notify_packet</a> (<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="returnvalue">PseudoTcpSocket</span></a> *self, | |
80 | const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *buffer, | |
81 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> len); | |
82 | <span class="returnvalue">void</span> <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-set-debug-level" title="pseudo_tcp_set_debug_level ()">pseudo_tcp_set_debug_level</a> (<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpDebugLevel" title="enum PseudoTcpDebugLevel"><span class="returnvalue">PseudoTcpDebugLevel</span></a> level); | |
54 | <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="returnvalue">PseudoTcpSocket</span></a> * <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-new" title="pseudo_tcp_socket_new ()">pseudo_tcp_socket_new</a> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> conversation</code></em>, | |
55 | <em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpCallbacks" title="PseudoTcpCallbacks"><span class="type">PseudoTcpCallbacks</span></a> *callbacks</code></em>); | |
56 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-connect" title="pseudo_tcp_socket_connect ()">pseudo_tcp_socket_connect</a> (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>); | |
57 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-recv" title="pseudo_tcp_socket_recv ()">pseudo_tcp_socket_recv</a> (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>, | |
58 | <em class="parameter"><code><span class="type">char</span> *buffer</code></em>, | |
59 | <em class="parameter"><code><span class="type">size_t</span> len</code></em>); | |
60 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-send" title="pseudo_tcp_socket_send ()">pseudo_tcp_socket_send</a> (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>, | |
61 | <em class="parameter"><code>const <span class="type">char</span> *buffer</code></em>, | |
62 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> len</code></em>); | |
63 | <span class="returnvalue">void</span> <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-close" title="pseudo_tcp_socket_close ()">pseudo_tcp_socket_close</a> (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>, | |
64 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> force</code></em>); | |
65 | <span class="returnvalue">int</span> <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-get-error" title="pseudo_tcp_socket_get_error ()">pseudo_tcp_socket_get_error</a> (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>); | |
66 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-get-next-clock" title="pseudo_tcp_socket_get_next_clock ()">pseudo_tcp_socket_get_next_clock</a> (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>, | |
67 | <em class="parameter"><code><span class="type">long</span> *timeout</code></em>); | |
68 | <span class="returnvalue">void</span> <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-notify-clock" title="pseudo_tcp_socket_notify_clock ()">pseudo_tcp_socket_notify_clock</a> (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>); | |
69 | <span class="returnvalue">void</span> <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-notify-mtu" title="pseudo_tcp_socket_notify_mtu ()">pseudo_tcp_socket_notify_mtu</a> (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>, | |
70 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> mtu</code></em>); | |
71 | <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-notify-packet" title="pseudo_tcp_socket_notify_packet ()">pseudo_tcp_socket_notify_packet</a> (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>, | |
72 | <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buffer</code></em>, | |
73 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> len</code></em>); | |
74 | <span class="returnvalue">void</span> <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-set-debug-level" title="pseudo_tcp_set_debug_level ()">pseudo_tcp_set_debug_level</a> (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpDebugLevel" title="enum PseudoTcpDebugLevel"><span class="type">PseudoTcpDebugLevel</span></a> level</code></em>); | |
83 | 75 | </pre> |
84 | 76 | </div> |
85 | 77 | <div class="refsect1" title="Object Hierarchy"> |
86 | 78 | <a name="libnice-Pseudo-TCP-Socket.object-hierarchy"></a><h2>Object Hierarchy</h2> |
87 | 79 | <pre class="synopsis"> |
88 | <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a> | |
80 | <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a> | |
89 | 81 | +----PseudoTcpSocket |
90 | 82 | </pre> |
91 | 83 | </div> |
92 | 84 | <div class="refsect1" title="Properties"> |
93 | 85 | <a name="libnice-Pseudo-TCP-Socket.properties"></a><h2>Properties</h2> |
94 | 86 | <pre class="synopsis"> |
95 | "<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket--callbacks" title='The "callbacks" property'>callbacks</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> : Read / Write | |
96 | "<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket--conversation" title='The "conversation" property'>conversation</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write / Construct Only | |
97 | "<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket--state" title='The "state" property'>state</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read | |
87 | "<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket--callbacks" title='The "callbacks" property'>callbacks</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> : Read / Write | |
88 | "<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket--conversation" title='The "conversation" property'>conversation</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write / Construct Only | |
89 | "<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket--state" title='The "state" property'>state</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read | |
98 | 90 | </pre> |
99 | 91 | </div> |
100 | 92 | <div class="refsect1" title="Description"> |
107 | 99 | </p> |
108 | 100 | <p> |
109 | 101 | See the file tests/test-pseudotcp.c in the source package for an example |
110 | of how to use the object.</p> | |
102 | of how to use the object. | |
103 | </p> | |
111 | 104 | </div> |
112 | 105 | <div class="refsect1" title="Details"> |
113 | 106 | <a name="libnice-Pseudo-TCP-Socket.details"></a><h2>Details</h2> |
115 | 108 | <a name="PseudoTcpSocket-struct"></a><h3>PseudoTcpSocket</h3> |
116 | 109 | <pre class="programlisting">typedef struct _PseudoTcpSocket PseudoTcpSocket;</pre> |
117 | 110 | <p> |
118 | The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> is the GObject implementing the Pseudo TCP Socket</p> | |
111 | The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> is the GObject implementing the Pseudo TCP Socket | |
112 | </p> | |
119 | 113 | <p class="since">Since 0.0.11</p> |
120 | 114 | </div> |
121 | 115 | <hr> |
133 | 127 | An enum representing the state of the <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a>. |
134 | 128 | </p> |
135 | 129 | <p> See also: <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket--state" title='The "state" property'><span class="type">"state"</span></a> </p> |
130 | <p> | |
131 | </p> | |
136 | 132 | <div class="variablelist"><table border="0"> |
137 | 133 | <col align="left" valign="top"> |
138 | 134 | <tbody> |
139 | 135 | <tr> |
140 | 136 | <td><p><a name="TCP-LISTEN:CAPS"></a><span class="term"><code class="literal">TCP_LISTEN</code></span></p></td> |
141 | <td> The socket's initial state. The socket isn't connected and is | |
137 | <td>The socket's initial state. The socket isn't connected and is | |
142 | 138 | listening for an incoming connection |
143 | 139 | </td> |
144 | 140 | </tr> |
145 | 141 | <tr> |
146 | 142 | <td><p><a name="TCP-SYN-SENT:CAPS"></a><span class="term"><code class="literal">TCP_SYN_SENT</code></span></p></td> |
147 | <td> The socket has sent a connection request (SYN) packet and is | |
143 | <td>The socket has sent a connection request (SYN) packet and is | |
148 | 144 | waiting for an answer |
149 | 145 | </td> |
150 | 146 | </tr> |
151 | 147 | <tr> |
152 | 148 | <td><p><a name="TCP-SYN-RECEIVED:CAPS"></a><span class="term"><code class="literal">TCP_SYN_RECEIVED</code></span></p></td> |
153 | <td> The socket has received a connection request (SYN) packet. | |
149 | <td>The socket has received a connection request (SYN) packet. | |
154 | 150 | </td> |
155 | 151 | </tr> |
156 | 152 | <tr> |
157 | 153 | <td><p><a name="TCP-ESTABLISHED:CAPS"></a><span class="term"><code class="literal">TCP_ESTABLISHED</code></span></p></td> |
158 | <td> The socket is connected | |
154 | <td>The socket is connected | |
159 | 155 | </td> |
160 | 156 | </tr> |
161 | 157 | <tr> |
162 | 158 | <td><p><a name="TCP-CLOSED:CAPS"></a><span class="term"><code class="literal">TCP_CLOSED</code></span></p></td> |
163 | <td> The socket has been closed | |
159 | <td>The socket has been closed | |
164 | 160 | </td> |
165 | 161 | </tr> |
166 | 162 | </tbody> |
181 | 177 | the <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a>. |
182 | 178 | </p> |
183 | 179 | <p> See also: <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpCallbacks" title="PseudoTcpCallbacks"><code class="literal">PseudoTcpCallbacks</code></a>:WritePacket </p> |
180 | <p> | |
181 | </p> | |
184 | 182 | <div class="variablelist"><table border="0"> |
185 | 183 | <col align="left" valign="top"> |
186 | 184 | <tbody> |
187 | 185 | <tr> |
188 | 186 | <td><p><a name="WR-SUCCESS:CAPS"></a><span class="term"><code class="literal">WR_SUCCESS</code></span></p></td> |
189 | <td> The write operation was successful | |
187 | <td>The write operation was successful | |
190 | 188 | </td> |
191 | 189 | </tr> |
192 | 190 | <tr> |
193 | 191 | <td><p><a name="WR-TOO-LARGE:CAPS"></a><span class="term"><code class="literal">WR_TOO_LARGE</code></span></p></td> |
194 | <td> The socket type requires that message be sent atomically | |
192 | <td>The socket type requires that message be sent atomically | |
195 | 193 | and the size of the message to be sent made this impossible. |
196 | 194 | </td> |
197 | 195 | </tr> |
198 | 196 | <tr> |
199 | 197 | <td><p><a name="WR-FAIL:CAPS"></a><span class="term"><code class="literal">WR_FAIL</code></span></p></td> |
200 | <td> There was an error sending the message | |
198 | <td>There was an error sending the message | |
201 | 199 | </td> |
202 | 200 | </tr> |
203 | 201 | </tbody> |
222 | 220 | <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> when some events happen. |
223 | 221 | </p> |
224 | 222 | <p> See also: <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpWriteResult" title="enum PseudoTcpWriteResult"><span class="type">PseudoTcpWriteResult</span></a> </p> |
225 | <div class="variablelist"><table border="0"> | |
226 | <col align="left" valign="top"> | |
227 | <tbody> | |
228 | <tr> | |
229 | <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> <em class="structfield"><code><a name="PseudoTcpCallbacks.user-data"></a>user_data</code></em>;</span></p></td> | |
230 | <td> A user defined pointer to be passed to the callbacks | |
223 | <p> | |
224 | </p> | |
225 | <div class="variablelist"><table border="0"> | |
226 | <col align="left" valign="top"> | |
227 | <tbody> | |
228 | <tr> | |
229 | <td><p><span class="term"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> <em class="structfield"><code><a name="PseudoTcpCallbacks.user-data"></a>user_data</code></em>;</span></p></td> | |
230 | <td>A user defined pointer to be passed to the callbacks | |
231 | 231 | </td> |
232 | 232 | </tr> |
233 | 233 | <tr> |
234 | 234 | <td><p><span class="term"><em class="structfield"><code><a name="PseudoTcpCallbacks.PseudoTcpOpened"></a>PseudoTcpOpened</code></em> ()</span></p></td> |
235 | <td> The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> is now connected | |
235 | <td>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> is now connected | |
236 | 236 | </td> |
237 | 237 | </tr> |
238 | 238 | <tr> |
239 | 239 | <td><p><span class="term"><em class="structfield"><code><a name="PseudoTcpCallbacks.PseudoTcpReadable"></a>PseudoTcpReadable</code></em> ()</span></p></td> |
240 | <td> The socket is readable | |
240 | <td>The socket is readable | |
241 | 241 | </td> |
242 | 242 | </tr> |
243 | 243 | <tr> |
244 | 244 | <td><p><span class="term"><em class="structfield"><code><a name="PseudoTcpCallbacks.PseudoTcpWritable"></a>PseudoTcpWritable</code></em> ()</span></p></td> |
245 | <td> The socket is writable | |
245 | <td>The socket is writable | |
246 | 246 | </td> |
247 | 247 | </tr> |
248 | 248 | <tr> |
249 | 249 | <td><p><span class="term"><em class="structfield"><code><a name="PseudoTcpCallbacks.PseudoTcpClosed"></a>PseudoTcpClosed</code></em> ()</span></p></td> |
250 | <td> The socket was closed | |
250 | <td>The socket was closed | |
251 | 251 | </td> |
252 | 252 | </tr> |
253 | 253 | <tr> |
254 | 254 | <td><p><span class="term"><em class="structfield"><code><a name="PseudoTcpCallbacks.WritePacket"></a>WritePacket</code></em> ()</span></p></td> |
255 | <td> This callback is called when the socket needs to send data. | |
255 | <td>This callback is called when the socket needs to send data. | |
256 | 256 | </td> |
257 | 257 | </tr> |
258 | 258 | </tbody> |
269 | 269 | } PseudoTcpDebugLevel; |
270 | 270 | </pre> |
271 | 271 | <p> |
272 | Valid values of debug levels to be set.</p> | |
272 | Valid values of debug levels to be set. | |
273 | </p> | |
273 | 274 | <div class="variablelist"><table border="0"> |
274 | 275 | <col align="left" valign="top"> |
275 | 276 | <tbody> |
276 | 277 | <tr> |
277 | 278 | <td><p><a name="PSEUDO-TCP-DEBUG-NONE:CAPS"></a><span class="term"><code class="literal">PSEUDO_TCP_DEBUG_NONE</code></span></p></td> |
278 | <td> Disable debug messages | |
279 | <td>Disable debug messages | |
279 | 280 | </td> |
280 | 281 | </tr> |
281 | 282 | <tr> |
282 | 283 | <td><p><a name="PSEUDO-TCP-DEBUG-NORMAL:CAPS"></a><span class="term"><code class="literal">PSEUDO_TCP_DEBUG_NORMAL</code></span></p></td> |
283 | <td> Enable basic debug messages | |
284 | <td>Enable basic debug messages | |
284 | 285 | </td> |
285 | 286 | </tr> |
286 | 287 | <tr> |
287 | 288 | <td><p><a name="PSEUDO-TCP-DEBUG-VERBOSE:CAPS"></a><span class="term"><code class="literal">PSEUDO_TCP_DEBUG_VERBOSE</code></span></p></td> |
288 | <td> Enable verbose debug messages | |
289 | <td>Enable verbose debug messages | |
289 | 290 | </td> |
290 | 291 | </tr> |
291 | 292 | </tbody> |
295 | 296 | <hr> |
296 | 297 | <div class="refsect2" title="pseudo_tcp_socket_new ()"> |
297 | 298 | <a name="pseudo-tcp-socket-new"></a><h3>pseudo_tcp_socket_new ()</h3> |
298 | <pre class="programlisting"><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="returnvalue">PseudoTcpSocket</span></a> * pseudo_tcp_socket_new (<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> conversation, | |
299 | <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpCallbacks" title="PseudoTcpCallbacks"><span class="returnvalue">PseudoTcpCallbacks</span></a> *callbacks);</pre> | |
299 | <pre class="programlisting"><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="returnvalue">PseudoTcpSocket</span></a> * pseudo_tcp_socket_new (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> conversation</code></em>, | |
300 | <em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpCallbacks" title="PseudoTcpCallbacks"><span class="type">PseudoTcpCallbacks</span></a> *callbacks</code></em>);</pre> | |
300 | 301 | <p> |
301 | 302 | Creates a new <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> for the specified conversation |
302 | 303 | </p> |
313 | 314 | after the call <em class="parameter"><code>pseudo_tcp_socket_new</code></em> |
314 | 315 | </p> |
315 | 316 | </div> |
317 | <p> | |
318 | </p> | |
316 | 319 | <div class="variablelist"><table border="0"> |
317 | 320 | <col align="left" valign="top"> |
318 | 321 | <tbody> |
319 | 322 | <tr> |
320 | 323 | <td><p><span class="term"><em class="parameter"><code>conversation</code></em> :</span></p></td> |
321 | <td> The conversation id for the socket. | |
324 | <td>The conversation id for the socket. | |
322 | 325 | </td> |
323 | 326 | </tr> |
324 | 327 | <tr> |
325 | 328 | <td><p><span class="term"><em class="parameter"><code>callbacks</code></em> :</span></p></td> |
326 | <td> A pointer to the <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpCallbacks" title="PseudoTcpCallbacks"><span class="type">PseudoTcpCallbacks</span></a> structure for getting | |
329 | <td>A pointer to the <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpCallbacks" title="PseudoTcpCallbacks"><span class="type">PseudoTcpCallbacks</span></a> structure for getting | |
327 | 330 | notified of the <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> events. |
328 | 331 | </td> |
329 | 332 | </tr> |
330 | 333 | <tr> |
331 | 334 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
332 | <td> The new <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error | |
335 | <td> The new <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error | |
333 | 336 | |
334 | 337 | </td> |
335 | 338 | </tr> |
340 | 343 | <hr> |
341 | 344 | <div class="refsect2" title="pseudo_tcp_socket_connect ()"> |
342 | 345 | <a name="pseudo-tcp-socket-connect"></a><h3>pseudo_tcp_socket_connect ()</h3> |
343 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> pseudo_tcp_socket_connect (<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="returnvalue">PseudoTcpSocket</span></a> *self);</pre> | |
346 | <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> pseudo_tcp_socket_connect (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>);</pre> | |
344 | 347 | <p> |
345 | 348 | Connects the <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> to the peer with the same conversation id. |
346 | 349 | The connection will only be successful after the |
347 | <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpCallbacks" title="PseudoTcpCallbacks"><code class="literal">PseudoTcpCallbacks</code></a>:PseudoTcpOpened callback is called</p> | |
348 | <div class="variablelist"><table border="0"> | |
349 | <col align="left" valign="top"> | |
350 | <tbody> | |
351 | <tr> | |
352 | <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td> | |
353 | <td> The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object. | |
350 | <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpCallbacks" title="PseudoTcpCallbacks"><code class="literal">PseudoTcpCallbacks</code></a>:PseudoTcpOpened callback is called | |
351 | </p> | |
352 | <div class="variablelist"><table border="0"> | |
353 | <col align="left" valign="top"> | |
354 | <tbody> | |
355 | <tr> | |
356 | <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td> | |
357 | <td>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object. | |
354 | 358 | </td> |
355 | 359 | </tr> |
356 | 360 | <tr> |
357 | 361 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
358 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on failure (not in <a class="link" href="libnice-Pseudo-TCP-Socket.html#TCP-LISTEN:CAPS"><code class="literal">TCP_LISTEN</code></a> state) | |
362 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on failure (not in <a class="link" href="libnice-Pseudo-TCP-Socket.html#TCP-LISTEN:CAPS"><code class="literal">TCP_LISTEN</code></a> state) | |
359 | 363 | <p> See also: <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-get-error" title="pseudo_tcp_socket_get_error ()"><code class="function">pseudo_tcp_socket_get_error()</code></a> </p> |
360 | 364 | |
361 | 365 | </td> |
367 | 371 | <hr> |
368 | 372 | <div class="refsect2" title="pseudo_tcp_socket_recv ()"> |
369 | 373 | <a name="pseudo-tcp-socket-recv"></a><h3>pseudo_tcp_socket_recv ()</h3> |
370 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> pseudo_tcp_socket_recv (<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="returnvalue">PseudoTcpSocket</span></a> *self, | |
371 | <span class="returnvalue">char</span> *buffer, | |
372 | <span class="returnvalue">size_t</span> len);</pre> | |
374 | <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> pseudo_tcp_socket_recv (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>, | |
375 | <em class="parameter"><code><span class="type">char</span> *buffer</code></em>, | |
376 | <em class="parameter"><code><span class="type">size_t</span> len</code></em>);</pre> | |
373 | 377 | <p> |
374 | 378 | Receive data from the socket. |
375 | 379 | </p> |
386 | 390 | <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpCallbacks" title="PseudoTcpCallbacks"><code class="literal">PseudoTcpCallbacks</code></a>:PseudoTcpReadable callback will not be called again. |
387 | 391 | </p> |
388 | 392 | </div> |
389 | <div class="variablelist"><table border="0"> | |
390 | <col align="left" valign="top"> | |
391 | <tbody> | |
392 | <tr> | |
393 | <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td> | |
394 | <td> The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object. | |
393 | <p> | |
394 | </p> | |
395 | <div class="variablelist"><table border="0"> | |
396 | <col align="left" valign="top"> | |
397 | <tbody> | |
398 | <tr> | |
399 | <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td> | |
400 | <td>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object. | |
395 | 401 | </td> |
396 | 402 | </tr> |
397 | 403 | <tr> |
398 | 404 | <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
399 | <td> The buffer to fill with received data | |
405 | <td>The buffer to fill with received data | |
400 | 406 | </td> |
401 | 407 | </tr> |
402 | 408 | <tr> |
403 | 409 | <td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td> |
404 | <td> The length of <em class="parameter"><code>buffer</code></em> | |
410 | <td>The length of <em class="parameter"><code>buffer</code></em> | |
405 | 411 | </td> |
406 | 412 | </tr> |
407 | 413 | <tr> |
418 | 424 | <hr> |
419 | 425 | <div class="refsect2" title="pseudo_tcp_socket_send ()"> |
420 | 426 | <a name="pseudo-tcp-socket-send"></a><h3>pseudo_tcp_socket_send ()</h3> |
421 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> pseudo_tcp_socket_send (<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="returnvalue">PseudoTcpSocket</span></a> *self, | |
422 | const <span class="returnvalue">char</span> *buffer, | |
423 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> len);</pre> | |
427 | <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> pseudo_tcp_socket_send (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>, | |
428 | <em class="parameter"><code>const <span class="type">char</span> *buffer</code></em>, | |
429 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> len</code></em>);</pre> | |
424 | 430 | <p> |
425 | 431 | Send data on the socket. |
426 | 432 | </p> |
434 | 440 | callback will be called when the socket will become writable. |
435 | 441 | </p> |
436 | 442 | </div> |
437 | <div class="variablelist"><table border="0"> | |
438 | <col align="left" valign="top"> | |
439 | <tbody> | |
440 | <tr> | |
441 | <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td> | |
442 | <td> The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object. | |
443 | <p> | |
444 | </p> | |
445 | <div class="variablelist"><table border="0"> | |
446 | <col align="left" valign="top"> | |
447 | <tbody> | |
448 | <tr> | |
449 | <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td> | |
450 | <td>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object. | |
443 | 451 | </td> |
444 | 452 | </tr> |
445 | 453 | <tr> |
446 | 454 | <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
447 | <td> The buffer with data to send | |
455 | <td>The buffer with data to send | |
448 | 456 | </td> |
449 | 457 | </tr> |
450 | 458 | <tr> |
451 | 459 | <td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td> |
452 | <td> The length of <em class="parameter"><code>buffer</code></em> | |
460 | <td>The length of <em class="parameter"><code>buffer</code></em> | |
453 | 461 | </td> |
454 | 462 | </tr> |
455 | 463 | <tr> |
466 | 474 | <hr> |
467 | 475 | <div class="refsect2" title="pseudo_tcp_socket_close ()"> |
468 | 476 | <a name="pseudo-tcp-socket-close"></a><h3>pseudo_tcp_socket_close ()</h3> |
469 | <pre class="programlisting"><span class="returnvalue">void</span> pseudo_tcp_socket_close (<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="returnvalue">PseudoTcpSocket</span></a> *self, | |
470 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> force);</pre> | |
471 | <p> | |
472 | Close the socket. IF <em class="parameter"><code>force</code></em> is set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, the socket will finish sending | |
477 | <pre class="programlisting"><span class="returnvalue">void</span> pseudo_tcp_socket_close (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>, | |
478 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> force</code></em>);</pre> | |
479 | <p> | |
480 | Close the socket. IF <em class="parameter"><code>force</code></em> is set to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, the socket will finish sending | |
473 | 481 | pending data before closing. |
474 | 482 | </p> |
475 | 483 | <p> |
488 | 496 | <p> |
489 | 497 | </p> |
490 | 498 | <p> See also: <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-get-next-clock" title="pseudo_tcp_socket_get_next_clock ()"><code class="function">pseudo_tcp_socket_get_next_clock()</code></a> </p> |
491 | <div class="variablelist"><table border="0"> | |
492 | <col align="left" valign="top"> | |
493 | <tbody> | |
494 | <tr> | |
495 | <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td> | |
496 | <td> The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object. | |
499 | <p> | |
500 | </p> | |
501 | <div class="variablelist"><table border="0"> | |
502 | <col align="left" valign="top"> | |
503 | <tbody> | |
504 | <tr> | |
505 | <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td> | |
506 | <td>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object. | |
497 | 507 | </td> |
498 | 508 | </tr> |
499 | 509 | <tr> |
500 | 510 | <td><p><span class="term"><em class="parameter"><code>force</code></em> :</span></p></td> |
501 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to close the socket forcefully, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> to close it gracefully | |
511 | <td> | |
512 | <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to close the socket forcefully, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> to close it gracefully | |
502 | 513 | </td> |
503 | 514 | </tr> |
504 | 515 | </tbody> |
508 | 519 | <hr> |
509 | 520 | <div class="refsect2" title="pseudo_tcp_socket_get_error ()"> |
510 | 521 | <a name="pseudo-tcp-socket-get-error"></a><h3>pseudo_tcp_socket_get_error ()</h3> |
511 | <pre class="programlisting"><span class="returnvalue">int</span> pseudo_tcp_socket_get_error (<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="returnvalue">PseudoTcpSocket</span></a> *self);</pre> | |
522 | <pre class="programlisting"><span class="returnvalue">int</span> pseudo_tcp_socket_get_error (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>);</pre> | |
512 | 523 | <p> |
513 | 524 | Return the last encountered error. |
514 | 525 | </p> |
531 | 542 | <p> |
532 | 543 | </p> |
533 | 544 | </div> |
534 | <div class="variablelist"><table border="0"> | |
535 | <col align="left" valign="top"> | |
536 | <tbody> | |
537 | <tr> | |
538 | <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td> | |
539 | <td> The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object. | |
545 | <p> | |
546 | </p> | |
547 | <div class="variablelist"><table border="0"> | |
548 | <col align="left" valign="top"> | |
549 | <tbody> | |
550 | <tr> | |
551 | <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td> | |
552 | <td>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object. | |
540 | 553 | </td> |
541 | 554 | </tr> |
542 | 555 | <tr> |
555 | 568 | <hr> |
556 | 569 | <div class="refsect2" title="pseudo_tcp_socket_get_next_clock ()"> |
557 | 570 | <a name="pseudo-tcp-socket-get-next-clock"></a><h3>pseudo_tcp_socket_get_next_clock ()</h3> |
558 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> pseudo_tcp_socket_get_next_clock (<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="returnvalue">PseudoTcpSocket</span></a> *self, | |
559 | <span class="returnvalue">long</span> *timeout);</pre> | |
571 | <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> pseudo_tcp_socket_get_next_clock (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>, | |
572 | <em class="parameter"><code><span class="type">long</span> *timeout</code></em>);</pre> | |
560 | 573 | <p> |
561 | 574 | Call this to determine the timeout needed before the next time call |
562 | to <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-notify-clock" title="pseudo_tcp_socket_notify_clock ()"><code class="function">pseudo_tcp_socket_notify_clock()</code></a> should be made.</p> | |
563 | <div class="variablelist"><table border="0"> | |
564 | <col align="left" valign="top"> | |
565 | <tbody> | |
566 | <tr> | |
567 | <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td> | |
568 | <td> The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object. | |
575 | to <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-notify-clock" title="pseudo_tcp_socket_notify_clock ()"><code class="function">pseudo_tcp_socket_notify_clock()</code></a> should be made. | |
576 | </p> | |
577 | <div class="variablelist"><table border="0"> | |
578 | <col align="left" valign="top"> | |
579 | <tbody> | |
580 | <tr> | |
581 | <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td> | |
582 | <td>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object. | |
569 | 583 | </td> |
570 | 584 | </tr> |
571 | 585 | <tr> |
572 | 586 | <td><p><span class="term"><em class="parameter"><code>timeout</code></em> :</span></p></td> |
573 | <td> A pointer to be filled with the new timeout. | |
587 | <td>A pointer to be filled with the new timeout. | |
574 | 588 | </td> |
575 | 589 | </tr> |
576 | 590 | <tr> |
577 | 591 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
578 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>timeout</code></em> was filled, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the socket is closed and | |
592 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>timeout</code></em> was filled, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the socket is closed and | |
579 | 593 | ready to be destroyed. |
580 | 594 | |
581 | 595 | <p> See also: <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-notify-clock" title="pseudo_tcp_socket_notify_clock ()"><code class="function">pseudo_tcp_socket_notify_clock()</code></a> </p> |
589 | 603 | <hr> |
590 | 604 | <div class="refsect2" title="pseudo_tcp_socket_notify_clock ()"> |
591 | 605 | <a name="pseudo-tcp-socket-notify-clock"></a><h3>pseudo_tcp_socket_notify_clock ()</h3> |
592 | <pre class="programlisting"><span class="returnvalue">void</span> pseudo_tcp_socket_notify_clock (<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="returnvalue">PseudoTcpSocket</span></a> *self);</pre> | |
606 | <pre class="programlisting"><span class="returnvalue">void</span> pseudo_tcp_socket_notify_clock (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>);</pre> | |
593 | 607 | <p> |
594 | 608 | Start the processing of receiving data, pending data or syn/acks. |
595 | 609 | Call this based on timeout value returned by |
599 | 613 | <p> |
600 | 614 | </p> |
601 | 615 | <p> See also: <a class="link" href="libnice-Pseudo-TCP-Socket.html#pseudo-tcp-socket-get-next-clock" title="pseudo_tcp_socket_get_next_clock ()"><code class="function">pseudo_tcp_socket_get_next_clock()</code></a> </p> |
616 | <p> | |
617 | </p> | |
602 | 618 | <div class="variablelist"><table border="0"> |
603 | 619 | <col align="left" valign="top"> |
604 | 620 | <tbody><tr> |
605 | 621 | <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td> |
606 | <td> The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object. | |
622 | <td>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object. | |
607 | 623 | </td> |
608 | 624 | </tr></tbody> |
609 | 625 | </table></div> |
612 | 628 | <hr> |
613 | 629 | <div class="refsect2" title="pseudo_tcp_socket_notify_mtu ()"> |
614 | 630 | <a name="pseudo-tcp-socket-notify-mtu"></a><h3>pseudo_tcp_socket_notify_mtu ()</h3> |
615 | <pre class="programlisting"><span class="returnvalue">void</span> pseudo_tcp_socket_notify_mtu (<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="returnvalue">PseudoTcpSocket</span></a> *self, | |
616 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint16"><span class="returnvalue">guint16</span></a> mtu);</pre> | |
617 | <p> | |
618 | Set the MTU of the socket</p> | |
619 | <div class="variablelist"><table border="0"> | |
620 | <col align="left" valign="top"> | |
621 | <tbody> | |
622 | <tr> | |
623 | <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td> | |
624 | <td> The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object. | |
631 | <pre class="programlisting"><span class="returnvalue">void</span> pseudo_tcp_socket_notify_mtu (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>, | |
632 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint16"><span class="type">guint16</span></a> mtu</code></em>);</pre> | |
633 | <p> | |
634 | Set the MTU of the socket | |
635 | </p> | |
636 | <div class="variablelist"><table border="0"> | |
637 | <col align="left" valign="top"> | |
638 | <tbody> | |
639 | <tr> | |
640 | <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td> | |
641 | <td>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object. | |
625 | 642 | </td> |
626 | 643 | </tr> |
627 | 644 | <tr> |
628 | 645 | <td><p><span class="term"><em class="parameter"><code>mtu</code></em> :</span></p></td> |
629 | <td> The new MTU of the socket | |
646 | <td>The new MTU of the socket | |
630 | 647 | </td> |
631 | 648 | </tr> |
632 | 649 | </tbody> |
636 | 653 | <hr> |
637 | 654 | <div class="refsect2" title="pseudo_tcp_socket_notify_packet ()"> |
638 | 655 | <a name="pseudo-tcp-socket-notify-packet"></a><h3>pseudo_tcp_socket_notify_packet ()</h3> |
639 | <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> pseudo_tcp_socket_notify_packet (<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="returnvalue">PseudoTcpSocket</span></a> *self, | |
640 | const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *buffer, | |
641 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="returnvalue">guint32</span></a> len);</pre> | |
642 | <p> | |
643 | Notify the <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> when a new packet arrives</p> | |
644 | <div class="variablelist"><table border="0"> | |
645 | <col align="left" valign="top"> | |
646 | <tbody> | |
647 | <tr> | |
648 | <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td> | |
649 | <td> The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object. | |
656 | <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> pseudo_tcp_socket_notify_packet (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> *self</code></em>, | |
657 | <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buffer</code></em>, | |
658 | <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> len</code></em>);</pre> | |
659 | <p> | |
660 | Notify the <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> when a new packet arrives | |
661 | </p> | |
662 | <div class="variablelist"><table border="0"> | |
663 | <col align="left" valign="top"> | |
664 | <tbody> | |
665 | <tr> | |
666 | <td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td> | |
667 | <td>The <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> object. | |
650 | 668 | </td> |
651 | 669 | </tr> |
652 | 670 | <tr> |
653 | 671 | <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
654 | <td> The buffer containing the received data | |
672 | <td>The buffer containing the received data | |
655 | 673 | </td> |
656 | 674 | </tr> |
657 | 675 | <tr> |
658 | 676 | <td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td> |
659 | <td> The length of <em class="parameter"><code>buffer</code></em> | |
677 | <td>The length of <em class="parameter"><code>buffer</code></em> | |
660 | 678 | </td> |
661 | 679 | </tr> |
662 | 680 | <tr> |
663 | 681 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
664 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the packet was processed successfully, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise | |
682 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the packet was processed successfully, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise | |
665 | 683 | |
666 | 684 | </td> |
667 | 685 | </tr> |
672 | 690 | <hr> |
673 | 691 | <div class="refsect2" title="pseudo_tcp_set_debug_level ()"> |
674 | 692 | <a name="pseudo-tcp-set-debug-level"></a><h3>pseudo_tcp_set_debug_level ()</h3> |
675 | <pre class="programlisting"><span class="returnvalue">void</span> pseudo_tcp_set_debug_level (<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpDebugLevel" title="enum PseudoTcpDebugLevel"><span class="returnvalue">PseudoTcpDebugLevel</span></a> level);</pre> | |
676 | <p> | |
677 | Sets the debug level to enable/disable normal/verbose debug messages.</p> | |
693 | <pre class="programlisting"><span class="returnvalue">void</span> pseudo_tcp_set_debug_level (<em class="parameter"><code><a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpDebugLevel" title="enum PseudoTcpDebugLevel"><span class="type">PseudoTcpDebugLevel</span></a> level</code></em>);</pre> | |
694 | <p> | |
695 | Sets the debug level to enable/disable normal/verbose debug messages. | |
696 | </p> | |
678 | 697 | <div class="variablelist"><table border="0"> |
679 | 698 | <col align="left" valign="top"> |
680 | 699 | <tbody><tr> |
681 | 700 | <td><p><span class="term"><em class="parameter"><code>level</code></em> :</span></p></td> |
682 | <td> The level of debug to set | |
701 | <td>The level of debug to set | |
683 | 702 | </td> |
684 | 703 | </tr></tbody> |
685 | 704 | </table></div> |
690 | 709 | <a name="libnice-Pseudo-TCP-Socket.property-details"></a><h2>Property Details</h2> |
691 | 710 | <div class="refsect2" title='The "callbacks" property'> |
692 | 711 | <a name="PseudoTcpSocket--callbacks"></a><h3>The <code class="literal">"callbacks"</code> property</h3> |
693 | <pre class="programlisting"> "callbacks" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> : Read / Write</pre> | |
712 | <pre class="programlisting"> "callbacks" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> : Read / Write</pre> | |
694 | 713 | <p>Structure with the callbacks to call when PseudoTcp events happen.</p> |
695 | 714 | </div> |
696 | 715 | <hr> |
697 | 716 | <div class="refsect2" title='The "conversation" property'> |
698 | 717 | <a name="PseudoTcpSocket--conversation"></a><h3>The <code class="literal">"conversation"</code> property</h3> |
699 | <pre class="programlisting"> "conversation" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write / Construct Only</pre> | |
718 | <pre class="programlisting"> "conversation" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read / Write / Construct Only</pre> | |
700 | 719 | <p>The TCP Conversation ID.</p> |
701 | 720 | <p>Default value: 0</p> |
702 | 721 | </div> |
703 | 722 | <hr> |
704 | 723 | <div class="refsect2" title='The "state" property'> |
705 | 724 | <a name="PseudoTcpSocket--state"></a><h3>The <code class="literal">"state"</code> property</h3> |
706 | <pre class="programlisting"> "state" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read</pre> | |
725 | <pre class="programlisting"> "state" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> : Read</pre> | |
707 | 726 | <p>The current state (enum PseudoTcpState) of the PseudoTcp socket.</p> |
708 | 727 | <p>Allowed values: <= 4</p> |
709 | 728 | <p>Default value: 0</p> |
712 | 731 | </div> |
713 | 732 | <div class="footer"> |
714 | 733 | <hr> |
715 | Generated by GTK-Doc V1.13</div> | |
734 | Generated by GTK-Doc V1.15</div> | |
716 | 735 | </body> |
717 | 736 | </html>⏎ |
7 | 7 | <link rel="up" href="ch03.html" title=""> |
8 | 8 | <link rel="prev" href="ch03.html" title=""> |
9 | 9 | <link rel="next" href="libnice-StunMessage.html" title="StunMessage"> |
10 | <meta name="generator" content="GTK-Doc V1.13 (XML mode)"> | |
10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> | |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | <link rel="part" href="pt01.html" title="Part I. ICE Library"> | |
13 | <link rel="chapter" href="ch01.html" title=""> | |
14 | <link rel="chapter" href="ch02.html" title="Libnice helper functions"> | |
15 | <link rel="part" href="pt02.html" title="Part II. STUN Library"> | |
16 | <link rel="chapter" href="ch03.html" title=""> | |
17 | <link rel="chapter" href="ch04.html" title="STUN usages"> | |
18 | <link rel="part" href="pt03.html" title="Part III. Pseudo TCP Socket implementation"> | |
19 | <link rel="chapter" href="ch05.html" title=""> | |
20 | 12 | </head> |
21 | 13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
22 | 14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
55 | 47 | enum <a class="link" href="libnice-StunAgent.html#StunCompatibility" title="enum StunCompatibility">StunCompatibility</a>; |
56 | 48 | enum <a class="link" href="libnice-StunAgent.html#StunAgentUsageFlags" title="enum StunAgentUsageFlags">StunAgentUsageFlags</a>; |
57 | 49 | enum <a class="link" href="libnice-StunAgent.html#StunValidationStatus" title="enum StunValidationStatus">StunValidationStatus</a>; |
58 | <span class="returnvalue">bool</span> (<a class="link" href="libnice-StunAgent.html#StunMessageIntegrityValidate" title="StunMessageIntegrityValidate ()">*StunMessageIntegrityValidate</a>) (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
59 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *message, | |
60 | <span class="returnvalue">uint8_t</span> *username, | |
61 | <span class="returnvalue">uint16_t</span> username_len, | |
62 | <span class="returnvalue">uint8_t</span> **password, | |
63 | <span class="returnvalue">size_t</span> *password_len, | |
64 | <span class="returnvalue">void</span> *user_data); | |
50 | <span class="returnvalue">bool</span> (<a class="link" href="libnice-StunAgent.html#StunMessageIntegrityValidate" title="StunMessageIntegrityValidate ()">*StunMessageIntegrityValidate</a>) (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
51 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *message</code></em>, | |
52 | <em class="parameter"><code><span class="type">uint8_t</span> *username</code></em>, | |
53 | <em class="parameter"><code><span class="type">uint16_t</span> username_len</code></em>, | |
54 | <em class="parameter"><code><span class="type">uint8_t</span> **password</code></em>, | |
55 | <em class="parameter"><code><span class="type">size_t</span> *password_len</code></em>, | |
56 | <em class="parameter"><code><span class="type">void</span> *user_data</code></em>); | |
65 | 57 | <a class="link" href="libnice-StunAgent.html#StunDefaultValidaterData" title="StunDefaultValidaterData">StunDefaultValidaterData</a>; |
66 | <span class="returnvalue">void</span> <a class="link" href="libnice-StunAgent.html#stun-agent-init" title="stun_agent_init ()">stun_agent_init</a> (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
67 | const <span class="returnvalue">uint16_t</span> *known_attributes, | |
68 | <a class="link" href="libnice-StunAgent.html#StunCompatibility" title="enum StunCompatibility"><span class="returnvalue">StunCompatibility</span></a> compatibility, | |
69 | <a class="link" href="libnice-StunAgent.html#StunAgentUsageFlags" title="enum StunAgentUsageFlags"><span class="returnvalue">StunAgentUsageFlags</span></a> usage_flags); | |
70 | <a class="link" href="libnice-StunAgent.html#StunValidationStatus" title="enum StunValidationStatus"><span class="returnvalue">StunValidationStatus</span></a> <a class="link" href="libnice-StunAgent.html#stun-agent-validate" title="stun_agent_validate ()">stun_agent_validate</a> (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
71 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
72 | const <span class="returnvalue">uint8_t</span> *buffer, | |
73 | <span class="returnvalue">size_t</span> buffer_len, | |
74 | <a class="link" href="libnice-StunAgent.html#StunMessageIntegrityValidate" title="StunMessageIntegrityValidate ()"><span class="returnvalue">StunMessageIntegrityValidate</span></a> validater, | |
75 | <span class="returnvalue">void</span> *validater_data); | |
76 | <span class="returnvalue">bool</span> <a class="link" href="libnice-StunAgent.html#stun-agent-default-validater" title="stun_agent_default_validater ()">stun_agent_default_validater</a> (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
77 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *message, | |
78 | <span class="returnvalue">uint8_t</span> *username, | |
79 | <span class="returnvalue">uint16_t</span> username_len, | |
80 | <span class="returnvalue">uint8_t</span> **password, | |
81 | <span class="returnvalue">size_t</span> *password_len, | |
82 | <span class="returnvalue">void</span> *user_data); | |
83 | <span class="returnvalue">bool</span> <a class="link" href="libnice-StunAgent.html#stun-agent-init-request" title="stun_agent_init_request ()">stun_agent_init_request</a> (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
84 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
85 | <span class="returnvalue">uint8_t</span> *buffer, | |
86 | <span class="returnvalue">size_t</span> buffer_len, | |
87 | <a class="link" href="libnice-StunMessage.html#StunMethod" title="enum StunMethod"><span class="returnvalue">StunMethod</span></a> m); | |
88 | <span class="returnvalue">bool</span> <a class="link" href="libnice-StunAgent.html#stun-agent-init-indication" title="stun_agent_init_indication ()">stun_agent_init_indication</a> (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
89 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
90 | <span class="returnvalue">uint8_t</span> *buffer, | |
91 | <span class="returnvalue">size_t</span> buffer_len, | |
92 | <a class="link" href="libnice-StunMessage.html#StunMethod" title="enum StunMethod"><span class="returnvalue">StunMethod</span></a> m); | |
93 | <span class="returnvalue">bool</span> <a class="link" href="libnice-StunAgent.html#stun-agent-init-response" title="stun_agent_init_response ()">stun_agent_init_response</a> (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
94 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
95 | <span class="returnvalue">uint8_t</span> *buffer, | |
96 | <span class="returnvalue">size_t</span> buffer_len, | |
97 | const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *request); | |
98 | <span class="returnvalue">bool</span> <a class="link" href="libnice-StunAgent.html#stun-agent-init-error" title="stun_agent_init_error ()">stun_agent_init_error</a> (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
99 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
100 | <span class="returnvalue">uint8_t</span> *buffer, | |
101 | <span class="returnvalue">size_t</span> buffer_len, | |
102 | const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *request, | |
103 | <a class="link" href="libnice-StunMessage.html#StunError" title="enum StunError"><span class="returnvalue">StunError</span></a> err); | |
58 | <span class="returnvalue">void</span> <a class="link" href="libnice-StunAgent.html#stun-agent-init" title="stun_agent_init ()">stun_agent_init</a> (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
59 | <em class="parameter"><code>const <span class="type">uint16_t</span> *known_attributes</code></em>, | |
60 | <em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunCompatibility" title="enum StunCompatibility"><span class="type">StunCompatibility</span></a> compatibility</code></em>, | |
61 | <em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgentUsageFlags" title="enum StunAgentUsageFlags"><span class="type">StunAgentUsageFlags</span></a> usage_flags</code></em>); | |
62 | <a class="link" href="libnice-StunAgent.html#StunValidationStatus" title="enum StunValidationStatus"><span class="returnvalue">StunValidationStatus</span></a> <a class="link" href="libnice-StunAgent.html#stun-agent-validate" title="stun_agent_validate ()">stun_agent_validate</a> (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
63 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
64 | <em class="parameter"><code>const <span class="type">uint8_t</span> *buffer</code></em>, | |
65 | <em class="parameter"><code><span class="type">size_t</span> buffer_len</code></em>, | |
66 | <em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunMessageIntegrityValidate" title="StunMessageIntegrityValidate ()"><span class="type">StunMessageIntegrityValidate</span></a> validater</code></em>, | |
67 | <em class="parameter"><code><span class="type">void</span> *validater_data</code></em>); | |
68 | <span class="returnvalue">bool</span> <a class="link" href="libnice-StunAgent.html#stun-agent-default-validater" title="stun_agent_default_validater ()">stun_agent_default_validater</a> (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
69 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *message</code></em>, | |
70 | <em class="parameter"><code><span class="type">uint8_t</span> *username</code></em>, | |
71 | <em class="parameter"><code><span class="type">uint16_t</span> username_len</code></em>, | |
72 | <em class="parameter"><code><span class="type">uint8_t</span> **password</code></em>, | |
73 | <em class="parameter"><code><span class="type">size_t</span> *password_len</code></em>, | |
74 | <em class="parameter"><code><span class="type">void</span> *user_data</code></em>); | |
75 | <span class="returnvalue">bool</span> <a class="link" href="libnice-StunAgent.html#stun-agent-init-request" title="stun_agent_init_request ()">stun_agent_init_request</a> (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
76 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
77 | <em class="parameter"><code><span class="type">uint8_t</span> *buffer</code></em>, | |
78 | <em class="parameter"><code><span class="type">size_t</span> buffer_len</code></em>, | |
79 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMethod" title="enum StunMethod"><span class="type">StunMethod</span></a> m</code></em>); | |
80 | <span class="returnvalue">bool</span> <a class="link" href="libnice-StunAgent.html#stun-agent-init-indication" title="stun_agent_init_indication ()">stun_agent_init_indication</a> (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
81 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
82 | <em class="parameter"><code><span class="type">uint8_t</span> *buffer</code></em>, | |
83 | <em class="parameter"><code><span class="type">size_t</span> buffer_len</code></em>, | |
84 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMethod" title="enum StunMethod"><span class="type">StunMethod</span></a> m</code></em>); | |
85 | <span class="returnvalue">bool</span> <a class="link" href="libnice-StunAgent.html#stun-agent-init-response" title="stun_agent_init_response ()">stun_agent_init_response</a> (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
86 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
87 | <em class="parameter"><code><span class="type">uint8_t</span> *buffer</code></em>, | |
88 | <em class="parameter"><code><span class="type">size_t</span> buffer_len</code></em>, | |
89 | <em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *request</code></em>); | |
90 | <span class="returnvalue">bool</span> <a class="link" href="libnice-StunAgent.html#stun-agent-init-error" title="stun_agent_init_error ()">stun_agent_init_error</a> (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
91 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
92 | <em class="parameter"><code><span class="type">uint8_t</span> *buffer</code></em>, | |
93 | <em class="parameter"><code><span class="type">size_t</span> buffer_len</code></em>, | |
94 | <em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *request</code></em>, | |
95 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunError" title="enum StunError"><span class="type">StunError</span></a> err</code></em>); | |
104 | 96 | <span class="returnvalue">size_t</span> <a class="link" href="libnice-StunAgent.html#stun-agent-build-unknown-attributes-error" title="stun_agent_build_unknown_attributes_error ()">stun_agent_build_unknown_attributes_error</a> |
105 | (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
106 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
107 | <span class="returnvalue">uint8_t</span> *buffer, | |
108 | <span class="returnvalue">size_t</span> buffer_len, | |
109 | const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *request); | |
110 | <span class="returnvalue">size_t</span> <a class="link" href="libnice-StunAgent.html#stun-agent-finish-message" title="stun_agent_finish_message ()">stun_agent_finish_message</a> (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
111 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
112 | const <span class="returnvalue">uint8_t</span> *key, | |
113 | <span class="returnvalue">size_t</span> key_len); | |
114 | <span class="returnvalue">bool</span> <a class="link" href="libnice-StunAgent.html#stun-agent-forget-transaction" title="stun_agent_forget_transaction ()">stun_agent_forget_transaction</a> (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
115 | <a class="link" href="libnice-StunMessage.html#StunTransactionId" title="StunTransactionId"><span class="returnvalue">StunTransactionId</span></a> id); | |
116 | <span class="returnvalue">void</span> <a class="link" href="libnice-StunAgent.html#stun-agent-set-software" title="stun_agent_set_software ()">stun_agent_set_software</a> (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
117 | const <span class="returnvalue">char</span> *software); | |
118 | <span class="returnvalue">void</span> <a class="link" href="libnice-StunAgent.html#stun-debug-enable" title="stun_debug_enable ()">stun_debug_enable</a> (void); | |
119 | <span class="returnvalue">void</span> <a class="link" href="libnice-StunAgent.html#stun-debug-disable" title="stun_debug_disable ()">stun_debug_disable</a> (void); | |
97 | (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
98 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
99 | <em class="parameter"><code><span class="type">uint8_t</span> *buffer</code></em>, | |
100 | <em class="parameter"><code><span class="type">size_t</span> buffer_len</code></em>, | |
101 | <em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *request</code></em>); | |
102 | <span class="returnvalue">size_t</span> <a class="link" href="libnice-StunAgent.html#stun-agent-finish-message" title="stun_agent_finish_message ()">stun_agent_finish_message</a> (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
103 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
104 | <em class="parameter"><code>const <span class="type">uint8_t</span> *key</code></em>, | |
105 | <em class="parameter"><code><span class="type">size_t</span> key_len</code></em>); | |
106 | <span class="returnvalue">bool</span> <a class="link" href="libnice-StunAgent.html#stun-agent-forget-transaction" title="stun_agent_forget_transaction ()">stun_agent_forget_transaction</a> (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
107 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunTransactionId" title="StunTransactionId"><span class="type">StunTransactionId</span></a> id</code></em>); | |
108 | <span class="returnvalue">void</span> <a class="link" href="libnice-StunAgent.html#stun-agent-set-software" title="stun_agent_set_software ()">stun_agent_set_software</a> (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
109 | <em class="parameter"><code>const <span class="type">char</span> *software</code></em>); | |
110 | <span class="returnvalue">void</span> <a class="link" href="libnice-StunAgent.html#stun-debug-enable" title="stun_debug_enable ()">stun_debug_enable</a> (<em class="parameter"><code><span class="type">void</span></code></em>); | |
111 | <span class="returnvalue">void</span> <a class="link" href="libnice-StunAgent.html#stun-debug-disable" title="stun_debug_disable ()">stun_debug_disable</a> (<em class="parameter"><code><span class="type">void</span></code></em>); | |
120 | 112 | </pre> |
121 | 113 | </div> |
122 | 114 | <div class="refsect1" title="Description"> |
126 | 118 | It's main purpose is to make sure the building and validation methods used |
127 | 119 | are compatible with the RFC you create it with. It also tracks the transaction |
128 | 120 | ids of the requests you send, so you can validate if a STUN response you |
129 | received should be processed by that agent or not.</p> | |
121 | received should be processed by that agent or not. | |
122 | </p> | |
130 | 123 | </div> |
131 | 124 | <div class="refsect1" title="Details"> |
132 | 125 | <a name="libnice-StunAgent.details"></a><h2>Details</h2> |
135 | 128 | <pre class="programlisting">typedef struct stun_agent_t StunAgent; |
136 | 129 | </pre> |
137 | 130 | <p> |
138 | An opaque structure representing the STUN agent.</p> | |
131 | An opaque structure representing the STUN agent. | |
132 | </p> | |
139 | 133 | </div> |
140 | 134 | <hr> |
141 | 135 | <div class="refsect2" title="enum StunCompatibility"> |
148 | 142 | } StunCompatibility; |
149 | 143 | </pre> |
150 | 144 | <p> |
151 | Enum that specifies the STUN compatibility mode of the <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a></p> | |
145 | Enum that specifies the STUN compatibility mode of the <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> | |
146 | </p> | |
152 | 147 | <div class="variablelist"><table border="0"> |
153 | 148 | <col align="left" valign="top"> |
154 | 149 | <tbody> |
155 | 150 | <tr> |
156 | 151 | <td><p><a name="STUN-COMPATIBILITY-RFC3489:CAPS"></a><span class="term"><code class="literal">STUN_COMPATIBILITY_RFC3489</code></span></p></td> |
157 | <td> Use the STUN specifications compatible with | |
152 | <td>Use the STUN specifications compatible with | |
158 | 153 | RFC 3489 |
159 | 154 | </td> |
160 | 155 | </tr> |
161 | 156 | <tr> |
162 | 157 | <td><p><a name="STUN-COMPATIBILITY-RFC5389:CAPS"></a><span class="term"><code class="literal">STUN_COMPATIBILITY_RFC5389</code></span></p></td> |
163 | <td> Use the STUN specifications compatible with | |
158 | <td>Use the STUN specifications compatible with | |
164 | 159 | RFC 5389 |
165 | 160 | </td> |
166 | 161 | </tr> |
167 | 162 | <tr> |
168 | 163 | <td><p><a name="STUN-COMPATIBILITY-WLM2009:CAPS"></a><span class="term"><code class="literal">STUN_COMPATIBILITY_WLM2009</code></span></p></td> |
169 | <td> Use the STUN specifications compatible with | |
164 | <td>Use the STUN specifications compatible with | |
170 | 165 | Windows Live Messenger 2009 (a mix between RFC3489 and RFC5389, as well as |
171 | 166 | a special usecase against a typo in their code) |
172 | 167 | </td> |
173 | 168 | </tr> |
174 | 169 | <tr> |
175 | 170 | <td><p><a name="STUN-COMPATIBILITY-LAST:CAPS"></a><span class="term"><code class="literal">STUN_COMPATIBILITY_LAST</code></span></p></td> |
176 | <td> Dummy last compatibility mode | |
171 | <td>Dummy last compatibility mode | |
177 | 172 | </td> |
178 | 173 | </tr> |
179 | 174 | </tbody> |
200 | 195 | <p> |
201 | 196 | </p> |
202 | 197 | <p> See also: <a class="link" href="libnice-StunAgent.html#stun-agent-validate" title="stun_agent_validate ()"><code class="function">stun_agent_validate()</code></a> </p> |
198 | <p> | |
199 | </p> | |
203 | 200 | <div class="variablelist"><table border="0"> |
204 | 201 | <col align="left" valign="top"> |
205 | 202 | <tbody> |
206 | 203 | <tr> |
207 | 204 | <td><p><a name="STUN-AGENT-USAGE-SHORT-TERM-CREDENTIALS:CAPS"></a><span class="term"><code class="literal">STUN_AGENT_USAGE_SHORT_TERM_CREDENTIALS</code></span></p></td> |
208 | <td> The agent should be using the short | |
205 | <td>The agent should be using the short | |
209 | 206 | term credentials mechanism for authenticating STUN messages |
210 | 207 | </td> |
211 | 208 | </tr> |
212 | 209 | <tr> |
213 | 210 | <td><p><a name="STUN-AGENT-USAGE-LONG-TERM-CREDENTIALS:CAPS"></a><span class="term"><code class="literal">STUN_AGENT_USAGE_LONG_TERM_CREDENTIALS</code></span></p></td> |
214 | <td> The agent should be using the long | |
211 | <td>The agent should be using the long | |
215 | 212 | term credentials mechanism for authenticating STUN messages |
216 | 213 | </td> |
217 | 214 | </tr> |
218 | 215 | <tr> |
219 | 216 | <td><p><a name="STUN-AGENT-USAGE-USE-FINGERPRINT:CAPS"></a><span class="term"><code class="literal">STUN_AGENT_USAGE_USE_FINGERPRINT</code></span></p></td> |
220 | <td> The agent should add the FINGERPRINT | |
217 | <td>The agent should add the FINGERPRINT | |
221 | 218 | attribute to the STUN messages it creates. |
222 | 219 | </td> |
223 | 220 | </tr> |
224 | 221 | <tr> |
225 | 222 | <td><p><a name="STUN-AGENT-USAGE-ADD-SOFTWARE:CAPS"></a><span class="term"><code class="literal">STUN_AGENT_USAGE_ADD_SOFTWARE</code></span></p></td> |
226 | <td> The agent should add the SOFTWARE attribute | |
223 | <td>The agent should add the SOFTWARE attribute | |
227 | 224 | to the STUN messages it creates. Calling <a class="link" href="NiceAgent.html#nice-agent-set-software" title="nice_agent_set_software ()"><code class="function">nice_agent_set_software()</code></a> will have |
228 | 225 | the same effect as enabling this Usage. STUN Indications do not have the |
229 | 226 | SOFTWARE attributes added to them though. The SOFTWARE attribute is only |
232 | 229 | </tr> |
233 | 230 | <tr> |
234 | 231 | <td><p><a name="STUN-AGENT-USAGE-IGNORE-CREDENTIALS:CAPS"></a><span class="term"><code class="literal">STUN_AGENT_USAGE_IGNORE_CREDENTIALS</code></span></p></td> |
235 | <td> The agent should ignore any credentials | |
232 | <td>The agent should ignore any credentials | |
236 | 233 | in the STUN messages it receives (the MESSAGE-INTEGRITY attribute |
237 | 234 | will never be validated by <a class="link" href="libnice-StunAgent.html#stun-agent-validate" title="stun_agent_validate ()"><code class="function">stun_agent_validate()</code></a>) |
238 | 235 | </td> |
239 | 236 | </tr> |
240 | 237 | <tr> |
241 | 238 | <td><p><a name="STUN-AGENT-USAGE-NO-INDICATION-AUTH:CAPS"></a><span class="term"><code class="literal">STUN_AGENT_USAGE_NO_INDICATION_AUTH</code></span></p></td> |
242 | <td> The agent should ignore credentials | |
239 | <td>The agent should ignore credentials | |
243 | 240 | in the STUN messages it receives if the <a class="link" href="libnice-StunMessage.html#StunClass" title="enum StunClass"><span class="type">StunClass</span></a> of the message is |
244 | 241 | <a class="link" href="libnice-StunMessage.html#STUN-INDICATION:CAPS"><span class="type">STUN_INDICATION</span></a> (some implementation require <a class="link" href="libnice-StunMessage.html#STUN-INDICATION:CAPS"><span class="type">STUN_INDICATION</span></a> messages to |
245 | 242 | be authenticated, while others never add a MESSAGE-INTEGRITY attribute to a |
248 | 245 | </tr> |
249 | 246 | <tr> |
250 | 247 | <td><p><a name="STUN-AGENT-USAGE-FORCE-VALIDATER:CAPS"></a><span class="term"><code class="literal">STUN_AGENT_USAGE_FORCE_VALIDATER</code></span></p></td> |
251 | <td> The agent should always try to validate | |
248 | <td>The agent should always try to validate | |
252 | 249 | the password of a STUN message, even if it already knows what the password |
253 | 250 | should be (a response to a previously created request). This means that the |
254 | 251 | <a class="link" href="libnice-StunAgent.html#StunMessageIntegrityValidate" title="StunMessageIntegrityValidate ()"><span class="type">StunMessageIntegrityValidate</span></a> callback will always be called when there is |
275 | 272 | </pre> |
276 | 273 | <p> |
277 | 274 | This enum is used as the return value of <a class="link" href="libnice-StunAgent.html#stun-agent-validate" title="stun_agent_validate ()"><code class="function">stun_agent_validate()</code></a> and represents |
278 | the status result of the validation of a STUN message.</p> | |
275 | the status result of the validation of a STUN message. | |
276 | </p> | |
279 | 277 | <div class="variablelist"><table border="0"> |
280 | 278 | <col align="left" valign="top"> |
281 | 279 | <tbody> |
282 | 280 | <tr> |
283 | 281 | <td><p><a name="STUN-VALIDATION-SUCCESS:CAPS"></a><span class="term"><code class="literal">STUN_VALIDATION_SUCCESS</code></span></p></td> |
284 | <td> The message is validated | |
282 | <td>The message is validated | |
285 | 283 | </td> |
286 | 284 | </tr> |
287 | 285 | <tr> |
288 | 286 | <td><p><a name="STUN-VALIDATION-NOT-STUN:CAPS"></a><span class="term"><code class="literal">STUN_VALIDATION_NOT_STUN</code></span></p></td> |
289 | <td> This is not a valid STUN message | |
287 | <td>This is not a valid STUN message | |
290 | 288 | </td> |
291 | 289 | </tr> |
292 | 290 | <tr> |
293 | 291 | <td><p><a name="STUN-VALIDATION-INCOMPLETE-STUN:CAPS"></a><span class="term"><code class="literal">STUN_VALIDATION_INCOMPLETE_STUN</code></span></p></td> |
294 | <td> The message seems to be valid but incomplete | |
292 | <td>The message seems to be valid but incomplete | |
295 | 293 | </td> |
296 | 294 | </tr> |
297 | 295 | <tr> |
298 | 296 | <td><p><a name="STUN-VALIDATION-BAD-REQUEST:CAPS"></a><span class="term"><code class="literal">STUN_VALIDATION_BAD_REQUEST</code></span></p></td> |
299 | <td> The message does not have the cookie or the | |
297 | <td>The message does not have the cookie or the | |
300 | 298 | fingerprint while the agent needs it with its usage |
301 | 299 | </td> |
302 | 300 | </tr> |
303 | 301 | <tr> |
304 | 302 | <td><p><a name="STUN-VALIDATION-UNAUTHORIZED-BAD-REQUEST:CAPS"></a><span class="term"><code class="literal">STUN_VALIDATION_UNAUTHORIZED_BAD_REQUEST</code></span></p></td> |
305 | <td> The message is valid but | |
303 | <td>The message is valid but | |
306 | 304 | unauthorized with no username and message-integrity attributes. |
307 | 305 | A BAD_REQUEST error must be generated |
308 | 306 | </td> |
309 | 307 | </tr> |
310 | 308 | <tr> |
311 | 309 | <td><p><a name="STUN-VALIDATION-UNAUTHORIZED:CAPS"></a><span class="term"><code class="literal">STUN_VALIDATION_UNAUTHORIZED</code></span></p></td> |
312 | <td> The message is valid but unauthorized as | |
310 | <td>The message is valid but unauthorized as | |
313 | 311 | the username/password do not match. |
314 | 312 | An UNAUTHORIZED error must be generated |
315 | 313 | </td> |
316 | 314 | </tr> |
317 | 315 | <tr> |
318 | 316 | <td><p><a name="STUN-VALIDATION-UNMATCHED-RESPONSE:CAPS"></a><span class="term"><code class="literal">STUN_VALIDATION_UNMATCHED_RESPONSE</code></span></p></td> |
319 | <td> The message is valid but this is a | |
317 | <td>The message is valid but this is a | |
320 | 318 | response/error that doesn't match a previously sent request |
321 | 319 | </td> |
322 | 320 | </tr> |
323 | 321 | <tr> |
324 | 322 | <td><p><a name="STUN-VALIDATION-UNKNOWN-REQUEST-ATTRIBUTE:CAPS"></a><span class="term"><code class="literal">STUN_VALIDATION_UNKNOWN_REQUEST_ATTRIBUTE</code></span></p></td> |
325 | <td> The message is valid but | |
323 | <td>The message is valid but | |
326 | 324 | contains one or more unknown comprehension attributes. |
327 | 325 | <a class="link" href="libnice-StunAgent.html#stun-agent-build-unknown-attributes-error" title="stun_agent_build_unknown_attributes_error ()"><code class="function">stun_agent_build_unknown_attributes_error()</code></a> should be called |
328 | 326 | </td> |
329 | 327 | </tr> |
330 | 328 | <tr> |
331 | 329 | <td><p><a name="STUN-VALIDATION-UNKNOWN-ATTRIBUTE:CAPS"></a><span class="term"><code class="literal">STUN_VALIDATION_UNKNOWN_ATTRIBUTE</code></span></p></td> |
332 | <td> The message is valid but contains one | |
330 | <td>The message is valid but contains one | |
333 | 331 | or more unknown comprehension attributes. This is a response, or error, |
334 | 332 | or indication message and no error response should be sent |
335 | 333 | </td> |
340 | 338 | <hr> |
341 | 339 | <div class="refsect2" title="StunMessageIntegrityValidate ()"> |
342 | 340 | <a name="StunMessageIntegrityValidate"></a><h3>StunMessageIntegrityValidate ()</h3> |
343 | <pre class="programlisting"><span class="returnvalue">bool</span> (*StunMessageIntegrityValidate) (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
344 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *message, | |
345 | <span class="returnvalue">uint8_t</span> *username, | |
346 | <span class="returnvalue">uint16_t</span> username_len, | |
347 | <span class="returnvalue">uint8_t</span> **password, | |
348 | <span class="returnvalue">size_t</span> *password_len, | |
349 | <span class="returnvalue">void</span> *user_data);</pre> | |
341 | <pre class="programlisting"><span class="returnvalue">bool</span> (*StunMessageIntegrityValidate) (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
342 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *message</code></em>, | |
343 | <em class="parameter"><code><span class="type">uint8_t</span> *username</code></em>, | |
344 | <em class="parameter"><code><span class="type">uint16_t</span> username_len</code></em>, | |
345 | <em class="parameter"><code><span class="type">uint8_t</span> **password</code></em>, | |
346 | <em class="parameter"><code><span class="type">size_t</span> *password_len</code></em>, | |
347 | <em class="parameter"><code><span class="type">void</span> *user_data</code></em>);</pre> | |
350 | 348 | <p> |
351 | 349 | This is the prototype for the <em class="parameter"><code>validater</code></em> argument of the <a class="link" href="libnice-StunAgent.html#stun-agent-validate" title="stun_agent_validate ()"><code class="function">stun_agent_validate()</code></a> |
352 | 350 | function. |
353 | 351 | </p> |
354 | 352 | <p> See also: <a class="link" href="libnice-StunAgent.html#stun-agent-validate" title="stun_agent_validate ()"><code class="function">stun_agent_validate()</code></a> </p> |
355 | <div class="variablelist"><table border="0"> | |
356 | <col align="left" valign="top"> | |
357 | <tbody> | |
358 | <tr> | |
359 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
360 | <td> The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> | |
353 | <p> | |
354 | </p> | |
355 | <div class="variablelist"><table border="0"> | |
356 | <col align="left" valign="top"> | |
357 | <tbody> | |
358 | <tr> | |
359 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
360 | <td>The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> | |
361 | 361 | </td> |
362 | 362 | </tr> |
363 | 363 | <tr> |
364 | 364 | <td><p><span class="term"><em class="parameter"><code>message</code></em> :</span></p></td> |
365 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> being validated | |
365 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> being validated | |
366 | 366 | </td> |
367 | 367 | </tr> |
368 | 368 | <tr> |
369 | 369 | <td><p><span class="term"><em class="parameter"><code>username</code></em> :</span></p></td> |
370 | <td> The username found in the <em class="parameter"><code>message</code></em> | |
370 | <td>The username found in the <em class="parameter"><code>message</code></em> | |
371 | 371 | </td> |
372 | 372 | </tr> |
373 | 373 | <tr> |
374 | 374 | <td><p><span class="term"><em class="parameter"><code>username_len</code></em> :</span></p></td> |
375 | <td> The length of <em class="parameter"><code>username</code></em> | |
375 | <td>The length of <em class="parameter"><code>username</code></em> | |
376 | 376 | </td> |
377 | 377 | </tr> |
378 | 378 | <tr> |
379 | 379 | <td><p><span class="term"><em class="parameter"><code>password</code></em> :</span></p></td> |
380 | <td> The password associated with that username. This argument is a | |
380 | <td>The password associated with that username. This argument is a | |
381 | 381 | pointer to a byte array that must be set by the validater function. |
382 | 382 | </td> |
383 | 383 | </tr> |
384 | 384 | <tr> |
385 | 385 | <td><p><span class="term"><em class="parameter"><code>password_len</code></em> :</span></p></td> |
386 | <td> The length of <em class="parameter"><code>password</code></em> which must also be set by the | |
386 | <td>The length of <em class="parameter"><code>password</code></em> which must also be set by the | |
387 | 387 | validater function. |
388 | 388 | </td> |
389 | 389 | </tr> |
390 | 390 | <tr> |
391 | 391 | <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td> |
392 | <td> Data to give the function | |
392 | <td>Data to give the function | |
393 | 393 | </td> |
394 | 394 | </tr> |
395 | 395 | <tr> |
396 | 396 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
397 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the authentication was successful, | |
398 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the authentication failed | |
397 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the authentication was successful, | |
398 | <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the authentication failed | |
399 | 399 | </td> |
400 | 400 | </tr> |
401 | 401 | </tbody> |
417 | 417 | message during validationg. |
418 | 418 | </p> |
419 | 419 | <p> See also: <a class="link" href="libnice-StunAgent.html#stun-agent-default-validater" title="stun_agent_default_validater ()"><code class="function">stun_agent_default_validater()</code></a> </p> |
420 | <p> | |
421 | </p> | |
420 | 422 | <div class="variablelist"><table border="0"> |
421 | 423 | <col align="left" valign="top"> |
422 | 424 | <tbody> |
423 | 425 | <tr> |
424 | 426 | <td><p><span class="term"><span class="type">uint8_t</span> *<em class="structfield"><code><a name="StunDefaultValidaterData.username"></a>username</code></em>;</span></p></td> |
425 | <td> The username | |
427 | <td>The username | |
426 | 428 | </td> |
427 | 429 | </tr> |
428 | 430 | <tr> |
429 | 431 | <td><p><span class="term"><span class="type">size_t</span> <em class="structfield"><code><a name="StunDefaultValidaterData.username-len"></a>username_len</code></em>;</span></p></td> |
430 | <td> The length of the <em class="parameter"><code>username</code></em> | |
432 | <td>The length of the <em class="parameter"><code>username</code></em> | |
431 | 433 | </td> |
432 | 434 | </tr> |
433 | 435 | <tr> |
434 | 436 | <td><p><span class="term"><span class="type">uint8_t</span> *<em class="structfield"><code><a name="StunDefaultValidaterData.password"></a>password</code></em>;</span></p></td> |
435 | <td> The password | |
437 | <td>The password | |
436 | 438 | </td> |
437 | 439 | </tr> |
438 | 440 | <tr> |
439 | 441 | <td><p><span class="term"><span class="type">size_t</span> <em class="structfield"><code><a name="StunDefaultValidaterData.password-len"></a>password_len</code></em>;</span></p></td> |
440 | <td> The length of the <em class="parameter"><code>password</code></em> | |
442 | <td>The length of the <em class="parameter"><code>password</code></em> | |
441 | 443 | </td> |
442 | 444 | </tr> |
443 | 445 | </tbody> |
446 | 448 | <hr> |
447 | 449 | <div class="refsect2" title="stun_agent_init ()"> |
448 | 450 | <a name="stun-agent-init"></a><h3>stun_agent_init ()</h3> |
449 | <pre class="programlisting"><span class="returnvalue">void</span> stun_agent_init (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
450 | const <span class="returnvalue">uint16_t</span> *known_attributes, | |
451 | <a class="link" href="libnice-StunAgent.html#StunCompatibility" title="enum StunCompatibility"><span class="returnvalue">StunCompatibility</span></a> compatibility, | |
452 | <a class="link" href="libnice-StunAgent.html#StunAgentUsageFlags" title="enum StunAgentUsageFlags"><span class="returnvalue">StunAgentUsageFlags</span></a> usage_flags);</pre> | |
451 | <pre class="programlisting"><span class="returnvalue">void</span> stun_agent_init (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
452 | <em class="parameter"><code>const <span class="type">uint16_t</span> *known_attributes</code></em>, | |
453 | <em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunCompatibility" title="enum StunCompatibility"><span class="type">StunCompatibility</span></a> compatibility</code></em>, | |
454 | <em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgentUsageFlags" title="enum StunAgentUsageFlags"><span class="type">StunAgentUsageFlags</span></a> usage_flags</code></em>);</pre> | |
453 | 455 | <p> |
454 | 456 | This function must be called to initialize an agent before it is being used. |
455 | 457 | </p> |
471 | 473 | <a class="link" href="libnice-StunAgent.html#STUN-COMPATIBILITY-WLM2009:CAPS"><span class="type">STUN_COMPATIBILITY_WLM2009</span></a> <em class="parameter"><code>compatibility</code></em> is used |
472 | 474 | </p> |
473 | 475 | </div> |
474 | <div class="variablelist"><table border="0"> | |
475 | <col align="left" valign="top"> | |
476 | <tbody> | |
477 | <tr> | |
478 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
479 | <td> The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> to initialize | |
476 | <p> | |
477 | </p> | |
478 | <div class="variablelist"><table border="0"> | |
479 | <col align="left" valign="top"> | |
480 | <tbody> | |
481 | <tr> | |
482 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
483 | <td>The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> to initialize | |
480 | 484 | </td> |
481 | 485 | </tr> |
482 | 486 | <tr> |
483 | 487 | <td><p><span class="term"><em class="parameter"><code>known_attributes</code></em> :</span></p></td> |
484 | <td> An array of <span class="type">uint16_t</span> specifying which attributes should | |
488 | <td>An array of <span class="type">uint16_t</span> specifying which attributes should | |
485 | 489 | be known by the agent. Any STUN message received that contains a mandatory |
486 | 490 | attribute that is not in this array will yield a |
487 | 491 | <a class="link" href="libnice-StunAgent.html#STUN-VALIDATION-UNKNOWN-REQUEST-ATTRIBUTE:CAPS"><span class="type">STUN_VALIDATION_UNKNOWN_REQUEST_ATTRIBUTE</span></a> or a |
490 | 494 | </tr> |
491 | 495 | <tr> |
492 | 496 | <td><p><span class="term"><em class="parameter"><code>compatibility</code></em> :</span></p></td> |
493 | <td> The <a class="link" href="libnice-StunAgent.html#StunCompatibility" title="enum StunCompatibility"><span class="type">StunCompatibility</span></a> to use for this agent. This will affect | |
497 | <td>The <a class="link" href="libnice-StunAgent.html#StunCompatibility" title="enum StunCompatibility"><span class="type">StunCompatibility</span></a> to use for this agent. This will affect | |
494 | 498 | how the agent builds and validates the STUN messages |
495 | 499 | </td> |
496 | 500 | </tr> |
497 | 501 | <tr> |
498 | 502 | <td><p><span class="term"><em class="parameter"><code>usage_flags</code></em> :</span></p></td> |
499 | <td> A bitflag using <a class="link" href="libnice-StunAgent.html#StunAgentUsageFlags" title="enum StunAgentUsageFlags"><span class="type">StunAgentUsageFlags</span></a> values to define which | |
503 | <td>A bitflag using <a class="link" href="libnice-StunAgent.html#StunAgentUsageFlags" title="enum StunAgentUsageFlags"><span class="type">StunAgentUsageFlags</span></a> values to define which | |
500 | 504 | STUN usages the agent should use. |
501 | 505 | </td> |
502 | 506 | </tr> |
506 | 510 | <hr> |
507 | 511 | <div class="refsect2" title="stun_agent_validate ()"> |
508 | 512 | <a name="stun-agent-validate"></a><h3>stun_agent_validate ()</h3> |
509 | <pre class="programlisting"><a class="link" href="libnice-StunAgent.html#StunValidationStatus" title="enum StunValidationStatus"><span class="returnvalue">StunValidationStatus</span></a> stun_agent_validate (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
510 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
511 | const <span class="returnvalue">uint8_t</span> *buffer, | |
512 | <span class="returnvalue">size_t</span> buffer_len, | |
513 | <a class="link" href="libnice-StunAgent.html#StunMessageIntegrityValidate" title="StunMessageIntegrityValidate ()"><span class="returnvalue">StunMessageIntegrityValidate</span></a> validater, | |
514 | <span class="returnvalue">void</span> *validater_data);</pre> | |
513 | <pre class="programlisting"><a class="link" href="libnice-StunAgent.html#StunValidationStatus" title="enum StunValidationStatus"><span class="returnvalue">StunValidationStatus</span></a> stun_agent_validate (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
514 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
515 | <em class="parameter"><code>const <span class="type">uint8_t</span> *buffer</code></em>, | |
516 | <em class="parameter"><code><span class="type">size_t</span> buffer_len</code></em>, | |
517 | <em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunMessageIntegrityValidate" title="StunMessageIntegrityValidate ()"><span class="type">StunMessageIntegrityValidate</span></a> validater</code></em>, | |
518 | <em class="parameter"><code><span class="type">void</span> *validater_data</code></em>);</pre> | |
515 | 519 | <p> |
516 | 520 | This function is used to validate an inbound STUN message and transform its |
517 | 521 | data buffer into a <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a>. It will take care of various validation |
519 | 523 | authenticated. |
520 | 524 | </p> |
521 | 525 | <p> See also: <a class="link" href="libnice-StunAgent.html#stun-agent-default-validater" title="stun_agent_default_validater ()"><code class="function">stun_agent_default_validater()</code></a> </p> |
522 | <div class="variablelist"><table border="0"> | |
523 | <col align="left" valign="top"> | |
524 | <tbody> | |
525 | <tr> | |
526 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
527 | <td> The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> | |
526 | <p> | |
527 | </p> | |
528 | <div class="variablelist"><table border="0"> | |
529 | <col align="left" valign="top"> | |
530 | <tbody> | |
531 | <tr> | |
532 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
533 | <td>The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> | |
528 | 534 | </td> |
529 | 535 | </tr> |
530 | 536 | <tr> |
531 | 537 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> |
532 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build | |
538 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build | |
533 | 539 | </td> |
534 | 540 | </tr> |
535 | 541 | <tr> |
536 | 542 | <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
537 | <td> The data buffer of the STUN message | |
543 | <td>The data buffer of the STUN message | |
538 | 544 | </td> |
539 | 545 | </tr> |
540 | 546 | <tr> |
541 | 547 | <td><p><span class="term"><em class="parameter"><code>buffer_len</code></em> :</span></p></td> |
542 | <td> The length of <em class="parameter"><code>buffer</code></em> | |
548 | <td>The length of <em class="parameter"><code>buffer</code></em> | |
543 | 549 | </td> |
544 | 550 | </tr> |
545 | 551 | <tr> |
546 | 552 | <td><p><span class="term"><em class="parameter"><code>validater</code></em> :</span></p></td> |
547 | <td> A <a class="link" href="libnice-StunAgent.html#StunMessageIntegrityValidate" title="StunMessageIntegrityValidate ()"><span class="type">StunMessageIntegrityValidate</span></a> function callback that will | |
553 | <td>A <a class="link" href="libnice-StunAgent.html#StunMessageIntegrityValidate" title="StunMessageIntegrityValidate ()"><span class="type">StunMessageIntegrityValidate</span></a> function callback that will | |
548 | 554 | be called if the agent needs to validate a MESSAGE-INTEGRITY attribute. It |
549 | 555 | will only be called if the agent finds a message that needs authentication |
550 | 556 | and a USERNAME is present in the STUN message, but no password is known. |
555 | 561 | </tr> |
556 | 562 | <tr> |
557 | 563 | <td><p><span class="term"><em class="parameter"><code>validater_data</code></em> :</span></p></td> |
558 | <td> A user data to give to the <em class="parameter"><code>validater</code></em> callback when it gets | |
564 | <td>A user data to give to the <em class="parameter"><code>validater</code></em> callback when it gets | |
559 | 565 | called. |
560 | 566 | </td> |
561 | 567 | </tr> |
585 | 591 | <hr> |
586 | 592 | <div class="refsect2" title="stun_agent_default_validater ()"> |
587 | 593 | <a name="stun-agent-default-validater"></a><h3>stun_agent_default_validater ()</h3> |
588 | <pre class="programlisting"><span class="returnvalue">bool</span> stun_agent_default_validater (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
589 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *message, | |
590 | <span class="returnvalue">uint8_t</span> *username, | |
591 | <span class="returnvalue">uint16_t</span> username_len, | |
592 | <span class="returnvalue">uint8_t</span> **password, | |
593 | <span class="returnvalue">size_t</span> *password_len, | |
594 | <span class="returnvalue">void</span> *user_data);</pre> | |
594 | <pre class="programlisting"><span class="returnvalue">bool</span> stun_agent_default_validater (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
595 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *message</code></em>, | |
596 | <em class="parameter"><code><span class="type">uint8_t</span> *username</code></em>, | |
597 | <em class="parameter"><code><span class="type">uint16_t</span> username_len</code></em>, | |
598 | <em class="parameter"><code><span class="type">uint8_t</span> **password</code></em>, | |
599 | <em class="parameter"><code><span class="type">size_t</span> *password_len</code></em>, | |
600 | <em class="parameter"><code><span class="type">void</span> *user_data</code></em>);</pre> | |
595 | 601 | <p> |
596 | 602 | This is a helper function to be used with <a class="link" href="libnice-StunAgent.html#stun-agent-validate" title="stun_agent_validate ()"><code class="function">stun_agent_validate()</code></a>. If no |
597 | 603 | complicated processing of the username needs to be done, this function can |
601 | 607 | password |
602 | 608 | </p> |
603 | 609 | <p> See also: <a class="link" href="libnice-StunAgent.html#stun-agent-validate" title="stun_agent_validate ()"><code class="function">stun_agent_validate()</code></a> </p> |
604 | <div class="variablelist"><table border="0"> | |
605 | <col align="left" valign="top"> | |
606 | <tbody> | |
607 | <tr> | |
608 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
609 | <td> The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> | |
610 | <p> | |
611 | </p> | |
612 | <div class="variablelist"><table border="0"> | |
613 | <col align="left" valign="top"> | |
614 | <tbody> | |
615 | <tr> | |
616 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
617 | <td>The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> | |
610 | 618 | </td> |
611 | 619 | </tr> |
612 | 620 | <tr> |
613 | 621 | <td><p><span class="term"><em class="parameter"><code>message</code></em> :</span></p></td> |
614 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> being validated | |
622 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> being validated | |
615 | 623 | </td> |
616 | 624 | </tr> |
617 | 625 | <tr> |
618 | 626 | <td><p><span class="term"><em class="parameter"><code>username</code></em> :</span></p></td> |
619 | <td> The username found in the <em class="parameter"><code>message</code></em> | |
627 | <td>The username found in the <em class="parameter"><code>message</code></em> | |
620 | 628 | </td> |
621 | 629 | </tr> |
622 | 630 | <tr> |
623 | 631 | <td><p><span class="term"><em class="parameter"><code>username_len</code></em> :</span></p></td> |
624 | <td> The length of <em class="parameter"><code>username</code></em> | |
632 | <td>The length of <em class="parameter"><code>username</code></em> | |
625 | 633 | </td> |
626 | 634 | </tr> |
627 | 635 | <tr> |
628 | 636 | <td><p><span class="term"><em class="parameter"><code>password</code></em> :</span></p></td> |
629 | <td> The password associated with that username. This argument is a | |
637 | <td>The password associated with that username. This argument is a | |
630 | 638 | pointer to a byte array that must be set by the validater function. |
631 | 639 | </td> |
632 | 640 | </tr> |
633 | 641 | <tr> |
634 | 642 | <td><p><span class="term"><em class="parameter"><code>password_len</code></em> :</span></p></td> |
635 | <td> The length of <em class="parameter"><code>password</code></em> which must also be set by the | |
643 | <td>The length of <em class="parameter"><code>password</code></em> which must also be set by the | |
636 | 644 | validater function. |
637 | 645 | </td> |
638 | 646 | </tr> |
639 | 647 | <tr> |
640 | 648 | <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td> |
641 | <td> This must be an array of <a class="link" href="libnice-StunAgent.html#StunDefaultValidaterData" title="StunDefaultValidaterData"><span class="type">StunDefaultValidaterData</span></a> structures. | |
649 | <td>This must be an array of <a class="link" href="libnice-StunAgent.html#StunDefaultValidaterData" title="StunDefaultValidaterData"><span class="type">StunDefaultValidaterData</span></a> structures. | |
642 | 650 | The last element in the array must have a username set to NULL |
643 | 651 | </td> |
644 | 652 | </tr> |
645 | 653 | <tr> |
646 | 654 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
647 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the authentication was successful, | |
648 | <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the authentication failed | |
655 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the authentication was successful, | |
656 | <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the authentication failed | |
649 | 657 | </td> |
650 | 658 | </tr> |
651 | 659 | </tbody> |
654 | 662 | <hr> |
655 | 663 | <div class="refsect2" title="stun_agent_init_request ()"> |
656 | 664 | <a name="stun-agent-init-request"></a><h3>stun_agent_init_request ()</h3> |
657 | <pre class="programlisting"><span class="returnvalue">bool</span> stun_agent_init_request (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
658 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
659 | <span class="returnvalue">uint8_t</span> *buffer, | |
660 | <span class="returnvalue">size_t</span> buffer_len, | |
661 | <a class="link" href="libnice-StunMessage.html#StunMethod" title="enum StunMethod"><span class="returnvalue">StunMethod</span></a> m);</pre> | |
662 | <p> | |
663 | Creates a new STUN message of class <a class="link" href="libnice-StunMessage.html#STUN-REQUEST:CAPS"><span class="type">STUN_REQUEST</span></a> and with the method <em class="parameter"><code>m</code></em></p> | |
664 | <div class="variablelist"><table border="0"> | |
665 | <col align="left" valign="top"> | |
666 | <tbody> | |
667 | <tr> | |
668 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
669 | <td> The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> | |
665 | <pre class="programlisting"><span class="returnvalue">bool</span> stun_agent_init_request (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
666 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
667 | <em class="parameter"><code><span class="type">uint8_t</span> *buffer</code></em>, | |
668 | <em class="parameter"><code><span class="type">size_t</span> buffer_len</code></em>, | |
669 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMethod" title="enum StunMethod"><span class="type">StunMethod</span></a> m</code></em>);</pre> | |
670 | <p> | |
671 | Creates a new STUN message of class <a class="link" href="libnice-StunMessage.html#STUN-REQUEST:CAPS"><span class="type">STUN_REQUEST</span></a> and with the method <em class="parameter"><code>m</code></em> | |
672 | </p> | |
673 | <div class="variablelist"><table border="0"> | |
674 | <col align="left" valign="top"> | |
675 | <tbody> | |
676 | <tr> | |
677 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
678 | <td>The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> | |
670 | 679 | </td> |
671 | 680 | </tr> |
672 | 681 | <tr> |
673 | 682 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> |
674 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build | |
683 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build | |
675 | 684 | </td> |
676 | 685 | </tr> |
677 | 686 | <tr> |
678 | 687 | <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
679 | <td> The buffer to use in the <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
688 | <td>The buffer to use in the <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
680 | 689 | </td> |
681 | 690 | </tr> |
682 | 691 | <tr> |
683 | 692 | <td><p><span class="term"><em class="parameter"><code>buffer_len</code></em> :</span></p></td> |
684 | <td> The length of the buffer | |
693 | <td>The length of the buffer | |
685 | 694 | </td> |
686 | 695 | </tr> |
687 | 696 | <tr> |
688 | 697 | <td><p><span class="term"><em class="parameter"><code>m</code></em> :</span></p></td> |
689 | <td> The <a class="link" href="libnice-StunMessage.html#StunMethod" title="enum StunMethod"><span class="type">StunMethod</span></a> of the request | |
698 | <td>The <a class="link" href="libnice-StunMessage.html#StunMethod" title="enum StunMethod"><span class="type">StunMethod</span></a> of the request | |
690 | 699 | </td> |
691 | 700 | </tr> |
692 | 701 | <tr> |
693 | 702 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
694 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the message was initialized correctly, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise | |
703 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the message was initialized correctly, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise | |
695 | 704 | </td> |
696 | 705 | </tr> |
697 | 706 | </tbody> |
700 | 709 | <hr> |
701 | 710 | <div class="refsect2" title="stun_agent_init_indication ()"> |
702 | 711 | <a name="stun-agent-init-indication"></a><h3>stun_agent_init_indication ()</h3> |
703 | <pre class="programlisting"><span class="returnvalue">bool</span> stun_agent_init_indication (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
704 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
705 | <span class="returnvalue">uint8_t</span> *buffer, | |
706 | <span class="returnvalue">size_t</span> buffer_len, | |
707 | <a class="link" href="libnice-StunMessage.html#StunMethod" title="enum StunMethod"><span class="returnvalue">StunMethod</span></a> m);</pre> | |
708 | <p> | |
709 | Creates a new STUN message of class <a class="link" href="libnice-StunMessage.html#STUN-INDICATION:CAPS"><span class="type">STUN_INDICATION</span></a> and with the method <em class="parameter"><code>m</code></em></p> | |
710 | <div class="variablelist"><table border="0"> | |
711 | <col align="left" valign="top"> | |
712 | <tbody> | |
713 | <tr> | |
714 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
715 | <td> The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> | |
712 | <pre class="programlisting"><span class="returnvalue">bool</span> stun_agent_init_indication (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
713 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
714 | <em class="parameter"><code><span class="type">uint8_t</span> *buffer</code></em>, | |
715 | <em class="parameter"><code><span class="type">size_t</span> buffer_len</code></em>, | |
716 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMethod" title="enum StunMethod"><span class="type">StunMethod</span></a> m</code></em>);</pre> | |
717 | <p> | |
718 | Creates a new STUN message of class <a class="link" href="libnice-StunMessage.html#STUN-INDICATION:CAPS"><span class="type">STUN_INDICATION</span></a> and with the method <em class="parameter"><code>m</code></em> | |
719 | </p> | |
720 | <div class="variablelist"><table border="0"> | |
721 | <col align="left" valign="top"> | |
722 | <tbody> | |
723 | <tr> | |
724 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
725 | <td>The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> | |
716 | 726 | </td> |
717 | 727 | </tr> |
718 | 728 | <tr> |
719 | 729 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> |
720 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build | |
730 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build | |
721 | 731 | </td> |
722 | 732 | </tr> |
723 | 733 | <tr> |
724 | 734 | <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
725 | <td> The buffer to use in the <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
735 | <td>The buffer to use in the <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
726 | 736 | </td> |
727 | 737 | </tr> |
728 | 738 | <tr> |
729 | 739 | <td><p><span class="term"><em class="parameter"><code>buffer_len</code></em> :</span></p></td> |
730 | <td> The length of the buffer | |
740 | <td>The length of the buffer | |
731 | 741 | </td> |
732 | 742 | </tr> |
733 | 743 | <tr> |
734 | 744 | <td><p><span class="term"><em class="parameter"><code>m</code></em> :</span></p></td> |
735 | <td> The <a class="link" href="libnice-StunMessage.html#StunMethod" title="enum StunMethod"><span class="type">StunMethod</span></a> of the indication | |
745 | <td>The <a class="link" href="libnice-StunMessage.html#StunMethod" title="enum StunMethod"><span class="type">StunMethod</span></a> of the indication | |
736 | 746 | </td> |
737 | 747 | </tr> |
738 | 748 | <tr> |
739 | 749 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
740 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the message was initialized correctly, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise | |
750 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the message was initialized correctly, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise | |
741 | 751 | </td> |
742 | 752 | </tr> |
743 | 753 | </tbody> |
746 | 756 | <hr> |
747 | 757 | <div class="refsect2" title="stun_agent_init_response ()"> |
748 | 758 | <a name="stun-agent-init-response"></a><h3>stun_agent_init_response ()</h3> |
749 | <pre class="programlisting"><span class="returnvalue">bool</span> stun_agent_init_response (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
750 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
751 | <span class="returnvalue">uint8_t</span> *buffer, | |
752 | <span class="returnvalue">size_t</span> buffer_len, | |
753 | const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *request);</pre> | |
759 | <pre class="programlisting"><span class="returnvalue">bool</span> stun_agent_init_response (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
760 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
761 | <em class="parameter"><code><span class="type">uint8_t</span> *buffer</code></em>, | |
762 | <em class="parameter"><code><span class="type">size_t</span> buffer_len</code></em>, | |
763 | <em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *request</code></em>);</pre> | |
754 | 764 | <p> |
755 | 765 | Creates a new STUN message of class <a class="link" href="libnice-StunMessage.html#STUN-RESPONSE:CAPS"><span class="type">STUN_RESPONSE</span></a> and with the same method |
756 | 766 | and transaction ID as the message <em class="parameter"><code>request</code></em>. This will also copy the pointer |
757 | 767 | to the key that was used to authenticate the request, so you won't need to |
758 | specify the key with <a class="link" href="libnice-StunAgent.html#stun-agent-finish-message" title="stun_agent_finish_message ()"><code class="function">stun_agent_finish_message()</code></a></p> | |
759 | <div class="variablelist"><table border="0"> | |
760 | <col align="left" valign="top"> | |
761 | <tbody> | |
762 | <tr> | |
763 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
764 | <td> The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> | |
768 | specify the key with <a class="link" href="libnice-StunAgent.html#stun-agent-finish-message" title="stun_agent_finish_message ()"><code class="function">stun_agent_finish_message()</code></a> | |
769 | </p> | |
770 | <div class="variablelist"><table border="0"> | |
771 | <col align="left" valign="top"> | |
772 | <tbody> | |
773 | <tr> | |
774 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
775 | <td>The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> | |
765 | 776 | </td> |
766 | 777 | </tr> |
767 | 778 | <tr> |
768 | 779 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> |
769 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build | |
780 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build | |
770 | 781 | </td> |
771 | 782 | </tr> |
772 | 783 | <tr> |
773 | 784 | <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
774 | <td> The buffer to use in the <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
785 | <td>The buffer to use in the <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
775 | 786 | </td> |
776 | 787 | </tr> |
777 | 788 | <tr> |
778 | 789 | <td><p><span class="term"><em class="parameter"><code>buffer_len</code></em> :</span></p></td> |
779 | <td> The length of the buffer | |
790 | <td>The length of the buffer | |
780 | 791 | </td> |
781 | 792 | </tr> |
782 | 793 | <tr> |
783 | 794 | <td><p><span class="term"><em class="parameter"><code>request</code></em> :</span></p></td> |
784 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> of class <a class="link" href="libnice-StunMessage.html#STUN-REQUEST:CAPS"><span class="type">STUN_REQUEST</span></a> that this response is for | |
795 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> of class <a class="link" href="libnice-StunMessage.html#STUN-REQUEST:CAPS"><span class="type">STUN_REQUEST</span></a> that this response is for | |
785 | 796 | </td> |
786 | 797 | </tr> |
787 | 798 | <tr> |
788 | 799 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
789 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the message was initialized correctly, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise | |
800 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the message was initialized correctly, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise | |
790 | 801 | </td> |
791 | 802 | </tr> |
792 | 803 | </tbody> |
795 | 806 | <hr> |
796 | 807 | <div class="refsect2" title="stun_agent_init_error ()"> |
797 | 808 | <a name="stun-agent-init-error"></a><h3>stun_agent_init_error ()</h3> |
798 | <pre class="programlisting"><span class="returnvalue">bool</span> stun_agent_init_error (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
799 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
800 | <span class="returnvalue">uint8_t</span> *buffer, | |
801 | <span class="returnvalue">size_t</span> buffer_len, | |
802 | const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *request, | |
803 | <a class="link" href="libnice-StunMessage.html#StunError" title="enum StunError"><span class="returnvalue">StunError</span></a> err);</pre> | |
809 | <pre class="programlisting"><span class="returnvalue">bool</span> stun_agent_init_error (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
810 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
811 | <em class="parameter"><code><span class="type">uint8_t</span> *buffer</code></em>, | |
812 | <em class="parameter"><code><span class="type">size_t</span> buffer_len</code></em>, | |
813 | <em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *request</code></em>, | |
814 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunError" title="enum StunError"><span class="type">StunError</span></a> err</code></em>);</pre> | |
804 | 815 | <p> |
805 | 816 | Creates a new STUN message of class <a class="link" href="libnice-StunMessage.html#STUN-ERROR:CAPS"><span class="type">STUN_ERROR</span></a> and with the same method |
806 | 817 | and transaction ID as the message <em class="parameter"><code>request</code></em>. This will also copy the pointer |
807 | 818 | to the key that was used to authenticate the request (if authenticated), |
808 | 819 | so you won't need to specify the key with <a class="link" href="libnice-StunAgent.html#stun-agent-finish-message" title="stun_agent_finish_message ()"><code class="function">stun_agent_finish_message()</code></a>. |
809 | 820 | It will then add the ERROR-CODE attribute with code <em class="parameter"><code>err</code></em> and the associated |
810 | string.</p> | |
811 | <div class="variablelist"><table border="0"> | |
812 | <col align="left" valign="top"> | |
813 | <tbody> | |
814 | <tr> | |
815 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
816 | <td> The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> | |
821 | string. | |
822 | </p> | |
823 | <div class="variablelist"><table border="0"> | |
824 | <col align="left" valign="top"> | |
825 | <tbody> | |
826 | <tr> | |
827 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
828 | <td>The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> | |
817 | 829 | </td> |
818 | 830 | </tr> |
819 | 831 | <tr> |
820 | 832 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> |
821 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build | |
833 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build | |
822 | 834 | </td> |
823 | 835 | </tr> |
824 | 836 | <tr> |
825 | 837 | <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
826 | <td> The buffer to use in the <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
838 | <td>The buffer to use in the <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
827 | 839 | </td> |
828 | 840 | </tr> |
829 | 841 | <tr> |
830 | 842 | <td><p><span class="term"><em class="parameter"><code>buffer_len</code></em> :</span></p></td> |
831 | <td> The length of the buffer | |
843 | <td>The length of the buffer | |
832 | 844 | </td> |
833 | 845 | </tr> |
834 | 846 | <tr> |
835 | 847 | <td><p><span class="term"><em class="parameter"><code>request</code></em> :</span></p></td> |
836 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> of class <a class="link" href="libnice-StunMessage.html#STUN-REQUEST:CAPS"><span class="type">STUN_REQUEST</span></a> that this error response | |
848 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> of class <a class="link" href="libnice-StunMessage.html#STUN-REQUEST:CAPS"><span class="type">STUN_REQUEST</span></a> that this error response | |
837 | 849 | is for |
838 | 850 | </td> |
839 | 851 | </tr> |
840 | 852 | <tr> |
841 | 853 | <td><p><span class="term"><em class="parameter"><code>err</code></em> :</span></p></td> |
842 | <td> The <a class="link" href="libnice-StunMessage.html#StunError" title="enum StunError"><span class="type">StunError</span></a> to put in the ERROR-CODE attribute of the error response | |
854 | <td>The <a class="link" href="libnice-StunMessage.html#StunError" title="enum StunError"><span class="type">StunError</span></a> to put in the ERROR-CODE attribute of the error response | |
843 | 855 | </td> |
844 | 856 | </tr> |
845 | 857 | <tr> |
846 | 858 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
847 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the message was initialized correctly, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise | |
859 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the message was initialized correctly, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise | |
848 | 860 | </td> |
849 | 861 | </tr> |
850 | 862 | </tbody> |
854 | 866 | <div class="refsect2" title="stun_agent_build_unknown_attributes_error ()"> |
855 | 867 | <a name="stun-agent-build-unknown-attributes-error"></a><h3>stun_agent_build_unknown_attributes_error ()</h3> |
856 | 868 | <pre class="programlisting"><span class="returnvalue">size_t</span> stun_agent_build_unknown_attributes_error |
857 | (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
858 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
859 | <span class="returnvalue">uint8_t</span> *buffer, | |
860 | <span class="returnvalue">size_t</span> buffer_len, | |
861 | const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *request);</pre> | |
869 | (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
870 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
871 | <em class="parameter"><code><span class="type">uint8_t</span> *buffer</code></em>, | |
872 | <em class="parameter"><code><span class="type">size_t</span> buffer_len</code></em>, | |
873 | <em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *request</code></em>);</pre> | |
862 | 874 | <p> |
863 | 875 | Creates a new STUN message of class <a class="link" href="libnice-StunMessage.html#STUN-ERROR:CAPS"><span class="type">STUN_ERROR</span></a> and with the same method |
864 | 876 | and transaction ID as the message <em class="parameter"><code>request</code></em>. It will then add the ERROR-CODE |
865 | 877 | attribute with code <a class="link" href="libnice-StunMessage.html#STUN-ERROR-UNKNOWN-ATTRIBUTE:CAPS"><span class="type">STUN_ERROR_UNKNOWN_ATTRIBUTE</span></a> and add all the unknown |
866 | 878 | mandatory attributes from the <em class="parameter"><code>request</code></em> STUN message in the |
867 | 879 | <a class="link" href="libnice-StunMessage.html#STUN-ATTRIBUTE-UNKNOWN-ATTRIBUTES:CAPS"><span class="type">STUN_ATTRIBUTE_UNKNOWN_ATTRIBUTES</span></a> attribute, it will then finish the message |
868 | by calling <a class="link" href="libnice-StunAgent.html#stun-agent-finish-message" title="stun_agent_finish_message ()"><code class="function">stun_agent_finish_message()</code></a></p> | |
869 | <div class="variablelist"><table border="0"> | |
870 | <col align="left" valign="top"> | |
871 | <tbody> | |
872 | <tr> | |
873 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
874 | <td> The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> | |
880 | by calling <a class="link" href="libnice-StunAgent.html#stun-agent-finish-message" title="stun_agent_finish_message ()"><code class="function">stun_agent_finish_message()</code></a> | |
881 | </p> | |
882 | <div class="variablelist"><table border="0"> | |
883 | <col align="left" valign="top"> | |
884 | <tbody> | |
885 | <tr> | |
886 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
887 | <td>The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> | |
875 | 888 | </td> |
876 | 889 | </tr> |
877 | 890 | <tr> |
878 | 891 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> |
879 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build | |
892 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build | |
880 | 893 | </td> |
881 | 894 | </tr> |
882 | 895 | <tr> |
883 | 896 | <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
884 | <td> The buffer to use in the <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
897 | <td>The buffer to use in the <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
885 | 898 | </td> |
886 | 899 | </tr> |
887 | 900 | <tr> |
888 | 901 | <td><p><span class="term"><em class="parameter"><code>buffer_len</code></em> :</span></p></td> |
889 | <td> The length of the buffer | |
902 | <td>The length of the buffer | |
890 | 903 | </td> |
891 | 904 | </tr> |
892 | 905 | <tr> |
893 | 906 | <td><p><span class="term"><em class="parameter"><code>request</code></em> :</span></p></td> |
894 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> of class <a class="link" href="libnice-StunMessage.html#STUN-REQUEST:CAPS"><span class="type">STUN_REQUEST</span></a> that this response is for | |
907 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> of class <a class="link" href="libnice-StunMessage.html#STUN-REQUEST:CAPS"><span class="type">STUN_REQUEST</span></a> that this response is for | |
895 | 908 | </td> |
896 | 909 | </tr> |
897 | 910 | <tr> |
905 | 918 | <hr> |
906 | 919 | <div class="refsect2" title="stun_agent_finish_message ()"> |
907 | 920 | <a name="stun-agent-finish-message"></a><h3>stun_agent_finish_message ()</h3> |
908 | <pre class="programlisting"><span class="returnvalue">size_t</span> stun_agent_finish_message (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
909 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
910 | const <span class="returnvalue">uint8_t</span> *key, | |
911 | <span class="returnvalue">size_t</span> key_len);</pre> | |
921 | <pre class="programlisting"><span class="returnvalue">size_t</span> stun_agent_finish_message (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
922 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
923 | <em class="parameter"><code>const <span class="type">uint8_t</span> *key</code></em>, | |
924 | <em class="parameter"><code><span class="type">size_t</span> key_len</code></em>);</pre> | |
912 | 925 | <p> |
913 | 926 | This function will 'finish' a message and make it ready to be sent. It will |
914 | 927 | add the MESSAGE-INTEGRITY and FINGERPRINT attributes if necessary. If the |
916 | 929 | the message in the agent for future matching of the response. |
917 | 930 | </p> |
918 | 931 | <p>See also: <a class="link" href="libnice-StunAgent.html#stun-agent-forget-transaction" title="stun_agent_forget_transaction ()"><code class="function">stun_agent_forget_transaction()</code></a></p> |
919 | <div class="variablelist"><table border="0"> | |
920 | <col align="left" valign="top"> | |
921 | <tbody> | |
922 | <tr> | |
923 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
924 | <td> The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> | |
932 | <p> | |
933 | </p> | |
934 | <div class="variablelist"><table border="0"> | |
935 | <col align="left" valign="top"> | |
936 | <tbody> | |
937 | <tr> | |
938 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
939 | <td>The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> | |
925 | 940 | </td> |
926 | 941 | </tr> |
927 | 942 | <tr> |
928 | 943 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> |
929 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to finish | |
944 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to finish | |
930 | 945 | </td> |
931 | 946 | </tr> |
932 | 947 | <tr> |
933 | 948 | <td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td> |
934 | <td> The key to use for the MESSAGE-INTEGRITY attribute | |
949 | <td>The key to use for the MESSAGE-INTEGRITY attribute | |
935 | 950 | </td> |
936 | 951 | </tr> |
937 | 952 | <tr> |
938 | 953 | <td><p><span class="term"><em class="parameter"><code>key_len</code></em> :</span></p></td> |
939 | <td> The length of the <em class="parameter"><code>key</code></em> | |
954 | <td>The length of the <em class="parameter"><code>key</code></em> | |
940 | 955 | </td> |
941 | 956 | </tr> |
942 | 957 | <tr> |
966 | 981 | <hr> |
967 | 982 | <div class="refsect2" title="stun_agent_forget_transaction ()"> |
968 | 983 | <a name="stun-agent-forget-transaction"></a><h3>stun_agent_forget_transaction ()</h3> |
969 | <pre class="programlisting"><span class="returnvalue">bool</span> stun_agent_forget_transaction (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
970 | <a class="link" href="libnice-StunMessage.html#StunTransactionId" title="StunTransactionId"><span class="returnvalue">StunTransactionId</span></a> id);</pre> | |
984 | <pre class="programlisting"><span class="returnvalue">bool</span> stun_agent_forget_transaction (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
985 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunTransactionId" title="StunTransactionId"><span class="type">StunTransactionId</span></a> id</code></em>);</pre> | |
971 | 986 | <p> |
972 | 987 | This function is used to make the <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> forget about a previously |
973 | 988 | created transaction. |
980 | 995 | this will allow the <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> to forget about the timed out transaction and |
981 | 996 | free its slot for future transactions. |
982 | 997 | </p> |
983 | <div class="variablelist"><table border="0"> | |
984 | <col align="left" valign="top"> | |
985 | <tbody> | |
986 | <tr> | |
987 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
988 | <td> The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> | |
998 | <p> | |
999 | </p> | |
1000 | <div class="variablelist"><table border="0"> | |
1001 | <col align="left" valign="top"> | |
1002 | <tbody> | |
1003 | <tr> | |
1004 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1005 | <td>The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> | |
989 | 1006 | </td> |
990 | 1007 | </tr> |
991 | 1008 | <tr> |
992 | 1009 | <td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td> |
993 | <td> The <a class="link" href="libnice-StunMessage.html#StunTransactionId" title="StunTransactionId"><span class="type">StunTransactionId</span></a> of the transaction to forget | |
1010 | <td>The <a class="link" href="libnice-StunMessage.html#StunTransactionId" title="StunTransactionId"><span class="type">StunTransactionId</span></a> of the transaction to forget | |
994 | 1011 | </td> |
995 | 1012 | </tr> |
996 | 1013 | <tr> |
997 | 1014 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
998 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the transaction was found, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise | |
1015 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the transaction was found, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise | |
999 | 1016 | </td> |
1000 | 1017 | </tr> |
1001 | 1018 | </tbody> |
1005 | 1022 | <hr> |
1006 | 1023 | <div class="refsect2" title="stun_agent_set_software ()"> |
1007 | 1024 | <a name="stun-agent-set-software"></a><h3>stun_agent_set_software ()</h3> |
1008 | <pre class="programlisting"><span class="returnvalue">void</span> stun_agent_set_software (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
1009 | const <span class="returnvalue">char</span> *software);</pre> | |
1025 | <pre class="programlisting"><span class="returnvalue">void</span> stun_agent_set_software (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
1026 | <em class="parameter"><code>const <span class="type">char</span> *software</code></em>);</pre> | |
1010 | 1027 | <p> |
1011 | 1028 | This function will set the value of the SOFTWARE attribute to be added to |
1012 | 1029 | STUN requests, responses and error responses. |
1032 | 1049 | the StunAgent's life. Do not free its content. |
1033 | 1050 | </p> |
1034 | 1051 | </div> |
1035 | <div class="variablelist"><table border="0"> | |
1036 | <col align="left" valign="top"> | |
1037 | <tbody> | |
1038 | <tr> | |
1039 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1040 | <td> The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> | |
1052 | <p> | |
1053 | </p> | |
1054 | <div class="variablelist"><table border="0"> | |
1055 | <col align="left" valign="top"> | |
1056 | <tbody> | |
1057 | <tr> | |
1058 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> | |
1059 | <td>The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> | |
1041 | 1060 | </td> |
1042 | 1061 | </tr> |
1043 | 1062 | <tr> |
1044 | 1063 | <td><p><span class="term"><em class="parameter"><code>software</code></em> :</span></p></td> |
1045 | <td> The value of the SOFTWARE attribute to add. | |
1064 | <td>The value of the SOFTWARE attribute to add. | |
1046 | 1065 | </td> |
1047 | 1066 | </tr> |
1048 | 1067 | </tbody> |
1052 | 1071 | <hr> |
1053 | 1072 | <div class="refsect2" title="stun_debug_enable ()"> |
1054 | 1073 | <a name="stun-debug-enable"></a><h3>stun_debug_enable ()</h3> |
1055 | <pre class="programlisting"><span class="returnvalue">void</span> stun_debug_enable (void);</pre> | |
1056 | <p> | |
1057 | Enable debug messages to stderr</p> | |
1074 | <pre class="programlisting"><span class="returnvalue">void</span> stun_debug_enable (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> | |
1075 | <p> | |
1076 | Enable debug messages to stderr | |
1077 | </p> | |
1058 | 1078 | </div> |
1059 | 1079 | <hr> |
1060 | 1080 | <div class="refsect2" title="stun_debug_disable ()"> |
1061 | 1081 | <a name="stun-debug-disable"></a><h3>stun_debug_disable ()</h3> |
1062 | <pre class="programlisting"><span class="returnvalue">void</span> stun_debug_disable (void);</pre> | |
1063 | <p> | |
1064 | Disable debug messages to stderr</p> | |
1082 | <pre class="programlisting"><span class="returnvalue">void</span> stun_debug_disable (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> | |
1083 | <p> | |
1084 | Disable debug messages to stderr | |
1085 | </p> | |
1065 | 1086 | </div> |
1066 | 1087 | </div> |
1067 | 1088 | <div class="refsect1" title="See Also"> |
1071 | 1092 | </div> |
1072 | 1093 | <div class="footer"> |
1073 | 1094 | <hr> |
1074 | Generated by GTK-Doc V1.13</div> | |
1095 | Generated by GTK-Doc V1.15</div> | |
1075 | 1096 | </body> |
1076 | 1097 | </html>⏎ |
7 | 7 | <link rel="up" href="ch03.html" title=""> |
8 | 8 | <link rel="prev" href="libnice-StunAgent.html" title="StunAgent"> |
9 | 9 | <link rel="next" href="ch04.html" title="STUN usages"> |
10 | <meta name="generator" content="GTK-Doc V1.13 (XML mode)"> | |
10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> | |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | <link rel="part" href="pt01.html" title="Part I. ICE Library"> | |
13 | <link rel="chapter" href="ch01.html" title=""> | |
14 | <link rel="chapter" href="ch02.html" title="Libnice helper functions"> | |
15 | <link rel="part" href="pt02.html" title="Part II. STUN Library"> | |
16 | <link rel="chapter" href="ch03.html" title=""> | |
17 | <link rel="chapter" href="ch04.html" title="STUN usages"> | |
18 | <link rel="part" href="pt03.html" title="Part III. Pseudo TCP Socket implementation"> | |
19 | <link rel="chapter" href="ch05.html" title=""> | |
20 | 12 | </head> |
21 | 13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
22 | 14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
60 | 52 | enum <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn">StunMessageReturn</a>; |
61 | 53 | #define <a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-BUFFER-INCOMPLETE:CAPS" title="STUN_MESSAGE_BUFFER_INCOMPLETE">STUN_MESSAGE_BUFFER_INCOMPLETE</a> |
62 | 54 | #define <a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-BUFFER-INVALID:CAPS" title="STUN_MESSAGE_BUFFER_INVALID">STUN_MESSAGE_BUFFER_INVALID</a> |
63 | <span class="returnvalue">bool</span> <a class="link" href="libnice-StunMessage.html#stun-message-init" title="stun_message_init ()">stun_message_init</a> (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
64 | <a class="link" href="libnice-StunMessage.html#StunClass" title="enum StunClass"><span class="returnvalue">StunClass</span></a> c, | |
65 | <a class="link" href="libnice-StunMessage.html#StunMethod" title="enum StunMethod"><span class="returnvalue">StunMethod</span></a> m, | |
66 | const <a class="link" href="libnice-StunMessage.html#StunTransactionId" title="StunTransactionId"><span class="returnvalue">StunTransactionId</span></a> id); | |
67 | <span class="returnvalue">uint16_t</span> <a class="link" href="libnice-StunMessage.html#stun-message-length" title="stun_message_length ()">stun_message_length</a> (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg); | |
68 | const <span class="returnvalue">void</span> * <a class="link" href="libnice-StunMessage.html#stun-message-find" title="stun_message_find ()">stun_message_find</a> (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
69 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
70 | <span class="returnvalue">uint16_t</span> *palen); | |
71 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-find-flag" title="stun_message_find_flag ()">stun_message_find_flag</a> (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
72 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type); | |
73 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-find32" title="stun_message_find32 ()">stun_message_find32</a> (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
74 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
75 | <span class="returnvalue">uint32_t</span> *pval); | |
76 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-find64" title="stun_message_find64 ()">stun_message_find64</a> (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
77 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
78 | <span class="returnvalue">uint64_t</span> *pval); | |
79 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-find-string" title="stun_message_find_string ()">stun_message_find_string</a> (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
80 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
81 | <span class="returnvalue">char</span> *buf, | |
82 | <span class="returnvalue">size_t</span> buflen); | |
83 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-find-addr" title="stun_message_find_addr ()">stun_message_find_addr</a> (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
84 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
85 | <span class="returnvalue">struct sockaddr</span> *addr, | |
86 | <span class="returnvalue">socklen_t</span> *addrlen); | |
87 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-find-xor-addr" title="stun_message_find_xor_addr ()">stun_message_find_xor_addr</a> (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
88 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
89 | <span class="returnvalue">struct sockaddr</span> *addr, | |
90 | <span class="returnvalue">socklen_t</span> *addrlen); | |
91 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <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> (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
92 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
93 | <span class="returnvalue">struct sockaddr</span> *addr, | |
94 | <span class="returnvalue">socklen_t</span> *addrlen, | |
95 | <span class="returnvalue">uint32_t</span> magic_cookie); | |
96 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-find-error" title="stun_message_find_error ()">stun_message_find_error</a> (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
97 | <span class="returnvalue">int</span> *code); | |
98 | <span class="returnvalue">void</span> * <a class="link" href="libnice-StunMessage.html#stun-message-append" title="stun_message_append ()">stun_message_append</a> (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
99 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
100 | <span class="returnvalue">size_t</span> length); | |
101 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-append-bytes" title="stun_message_append_bytes ()">stun_message_append_bytes</a> (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
102 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
103 | const <span class="returnvalue">void</span> *data, | |
104 | <span class="returnvalue">size_t</span> len); | |
105 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-append-flag" title="stun_message_append_flag ()">stun_message_append_flag</a> (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
106 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type); | |
107 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-append32" title="stun_message_append32 ()">stun_message_append32</a> (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
108 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
109 | <span class="returnvalue">uint32_t</span> value); | |
110 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-append64" title="stun_message_append64 ()">stun_message_append64</a> (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
111 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
112 | <span class="returnvalue">uint64_t</span> value); | |
113 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-append-string" title="stun_message_append_string ()">stun_message_append_string</a> (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
114 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
115 | const <span class="returnvalue">char</span> *str); | |
116 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-append-addr" title="stun_message_append_addr ()">stun_message_append_addr</a> (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
117 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
118 | const <span class="returnvalue">struct sockaddr</span> *addr, | |
119 | <span class="returnvalue">socklen_t</span> addrlen); | |
120 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-append-xor-addr" title="stun_message_append_xor_addr ()">stun_message_append_xor_addr</a> (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
121 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
122 | const <span class="returnvalue">struct sockaddr</span> *addr, | |
123 | <span class="returnvalue">socklen_t</span> addrlen); | |
124 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <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> (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
125 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
126 | const <span class="returnvalue">struct sockaddr</span> *addr, | |
127 | <span class="returnvalue">socklen_t</span> addrlen, | |
128 | <span class="returnvalue">uint32_t</span> magic_cookie); | |
129 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-append-error" title="stun_message_append_error ()">stun_message_append_error</a> (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
130 | <a class="link" href="libnice-StunMessage.html#StunError" title="enum StunError"><span class="returnvalue">StunError</span></a> code); | |
131 | <span class="returnvalue">int</span> <a class="link" href="libnice-StunMessage.html#stun-message-validate-buffer-length" title="stun_message_validate_buffer_length ()">stun_message_validate_buffer_length</a> (const <span class="returnvalue">uint8_t</span> *msg, | |
132 | <span class="returnvalue">size_t</span> length); | |
133 | <span class="returnvalue">void</span> <a class="link" href="libnice-StunMessage.html#stun-message-id" title="stun_message_id ()">stun_message_id</a> (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
134 | <a class="link" href="libnice-StunMessage.html#StunTransactionId" title="StunTransactionId"><span class="returnvalue">StunTransactionId</span></a> id); | |
135 | <a class="link" href="libnice-StunMessage.html#StunClass" title="enum StunClass"><span class="returnvalue">StunClass</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-get-class" title="stun_message_get_class ()">stun_message_get_class</a> (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg); | |
136 | <a class="link" href="libnice-StunMessage.html#StunMethod" title="enum StunMethod"><span class="returnvalue">StunMethod</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-get-method" title="stun_message_get_method ()">stun_message_get_method</a> (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg); | |
137 | <span class="returnvalue">bool</span> <a class="link" href="libnice-StunMessage.html#stun-message-has-attribute" title="stun_message_has_attribute ()">stun_message_has_attribute</a> (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
138 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type); | |
139 | <span class="returnvalue">bool</span> <a class="link" href="libnice-StunMessage.html#stun-message-has-cookie" title="stun_message_has_cookie ()">stun_message_has_cookie</a> (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg); | |
140 | <span class="returnvalue">bool</span> <a class="link" href="libnice-StunMessage.html#stun-optional" title="stun_optional ()">stun_optional</a> (<span class="returnvalue">uint16_t</span> t); | |
141 | const <span class="returnvalue">char</span> * <a class="link" href="libnice-StunMessage.html#stun-strerror" title="stun_strerror ()">stun_strerror</a> (<a class="link" href="libnice-StunMessage.html#StunError" title="enum StunError"><span class="returnvalue">StunError</span></a> code); | |
55 | <span class="returnvalue">bool</span> <a class="link" href="libnice-StunMessage.html#stun-message-init" title="stun_message_init ()">stun_message_init</a> (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
56 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunClass" title="enum StunClass"><span class="type">StunClass</span></a> c</code></em>, | |
57 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMethod" title="enum StunMethod"><span class="type">StunMethod</span></a> m</code></em>, | |
58 | <em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunTransactionId" title="StunTransactionId"><span class="type">StunTransactionId</span></a> id</code></em>); | |
59 | <span class="returnvalue">uint16_t</span> <a class="link" href="libnice-StunMessage.html#stun-message-length" title="stun_message_length ()">stun_message_length</a> (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>); | |
60 | const <span class="returnvalue">void</span> * <a class="link" href="libnice-StunMessage.html#stun-message-find" title="stun_message_find ()">stun_message_find</a> (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
61 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
62 | <em class="parameter"><code><span class="type">uint16_t</span> *palen</code></em>); | |
63 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-find-flag" title="stun_message_find_flag ()">stun_message_find_flag</a> (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
64 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>); | |
65 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-find32" title="stun_message_find32 ()">stun_message_find32</a> (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
66 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
67 | <em class="parameter"><code><span class="type">uint32_t</span> *pval</code></em>); | |
68 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-find64" title="stun_message_find64 ()">stun_message_find64</a> (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
69 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
70 | <em class="parameter"><code><span class="type">uint64_t</span> *pval</code></em>); | |
71 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-find-string" title="stun_message_find_string ()">stun_message_find_string</a> (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
72 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
73 | <em class="parameter"><code><span class="type">char</span> *buf</code></em>, | |
74 | <em class="parameter"><code><span class="type">size_t</span> buflen</code></em>); | |
75 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-find-addr" title="stun_message_find_addr ()">stun_message_find_addr</a> (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
76 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
77 | <em class="parameter"><code><span class="type">struct sockaddr</span> *addr</code></em>, | |
78 | <em class="parameter"><code><span class="type">socklen_t</span> *addrlen</code></em>); | |
79 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-find-xor-addr" title="stun_message_find_xor_addr ()">stun_message_find_xor_addr</a> (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
80 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
81 | <em class="parameter"><code><span class="type">struct sockaddr</span> *addr</code></em>, | |
82 | <em class="parameter"><code><span class="type">socklen_t</span> *addrlen</code></em>); | |
83 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <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> (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
84 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
85 | <em class="parameter"><code><span class="type">struct sockaddr</span> *addr</code></em>, | |
86 | <em class="parameter"><code><span class="type">socklen_t</span> *addrlen</code></em>, | |
87 | <em class="parameter"><code><span class="type">uint32_t</span> magic_cookie</code></em>); | |
88 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-find-error" title="stun_message_find_error ()">stun_message_find_error</a> (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
89 | <em class="parameter"><code><span class="type">int</span> *code</code></em>); | |
90 | <span class="returnvalue">void</span> * <a class="link" href="libnice-StunMessage.html#stun-message-append" title="stun_message_append ()">stun_message_append</a> (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
91 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
92 | <em class="parameter"><code><span class="type">size_t</span> length</code></em>); | |
93 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-append-bytes" title="stun_message_append_bytes ()">stun_message_append_bytes</a> (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
94 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
95 | <em class="parameter"><code>const <span class="type">void</span> *data</code></em>, | |
96 | <em class="parameter"><code><span class="type">size_t</span> len</code></em>); | |
97 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-append-flag" title="stun_message_append_flag ()">stun_message_append_flag</a> (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
98 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>); | |
99 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-append32" title="stun_message_append32 ()">stun_message_append32</a> (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
100 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
101 | <em class="parameter"><code><span class="type">uint32_t</span> value</code></em>); | |
102 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-append64" title="stun_message_append64 ()">stun_message_append64</a> (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
103 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
104 | <em class="parameter"><code><span class="type">uint64_t</span> value</code></em>); | |
105 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-append-string" title="stun_message_append_string ()">stun_message_append_string</a> (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
106 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
107 | <em class="parameter"><code>const <span class="type">char</span> *str</code></em>); | |
108 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-append-addr" title="stun_message_append_addr ()">stun_message_append_addr</a> (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
109 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
110 | <em class="parameter"><code>const <span class="type">struct sockaddr</span> *addr</code></em>, | |
111 | <em class="parameter"><code><span class="type">socklen_t</span> addrlen</code></em>); | |
112 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-append-xor-addr" title="stun_message_append_xor_addr ()">stun_message_append_xor_addr</a> (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
113 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
114 | <em class="parameter"><code>const <span class="type">struct sockaddr</span> *addr</code></em>, | |
115 | <em class="parameter"><code><span class="type">socklen_t</span> addrlen</code></em>); | |
116 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <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> (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
117 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
118 | <em class="parameter"><code>const <span class="type">struct sockaddr</span> *addr</code></em>, | |
119 | <em class="parameter"><code><span class="type">socklen_t</span> addrlen</code></em>, | |
120 | <em class="parameter"><code><span class="type">uint32_t</span> magic_cookie</code></em>); | |
121 | <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-append-error" title="stun_message_append_error ()">stun_message_append_error</a> (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
122 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunError" title="enum StunError"><span class="type">StunError</span></a> code</code></em>); | |
123 | <span class="returnvalue">int</span> <a class="link" href="libnice-StunMessage.html#stun-message-validate-buffer-length" title="stun_message_validate_buffer_length ()">stun_message_validate_buffer_length</a> (<em class="parameter"><code>const <span class="type">uint8_t</span> *msg</code></em>, | |
124 | <em class="parameter"><code><span class="type">size_t</span> length</code></em>); | |
125 | <span class="returnvalue">void</span> <a class="link" href="libnice-StunMessage.html#stun-message-id" title="stun_message_id ()">stun_message_id</a> (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
126 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunTransactionId" title="StunTransactionId"><span class="type">StunTransactionId</span></a> id</code></em>); | |
127 | <a class="link" href="libnice-StunMessage.html#StunClass" title="enum StunClass"><span class="returnvalue">StunClass</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-get-class" title="stun_message_get_class ()">stun_message_get_class</a> (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>); | |
128 | <a class="link" href="libnice-StunMessage.html#StunMethod" title="enum StunMethod"><span class="returnvalue">StunMethod</span></a> <a class="link" href="libnice-StunMessage.html#stun-message-get-method" title="stun_message_get_method ()">stun_message_get_method</a> (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>); | |
129 | <span class="returnvalue">bool</span> <a class="link" href="libnice-StunMessage.html#stun-message-has-attribute" title="stun_message_has_attribute ()">stun_message_has_attribute</a> (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
130 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>); | |
131 | <span class="returnvalue">bool</span> <a class="link" href="libnice-StunMessage.html#stun-message-has-cookie" title="stun_message_has_cookie ()">stun_message_has_cookie</a> (<em class="parameter"><code>const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>); | |
132 | <span class="returnvalue">bool</span> <a class="link" href="libnice-StunMessage.html#stun-optional" title="stun_optional ()">stun_optional</a> (<em class="parameter"><code><span class="type">uint16_t</span> t</code></em>); | |
133 | const <span class="returnvalue">char</span> * <a class="link" href="libnice-StunMessage.html#stun-strerror" title="stun_strerror ()">stun_strerror</a> (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunError" title="enum StunError"><span class="type">StunError</span></a> code</code></em>); | |
142 | 134 | </pre> |
143 | 135 | </div> |
144 | 136 | <div class="refsect1" title="Description"> |
145 | 137 | <a name="libnice-StunMessage.description"></a><h2>Description</h2> |
146 | 138 | <p> |
147 | 139 | The STUN Messages API allows you to create STUN messages easily as well as to |
148 | parse existing messages.</p> | |
140 | parse existing messages. | |
141 | </p> | |
149 | 142 | </div> |
150 | 143 | <div class="refsect1" title="Details"> |
151 | 144 | <a name="libnice-StunMessage.details"></a><h2>Details</h2> |
162 | 155 | } StunMessage; |
163 | 156 | </pre> |
164 | 157 | <p> |
165 | This structure represents a STUN message</p> | |
158 | This structure represents a STUN message | |
159 | </p> | |
166 | 160 | <div class="variablelist"><table border="0"> |
167 | 161 | <col align="left" valign="top"> |
168 | 162 | <tbody> |
169 | 163 | <tr> |
170 | 164 | <td><p><span class="term"><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>;</span></p></td> |
171 | <td> The agent that created or validated this message | |
165 | <td>The agent that created or validated this message | |
172 | 166 | </td> |
173 | 167 | </tr> |
174 | 168 | <tr> |
175 | 169 | <td><p><span class="term"><span class="type">uint8_t</span> *<em class="structfield"><code><a name="StunMessage.buffer"></a>buffer</code></em>;</span></p></td> |
176 | <td> The buffer containing the STUN message | |
170 | <td>The buffer containing the STUN message | |
177 | 171 | </td> |
178 | 172 | </tr> |
179 | 173 | <tr> |
180 | 174 | <td><p><span class="term"><span class="type">size_t</span> <em class="structfield"><code><a name="StunMessage.buffer-len"></a>buffer_len</code></em>;</span></p></td> |
181 | <td> The length of the buffer (not the size of the message) | |
175 | <td>The length of the buffer (not the size of the message) | |
182 | 176 | </td> |
183 | 177 | </tr> |
184 | 178 | <tr> |
185 | 179 | <td><p><span class="term"><span class="type">uint8_t</span> *<em class="structfield"><code><a name="StunMessage.key"></a>key</code></em>;</span></p></td> |
186 | <td> The short term credentials key to use for authentication validation | |
180 | <td>The short term credentials key to use for authentication validation | |
187 | 181 | or that was used to finalize this message |
188 | 182 | </td> |
189 | 183 | </tr> |
190 | 184 | <tr> |
191 | 185 | <td><p><span class="term"><span class="type">size_t</span> <em class="structfield"><code><a name="StunMessage.key-len"></a>key_len</code></em>;</span></p></td> |
192 | <td> The length of the associated key | |
186 | <td>The length of the associated key | |
193 | 187 | </td> |
194 | 188 | </tr> |
195 | 189 | <tr> |
196 | 190 | <td><p><span class="term"><span class="type">uint8_t</span> <em class="structfield"><code><a name="StunMessage.long-term-key"></a>long_term_key</code></em>[16];</span></p></td> |
197 | <td> The long term credential key to use for authentication | |
191 | <td>The long term credential key to use for authentication | |
198 | 192 | validation or that was used to finalize this message |
199 | 193 | </td> |
200 | 194 | </tr> |
201 | 195 | <tr> |
202 | 196 | <td><p><span class="term"><span class="type">bool</span> <em class="structfield"><code><a name="StunMessage.long-term-valid"></a>long_term_valid</code></em>;</span></p></td> |
203 | <td> Whether or not the <span class="type">long_term_key</span> variable contains valid | |
197 | <td>Whether or not the <span class="type">long_term_key</span> variable contains valid | |
204 | 198 | data |
205 | 199 | </td> |
206 | 200 | </tr> |
220 | 214 | </pre> |
221 | 215 | <p> |
222 | 216 | This enum is used to represent the class of |
223 | a STUN message, as defined in RFC5389</p> | |
217 | a STUN message, as defined in RFC5389 | |
218 | </p> | |
224 | 219 | <div class="variablelist"><table border="0"> |
225 | 220 | <col align="left" valign="top"> |
226 | 221 | <tbody> |
227 | 222 | <tr> |
228 | 223 | <td><p><a name="STUN-REQUEST:CAPS"></a><span class="term"><code class="literal">STUN_REQUEST</code></span></p></td> |
229 | <td> A STUN Request message | |
224 | <td>A STUN Request message | |
230 | 225 | </td> |
231 | 226 | </tr> |
232 | 227 | <tr> |
233 | 228 | <td><p><a name="STUN-INDICATION:CAPS"></a><span class="term"><code class="literal">STUN_INDICATION</code></span></p></td> |
234 | <td> A STUN indication message | |
229 | <td>A STUN indication message | |
235 | 230 | </td> |
236 | 231 | </tr> |
237 | 232 | <tr> |
238 | 233 | <td><p><a name="STUN-RESPONSE:CAPS"></a><span class="term"><code class="literal">STUN_RESPONSE</code></span></p></td> |
239 | <td> A STUN Response message | |
234 | <td>A STUN Response message | |
240 | 235 | </td> |
241 | 236 | </tr> |
242 | 237 | <tr> |
243 | 238 | <td><p><a name="STUN-ERROR:CAPS"></a><span class="term"><code class="literal">STUN_ERROR</code></span></p></td> |
244 | <td> A STUN Error message | |
239 | <td>A STUN Error message | |
245 | 240 | </td> |
246 | 241 | </tr> |
247 | 242 | </tbody> |
269 | 264 | </pre> |
270 | 265 | <p> |
271 | 266 | This enum is used to represent the method of |
272 | a STUN message, as defined by various RFCs</p> | |
267 | a STUN message, as defined by various RFCs | |
268 | </p> | |
273 | 269 | <div class="variablelist"><table border="0"> |
274 | 270 | <col align="left" valign="top"> |
275 | 271 | <tbody> |
276 | 272 | <tr> |
277 | 273 | <td><p><a name="STUN-BINDING:CAPS"></a><span class="term"><code class="literal">STUN_BINDING</code></span></p></td> |
278 | <td> The Binding method as defined by the RFC5389 | |
274 | <td>The Binding method as defined by the RFC5389 | |
279 | 275 | </td> |
280 | 276 | </tr> |
281 | 277 | <tr> |
282 | 278 | <td><p><a name="STUN-SHARED-SECRET:CAPS"></a><span class="term"><code class="literal">STUN_SHARED_SECRET</code></span></p></td> |
283 | <td> The Shared-Secret method as defined by the RFC3489 | |
279 | <td>The Shared-Secret method as defined by the RFC3489 | |
284 | 280 | </td> |
285 | 281 | </tr> |
286 | 282 | <tr> |
287 | 283 | <td><p><a name="STUN-ALLOCATE:CAPS"></a><span class="term"><code class="literal">STUN_ALLOCATE</code></span></p></td> |
288 | <td> The Allocate method as defined by the TURN draft 12 | |
284 | <td>The Allocate method as defined by the TURN draft 12 | |
289 | 285 | </td> |
290 | 286 | </tr> |
291 | 287 | <tr> |
292 | 288 | <td><p><a name="STUN-SET-ACTIVE-DST:CAPS"></a><span class="term"><code class="literal">STUN_SET_ACTIVE_DST</code></span></p></td> |
293 | <td> The Set-Active-Destination method as defined by | |
289 | <td>The Set-Active-Destination method as defined by | |
294 | 290 | the TURN draft 4 |
295 | 291 | </td> |
296 | 292 | </tr> |
297 | 293 | <tr> |
298 | 294 | <td><p><a name="STUN-REFRESH:CAPS"></a><span class="term"><code class="literal">STUN_REFRESH</code></span></p></td> |
299 | <td> The Refresh method as defined by the TURN draft 12 | |
295 | <td>The Refresh method as defined by the TURN draft 12 | |
300 | 296 | </td> |
301 | 297 | </tr> |
302 | 298 | <tr> |
303 | 299 | <td><p><a name="STUN-SEND:CAPS"></a><span class="term"><code class="literal">STUN_SEND</code></span></p></td> |
304 | <td> The Send method as defined by the TURN draft 00 | |
300 | <td>The Send method as defined by the TURN draft 00 | |
305 | 301 | </td> |
306 | 302 | </tr> |
307 | 303 | <tr> |
308 | 304 | <td><p><a name="STUN-CONNECT:CAPS"></a><span class="term"><code class="literal">STUN_CONNECT</code></span></p></td> |
309 | <td> The Connect method as defined by the TURN draft 4 | |
305 | <td>The Connect method as defined by the TURN draft 4 | |
310 | 306 | </td> |
311 | 307 | </tr> |
312 | 308 | <tr> |
313 | 309 | <td><p><a name="STUN-OLD-SET-ACTIVE-DST:CAPS"></a><span class="term"><code class="literal">STUN_OLD_SET_ACTIVE_DST</code></span></p></td> |
314 | <td> The older Set-Active-Destination method as | |
310 | <td>The older Set-Active-Destination method as | |
315 | 311 | defined by the TURN draft 0 |
316 | 312 | </td> |
317 | 313 | </tr> |
318 | 314 | <tr> |
319 | 315 | <td><p><a name="STUN-IND-SEND:CAPS"></a><span class="term"><code class="literal">STUN_IND_SEND</code></span></p></td> |
320 | <td> The Send method used in indication messages as defined | |
316 | <td>The Send method used in indication messages as defined | |
321 | 317 | by the TURN draft 12 |
322 | 318 | </td> |
323 | 319 | </tr> |
324 | 320 | <tr> |
325 | 321 | <td><p><a name="STUN-IND-DATA:CAPS"></a><span class="term"><code class="literal">STUN_IND_DATA</code></span></p></td> |
326 | <td> The Data method used in indication messages as defined | |
322 | <td>The Data method used in indication messages as defined | |
327 | 323 | by the TURN draft 12 |
328 | 324 | </td> |
329 | 325 | </tr> |
330 | 326 | <tr> |
331 | 327 | <td><p><a name="STUN-IND-CONNECT-STATUS:CAPS"></a><span class="term"><code class="literal">STUN_IND_CONNECT_STATUS</code></span></p></td> |
332 | <td> The Connect-Status method used in indication | |
328 | <td>The Connect-Status method used in indication | |
333 | 329 | messages as defined by the TURN draft 4 |
334 | 330 | </td> |
335 | 331 | </tr> |
336 | 332 | <tr> |
337 | 333 | <td><p><a name="STUN-CREATEPERMISSION:CAPS"></a><span class="term"><code class="literal">STUN_CREATEPERMISSION</code></span></p></td> |
338 | <td> The CreatePermission method as defined by | |
334 | <td>The CreatePermission method as defined by | |
339 | 335 | the TURN draft 12 |
340 | 336 | </td> |
341 | 337 | </tr> |
342 | 338 | <tr> |
343 | 339 | <td><p><a name="STUN-CHANNELBIND:CAPS"></a><span class="term"><code class="literal">STUN_CHANNELBIND</code></span></p></td> |
344 | <td> The ChannelBind method as defined by the TURN draft 12 | |
340 | <td>The ChannelBind method as defined by the TURN draft 12 | |
345 | 341 | </td> |
346 | 342 | </tr> |
347 | 343 | </tbody> |
420 | 416 | } StunAttribute; |
421 | 417 | </pre> |
422 | 418 | <p> |
423 | Known STUN attribute types as defined by various RFCs and drafts</p> | |
419 | Known STUN attribute types as defined by various RFCs and drafts | |
420 | </p> | |
424 | 421 | <div class="variablelist"><table border="0"> |
425 | 422 | <col align="left" valign="top"> |
426 | 423 | <tbody> |
427 | 424 | <tr> |
428 | 425 | <td><p><a name="STUN-ATTRIBUTE-MAPPED-ADDRESS:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_MAPPED_ADDRESS</code></span></p></td> |
429 | <td> The MAPPED-ADDRESS attribute as defined | |
426 | <td>The MAPPED-ADDRESS attribute as defined | |
430 | 427 | by RFC5389 |
431 | 428 | </td> |
432 | 429 | </tr> |
433 | 430 | <tr> |
434 | 431 | <td><p><a name="STUN-ATTRIBUTE-RESPONSE-ADDRESS:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_RESPONSE_ADDRESS</code></span></p></td> |
435 | <td> The RESPONSE-ADDRESS attribute as defined | |
432 | <td>The RESPONSE-ADDRESS attribute as defined | |
436 | 433 | by RFC3489 |
437 | 434 | </td> |
438 | 435 | </tr> |
439 | 436 | <tr> |
440 | 437 | <td><p><a name="STUN-ATTRIBUTE-CHANGE-REQUEST:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_CHANGE_REQUEST</code></span></p></td> |
441 | <td> The CHANGE-REQUEST attribute as defined by | |
438 | <td>The CHANGE-REQUEST attribute as defined by | |
442 | 439 | RFC3489 |
443 | 440 | </td> |
444 | 441 | </tr> |
445 | 442 | <tr> |
446 | 443 | <td><p><a name="STUN-ATTRIBUTE-SOURCE-ADDRESS:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_SOURCE_ADDRESS</code></span></p></td> |
447 | <td> The SOURCE-ADDRESS attribute as defined by | |
444 | <td>The SOURCE-ADDRESS attribute as defined by | |
448 | 445 | RFC3489 |
449 | 446 | </td> |
450 | 447 | </tr> |
451 | 448 | <tr> |
452 | 449 | <td><p><a name="STUN-ATTRIBUTE-CHANGED-ADDRESS:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_CHANGED_ADDRESS</code></span></p></td> |
453 | <td> The CHANGED-ADDRESS attribute as defined | |
450 | <td>The CHANGED-ADDRESS attribute as defined | |
454 | 451 | by RFC3489 |
455 | 452 | </td> |
456 | 453 | </tr> |
457 | 454 | <tr> |
458 | 455 | <td><p><a name="STUN-ATTRIBUTE-USERNAME:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_USERNAME</code></span></p></td> |
459 | <td> The USERNAME attribute as defined by RFC5389 | |
456 | <td>The USERNAME attribute as defined by RFC5389 | |
460 | 457 | </td> |
461 | 458 | </tr> |
462 | 459 | <tr> |
463 | 460 | <td><p><a name="STUN-ATTRIBUTE-PASSWORD:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_PASSWORD</code></span></p></td> |
464 | <td> The PASSWORD attribute as defined by RFC3489 | |
461 | <td>The PASSWORD attribute as defined by RFC3489 | |
465 | 462 | </td> |
466 | 463 | </tr> |
467 | 464 | <tr> |
468 | 465 | <td><p><a name="STUN-ATTRIBUTE-MESSAGE-INTEGRITY:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_MESSAGE_INTEGRITY</code></span></p></td> |
469 | <td> The MESSAGE-INTEGRITY attribute as defined | |
466 | <td>The MESSAGE-INTEGRITY attribute as defined | |
470 | 467 | by RFC5389 |
471 | 468 | </td> |
472 | 469 | </tr> |
473 | 470 | <tr> |
474 | 471 | <td><p><a name="STUN-ATTRIBUTE-ERROR-CODE:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_ERROR_CODE</code></span></p></td> |
475 | <td> The ERROR-CODE attribute as defined by RFC5389 | |
472 | <td>The ERROR-CODE attribute as defined by RFC5389 | |
476 | 473 | </td> |
477 | 474 | </tr> |
478 | 475 | <tr> |
479 | 476 | <td><p><a name="STUN-ATTRIBUTE-UNKNOWN-ATTRIBUTES:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_UNKNOWN_ATTRIBUTES</code></span></p></td> |
480 | <td> The UNKNOWN-ATTRIBUTES attribute as | |
477 | <td>The UNKNOWN-ATTRIBUTES attribute as | |
481 | 478 | defined by RFC5389 |
482 | 479 | </td> |
483 | 480 | </tr> |
484 | 481 | <tr> |
485 | 482 | <td><p><a name="STUN-ATTRIBUTE-REFLECTED-FROM:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_REFLECTED_FROM</code></span></p></td> |
486 | <td> The REFLECTED-FROM attribute as defined | |
483 | <td>The REFLECTED-FROM attribute as defined | |
487 | 484 | by RFC3489 |
488 | 485 | </td> |
489 | 486 | </tr> |
490 | 487 | <tr> |
491 | 488 | <td><p><a name="STUN-ATTRIBUTE-CHANNEL-NUMBER:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_CHANNEL_NUMBER</code></span></p></td> |
492 | <td> The CHANNEL-NUMBER attribute as defined by | |
489 | <td>The CHANNEL-NUMBER attribute as defined by | |
493 | 490 | TURN draft 09 and 12 |
494 | 491 | </td> |
495 | 492 | </tr> |
496 | 493 | <tr> |
497 | 494 | <td><p><a name="STUN-ATTRIBUTE-LIFETIME:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_LIFETIME</code></span></p></td> |
498 | <td> The LIFETIME attribute as defined by TURN | |
495 | <td>The LIFETIME attribute as defined by TURN | |
499 | 496 | draft 04, 09 and 12 |
500 | 497 | </td> |
501 | 498 | </tr> |
502 | 499 | <tr> |
503 | 500 | <td><p><a name="STUN-ATTRIBUTE-MAGIC-COOKIE:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_MAGIC_COOKIE</code></span></p></td> |
504 | <td> The MAGIC-COOKIE attribute as defined by | |
501 | <td>The MAGIC-COOKIE attribute as defined by | |
505 | 502 | the rosenberg-midcom TURN draft 08 |
506 | 503 | </td> |
507 | 504 | </tr> |
508 | 505 | <tr> |
509 | 506 | <td><p><a name="STUN-ATTRIBUTE-BANDWIDTH:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_BANDWIDTH</code></span></p></td> |
510 | <td> The BANDWIDTH attribute as defined by TURN draft 04 | |
507 | <td>The BANDWIDTH attribute as defined by TURN draft 04 | |
511 | 508 | </td> |
512 | 509 | </tr> |
513 | 510 | <tr> |
514 | 511 | <td><p><a name="STUN-ATTRIBUTE-DESTINATION-ADDRESS:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_DESTINATION_ADDRESS</code></span></p></td> |
515 | <td> The DESTINATION-ADDRESS attribute as | |
512 | <td>The DESTINATION-ADDRESS attribute as | |
516 | 513 | defined by the rosenberg-midcom TURN draft 08 |
517 | 514 | </td> |
518 | 515 | </tr> |
519 | 516 | <tr> |
520 | 517 | <td><p><a name="STUN-ATTRIBUTE-REMOTE-ADDRESS:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_REMOTE_ADDRESS</code></span></p></td> |
521 | <td> The REMOTE-ADDRESS attribute as defined by | |
518 | <td>The REMOTE-ADDRESS attribute as defined by | |
522 | 519 | TURN draft 04 |
523 | 520 | </td> |
524 | 521 | </tr> |
525 | 522 | <tr> |
526 | 523 | <td><p><a name="STUN-ATTRIBUTE-PEER-ADDRESS:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_PEER_ADDRESS</code></span></p></td> |
527 | <td> The PEER-ADDRESS attribute as defined by | |
524 | <td>The PEER-ADDRESS attribute as defined by | |
528 | 525 | TURN draft 09 |
529 | 526 | </td> |
530 | 527 | </tr> |
531 | 528 | <tr> |
532 | 529 | <td><p><a name="STUN-ATTRIBUTE-XOR-PEER-ADDRESS:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_XOR_PEER_ADDRESS</code></span></p></td> |
533 | <td> The XOR-PEER-ADDRESS attribute as defined | |
530 | <td>The XOR-PEER-ADDRESS attribute as defined | |
534 | 531 | by TURN draft 12 |
535 | 532 | </td> |
536 | 533 | </tr> |
537 | 534 | <tr> |
538 | 535 | <td><p><a name="STUN-ATTRIBUTE-DATA:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_DATA</code></span></p></td> |
539 | <td> The DATA attribute as defined by TURN draft 04, | |
536 | <td>The DATA attribute as defined by TURN draft 04, | |
540 | 537 | 09 and 12 |
541 | 538 | </td> |
542 | 539 | </tr> |
543 | 540 | <tr> |
544 | 541 | <td><p><a name="STUN-ATTRIBUTE-REALM:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_REALM</code></span></p></td> |
545 | <td> The REALM attribute as defined by RFC5389 | |
542 | <td>The REALM attribute as defined by RFC5389 | |
546 | 543 | </td> |
547 | 544 | </tr> |
548 | 545 | <tr> |
549 | 546 | <td><p><a name="STUN-ATTRIBUTE-NONCE:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_NONCE</code></span></p></td> |
550 | <td> The NONCE attribute as defined by RFC5389 | |
547 | <td>The NONCE attribute as defined by RFC5389 | |
551 | 548 | </td> |
552 | 549 | </tr> |
553 | 550 | <tr> |
554 | 551 | <td><p><a name="STUN-ATTRIBUTE-RELAY-ADDRESS:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_RELAY_ADDRESS</code></span></p></td> |
555 | <td> The RELAY-ADDRESS attribute as defined by | |
552 | <td>The RELAY-ADDRESS attribute as defined by | |
556 | 553 | TURN draft 04 |
557 | 554 | </td> |
558 | 555 | </tr> |
559 | 556 | <tr> |
560 | 557 | <td><p><a name="STUN-ATTRIBUTE-RELAYED-ADDRESS:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_RELAYED_ADDRESS</code></span></p></td> |
561 | <td> The RELAYED-ADDRESS attribute as defined by | |
558 | <td>The RELAYED-ADDRESS attribute as defined by | |
562 | 559 | TURN draft 09 |
563 | 560 | </td> |
564 | 561 | </tr> |
565 | 562 | <tr> |
566 | 563 | <td><p><a name="STUN-ATTRIBUTE-XOR-RELAYED-ADDRESS:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_XOR_RELAYED_ADDRESS</code></span></p></td> |
567 | <td> The XOR-RELAYED-ADDRESS attribute as | |
564 | <td>The XOR-RELAYED-ADDRESS attribute as | |
568 | 565 | defined by TURN draft 12 |
569 | 566 | </td> |
570 | 567 | </tr> |
571 | 568 | <tr> |
572 | 569 | <td><p><a name="STUN-ATTRIBUTE-REQUESTED-ADDRESS-TYPE:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_REQUESTED_ADDRESS_TYPE</code></span></p></td> |
573 | <td> The REQUESTED-ADDRESS-TYPE attribute | |
570 | <td>The REQUESTED-ADDRESS-TYPE attribute | |
574 | 571 | as defined by TURN-IPV6 draft 05 |
575 | 572 | </td> |
576 | 573 | </tr> |
577 | 574 | <tr> |
578 | 575 | <td><p><a name="STUN-ATTRIBUTE-REQUESTED-PORT-PROPS:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_REQUESTED_PORT_PROPS</code></span></p></td> |
579 | <td> The REQUESTED-PORT-PROPS attribute | |
576 | <td>The REQUESTED-PORT-PROPS attribute | |
580 | 577 | as defined by TURN draft 04 |
581 | 578 | </td> |
582 | 579 | </tr> |
583 | 580 | <tr> |
584 | 581 | <td><p><a name="STUN-ATTRIBUTE-REQUESTED-PROPS:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_REQUESTED_PROPS</code></span></p></td> |
585 | <td> The REQUESTED-PROPS attribute as defined | |
582 | <td>The REQUESTED-PROPS attribute as defined | |
586 | 583 | by TURN draft 09 |
587 | 584 | </td> |
588 | 585 | </tr> |
589 | 586 | <tr> |
590 | 587 | <td><p><a name="STUN-ATTRIBUTE-EVEN-PORT:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_EVEN_PORT</code></span></p></td> |
591 | <td> The EVEN-PORT attribute as defined by TURN draft 12 | |
588 | <td>The EVEN-PORT attribute as defined by TURN draft 12 | |
592 | 589 | </td> |
593 | 590 | </tr> |
594 | 591 | <tr> |
595 | 592 | <td><p><a name="STUN-ATTRIBUTE-REQUESTED-TRANSPORT:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_REQUESTED_TRANSPORT</code></span></p></td> |
596 | <td> The REQUESTED-TRANSPORT attribute as | |
593 | <td>The REQUESTED-TRANSPORT attribute as | |
597 | 594 | defined by TURN draft 12 |
598 | 595 | </td> |
599 | 596 | </tr> |
600 | 597 | <tr> |
601 | 598 | <td><p><a name="STUN-ATTRIBUTE-DONT-FRAGMENT:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_DONT_FRAGMENT</code></span></p></td> |
602 | <td> The DONT-FRAGMENT attribute as defined | |
599 | <td>The DONT-FRAGMENT attribute as defined | |
603 | 600 | by TURN draft 12 |
604 | 601 | </td> |
605 | 602 | </tr> |
606 | 603 | <tr> |
607 | 604 | <td><p><a name="STUN-ATTRIBUTE-XOR-MAPPED-ADDRESS:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_XOR_MAPPED_ADDRESS</code></span></p></td> |
608 | <td> The XOR-MAPPED-ADDRESS attribute as | |
605 | <td>The XOR-MAPPED-ADDRESS attribute as | |
609 | 606 | defined by RFC5389 |
610 | 607 | </td> |
611 | 608 | </tr> |
612 | 609 | <tr> |
613 | 610 | <td><p><a name="STUN-ATTRIBUTE-TIMER-VAL:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_TIMER_VAL</code></span></p></td> |
614 | <td> The TIMER-VAL attribute as defined by TURN draft 04 | |
611 | <td>The TIMER-VAL attribute as defined by TURN draft 04 | |
615 | 612 | </td> |
616 | 613 | </tr> |
617 | 614 | <tr> |
618 | 615 | <td><p><a name="STUN-ATTRIBUTE-REQUESTED-IP:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_REQUESTED_IP</code></span></p></td> |
619 | <td> The REQUESTED-IP attribute as defined by | |
616 | <td>The REQUESTED-IP attribute as defined by | |
620 | 617 | TURN draft 04 |
621 | 618 | </td> |
622 | 619 | </tr> |
623 | 620 | <tr> |
624 | 621 | <td><p><a name="STUN-ATTRIBUTE-RESERVATION-TOKEN:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_RESERVATION_TOKEN</code></span></p></td> |
625 | <td> The RESERVATION-TOKEN attribute as defined | |
622 | <td>The RESERVATION-TOKEN attribute as defined | |
626 | 623 | by TURN draft 09 and 12 |
627 | 624 | </td> |
628 | 625 | </tr> |
629 | 626 | <tr> |
630 | 627 | <td><p><a name="STUN-ATTRIBUTE-CONNECT-STAT:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_CONNECT_STAT</code></span></p></td> |
631 | <td> The CONNECT-STAT attribute as defined by TURN | |
628 | <td>The CONNECT-STAT attribute as defined by TURN | |
632 | 629 | draft 04 |
633 | 630 | </td> |
634 | 631 | </tr> |
635 | 632 | <tr> |
636 | 633 | <td><p><a name="STUN-ATTRIBUTE-PRIORITY:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_PRIORITY</code></span></p></td> |
637 | <td> The PRIORITY attribute as defined by ICE draft 19 | |
634 | <td>The PRIORITY attribute as defined by ICE draft 19 | |
638 | 635 | </td> |
639 | 636 | </tr> |
640 | 637 | <tr> |
641 | 638 | <td><p><a name="STUN-ATTRIBUTE-USE-CANDIDATE:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_USE_CANDIDATE</code></span></p></td> |
642 | <td> The USE-CANDIDATE attribute as defined by | |
639 | <td>The USE-CANDIDATE attribute as defined by | |
643 | 640 | ICE draft 19 |
644 | 641 | </td> |
645 | 642 | </tr> |
646 | 643 | <tr> |
647 | 644 | <td><p><a name="STUN-ATTRIBUTE-OPTIONS:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_OPTIONS</code></span></p></td> |
648 | <td> The OPTIONS optional attribute as defined by | |
645 | <td>The OPTIONS optional attribute as defined by | |
649 | 646 | libjingle |
650 | 647 | </td> |
651 | 648 | </tr> |
652 | 649 | <tr> |
653 | 650 | <td><p><a name="STUN-ATTRIBUTE-SOFTWARE:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_SOFTWARE</code></span></p></td> |
654 | <td> The SOFTWARE optional attribute as defined by RFC5389 | |
651 | <td>The SOFTWARE optional attribute as defined by RFC5389 | |
655 | 652 | </td> |
656 | 653 | </tr> |
657 | 654 | <tr> |
658 | 655 | <td><p><a name="STUN-ATTRIBUTE-ALTERNATE-SERVER:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_ALTERNATE_SERVER</code></span></p></td> |
659 | <td> The ALTERNATE-SERVER optional attribute as | |
656 | <td>The ALTERNATE-SERVER optional attribute as | |
660 | 657 | defined by RFC5389 |
661 | 658 | </td> |
662 | 659 | </tr> |
663 | 660 | <tr> |
664 | 661 | <td><p><a name="STUN-ATTRIBUTE-FINGERPRINT:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_FINGERPRINT</code></span></p></td> |
665 | <td> The FINGERPRINT optional attribute as defined | |
662 | <td>The FINGERPRINT optional attribute as defined | |
666 | 663 | by RFC5389 |
667 | 664 | </td> |
668 | 665 | </tr> |
669 | 666 | <tr> |
670 | 667 | <td><p><a name="STUN-ATTRIBUTE-ICE-CONTROLLED:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_ICE_CONTROLLED</code></span></p></td> |
671 | <td> The ICE-CONTROLLED optional attribute as | |
668 | <td>The ICE-CONTROLLED optional attribute as | |
672 | 669 | defined by ICE draft 19 |
673 | 670 | </td> |
674 | 671 | </tr> |
675 | 672 | <tr> |
676 | 673 | <td><p><a name="STUN-ATTRIBUTE-ICE-CONTROLLING:CAPS"></a><span class="term"><code class="literal">STUN_ATTRIBUTE_ICE_CONTROLLING</code></span></p></td> |
677 | <td> The ICE-CONTROLLING optional attribute as | |
674 | <td>The ICE-CONTROLLING optional attribute as | |
678 | 675 | defined by ICE draft 19 |
679 | 676 | </td> |
680 | 677 | </tr> |
687 | 684 | <pre class="programlisting">typedef uint8_t StunTransactionId[STUN_MESSAGE_TRANS_ID_LEN]; |
688 | 685 | </pre> |
689 | 686 | <p> |
690 | A type that holds a STUN transaction id.</p> | |
687 | A type that holds a STUN transaction id. | |
688 | </p> | |
691 | 689 | </div> |
692 | 690 | <hr> |
693 | 691 | <div class="refsect2" title="enum StunError"> |
717 | 715 | } StunError; |
718 | 716 | </pre> |
719 | 717 | <p> |
720 | STUN error codes as defined by various RFCs and drafts</p> | |
718 | STUN error codes as defined by various RFCs and drafts | |
719 | </p> | |
721 | 720 | <div class="variablelist"><table border="0"> |
722 | 721 | <col align="left" valign="top"> |
723 | 722 | <tbody> |
724 | 723 | <tr> |
725 | 724 | <td><p><a name="STUN-ERROR-TRY-ALTERNATE:CAPS"></a><span class="term"><code class="literal">STUN_ERROR_TRY_ALTERNATE</code></span></p></td> |
726 | <td> The ERROR-CODE value for the | |
725 | <td>The ERROR-CODE value for the | |
727 | 726 | "Try Alternate" error as defined in RFC5389 |
728 | 727 | </td> |
729 | 728 | </tr> |
730 | 729 | <tr> |
731 | 730 | <td><p><a name="STUN-ERROR-BAD-REQUEST:CAPS"></a><span class="term"><code class="literal">STUN_ERROR_BAD_REQUEST</code></span></p></td> |
732 | <td> The ERROR-CODE value for the | |
731 | <td>The ERROR-CODE value for the | |
733 | 732 | "Bad Request" error as defined in RFC5389 |
734 | 733 | </td> |
735 | 734 | </tr> |
736 | 735 | <tr> |
737 | 736 | <td><p><a name="STUN-ERROR-UNAUTHORIZED:CAPS"></a><span class="term"><code class="literal">STUN_ERROR_UNAUTHORIZED</code></span></p></td> |
738 | <td> The ERROR-CODE value for the | |
737 | <td>The ERROR-CODE value for the | |
739 | 738 | "Unauthorized" error as defined in RFC5389 |
740 | 739 | </td> |
741 | 740 | </tr> |
742 | 741 | <tr> |
743 | 742 | <td><p><a name="STUN-ERROR-UNKNOWN-ATTRIBUTE:CAPS"></a><span class="term"><code class="literal">STUN_ERROR_UNKNOWN_ATTRIBUTE</code></span></p></td> |
744 | <td> The ERROR-CODE value for the | |
743 | <td>The ERROR-CODE value for the | |
745 | 744 | "Unknown Attribute" error as defined in RFC5389 |
746 | 745 | </td> |
747 | 746 | </tr> |
754 | 753 | </tr> |
755 | 754 | <tr> |
756 | 755 | <td><p><a name="STUN-ERROR-STALE-NONCE:CAPS"></a><span class="term"><code class="literal">STUN_ERROR_STALE_NONCE</code></span></p></td> |
757 | <td> The ERROR-CODE value for the | |
756 | <td>The ERROR-CODE value for the | |
758 | 757 | "Stale Nonce" error as defined in RFC5389 |
759 | 758 | </td> |
760 | 759 | </tr> |
761 | 760 | <tr> |
762 | 761 | <td><p><a name="STUN-ERROR-ACT-DST-ALREADY:CAPS"></a><span class="term"><code class="literal">STUN_ERROR_ACT_DST_ALREADY</code></span></p></td> |
763 | <td> The ERROR-CODE value for the | |
762 | <td>The ERROR-CODE value for the | |
764 | 763 | "Active Destination Already Set" error as defined in TURN draft 04. |
765 | 764 | </td> |
766 | 765 | </tr> |
767 | 766 | <tr> |
768 | 767 | <td><p><a name="STUN-ERROR-UNSUPPORTED-FAMILY:CAPS"></a><span class="term"><code class="literal">STUN_ERROR_UNSUPPORTED_FAMILY</code></span></p></td> |
769 | <td> The ERROR-CODE value for the | |
768 | <td>The ERROR-CODE value for the | |
770 | 769 | "Address Family not Supported" error as defined in TURN IPV6 Draft 05. |
771 | 770 | </td> |
772 | 771 | </tr> |
773 | 772 | <tr> |
774 | 773 | <td><p><a name="STUN-ERROR-WRONG-CREDENTIALS:CAPS"></a><span class="term"><code class="literal">STUN_ERROR_WRONG_CREDENTIALS</code></span></p></td> |
775 | <td> The ERROR-CODE value for the | |
774 | <td>The ERROR-CODE value for the | |
776 | 775 | "Wrong Credentials" error as defined in TURN Draft 12. |
777 | 776 | </td> |
778 | 777 | </tr> |
784 | 783 | </tr> |
785 | 784 | <tr> |
786 | 785 | <td><p><a name="STUN-ERROR-INVALID-IP:CAPS"></a><span class="term"><code class="literal">STUN_ERROR_INVALID_IP</code></span></p></td> |
787 | <td> The ERROR-CODE value for the | |
786 | <td>The ERROR-CODE value for the | |
788 | 787 | "Invalid IP Address" error as defined in TURN draft 04. |
789 | 788 | </td> |
790 | 789 | </tr> |
791 | 790 | <tr> |
792 | 791 | <td><p><a name="STUN-ERROR-INVALID-PORT:CAPS"></a><span class="term"><code class="literal">STUN_ERROR_INVALID_PORT</code></span></p></td> |
793 | <td> The ERROR-CODE value for the | |
792 | <td>The ERROR-CODE value for the | |
794 | 793 | "Invalid Port" error as defined in TURN draft 04. |
795 | 794 | </td> |
796 | 795 | </tr> |
797 | 796 | <tr> |
798 | 797 | <td><p><a name="STUN-ERROR-OP-TCP-ONLY:CAPS"></a><span class="term"><code class="literal">STUN_ERROR_OP_TCP_ONLY</code></span></p></td> |
799 | <td> The ERROR-CODE value for the | |
798 | <td>The ERROR-CODE value for the | |
800 | 799 | "Operation for TCP Only" error as defined in TURN draft 04. |
801 | 800 | </td> |
802 | 801 | </tr> |
803 | 802 | <tr> |
804 | 803 | <td><p><a name="STUN-ERROR-CONN-ALREADY:CAPS"></a><span class="term"><code class="literal">STUN_ERROR_CONN_ALREADY</code></span></p></td> |
805 | <td> The ERROR-CODE value for the | |
804 | <td>The ERROR-CODE value for the | |
806 | 805 | "Connection Already Exists" error as defined in TURN draft 04. |
807 | 806 | </td> |
808 | 807 | </tr> |
809 | 808 | <tr> |
810 | 809 | <td><p><a name="STUN-ERROR-ALLOCATION-QUOTA-REACHED:CAPS"></a><span class="term"><code class="literal">STUN_ERROR_ALLOCATION_QUOTA_REACHED</code></span></p></td> |
811 | <td> The ERROR-CODE value for the | |
810 | <td>The ERROR-CODE value for the | |
812 | 811 | "Allocation Quota Reached" error as defined in TURN draft 12. |
813 | 812 | </td> |
814 | 813 | </tr> |
820 | 819 | </tr> |
821 | 820 | <tr> |
822 | 821 | <td><p><a name="STUN-ERROR-SERVER-ERROR:CAPS"></a><span class="term"><code class="literal">STUN_ERROR_SERVER_ERROR</code></span></p></td> |
823 | <td> The ERROR-CODE value for the | |
822 | <td>The ERROR-CODE value for the | |
824 | 823 | "Server Error" error as defined in RFC5389 |
825 | 824 | </td> |
826 | 825 | </tr> |
827 | 826 | <tr> |
828 | 827 | <td><p><a name="STUN-ERROR-SERVER-CAPACITY:CAPS"></a><span class="term"><code class="literal">STUN_ERROR_SERVER_CAPACITY</code></span></p></td> |
829 | <td> The ERROR-CODE value for the | |
828 | <td>The ERROR-CODE value for the | |
830 | 829 | "Insufficient Capacity" error as defined in TURN draft 04. |
831 | 830 | </td> |
832 | 831 | </tr> |
833 | 832 | <tr> |
834 | 833 | <td><p><a name="STUN-ERROR-INSUFFICIENT-CAPACITY:CAPS"></a><span class="term"><code class="literal">STUN_ERROR_INSUFFICIENT_CAPACITY</code></span></p></td> |
835 | <td> The ERROR-CODE value for the | |
834 | <td>The ERROR-CODE value for the | |
836 | 835 | "Insufficient Capacity" error as defined in TURN draft 12. |
837 | 836 | </td> |
838 | 837 | </tr> |
839 | 838 | <tr> |
840 | 839 | <td><p><a name="STUN-ERROR-MAX:CAPS"></a><span class="term"><code class="literal">STUN_ERROR_MAX</code></span></p></td> |
841 | <td> The maximum possible ERROR-CODE value as defined by RFC 5389. | |
840 | <td>The maximum possible ERROR-CODE value as defined by RFC 5389. | |
842 | 841 | </td> |
843 | 842 | </tr> |
844 | 843 | </tbody> |
859 | 858 | <p> |
860 | 859 | The return value of most stun_message_* functions. |
861 | 860 | This enum will report on whether an operation was successful or not |
862 | and what error occured if any.</p> | |
861 | and what error occured if any. | |
862 | </p> | |
863 | 863 | <div class="variablelist"><table border="0"> |
864 | 864 | <col align="left" valign="top"> |
865 | 865 | <tbody> |
866 | 866 | <tr> |
867 | 867 | <td><p><a name="STUN-MESSAGE-RETURN-SUCCESS:CAPS"></a><span class="term"><code class="literal">STUN_MESSAGE_RETURN_SUCCESS</code></span></p></td> |
868 | <td> The operation was successful | |
868 | <td>The operation was successful | |
869 | 869 | </td> |
870 | 870 | </tr> |
871 | 871 | <tr> |
872 | 872 | <td><p><a name="STUN-MESSAGE-RETURN-NOT-FOUND:CAPS"></a><span class="term"><code class="literal">STUN_MESSAGE_RETURN_NOT_FOUND</code></span></p></td> |
873 | <td> The attribute was not found | |
873 | <td>The attribute was not found | |
874 | 874 | </td> |
875 | 875 | </tr> |
876 | 876 | <tr> |
877 | 877 | <td><p><a name="STUN-MESSAGE-RETURN-INVALID:CAPS"></a><span class="term"><code class="literal">STUN_MESSAGE_RETURN_INVALID</code></span></p></td> |
878 | <td> The argument or data is invalid | |
878 | <td>The argument or data is invalid | |
879 | 879 | </td> |
880 | 880 | </tr> |
881 | 881 | <tr> |
882 | 882 | <td><p><a name="STUN-MESSAGE-RETURN-NOT-ENOUGH-SPACE:CAPS"></a><span class="term"><code class="literal">STUN_MESSAGE_RETURN_NOT_ENOUGH_SPACE</code></span></p></td> |
883 | <td> There is not enough space in the | |
883 | <td>There is not enough space in the | |
884 | 884 | message to append data to it, or not enough in an argument to fill it with |
885 | 885 | the data requested. |
886 | 886 | </td> |
887 | 887 | </tr> |
888 | 888 | <tr> |
889 | 889 | <td><p><a name="STUN-MESSAGE-RETURN-UNSUPPORTED-ADDRESS:CAPS"></a><span class="term"><code class="literal">STUN_MESSAGE_RETURN_UNSUPPORTED_ADDRESS</code></span></p></td> |
890 | <td> The address in the arguments or in | |
890 | <td>The address in the arguments or in | |
891 | 891 | the STUN message is not supported. |
892 | 892 | </td> |
893 | 893 | </tr> |
901 | 901 | </pre> |
902 | 902 | <p> |
903 | 903 | 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 |
904 | data to validate does not hold a complete STUN message</p> | |
904 | data to validate does not hold a complete STUN message | |
905 | </p> | |
905 | 906 | </div> |
906 | 907 | <hr> |
907 | 908 | <div class="refsect2" title="STUN_MESSAGE_BUFFER_INVALID"> |
910 | 911 | </pre> |
911 | 912 | <p> |
912 | 913 | 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 |
913 | data to validate is not a valid STUN message</p> | |
914 | data to validate is not a valid STUN message | |
915 | </p> | |
914 | 916 | </div> |
915 | 917 | <hr> |
916 | 918 | <div class="refsect2" title="stun_message_init ()"> |
917 | 919 | <a name="stun-message-init"></a><h3>stun_message_init ()</h3> |
918 | <pre class="programlisting"><span class="returnvalue">bool</span> stun_message_init (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
919 | <a class="link" href="libnice-StunMessage.html#StunClass" title="enum StunClass"><span class="returnvalue">StunClass</span></a> c, | |
920 | <a class="link" href="libnice-StunMessage.html#StunMethod" title="enum StunMethod"><span class="returnvalue">StunMethod</span></a> m, | |
921 | const <a class="link" href="libnice-StunMessage.html#StunTransactionId" title="StunTransactionId"><span class="returnvalue">StunTransactionId</span></a> id);</pre> | |
922 | <p> | |
923 | Initializes a STUN message buffer, with no attributes.</p> | |
924 | <div class="variablelist"><table border="0"> | |
925 | <col align="left" valign="top"> | |
926 | <tbody> | |
927 | <tr> | |
928 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
929 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to initialize | |
920 | <pre class="programlisting"><span class="returnvalue">bool</span> stun_message_init (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
921 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunClass" title="enum StunClass"><span class="type">StunClass</span></a> c</code></em>, | |
922 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMethod" title="enum StunMethod"><span class="type">StunMethod</span></a> m</code></em>, | |
923 | <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> | |
924 | <p> | |
925 | Initializes a STUN message buffer, with no attributes. | |
926 | </p> | |
927 | <div class="variablelist"><table border="0"> | |
928 | <col align="left" valign="top"> | |
929 | <tbody> | |
930 | <tr> | |
931 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
932 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to initialize | |
930 | 933 | </td> |
931 | 934 | </tr> |
932 | 935 | <tr> |
933 | 936 | <td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td> |
934 | <td> STUN message class (host byte order) | |
937 | <td>STUN message class (host byte order) | |
935 | 938 | </td> |
936 | 939 | </tr> |
937 | 940 | <tr> |
938 | 941 | <td><p><span class="term"><em class="parameter"><code>m</code></em> :</span></p></td> |
939 | <td> STUN message method (host byte order) | |
942 | <td>STUN message method (host byte order) | |
940 | 943 | </td> |
941 | 944 | </tr> |
942 | 945 | <tr> |
943 | 946 | <td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td> |
944 | <td> 16-bytes transaction ID | |
945 | </td> | |
946 | </tr> | |
947 | <tr> | |
948 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> | |
949 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the initialization was successful | |
947 | <td>16-bytes transaction ID | |
948 | </td> | |
949 | </tr> | |
950 | <tr> | |
951 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> | |
952 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the initialization was successful | |
950 | 953 | </td> |
951 | 954 | </tr> |
952 | 955 | </tbody> |
955 | 958 | <hr> |
956 | 959 | <div class="refsect2" title="stun_message_length ()"> |
957 | 960 | <a name="stun-message-length"></a><h3>stun_message_length ()</h3> |
958 | <pre class="programlisting"><span class="returnvalue">uint16_t</span> stun_message_length (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg);</pre> | |
959 | <p> | |
960 | Get the length of the message (including the header)</p> | |
961 | <div class="variablelist"><table border="0"> | |
962 | <col align="left" valign="top"> | |
963 | <tbody> | |
964 | <tr> | |
965 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
966 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
961 | <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="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>);</pre> | |
962 | <p> | |
963 | Get the length of the message (including the header) | |
964 | </p> | |
965 | <div class="variablelist"><table border="0"> | |
966 | <col align="left" valign="top"> | |
967 | <tbody> | |
968 | <tr> | |
969 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
970 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
967 | 971 | </td> |
968 | 972 | </tr> |
969 | 973 | <tr> |
977 | 981 | <hr> |
978 | 982 | <div class="refsect2" title="stun_message_find ()"> |
979 | 983 | <a name="stun-message-find"></a><h3>stun_message_find ()</h3> |
980 | <pre class="programlisting">const <span class="returnvalue">void</span> * stun_message_find (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
981 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
982 | <span class="returnvalue">uint16_t</span> *palen);</pre> | |
983 | <p> | |
984 | Finds an attribute in a STUN message and fetches its content</p> | |
985 | <div class="variablelist"><table border="0"> | |
986 | <col align="left" valign="top"> | |
987 | <tbody> | |
988 | <tr> | |
989 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
990 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
984 | <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="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
985 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
986 | <em class="parameter"><code><span class="type">uint16_t</span> *palen</code></em>);</pre> | |
987 | <p> | |
988 | Finds an attribute in a STUN message and fetches its content | |
989 | </p> | |
990 | <div class="variablelist"><table border="0"> | |
991 | <col align="left" valign="top"> | |
992 | <tbody> | |
993 | <tr> | |
994 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
995 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
991 | 996 | </td> |
992 | 997 | </tr> |
993 | 998 | <tr> |
994 | 999 | <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> |
995 | <td> The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to find | |
1000 | <td>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to find | |
996 | 1001 | </td> |
997 | 1002 | </tr> |
998 | 1003 | <tr> |
999 | 1004 | <td><p><span class="term"><em class="parameter"><code>palen</code></em> :</span></p></td> |
1000 | <td> A pointer to store the length of the attribute | |
1005 | <td>A pointer to store the length of the attribute | |
1001 | 1006 | </td> |
1002 | 1007 | </tr> |
1003 | 1008 | <tr> |
1012 | 1017 | <hr> |
1013 | 1018 | <div class="refsect2" title="stun_message_find_flag ()"> |
1014 | 1019 | <a name="stun-message-find-flag"></a><h3>stun_message_find_flag ()</h3> |
1015 | <pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> stun_message_find_flag (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
1016 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type);</pre> | |
1017 | <p> | |
1018 | Looks for a flag attribute within a valid STUN message.</p> | |
1019 | <div class="variablelist"><table border="0"> | |
1020 | <col align="left" valign="top"> | |
1021 | <tbody> | |
1022 | <tr> | |
1023 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1024 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1020 | <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="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
1021 | <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> | |
1022 | <p> | |
1023 | Looks for a flag attribute within a valid STUN message. | |
1024 | </p> | |
1025 | <div class="variablelist"><table border="0"> | |
1026 | <col align="left" valign="top"> | |
1027 | <tbody> | |
1028 | <tr> | |
1029 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1030 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1025 | 1031 | </td> |
1026 | 1032 | </tr> |
1027 | 1033 | <tr> |
1028 | 1034 | <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> |
1029 | <td> The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to find | |
1035 | <td>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to find | |
1030 | 1036 | </td> |
1031 | 1037 | </tr> |
1032 | 1038 | <tr> |
1041 | 1047 | <hr> |
1042 | 1048 | <div class="refsect2" title="stun_message_find32 ()"> |
1043 | 1049 | <a name="stun-message-find32"></a><h3>stun_message_find32 ()</h3> |
1044 | <pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> stun_message_find32 (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
1045 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
1046 | <span class="returnvalue">uint32_t</span> *pval);</pre> | |
1047 | <p> | |
1048 | Extracts a 32-bits attribute from a STUN message.</p> | |
1049 | <div class="variablelist"><table border="0"> | |
1050 | <col align="left" valign="top"> | |
1051 | <tbody> | |
1052 | <tr> | |
1053 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1054 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1050 | <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="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
1051 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
1052 | <em class="parameter"><code><span class="type">uint32_t</span> *pval</code></em>);</pre> | |
1053 | <p> | |
1054 | Extracts a 32-bits attribute from a STUN message. | |
1055 | </p> | |
1056 | <div class="variablelist"><table border="0"> | |
1057 | <col align="left" valign="top"> | |
1058 | <tbody> | |
1059 | <tr> | |
1060 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1061 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1055 | 1062 | </td> |
1056 | 1063 | </tr> |
1057 | 1064 | <tr> |
1058 | 1065 | <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> |
1059 | <td> The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to find | |
1066 | <td>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to find | |
1060 | 1067 | </td> |
1061 | 1068 | </tr> |
1062 | 1069 | <tr> |
1063 | 1070 | <td><p><span class="term"><em class="parameter"><code>pval</code></em> :</span></p></td> |
1064 | <td> A pointer where to store the value (host byte order) | |
1071 | <td>A pointer where to store the value (host byte order) | |
1065 | 1072 | </td> |
1066 | 1073 | </tr> |
1067 | 1074 | <tr> |
1077 | 1084 | <hr> |
1078 | 1085 | <div class="refsect2" title="stun_message_find64 ()"> |
1079 | 1086 | <a name="stun-message-find64"></a><h3>stun_message_find64 ()</h3> |
1080 | <pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> stun_message_find64 (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
1081 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
1082 | <span class="returnvalue">uint64_t</span> *pval);</pre> | |
1083 | <p> | |
1084 | Extracts a 64-bits attribute from a STUN message.</p> | |
1085 | <div class="variablelist"><table border="0"> | |
1086 | <col align="left" valign="top"> | |
1087 | <tbody> | |
1088 | <tr> | |
1089 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1090 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1087 | <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="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
1088 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
1089 | <em class="parameter"><code><span class="type">uint64_t</span> *pval</code></em>);</pre> | |
1090 | <p> | |
1091 | Extracts a 64-bits attribute from a STUN message. | |
1092 | </p> | |
1093 | <div class="variablelist"><table border="0"> | |
1094 | <col align="left" valign="top"> | |
1095 | <tbody> | |
1096 | <tr> | |
1097 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1098 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1091 | 1099 | </td> |
1092 | 1100 | </tr> |
1093 | 1101 | <tr> |
1094 | 1102 | <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> |
1095 | <td> The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to find | |
1103 | <td>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to find | |
1096 | 1104 | </td> |
1097 | 1105 | </tr> |
1098 | 1106 | <tr> |
1099 | 1107 | <td><p><span class="term"><em class="parameter"><code>pval</code></em> :</span></p></td> |
1100 | <td> A pointer where to store the value (host byte order) | |
1108 | <td>A pointer where to store the value (host byte order) | |
1101 | 1109 | </td> |
1102 | 1110 | </tr> |
1103 | 1111 | <tr> |
1113 | 1121 | <hr> |
1114 | 1122 | <div class="refsect2" title="stun_message_find_string ()"> |
1115 | 1123 | <a name="stun-message-find-string"></a><h3>stun_message_find_string ()</h3> |
1116 | <pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> stun_message_find_string (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
1117 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
1118 | <span class="returnvalue">char</span> *buf, | |
1119 | <span class="returnvalue">size_t</span> buflen);</pre> | |
1120 | <p> | |
1121 | Extracts an UTF-8 string from a valid STUN message.</p> | |
1122 | <div class="variablelist"><table border="0"> | |
1123 | <col align="left" valign="top"> | |
1124 | <tbody> | |
1125 | <tr> | |
1126 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1127 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1124 | <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="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
1125 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
1126 | <em class="parameter"><code><span class="type">char</span> *buf</code></em>, | |
1127 | <em class="parameter"><code><span class="type">size_t</span> buflen</code></em>);</pre> | |
1128 | <p> | |
1129 | Extracts an UTF-8 string from a valid STUN message. | |
1130 | </p> | |
1131 | <div class="variablelist"><table border="0"> | |
1132 | <col align="left" valign="top"> | |
1133 | <tbody> | |
1134 | <tr> | |
1135 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1136 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1128 | 1137 | </td> |
1129 | 1138 | </tr> |
1130 | 1139 | <tr> |
1131 | 1140 | <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> |
1132 | <td> The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to find | |
1141 | <td>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to find | |
1133 | 1142 | </td> |
1134 | 1143 | </tr> |
1135 | 1144 | <tr> |
1136 | 1145 | <td><p><span class="term"><em class="parameter"><code>buf</code></em> :</span></p></td> |
1137 | <td> A pointer where to store the data | |
1146 | <td>A pointer where to store the data | |
1138 | 1147 | </td> |
1139 | 1148 | </tr> |
1140 | 1149 | <tr> |
1141 | 1150 | <td><p><span class="term"><em class="parameter"><code>buflen</code></em> :</span></p></td> |
1142 | <td> The length of the buffer | |
1151 | <td>The length of the buffer | |
1143 | 1152 | </td> |
1144 | 1153 | </tr> |
1145 | 1154 | <tr> |
1165 | 1174 | <hr> |
1166 | 1175 | <div class="refsect2" title="stun_message_find_addr ()"> |
1167 | 1176 | <a name="stun-message-find-addr"></a><h3>stun_message_find_addr ()</h3> |
1168 | <pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> stun_message_find_addr (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
1169 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
1170 | <span class="returnvalue">struct sockaddr</span> *addr, | |
1171 | <span class="returnvalue">socklen_t</span> *addrlen);</pre> | |
1172 | <p> | |
1173 | Extracts a network address attribute from a STUN message.</p> | |
1174 | <div class="variablelist"><table border="0"> | |
1175 | <col align="left" valign="top"> | |
1176 | <tbody> | |
1177 | <tr> | |
1178 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1179 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1177 | <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="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
1178 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
1179 | <em class="parameter"><code><span class="type">struct sockaddr</span> *addr</code></em>, | |
1180 | <em class="parameter"><code><span class="type">socklen_t</span> *addrlen</code></em>);</pre> | |
1181 | <p> | |
1182 | Extracts a network address attribute from a STUN message. | |
1183 | </p> | |
1184 | <div class="variablelist"><table border="0"> | |
1185 | <col align="left" valign="top"> | |
1186 | <tbody> | |
1187 | <tr> | |
1188 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1189 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1180 | 1190 | </td> |
1181 | 1191 | </tr> |
1182 | 1192 | <tr> |
1183 | 1193 | <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> |
1184 | <td> The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to find | |
1194 | <td>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to find | |
1185 | 1195 | </td> |
1186 | 1196 | </tr> |
1187 | 1197 | <tr> |
1188 | 1198 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> |
1189 | <td> The <span class="type">sockaddr</span> to be filled | |
1199 | <td>The <span class="type">sockaddr</span> to be filled | |
1190 | 1200 | </td> |
1191 | 1201 | </tr> |
1192 | 1202 | <tr> |
1193 | 1203 | <td><p><span class="term"><em class="parameter"><code>addrlen</code></em> :</span></p></td> |
1194 | <td> The size of the <em class="parameter"><code>addr</code></em> variable. Must be set to the size of the | |
1204 | <td>The size of the <em class="parameter"><code>addr</code></em> variable. Must be set to the size of the | |
1195 | 1205 | <em class="parameter"><code>addr</code></em> socket address and will be set to the size of the extracted socket |
1196 | 1206 | address. |
1197 | 1207 | </td> |
1210 | 1220 | <hr> |
1211 | 1221 | <div class="refsect2" title="stun_message_find_xor_addr ()"> |
1212 | 1222 | <a name="stun-message-find-xor-addr"></a><h3>stun_message_find_xor_addr ()</h3> |
1213 | <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 (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
1214 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
1215 | <span class="returnvalue">struct sockaddr</span> *addr, | |
1216 | <span class="returnvalue">socklen_t</span> *addrlen);</pre> | |
1217 | <p> | |
1218 | Extracts an obfuscated network address attribute from a STUN message.</p> | |
1219 | <div class="variablelist"><table border="0"> | |
1220 | <col align="left" valign="top"> | |
1221 | <tbody> | |
1222 | <tr> | |
1223 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1224 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1223 | <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="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
1224 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
1225 | <em class="parameter"><code><span class="type">struct sockaddr</span> *addr</code></em>, | |
1226 | <em class="parameter"><code><span class="type">socklen_t</span> *addrlen</code></em>);</pre> | |
1227 | <p> | |
1228 | Extracts an obfuscated network address attribute from a STUN message. | |
1229 | </p> | |
1230 | <div class="variablelist"><table border="0"> | |
1231 | <col align="left" valign="top"> | |
1232 | <tbody> | |
1233 | <tr> | |
1234 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1235 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1225 | 1236 | </td> |
1226 | 1237 | </tr> |
1227 | 1238 | <tr> |
1228 | 1239 | <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> |
1229 | <td> The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to find | |
1240 | <td>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to find | |
1230 | 1241 | </td> |
1231 | 1242 | </tr> |
1232 | 1243 | <tr> |
1233 | 1244 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> |
1234 | <td> The <span class="type">sockaddr</span> to be filled | |
1245 | <td>The <span class="type">sockaddr</span> to be filled | |
1235 | 1246 | </td> |
1236 | 1247 | </tr> |
1237 | 1248 | <tr> |
1238 | 1249 | <td><p><span class="term"><em class="parameter"><code>addrlen</code></em> :</span></p></td> |
1239 | <td> The size of the <em class="parameter"><code>addr</code></em> variable. Must be set to the size of the | |
1250 | <td>The size of the <em class="parameter"><code>addr</code></em> variable. Must be set to the size of the | |
1240 | 1251 | <em class="parameter"><code>addr</code></em> socket address and will be set to the size of the |
1241 | 1252 | extracted socket address. |
1242 | 1253 | </td> |
1255 | 1266 | <hr> |
1256 | 1267 | <div class="refsect2" title="stun_message_find_xor_addr_full ()"> |
1257 | 1268 | <a name="stun-message-find-xor-addr-full"></a><h3>stun_message_find_xor_addr_full ()</h3> |
1258 | <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 (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
1259 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
1260 | <span class="returnvalue">struct sockaddr</span> *addr, | |
1261 | <span class="returnvalue">socklen_t</span> *addrlen, | |
1262 | <span class="returnvalue">uint32_t</span> magic_cookie);</pre> | |
1263 | <p> | |
1264 | Extracts an obfuscated network address attribute from a STUN message.</p> | |
1265 | <div class="variablelist"><table border="0"> | |
1266 | <col align="left" valign="top"> | |
1267 | <tbody> | |
1268 | <tr> | |
1269 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1270 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1269 | <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="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
1270 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
1271 | <em class="parameter"><code><span class="type">struct sockaddr</span> *addr</code></em>, | |
1272 | <em class="parameter"><code><span class="type">socklen_t</span> *addrlen</code></em>, | |
1273 | <em class="parameter"><code><span class="type">uint32_t</span> magic_cookie</code></em>);</pre> | |
1274 | <p> | |
1275 | Extracts an obfuscated network address attribute from a STUN message. | |
1276 | </p> | |
1277 | <div class="variablelist"><table border="0"> | |
1278 | <col align="left" valign="top"> | |
1279 | <tbody> | |
1280 | <tr> | |
1281 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1282 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1271 | 1283 | </td> |
1272 | 1284 | </tr> |
1273 | 1285 | <tr> |
1274 | 1286 | <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> |
1275 | <td> The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to find | |
1287 | <td>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to find | |
1276 | 1288 | </td> |
1277 | 1289 | </tr> |
1278 | 1290 | <tr> |
1279 | 1291 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> |
1280 | <td> The <span class="type">sockaddr</span> to be filled | |
1292 | <td>The <span class="type">sockaddr</span> to be filled | |
1281 | 1293 | </td> |
1282 | 1294 | </tr> |
1283 | 1295 | <tr> |
1284 | 1296 | <td><p><span class="term"><em class="parameter"><code>addrlen</code></em> :</span></p></td> |
1285 | <td> The size of the <em class="parameter"><code>addr</code></em> variable. Must be set to the size of the | |
1297 | <td>The size of the <em class="parameter"><code>addr</code></em> variable. Must be set to the size of the | |
1286 | 1298 | <em class="parameter"><code>addr</code></em> socket address and will be set to the size of the |
1287 | 1299 | extracted socket address. |
1288 | 1300 | </td> |
1289 | 1301 | </tr> |
1290 | 1302 | <tr> |
1291 | 1303 | <td><p><span class="term"><em class="parameter"><code>magic_cookie</code></em> :</span></p></td> |
1292 | <td> The magic cookie to use to XOR the address. | |
1304 | <td>The magic cookie to use to XOR the address. | |
1293 | 1305 | </td> |
1294 | 1306 | </tr> |
1295 | 1307 | <tr> |
1306 | 1318 | <hr> |
1307 | 1319 | <div class="refsect2" title="stun_message_find_error ()"> |
1308 | 1320 | <a name="stun-message-find-error"></a><h3>stun_message_find_error ()</h3> |
1309 | <pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> stun_message_find_error (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
1310 | <span class="returnvalue">int</span> *code);</pre> | |
1311 | <p> | |
1312 | Extract the error response code from a STUN message</p> | |
1313 | <div class="variablelist"><table border="0"> | |
1314 | <col align="left" valign="top"> | |
1315 | <tbody> | |
1316 | <tr> | |
1317 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1318 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1321 | <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="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
1322 | <em class="parameter"><code><span class="type">int</span> *code</code></em>);</pre> | |
1323 | <p> | |
1324 | Extract the error response code from a STUN message | |
1325 | </p> | |
1326 | <div class="variablelist"><table border="0"> | |
1327 | <col align="left" valign="top"> | |
1328 | <tbody> | |
1329 | <tr> | |
1330 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1331 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1319 | 1332 | </td> |
1320 | 1333 | </tr> |
1321 | 1334 | <tr> |
1322 | 1335 | <td><p><span class="term"><em class="parameter"><code>code</code></em> :</span></p></td> |
1323 | <td> A pointer where to store the value | |
1336 | <td>A pointer where to store the value | |
1324 | 1337 | </td> |
1325 | 1338 | </tr> |
1326 | 1339 | <tr> |
1335 | 1348 | <hr> |
1336 | 1349 | <div class="refsect2" title="stun_message_append ()"> |
1337 | 1350 | <a name="stun-message-append"></a><h3>stun_message_append ()</h3> |
1338 | <pre class="programlisting"><span class="returnvalue">void</span> * stun_message_append (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
1339 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
1340 | <span class="returnvalue">size_t</span> length);</pre> | |
1341 | <p> | |
1342 | Reserves room for appending an attribute to an unfinished STUN message.</p> | |
1343 | <div class="variablelist"><table border="0"> | |
1344 | <col align="left" valign="top"> | |
1345 | <tbody> | |
1346 | <tr> | |
1347 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1348 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1351 | <pre class="programlisting"><span class="returnvalue">void</span> * stun_message_append (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
1352 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
1353 | <em class="parameter"><code><span class="type">size_t</span> length</code></em>);</pre> | |
1354 | <p> | |
1355 | Reserves room for appending an attribute to an unfinished STUN message. | |
1356 | </p> | |
1357 | <div class="variablelist"><table border="0"> | |
1358 | <col align="left" valign="top"> | |
1359 | <tbody> | |
1360 | <tr> | |
1361 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1362 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1349 | 1363 | </td> |
1350 | 1364 | </tr> |
1351 | 1365 | <tr> |
1352 | 1366 | <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> |
1353 | <td> The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append | |
1367 | <td>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append | |
1354 | 1368 | </td> |
1355 | 1369 | </tr> |
1356 | 1370 | <tr> |
1357 | 1371 | <td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td> |
1358 | <td> The length of the attribute | |
1372 | <td>The length of the attribute | |
1359 | 1373 | </td> |
1360 | 1374 | </tr> |
1361 | 1375 | <tr> |
1371 | 1385 | <hr> |
1372 | 1386 | <div class="refsect2" title="stun_message_append_bytes ()"> |
1373 | 1387 | <a name="stun-message-append-bytes"></a><h3>stun_message_append_bytes ()</h3> |
1374 | <pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> stun_message_append_bytes (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
1375 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
1376 | const <span class="returnvalue">void</span> *data, | |
1377 | <span class="returnvalue">size_t</span> len);</pre> | |
1378 | <p> | |
1379 | Appends a binary value to a STUN message</p> | |
1380 | <div class="variablelist"><table border="0"> | |
1381 | <col align="left" valign="top"> | |
1382 | <tbody> | |
1383 | <tr> | |
1384 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1385 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1388 | <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="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
1389 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
1390 | <em class="parameter"><code>const <span class="type">void</span> *data</code></em>, | |
1391 | <em class="parameter"><code><span class="type">size_t</span> len</code></em>);</pre> | |
1392 | <p> | |
1393 | Appends a binary value to a STUN message | |
1394 | </p> | |
1395 | <div class="variablelist"><table border="0"> | |
1396 | <col align="left" valign="top"> | |
1397 | <tbody> | |
1398 | <tr> | |
1399 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1400 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1386 | 1401 | </td> |
1387 | 1402 | </tr> |
1388 | 1403 | <tr> |
1389 | 1404 | <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> |
1390 | <td> The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append | |
1405 | <td>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append | |
1391 | 1406 | </td> |
1392 | 1407 | </tr> |
1393 | 1408 | <tr> |
1394 | 1409 | <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td> |
1395 | <td> The data to append | |
1410 | <td>The data to append | |
1396 | 1411 | </td> |
1397 | 1412 | </tr> |
1398 | 1413 | <tr> |
1399 | 1414 | <td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td> |
1400 | <td> The length of the attribute | |
1415 | <td>The length of the attribute | |
1401 | 1416 | </td> |
1402 | 1417 | </tr> |
1403 | 1418 | <tr> |
1411 | 1426 | <hr> |
1412 | 1427 | <div class="refsect2" title="stun_message_append_flag ()"> |
1413 | 1428 | <a name="stun-message-append-flag"></a><h3>stun_message_append_flag ()</h3> |
1414 | <pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> stun_message_append_flag (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
1415 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type);</pre> | |
1416 | <p> | |
1417 | Appends an empty flag attribute to a STUN message</p> | |
1418 | <div class="variablelist"><table border="0"> | |
1419 | <col align="left" valign="top"> | |
1420 | <tbody> | |
1421 | <tr> | |
1422 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1423 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1429 | <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="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
1430 | <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> | |
1431 | <p> | |
1432 | Appends an empty flag attribute to a STUN message | |
1433 | </p> | |
1434 | <div class="variablelist"><table border="0"> | |
1435 | <col align="left" valign="top"> | |
1436 | <tbody> | |
1437 | <tr> | |
1438 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1439 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1424 | 1440 | </td> |
1425 | 1441 | </tr> |
1426 | 1442 | <tr> |
1427 | 1443 | <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> |
1428 | <td> The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append | |
1444 | <td>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append | |
1429 | 1445 | </td> |
1430 | 1446 | </tr> |
1431 | 1447 | <tr> |
1439 | 1455 | <hr> |
1440 | 1456 | <div class="refsect2" title="stun_message_append32 ()"> |
1441 | 1457 | <a name="stun-message-append32"></a><h3>stun_message_append32 ()</h3> |
1442 | <pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> stun_message_append32 (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
1443 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
1444 | <span class="returnvalue">uint32_t</span> value);</pre> | |
1445 | <p> | |
1446 | Appends a 32-bits value attribute to a STUN message</p> | |
1447 | <div class="variablelist"><table border="0"> | |
1448 | <col align="left" valign="top"> | |
1449 | <tbody> | |
1450 | <tr> | |
1451 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1452 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1458 | <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="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
1459 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
1460 | <em class="parameter"><code><span class="type">uint32_t</span> value</code></em>);</pre> | |
1461 | <p> | |
1462 | Appends a 32-bits value attribute to a STUN message | |
1463 | </p> | |
1464 | <div class="variablelist"><table border="0"> | |
1465 | <col align="left" valign="top"> | |
1466 | <tbody> | |
1467 | <tr> | |
1468 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1469 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1453 | 1470 | </td> |
1454 | 1471 | </tr> |
1455 | 1472 | <tr> |
1456 | 1473 | <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> |
1457 | <td> The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append | |
1474 | <td>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append | |
1458 | 1475 | </td> |
1459 | 1476 | </tr> |
1460 | 1477 | <tr> |
1461 | 1478 | <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td> |
1462 | <td> The value to append (host byte order) | |
1479 | <td>The value to append (host byte order) | |
1463 | 1480 | </td> |
1464 | 1481 | </tr> |
1465 | 1482 | <tr> |
1473 | 1490 | <hr> |
1474 | 1491 | <div class="refsect2" title="stun_message_append64 ()"> |
1475 | 1492 | <a name="stun-message-append64"></a><h3>stun_message_append64 ()</h3> |
1476 | <pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> stun_message_append64 (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
1477 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
1478 | <span class="returnvalue">uint64_t</span> value);</pre> | |
1479 | <p> | |
1480 | Appends a 64-bits value attribute to a STUN message</p> | |
1481 | <div class="variablelist"><table border="0"> | |
1482 | <col align="left" valign="top"> | |
1483 | <tbody> | |
1484 | <tr> | |
1485 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1486 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1493 | <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="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
1494 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
1495 | <em class="parameter"><code><span class="type">uint64_t</span> value</code></em>);</pre> | |
1496 | <p> | |
1497 | Appends a 64-bits value attribute to a STUN message | |
1498 | </p> | |
1499 | <div class="variablelist"><table border="0"> | |
1500 | <col align="left" valign="top"> | |
1501 | <tbody> | |
1502 | <tr> | |
1503 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1504 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1487 | 1505 | </td> |
1488 | 1506 | </tr> |
1489 | 1507 | <tr> |
1490 | 1508 | <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> |
1491 | <td> The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append | |
1509 | <td>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append | |
1492 | 1510 | </td> |
1493 | 1511 | </tr> |
1494 | 1512 | <tr> |
1495 | 1513 | <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td> |
1496 | <td> The value to append (host byte order) | |
1514 | <td>The value to append (host byte order) | |
1497 | 1515 | </td> |
1498 | 1516 | </tr> |
1499 | 1517 | <tr> |
1507 | 1525 | <hr> |
1508 | 1526 | <div class="refsect2" title="stun_message_append_string ()"> |
1509 | 1527 | <a name="stun-message-append-string"></a><h3>stun_message_append_string ()</h3> |
1510 | <pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> stun_message_append_string (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
1511 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
1512 | const <span class="returnvalue">char</span> *str);</pre> | |
1513 | <p> | |
1514 | Adds an attribute from a NULL-terminated string to a STUN message</p> | |
1515 | <div class="variablelist"><table border="0"> | |
1516 | <col align="left" valign="top"> | |
1517 | <tbody> | |
1518 | <tr> | |
1519 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1520 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1528 | <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="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
1529 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
1530 | <em class="parameter"><code>const <span class="type">char</span> *str</code></em>);</pre> | |
1531 | <p> | |
1532 | Adds an attribute from a NULL-terminated string to a STUN message | |
1533 | </p> | |
1534 | <div class="variablelist"><table border="0"> | |
1535 | <col align="left" valign="top"> | |
1536 | <tbody> | |
1537 | <tr> | |
1538 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1539 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1521 | 1540 | </td> |
1522 | 1541 | </tr> |
1523 | 1542 | <tr> |
1524 | 1543 | <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> |
1525 | <td> The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append | |
1544 | <td>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append | |
1526 | 1545 | </td> |
1527 | 1546 | </tr> |
1528 | 1547 | <tr> |
1529 | 1548 | <td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td> |
1530 | <td> The string to append | |
1549 | <td>The string to append | |
1531 | 1550 | </td> |
1532 | 1551 | </tr> |
1533 | 1552 | <tr> |
1541 | 1560 | <hr> |
1542 | 1561 | <div class="refsect2" title="stun_message_append_addr ()"> |
1543 | 1562 | <a name="stun-message-append-addr"></a><h3>stun_message_append_addr ()</h3> |
1544 | <pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> stun_message_append_addr (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
1545 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
1546 | const <span class="returnvalue">struct sockaddr</span> *addr, | |
1547 | <span class="returnvalue">socklen_t</span> addrlen);</pre> | |
1548 | <p> | |
1549 | Append a network address attribute to a STUN message</p> | |
1550 | <div class="variablelist"><table border="0"> | |
1551 | <col align="left" valign="top"> | |
1552 | <tbody> | |
1553 | <tr> | |
1554 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1555 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1563 | <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="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
1564 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
1565 | <em class="parameter"><code>const <span class="type">struct sockaddr</span> *addr</code></em>, | |
1566 | <em class="parameter"><code><span class="type">socklen_t</span> addrlen</code></em>);</pre> | |
1567 | <p> | |
1568 | Append a network address attribute to a STUN message | |
1569 | </p> | |
1570 | <div class="variablelist"><table border="0"> | |
1571 | <col align="left" valign="top"> | |
1572 | <tbody> | |
1573 | <tr> | |
1574 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1575 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1556 | 1576 | </td> |
1557 | 1577 | </tr> |
1558 | 1578 | <tr> |
1559 | 1579 | <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> |
1560 | <td> The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append | |
1580 | <td>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append | |
1561 | 1581 | </td> |
1562 | 1582 | </tr> |
1563 | 1583 | <tr> |
1564 | 1584 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> |
1565 | <td> The <span class="type">sockaddr</span> to be append | |
1585 | <td>The <span class="type">sockaddr</span> to be append | |
1566 | 1586 | </td> |
1567 | 1587 | </tr> |
1568 | 1588 | <tr> |
1569 | 1589 | <td><p><span class="term"><em class="parameter"><code>addrlen</code></em> :</span></p></td> |
1570 | <td> The size of the <em class="parameter"><code>addr</code></em> variable. | |
1590 | <td>The size of the <em class="parameter"><code>addr</code></em> variable. | |
1571 | 1591 | </td> |
1572 | 1592 | </tr> |
1573 | 1593 | <tr> |
1583 | 1603 | <hr> |
1584 | 1604 | <div class="refsect2" title="stun_message_append_xor_addr ()"> |
1585 | 1605 | <a name="stun-message-append-xor-addr"></a><h3>stun_message_append_xor_addr ()</h3> |
1586 | <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 (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
1587 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
1588 | const <span class="returnvalue">struct sockaddr</span> *addr, | |
1589 | <span class="returnvalue">socklen_t</span> addrlen);</pre> | |
1590 | <p> | |
1591 | Append an obfuscated network address attribute to a STUN message</p> | |
1592 | <div class="variablelist"><table border="0"> | |
1593 | <col align="left" valign="top"> | |
1594 | <tbody> | |
1595 | <tr> | |
1596 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1597 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1606 | <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="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
1607 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
1608 | <em class="parameter"><code>const <span class="type">struct sockaddr</span> *addr</code></em>, | |
1609 | <em class="parameter"><code><span class="type">socklen_t</span> addrlen</code></em>);</pre> | |
1610 | <p> | |
1611 | Append an obfuscated network address attribute to a STUN message | |
1612 | </p> | |
1613 | <div class="variablelist"><table border="0"> | |
1614 | <col align="left" valign="top"> | |
1615 | <tbody> | |
1616 | <tr> | |
1617 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1618 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1598 | 1619 | </td> |
1599 | 1620 | </tr> |
1600 | 1621 | <tr> |
1601 | 1622 | <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> |
1602 | <td> The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append | |
1623 | <td>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append | |
1603 | 1624 | </td> |
1604 | 1625 | </tr> |
1605 | 1626 | <tr> |
1606 | 1627 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> |
1607 | <td> The <span class="type">sockaddr</span> to be append | |
1628 | <td>The <span class="type">sockaddr</span> to be append | |
1608 | 1629 | </td> |
1609 | 1630 | </tr> |
1610 | 1631 | <tr> |
1611 | 1632 | <td><p><span class="term"><em class="parameter"><code>addrlen</code></em> :</span></p></td> |
1612 | <td> The size of the <em class="parameter"><code>addr</code></em> variable. | |
1633 | <td>The size of the <em class="parameter"><code>addr</code></em> variable. | |
1613 | 1634 | </td> |
1614 | 1635 | </tr> |
1615 | 1636 | <tr> |
1625 | 1646 | <hr> |
1626 | 1647 | <div class="refsect2" title="stun_message_append_xor_addr_full ()"> |
1627 | 1648 | <a name="stun-message-append-xor-addr-full"></a><h3>stun_message_append_xor_addr_full ()</h3> |
1628 | <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 (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
1629 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type, | |
1630 | const <span class="returnvalue">struct sockaddr</span> *addr, | |
1631 | <span class="returnvalue">socklen_t</span> addrlen, | |
1632 | <span class="returnvalue">uint32_t</span> magic_cookie);</pre> | |
1633 | <p> | |
1634 | Append an obfuscated network address attribute from a STUN message.</p> | |
1635 | <div class="variablelist"><table border="0"> | |
1636 | <col align="left" valign="top"> | |
1637 | <tbody> | |
1638 | <tr> | |
1639 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1640 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1649 | <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="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
1650 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> type</code></em>, | |
1651 | <em class="parameter"><code>const <span class="type">struct sockaddr</span> *addr</code></em>, | |
1652 | <em class="parameter"><code><span class="type">socklen_t</span> addrlen</code></em>, | |
1653 | <em class="parameter"><code><span class="type">uint32_t</span> magic_cookie</code></em>);</pre> | |
1654 | <p> | |
1655 | Append an obfuscated network address attribute from a STUN message. | |
1656 | </p> | |
1657 | <div class="variablelist"><table border="0"> | |
1658 | <col align="left" valign="top"> | |
1659 | <tbody> | |
1660 | <tr> | |
1661 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1662 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1641 | 1663 | </td> |
1642 | 1664 | </tr> |
1643 | 1665 | <tr> |
1644 | 1666 | <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> |
1645 | <td> The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append | |
1667 | <td>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to append | |
1646 | 1668 | </td> |
1647 | 1669 | </tr> |
1648 | 1670 | <tr> |
1649 | 1671 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> |
1650 | <td> The <span class="type">sockaddr</span> to be append | |
1672 | <td>The <span class="type">sockaddr</span> to be append | |
1651 | 1673 | </td> |
1652 | 1674 | </tr> |
1653 | 1675 | <tr> |
1654 | 1676 | <td><p><span class="term"><em class="parameter"><code>addrlen</code></em> :</span></p></td> |
1655 | <td> The size of the <em class="parameter"><code>addr</code></em> variable. | |
1677 | <td>The size of the <em class="parameter"><code>addr</code></em> variable. | |
1656 | 1678 | </td> |
1657 | 1679 | </tr> |
1658 | 1680 | <tr> |
1659 | 1681 | <td><p><span class="term"><em class="parameter"><code>magic_cookie</code></em> :</span></p></td> |
1660 | <td> The magic cookie to use to XOR the address. | |
1682 | <td>The magic cookie to use to XOR the address. | |
1661 | 1683 | </td> |
1662 | 1684 | </tr> |
1663 | 1685 | <tr> |
1673 | 1695 | <hr> |
1674 | 1696 | <div class="refsect2" title="stun_message_append_error ()"> |
1675 | 1697 | <a name="stun-message-append-error"></a><h3>stun_message_append_error ()</h3> |
1676 | <pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn"><span class="returnvalue">StunMessageReturn</span></a> stun_message_append_error (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
1677 | <a class="link" href="libnice-StunMessage.html#StunError" title="enum StunError"><span class="returnvalue">StunError</span></a> code);</pre> | |
1698 | <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="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
1699 | <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> | |
1678 | 1700 | <p> |
1679 | 1701 | Appends the ERROR-CODE attribute to the STUN message and fills it according |
1680 | to <span class="type">code</span></p> | |
1681 | <div class="variablelist"><table border="0"> | |
1682 | <col align="left" valign="top"> | |
1683 | <tbody> | |
1684 | <tr> | |
1685 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1686 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1702 | to <span class="type">code</span> | |
1703 | </p> | |
1704 | <div class="variablelist"><table border="0"> | |
1705 | <col align="left" valign="top"> | |
1706 | <tbody> | |
1707 | <tr> | |
1708 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1709 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1687 | 1710 | </td> |
1688 | 1711 | </tr> |
1689 | 1712 | <tr> |
1690 | 1713 | <td><p><span class="term"><em class="parameter"><code>code</code></em> :</span></p></td> |
1691 | <td> The error code value | |
1714 | <td>The error code value | |
1692 | 1715 | </td> |
1693 | 1716 | </tr> |
1694 | 1717 | <tr> |
1702 | 1725 | <hr> |
1703 | 1726 | <div class="refsect2" title="stun_message_validate_buffer_length ()"> |
1704 | 1727 | <a name="stun-message-validate-buffer-length"></a><h3>stun_message_validate_buffer_length ()</h3> |
1705 | <pre class="programlisting"><span class="returnvalue">int</span> stun_message_validate_buffer_length (const <span class="returnvalue">uint8_t</span> *msg, | |
1706 | <span class="returnvalue">size_t</span> length);</pre> | |
1728 | <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>, | |
1729 | <em class="parameter"><code><span class="type">size_t</span> length</code></em>);</pre> | |
1707 | 1730 | <p> |
1708 | 1731 | This function will take a data buffer and will try to validate whether it is |
1709 | 1732 | a STUN message or if it's not or if it's an incomplete STUN message and will |
1710 | provide us with the length of the STUN message.</p> | |
1711 | <div class="variablelist"><table border="0"> | |
1712 | <col align="left" valign="top"> | |
1713 | <tbody> | |
1714 | <tr> | |
1715 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1716 | <td> The buffer to validate | |
1733 | provide us with the length of the STUN message. | |
1734 | </p> | |
1735 | <div class="variablelist"><table border="0"> | |
1736 | <col align="left" valign="top"> | |
1737 | <tbody> | |
1738 | <tr> | |
1739 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1740 | <td>The buffer to validate | |
1717 | 1741 | </td> |
1718 | 1742 | </tr> |
1719 | 1743 | <tr> |
1720 | 1744 | <td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td> |
1721 | <td> The length of the buffer | |
1745 | <td>The length of the buffer | |
1722 | 1746 | </td> |
1723 | 1747 | </tr> |
1724 | 1748 | <tr> |
1734 | 1758 | <hr> |
1735 | 1759 | <div class="refsect2" title="stun_message_id ()"> |
1736 | 1760 | <a name="stun-message-id"></a><h3>stun_message_id ()</h3> |
1737 | <pre class="programlisting"><span class="returnvalue">void</span> stun_message_id (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
1738 | <a class="link" href="libnice-StunMessage.html#StunTransactionId" title="StunTransactionId"><span class="returnvalue">StunTransactionId</span></a> id);</pre> | |
1739 | <p> | |
1740 | Retreive the STUN transaction id from a STUN message</p> | |
1741 | <div class="variablelist"><table border="0"> | |
1742 | <col align="left" valign="top"> | |
1743 | <tbody> | |
1744 | <tr> | |
1745 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1746 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1761 | <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="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
1762 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunTransactionId" title="StunTransactionId"><span class="type">StunTransactionId</span></a> id</code></em>);</pre> | |
1763 | <p> | |
1764 | Retreive the STUN transaction id from a STUN message | |
1765 | </p> | |
1766 | <div class="variablelist"><table border="0"> | |
1767 | <col align="left" valign="top"> | |
1768 | <tbody> | |
1769 | <tr> | |
1770 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1771 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1747 | 1772 | </td> |
1748 | 1773 | </tr> |
1749 | 1774 | <tr> |
1750 | 1775 | <td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td> |
1751 | <td> The <a class="link" href="libnice-StunMessage.html#StunTransactionId" title="StunTransactionId"><span class="type">StunTransactionId</span></a> to fill | |
1776 | <td>The <a class="link" href="libnice-StunMessage.html#StunTransactionId" title="StunTransactionId"><span class="type">StunTransactionId</span></a> to fill | |
1752 | 1777 | </td> |
1753 | 1778 | </tr> |
1754 | 1779 | </tbody> |
1757 | 1782 | <hr> |
1758 | 1783 | <div class="refsect2" title="stun_message_get_class ()"> |
1759 | 1784 | <a name="stun-message-get-class"></a><h3>stun_message_get_class ()</h3> |
1760 | <pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunClass" title="enum StunClass"><span class="returnvalue">StunClass</span></a> stun_message_get_class (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg);</pre> | |
1761 | <p> | |
1762 | Retreive the STUN class from a STUN message</p> | |
1763 | <div class="variablelist"><table border="0"> | |
1764 | <col align="left" valign="top"> | |
1765 | <tbody> | |
1766 | <tr> | |
1767 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1768 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1785 | <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="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>);</pre> | |
1786 | <p> | |
1787 | Retreive the STUN class from a STUN message | |
1788 | </p> | |
1789 | <div class="variablelist"><table border="0"> | |
1790 | <col align="left" valign="top"> | |
1791 | <tbody> | |
1792 | <tr> | |
1793 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1794 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1769 | 1795 | </td> |
1770 | 1796 | </tr> |
1771 | 1797 | <tr> |
1779 | 1805 | <hr> |
1780 | 1806 | <div class="refsect2" title="stun_message_get_method ()"> |
1781 | 1807 | <a name="stun-message-get-method"></a><h3>stun_message_get_method ()</h3> |
1782 | <pre class="programlisting"><a class="link" href="libnice-StunMessage.html#StunMethod" title="enum StunMethod"><span class="returnvalue">StunMethod</span></a> stun_message_get_method (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg);</pre> | |
1783 | <p> | |
1784 | Retreive the STUN method from a STUN message</p> | |
1785 | <div class="variablelist"><table border="0"> | |
1786 | <col align="left" valign="top"> | |
1787 | <tbody> | |
1788 | <tr> | |
1789 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1790 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1808 | <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="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>);</pre> | |
1809 | <p> | |
1810 | Retreive the STUN method from a STUN message | |
1811 | </p> | |
1812 | <div class="variablelist"><table border="0"> | |
1813 | <col align="left" valign="top"> | |
1814 | <tbody> | |
1815 | <tr> | |
1816 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1817 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1791 | 1818 | </td> |
1792 | 1819 | </tr> |
1793 | 1820 | <tr> |
1801 | 1828 | <hr> |
1802 | 1829 | <div class="refsect2" title="stun_message_has_attribute ()"> |
1803 | 1830 | <a name="stun-message-has-attribute"></a><h3>stun_message_has_attribute ()</h3> |
1804 | <pre class="programlisting"><span class="returnvalue">bool</span> stun_message_has_attribute (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
1805 | <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="returnvalue">StunAttribute</span></a> type);</pre> | |
1806 | <p> | |
1807 | Checks if an attribute is present within a STUN message.</p> | |
1808 | <div class="variablelist"><table border="0"> | |
1809 | <col align="left" valign="top"> | |
1810 | <tbody> | |
1811 | <tr> | |
1812 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1813 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1831 | <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="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
1832 | <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> | |
1833 | <p> | |
1834 | Checks if an attribute is present within a STUN message. | |
1835 | </p> | |
1836 | <div class="variablelist"><table border="0"> | |
1837 | <col align="left" valign="top"> | |
1838 | <tbody> | |
1839 | <tr> | |
1840 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1841 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1814 | 1842 | </td> |
1815 | 1843 | </tr> |
1816 | 1844 | <tr> |
1817 | 1845 | <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> |
1818 | <td> The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to look for | |
1819 | </td> | |
1820 | </tr> | |
1821 | <tr> | |
1822 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> | |
1823 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the attribute is found, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise | |
1846 | <td>The <a class="link" href="libnice-StunMessage.html#StunAttribute" title="enum StunAttribute"><span class="type">StunAttribute</span></a> to look for | |
1847 | </td> | |
1848 | </tr> | |
1849 | <tr> | |
1850 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> | |
1851 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the attribute is found, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise | |
1824 | 1852 | </td> |
1825 | 1853 | </tr> |
1826 | 1854 | </tbody> |
1829 | 1857 | <hr> |
1830 | 1858 | <div class="refsect2" title="stun_message_has_cookie ()"> |
1831 | 1859 | <a name="stun-message-has-cookie"></a><h3>stun_message_has_cookie ()</h3> |
1832 | <pre class="programlisting"><span class="returnvalue">bool</span> stun_message_has_cookie (const <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg);</pre> | |
1833 | <p> | |
1834 | Checks if the STUN message has a RFC5389 compatible cookie</p> | |
1835 | <div class="variablelist"><table border="0"> | |
1836 | <col align="left" valign="top"> | |
1837 | <tbody> | |
1838 | <tr> | |
1839 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1840 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1841 | </td> | |
1842 | </tr> | |
1843 | <tr> | |
1844 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> | |
1845 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the cookie is present, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise | |
1860 | <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="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>);</pre> | |
1861 | <p> | |
1862 | Checks if the STUN message has a RFC5389 compatible cookie | |
1863 | </p> | |
1864 | <div class="variablelist"><table border="0"> | |
1865 | <col align="left" valign="top"> | |
1866 | <tbody> | |
1867 | <tr> | |
1868 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> | |
1869 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
1870 | </td> | |
1871 | </tr> | |
1872 | <tr> | |
1873 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> | |
1874 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the cookie is present, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise | |
1846 | 1875 | </td> |
1847 | 1876 | </tr> |
1848 | 1877 | </tbody> |
1851 | 1880 | <hr> |
1852 | 1881 | <div class="refsect2" title="stun_optional ()"> |
1853 | 1882 | <a name="stun-optional"></a><h3>stun_optional ()</h3> |
1854 | <pre class="programlisting"><span class="returnvalue">bool</span> stun_optional (<span class="returnvalue">uint16_t</span> t);</pre> | |
1883 | <pre class="programlisting"><span class="returnvalue">bool</span> stun_optional (<em class="parameter"><code><span class="type">uint16_t</span> t</code></em>);</pre> | |
1855 | 1884 | <p> |
1856 | 1885 | Helper function that checks whether a STUN attribute is a mandatory |
1857 | or an optional attribute</p> | |
1886 | or an optional attribute | |
1887 | </p> | |
1858 | 1888 | <div class="variablelist"><table border="0"> |
1859 | 1889 | <col align="left" valign="top"> |
1860 | 1890 | <tbody> |
1861 | 1891 | <tr> |
1862 | 1892 | <td><p><span class="term"><em class="parameter"><code>t</code></em> :</span></p></td> |
1863 | <td> An attribute type | |
1864 | </td> | |
1865 | </tr> | |
1866 | <tr> | |
1867 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> | |
1868 | <td> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the attribute is an optional one | |
1893 | <td>An attribute type | |
1894 | </td> | |
1895 | </tr> | |
1896 | <tr> | |
1897 | <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> | |
1898 | <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the attribute is an optional one | |
1869 | 1899 | </td> |
1870 | 1900 | </tr> |
1871 | 1901 | </tbody> |
1874 | 1904 | <hr> |
1875 | 1905 | <div class="refsect2" title="stun_strerror ()"> |
1876 | 1906 | <a name="stun-strerror"></a><h3>stun_strerror ()</h3> |
1877 | <pre class="programlisting">const <span class="returnvalue">char</span> * stun_strerror (<a class="link" href="libnice-StunMessage.html#StunError" title="enum StunError"><span class="returnvalue">StunError</span></a> code);</pre> | |
1878 | <p> | |
1879 | Transforms a STUN error-code into a human readable string</p> | |
1907 | <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> | |
1908 | <p> | |
1909 | Transforms a STUN error-code into a human readable string | |
1910 | </p> | |
1880 | 1911 | <div class="variablelist"><table border="0"> |
1881 | 1912 | <col align="left" valign="top"> |
1882 | 1913 | <tbody> |
1883 | 1914 | <tr> |
1884 | 1915 | <td><p><span class="term"><em class="parameter"><code>code</code></em> :</span></p></td> |
1885 | <td> host-byte order error code | |
1916 | <td>host-byte order error code | |
1886 | 1917 | </td> |
1887 | 1918 | </tr> |
1888 | 1919 | <tr> |
1901 | 1932 | </div> |
1902 | 1933 | <div class="footer"> |
1903 | 1934 | <hr> |
1904 | Generated by GTK-Doc V1.13</div> | |
1935 | Generated by GTK-Doc V1.15</div> | |
1905 | 1936 | </body> |
1906 | 1937 | </html>⏎ |
7 | 7 | <link rel="up" href="ch04.html" title="STUN usages"> |
8 | 8 | <link rel="prev" href="libnice-ICE.html" title="ICE"> |
9 | 9 | <link rel="next" href="libnice-Timer.html" title="Timer"> |
10 | <meta name="generator" content="GTK-Doc V1.13 (XML mode)"> | |
10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> | |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | <link rel="part" href="pt01.html" title="Part I. ICE Library"> | |
13 | <link rel="chapter" href="ch01.html" title=""> | |
14 | <link rel="chapter" href="ch02.html" title="Libnice helper functions"> | |
15 | <link rel="part" href="pt02.html" title="Part II. STUN Library"> | |
16 | <link rel="chapter" href="ch03.html" title=""> | |
17 | <link rel="chapter" href="ch04.html" title="STUN usages"> | |
18 | <link rel="part" href="pt03.html" title="Part III. Pseudo TCP Socket implementation"> | |
19 | <link rel="chapter" href="ch05.html" title=""> | |
20 | 12 | </head> |
21 | 13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
22 | 14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
54 | 46 | enum <a class="link" href="libnice-TURN.html#StunUsageTurnCompatibility" title="enum StunUsageTurnCompatibility">StunUsageTurnCompatibility</a>; |
55 | 47 | enum <a class="link" href="libnice-TURN.html#StunUsageTurnRequestPorts" title="enum StunUsageTurnRequestPorts">StunUsageTurnRequestPorts</a>; |
56 | 48 | enum <a class="link" href="libnice-TURN.html#StunUsageTurnReturn" title="enum StunUsageTurnReturn">StunUsageTurnReturn</a>; |
57 | <span class="returnvalue">size_t</span> <a class="link" href="libnice-TURN.html#stun-usage-turn-create" title="stun_usage_turn_create ()">stun_usage_turn_create</a> (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
58 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
59 | <span class="returnvalue">uint8_t</span> *buffer, | |
60 | <span class="returnvalue">size_t</span> buffer_len, | |
61 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *previous_response, | |
62 | <a class="link" href="libnice-TURN.html#StunUsageTurnRequestPorts" title="enum StunUsageTurnRequestPorts"><span class="returnvalue">StunUsageTurnRequestPorts</span></a> request_ports, | |
63 | <span class="returnvalue">int32_t</span> bandwidth, | |
64 | <span class="returnvalue">int32_t</span> lifetime, | |
65 | <span class="returnvalue">uint8_t</span> *username, | |
66 | <span class="returnvalue">size_t</span> username_len, | |
67 | <span class="returnvalue">uint8_t</span> *password, | |
68 | <span class="returnvalue">size_t</span> password_len, | |
69 | <a class="link" href="libnice-TURN.html#StunUsageTurnCompatibility" title="enum StunUsageTurnCompatibility"><span class="returnvalue">StunUsageTurnCompatibility</span></a> compatibility); | |
70 | <span class="returnvalue">size_t</span> <a class="link" href="libnice-TURN.html#stun-usage-turn-create-refresh" title="stun_usage_turn_create_refresh ()">stun_usage_turn_create_refresh</a> (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
71 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
72 | <span class="returnvalue">uint8_t</span> *buffer, | |
73 | <span class="returnvalue">size_t</span> buffer_len, | |
74 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *previous_response, | |
75 | <span class="returnvalue">int32_t</span> lifetime, | |
76 | <span class="returnvalue">uint8_t</span> *username, | |
77 | <span class="returnvalue">size_t</span> username_len, | |
78 | <span class="returnvalue">uint8_t</span> *password, | |
79 | <span class="returnvalue">size_t</span> password_len, | |
80 | <a class="link" href="libnice-TURN.html#StunUsageTurnCompatibility" title="enum StunUsageTurnCompatibility"><span class="returnvalue">StunUsageTurnCompatibility</span></a> compatibility); | |
81 | <a class="link" href="libnice-TURN.html#StunUsageTurnReturn" title="enum StunUsageTurnReturn"><span class="returnvalue">StunUsageTurnReturn</span></a> <a class="link" href="libnice-TURN.html#stun-usage-turn-process" title="stun_usage_turn_process ()">stun_usage_turn_process</a> (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
82 | <span class="returnvalue">struct sockaddr</span> *relay_addr, | |
83 | <span class="returnvalue">socklen_t</span> *relay_addrlen, | |
84 | <span class="returnvalue">struct sockaddr</span> *addr, | |
85 | <span class="returnvalue">socklen_t</span> *addrlen, | |
86 | <span class="returnvalue">struct sockaddr</span> *alternate_server, | |
87 | <span class="returnvalue">socklen_t</span> *alternate_server_len, | |
88 | <span class="returnvalue">uint32_t</span> *bandwidth, | |
89 | <span class="returnvalue">uint32_t</span> *lifetime, | |
90 | <a class="link" href="libnice-TURN.html#StunUsageTurnCompatibility" title="enum StunUsageTurnCompatibility"><span class="returnvalue">StunUsageTurnCompatibility</span></a> compatibility); | |
91 | <a class="link" href="libnice-TURN.html#StunUsageTurnReturn" title="enum StunUsageTurnReturn"><span class="returnvalue">StunUsageTurnReturn</span></a> <a class="link" href="libnice-TURN.html#stun-usage-turn-refresh-process" title="stun_usage_turn_refresh_process ()">stun_usage_turn_refresh_process</a> (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
92 | <span class="returnvalue">uint32_t</span> *lifetime, | |
93 | <a class="link" href="libnice-TURN.html#StunUsageTurnCompatibility" title="enum StunUsageTurnCompatibility"><span class="returnvalue">StunUsageTurnCompatibility</span></a> compatibility); | |
49 | <span class="returnvalue">size_t</span> <a class="link" href="libnice-TURN.html#stun-usage-turn-create" title="stun_usage_turn_create ()">stun_usage_turn_create</a> (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
50 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
51 | <em class="parameter"><code><span class="type">uint8_t</span> *buffer</code></em>, | |
52 | <em class="parameter"><code><span class="type">size_t</span> buffer_len</code></em>, | |
53 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *previous_response</code></em>, | |
54 | <em class="parameter"><code><a class="link" href="libnice-TURN.html#StunUsageTurnRequestPorts" title="enum StunUsageTurnRequestPorts"><span class="type">StunUsageTurnRequestPorts</span></a> request_ports</code></em>, | |
55 | <em class="parameter"><code><span class="type">int32_t</span> bandwidth</code></em>, | |
56 | <em class="parameter"><code><span class="type">int32_t</span> lifetime</code></em>, | |
57 | <em class="parameter"><code><span class="type">uint8_t</span> *username</code></em>, | |
58 | <em class="parameter"><code><span class="type">size_t</span> username_len</code></em>, | |
59 | <em class="parameter"><code><span class="type">uint8_t</span> *password</code></em>, | |
60 | <em class="parameter"><code><span class="type">size_t</span> password_len</code></em>, | |
61 | <em class="parameter"><code><a class="link" href="libnice-TURN.html#StunUsageTurnCompatibility" title="enum StunUsageTurnCompatibility"><span class="type">StunUsageTurnCompatibility</span></a> compatibility</code></em>); | |
62 | <span class="returnvalue">size_t</span> <a class="link" href="libnice-TURN.html#stun-usage-turn-create-refresh" title="stun_usage_turn_create_refresh ()">stun_usage_turn_create_refresh</a> (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
63 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
64 | <em class="parameter"><code><span class="type">uint8_t</span> *buffer</code></em>, | |
65 | <em class="parameter"><code><span class="type">size_t</span> buffer_len</code></em>, | |
66 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *previous_response</code></em>, | |
67 | <em class="parameter"><code><span class="type">int32_t</span> lifetime</code></em>, | |
68 | <em class="parameter"><code><span class="type">uint8_t</span> *username</code></em>, | |
69 | <em class="parameter"><code><span class="type">size_t</span> username_len</code></em>, | |
70 | <em class="parameter"><code><span class="type">uint8_t</span> *password</code></em>, | |
71 | <em class="parameter"><code><span class="type">size_t</span> password_len</code></em>, | |
72 | <em class="parameter"><code><a class="link" href="libnice-TURN.html#StunUsageTurnCompatibility" title="enum StunUsageTurnCompatibility"><span class="type">StunUsageTurnCompatibility</span></a> compatibility</code></em>); | |
73 | <a class="link" href="libnice-TURN.html#StunUsageTurnReturn" title="enum StunUsageTurnReturn"><span class="returnvalue">StunUsageTurnReturn</span></a> <a class="link" href="libnice-TURN.html#stun-usage-turn-process" title="stun_usage_turn_process ()">stun_usage_turn_process</a> (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
74 | <em class="parameter"><code><span class="type">struct sockaddr</span> *relay_addr</code></em>, | |
75 | <em class="parameter"><code><span class="type">socklen_t</span> *relay_addrlen</code></em>, | |
76 | <em class="parameter"><code><span class="type">struct sockaddr</span> *addr</code></em>, | |
77 | <em class="parameter"><code><span class="type">socklen_t</span> *addrlen</code></em>, | |
78 | <em class="parameter"><code><span class="type">struct sockaddr</span> *alternate_server</code></em>, | |
79 | <em class="parameter"><code><span class="type">socklen_t</span> *alternate_server_len</code></em>, | |
80 | <em class="parameter"><code><span class="type">uint32_t</span> *bandwidth</code></em>, | |
81 | <em class="parameter"><code><span class="type">uint32_t</span> *lifetime</code></em>, | |
82 | <em class="parameter"><code><a class="link" href="libnice-TURN.html#StunUsageTurnCompatibility" title="enum StunUsageTurnCompatibility"><span class="type">StunUsageTurnCompatibility</span></a> compatibility</code></em>); | |
83 | <a class="link" href="libnice-TURN.html#StunUsageTurnReturn" title="enum StunUsageTurnReturn"><span class="returnvalue">StunUsageTurnReturn</span></a> <a class="link" href="libnice-TURN.html#stun-usage-turn-refresh-process" title="stun_usage_turn_refresh_process ()">stun_usage_turn_refresh_process</a> (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
84 | <em class="parameter"><code><span class="type">uint32_t</span> *lifetime</code></em>, | |
85 | <em class="parameter"><code><a class="link" href="libnice-TURN.html#StunUsageTurnCompatibility" title="enum StunUsageTurnCompatibility"><span class="type">StunUsageTurnCompatibility</span></a> compatibility</code></em>); | |
94 | 86 | </pre> |
95 | 87 | </div> |
96 | 88 | <div class="refsect1" title="Description"> |
99 | 91 | The STUN TURN usage allows for easily creating and parsing STUN Allocate |
100 | 92 | requests and responses used for TURN. The API allows you to create a new |
101 | 93 | allocation or refresh an existing one as well as to parse a response to |
102 | an allocate or refresh request.</p> | |
94 | an allocate or refresh request. | |
95 | </p> | |
103 | 96 | </div> |
104 | 97 | <div class="refsect1" title="Details"> |
105 | 98 | <a name="libnice-TURN.details"></a><h2>Details</h2> |
112 | 105 | } StunUsageTurnCompatibility; |
113 | 106 | </pre> |
114 | 107 | <p> |
115 | Specifies which TURN specification compatibility to use</p> | |
108 | Specifies which TURN specification compatibility to use | |
109 | </p> | |
116 | 110 | <div class="variablelist"><table border="0"> |
117 | 111 | <col align="left" valign="top"> |
118 | 112 | <tbody> |
119 | 113 | <tr> |
120 | 114 | <td><p><a name="STUN-USAGE-TURN-COMPATIBILITY-DRAFT9:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_TURN_COMPATIBILITY_DRAFT9</code></span></p></td> |
121 | <td> Use the specification compatible with | |
115 | <td>Use the specification compatible with | |
122 | 116 | TURN Draft 09 |
123 | 117 | </td> |
124 | 118 | </tr> |
125 | 119 | <tr> |
126 | 120 | <td><p><a name="STUN-USAGE-TURN-COMPATIBILITY-GOOGLE:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_TURN_COMPATIBILITY_GOOGLE</code></span></p></td> |
127 | <td> Use the specification compatible with | |
121 | <td>Use the specification compatible with | |
128 | 122 | Google Talk's relay server |
129 | 123 | </td> |
130 | 124 | </tr> |
131 | 125 | <tr> |
132 | 126 | <td><p><a name="STUN-USAGE-TURN-COMPATIBILITY-MSN:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_TURN_COMPATIBILITY_MSN</code></span></p></td> |
133 | <td> Use the specification compatible with | |
127 | <td>Use the specification compatible with | |
134 | 128 | MSN TURN servers |
135 | 129 | </td> |
136 | 130 | </tr> |
148 | 142 | </pre> |
149 | 143 | <p> |
150 | 144 | This enum is used to specify which port configuration you want when creating |
151 | a new Allocation</p> | |
145 | a new Allocation | |
146 | </p> | |
152 | 147 | <div class="variablelist"><table border="0"> |
153 | 148 | <col align="left" valign="top"> |
154 | 149 | <tbody> |
155 | 150 | <tr> |
156 | 151 | <td><p><a name="STUN-USAGE-TURN-REQUEST-PORT-NORMAL:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_TURN_REQUEST_PORT_NORMAL</code></span></p></td> |
157 | <td> Request a normal port | |
152 | <td>Request a normal port | |
158 | 153 | </td> |
159 | 154 | </tr> |
160 | 155 | <tr> |
161 | 156 | <td><p><a name="STUN-USAGE-TURN-REQUEST-PORT-EVEN:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_TURN_REQUEST_PORT_EVEN</code></span></p></td> |
162 | <td> Request an even port | |
157 | <td>Request an even port | |
163 | 158 | </td> |
164 | 159 | </tr> |
165 | 160 | <tr> |
166 | 161 | <td><p><a name="STUN-USAGE-TURN-REQUEST-PORT-EVEN-AND-RESERVE:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_TURN_REQUEST_PORT_EVEN_AND_RESERVE</code></span></p></td> |
167 | <td> Request an even port and | |
162 | <td>Request an even port and | |
168 | 163 | reserve the next higher port |
169 | 164 | </td> |
170 | 165 | </tr> |
185 | 180 | <p> |
186 | 181 | Return value of <a class="link" href="libnice-TURN.html#stun-usage-turn-process" title="stun_usage_turn_process ()"><code class="function">stun_usage_turn_process()</code></a> and |
187 | 182 | <a class="link" href="libnice-TURN.html#stun-usage-turn-refresh-process" title="stun_usage_turn_refresh_process ()"><code class="function">stun_usage_turn_refresh_process()</code></a> which allows you to see what status the |
188 | function call returned.</p> | |
183 | function call returned. | |
184 | </p> | |
189 | 185 | <div class="variablelist"><table border="0"> |
190 | 186 | <col align="left" valign="top"> |
191 | 187 | <tbody> |
192 | 188 | <tr> |
193 | 189 | <td><p><a name="STUN-USAGE-TURN-RETURN-RELAY-SUCCESS:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_TURN_RETURN_RELAY_SUCCESS</code></span></p></td> |
194 | <td> The response was successful and a relay | |
190 | <td>The response was successful and a relay | |
195 | 191 | address is provided |
196 | 192 | </td> |
197 | 193 | </tr> |
198 | 194 | <tr> |
199 | 195 | <td><p><a name="STUN-USAGE-TURN-RETURN-MAPPED-SUCCESS:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_TURN_RETURN_MAPPED_SUCCESS</code></span></p></td> |
200 | <td> The response was successful and a | |
196 | <td>The response was successful and a | |
201 | 197 | relay address as well as a mapped address are provided |
202 | 198 | </td> |
203 | 199 | </tr> |
204 | 200 | <tr> |
205 | 201 | <td><p><a name="STUN-USAGE-TURN-RETURN-ERROR:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_TURN_RETURN_ERROR</code></span></p></td> |
206 | <td> The response resulted in an error | |
202 | <td>The response resulted in an error | |
207 | 203 | </td> |
208 | 204 | </tr> |
209 | 205 | <tr> |
210 | 206 | <td><p><a name="STUN-USAGE-TURN-RETURN-INVALID:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_TURN_RETURN_INVALID</code></span></p></td> |
211 | <td> The response is not a valid response | |
207 | <td>The response is not a valid response | |
212 | 208 | </td> |
213 | 209 | </tr> |
214 | 210 | <tr> |
215 | 211 | <td><p><a name="STUN-USAGE-TURN-RETURN-ALTERNATE-SERVER:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_TURN_RETURN_ALTERNATE_SERVER</code></span></p></td> |
216 | <td> The server requests the message | |
212 | <td>The server requests the message | |
217 | 213 | to be sent to an alternate server |
218 | 214 | </td> |
219 | 215 | </tr> |
223 | 219 | <hr> |
224 | 220 | <div class="refsect2" title="stun_usage_turn_create ()"> |
225 | 221 | <a name="stun-usage-turn-create"></a><h3>stun_usage_turn_create ()</h3> |
226 | <pre class="programlisting"><span class="returnvalue">size_t</span> stun_usage_turn_create (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
227 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
228 | <span class="returnvalue">uint8_t</span> *buffer, | |
229 | <span class="returnvalue">size_t</span> buffer_len, | |
230 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *previous_response, | |
231 | <a class="link" href="libnice-TURN.html#StunUsageTurnRequestPorts" title="enum StunUsageTurnRequestPorts"><span class="returnvalue">StunUsageTurnRequestPorts</span></a> request_ports, | |
232 | <span class="returnvalue">int32_t</span> bandwidth, | |
233 | <span class="returnvalue">int32_t</span> lifetime, | |
234 | <span class="returnvalue">uint8_t</span> *username, | |
235 | <span class="returnvalue">size_t</span> username_len, | |
236 | <span class="returnvalue">uint8_t</span> *password, | |
237 | <span class="returnvalue">size_t</span> password_len, | |
238 | <a class="link" href="libnice-TURN.html#StunUsageTurnCompatibility" title="enum StunUsageTurnCompatibility"><span class="returnvalue">StunUsageTurnCompatibility</span></a> compatibility);</pre> | |
239 | <p> | |
240 | Create a new TURN Allocation request</p> | |
222 | <pre class="programlisting"><span class="returnvalue">size_t</span> stun_usage_turn_create (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
223 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
224 | <em class="parameter"><code><span class="type">uint8_t</span> *buffer</code></em>, | |
225 | <em class="parameter"><code><span class="type">size_t</span> buffer_len</code></em>, | |
226 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *previous_response</code></em>, | |
227 | <em class="parameter"><code><a class="link" href="libnice-TURN.html#StunUsageTurnRequestPorts" title="enum StunUsageTurnRequestPorts"><span class="type">StunUsageTurnRequestPorts</span></a> request_ports</code></em>, | |
228 | <em class="parameter"><code><span class="type">int32_t</span> bandwidth</code></em>, | |
229 | <em class="parameter"><code><span class="type">int32_t</span> lifetime</code></em>, | |
230 | <em class="parameter"><code><span class="type">uint8_t</span> *username</code></em>, | |
231 | <em class="parameter"><code><span class="type">size_t</span> username_len</code></em>, | |
232 | <em class="parameter"><code><span class="type">uint8_t</span> *password</code></em>, | |
233 | <em class="parameter"><code><span class="type">size_t</span> password_len</code></em>, | |
234 | <em class="parameter"><code><a class="link" href="libnice-TURN.html#StunUsageTurnCompatibility" title="enum StunUsageTurnCompatibility"><span class="type">StunUsageTurnCompatibility</span></a> compatibility</code></em>);</pre> | |
235 | <p> | |
236 | Create a new TURN Allocation request | |
237 | </p> | |
241 | 238 | <div class="variablelist"><table border="0"> |
242 | 239 | <col align="left" valign="top"> |
243 | 240 | <tbody> |
244 | 241 | <tr> |
245 | 242 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> |
246 | <td> The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> to use to build the request | |
243 | <td>The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> to use to build the request | |
247 | 244 | </td> |
248 | 245 | </tr> |
249 | 246 | <tr> |
250 | 247 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> |
251 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build | |
248 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build | |
252 | 249 | </td> |
253 | 250 | </tr> |
254 | 251 | <tr> |
255 | 252 | <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
256 | <td> The buffer to use for creating the <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
253 | <td>The buffer to use for creating the <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
257 | 254 | </td> |
258 | 255 | </tr> |
259 | 256 | <tr> |
260 | 257 | <td><p><span class="term"><em class="parameter"><code>buffer_len</code></em> :</span></p></td> |
261 | <td> The size of the <em class="parameter"><code>buffer</code></em> | |
258 | <td>The size of the <em class="parameter"><code>buffer</code></em> | |
262 | 259 | </td> |
263 | 260 | </tr> |
264 | 261 | <tr> |
265 | 262 | <td><p><span class="term"><em class="parameter"><code>previous_response</code></em> :</span></p></td> |
266 | <td> If this is the first request you are sending, set this | |
263 | <td>If this is the first request you are sending, set this | |
267 | 264 | argument to NULL, if it's a subsequent request you are building, then set this |
268 | 265 | argument to the response you have received. This argument is used for building |
269 | 266 | long term credentials (using the REALM and NONCE attributes) as well as for |
273 | 270 | </tr> |
274 | 271 | <tr> |
275 | 272 | <td><p><span class="term"><em class="parameter"><code>request_ports</code></em> :</span></p></td> |
276 | <td> Specify how you want to request the allocated port(s). | |
273 | <td>Specify how you want to request the allocated port(s). | |
277 | 274 | This is only used if the compatibility is set to |
278 | 275 | <a class="link" href="libnice-TURN.html#STUN-USAGE-TURN-COMPATIBILITY-DRAFT9:CAPS"><span class="type">STUN_USAGE_TURN_COMPATIBILITY_DRAFT9</span></a> |
279 | 276 | <p>See <a class="link" href="libnice-TURN.html#StunUsageTurnRequestPorts" title="enum StunUsageTurnRequestPorts"><span class="type">StunUsageTurnRequestPorts</span></a> </p> |
281 | 278 | </tr> |
282 | 279 | <tr> |
283 | 280 | <td><p><span class="term"><em class="parameter"><code>bandwidth</code></em> :</span></p></td> |
284 | <td> The bandwidth to request from the server for the allocation. If | |
281 | <td>The bandwidth to request from the server for the allocation. If | |
285 | 282 | this value is negative, then no BANDWIDTH attribute is added to the request. |
286 | 283 | This is only used if the compatibility is set to |
287 | 284 | <a class="link" href="libnice-TURN.html#STUN-USAGE-TURN-COMPATIBILITY-DRAFT9:CAPS"><span class="type">STUN_USAGE_TURN_COMPATIBILITY_DRAFT9</span></a> |
289 | 286 | </tr> |
290 | 287 | <tr> |
291 | 288 | <td><p><span class="term"><em class="parameter"><code>lifetime</code></em> :</span></p></td> |
292 | <td> The lifetime of the allocation to request from the server. If | |
289 | <td>The lifetime of the allocation to request from the server. If | |
293 | 290 | this value is negative, then no LIFETIME attribute is added to the request. |
294 | 291 | This is only used if the compatibility is set to |
295 | 292 | <a class="link" href="libnice-TURN.html#STUN-USAGE-TURN-COMPATIBILITY-DRAFT9:CAPS"><span class="type">STUN_USAGE_TURN_COMPATIBILITY_DRAFT9</span></a> |
297 | 294 | </tr> |
298 | 295 | <tr> |
299 | 296 | <td><p><span class="term"><em class="parameter"><code>username</code></em> :</span></p></td> |
300 | <td> The username to use in the request | |
297 | <td>The username to use in the request | |
301 | 298 | </td> |
302 | 299 | </tr> |
303 | 300 | <tr> |
304 | 301 | <td><p><span class="term"><em class="parameter"><code>username_len</code></em> :</span></p></td> |
305 | <td> The length of <em class="parameter"><code>username</code></em> | |
302 | <td>The length of <em class="parameter"><code>username</code></em> | |
306 | 303 | </td> |
307 | 304 | </tr> |
308 | 305 | <tr> |
309 | 306 | <td><p><span class="term"><em class="parameter"><code>password</code></em> :</span></p></td> |
310 | <td> The key to use for building the MESSAGE-INTEGRITY | |
307 | <td>The key to use for building the MESSAGE-INTEGRITY | |
311 | 308 | </td> |
312 | 309 | </tr> |
313 | 310 | <tr> |
314 | 311 | <td><p><span class="term"><em class="parameter"><code>password_len</code></em> :</span></p></td> |
315 | <td> The length of <em class="parameter"><code>password</code></em> | |
312 | <td>The length of <em class="parameter"><code>password</code></em> | |
316 | 313 | </td> |
317 | 314 | </tr> |
318 | 315 | <tr> |
319 | 316 | <td><p><span class="term"><em class="parameter"><code>compatibility</code></em> :</span></p></td> |
320 | <td> The compatibility mode to use for building the Allocation | |
317 | <td>The compatibility mode to use for building the Allocation | |
321 | 318 | request |
322 | 319 | </td> |
323 | 320 | </tr> |
332 | 329 | <hr> |
333 | 330 | <div class="refsect2" title="stun_usage_turn_create_refresh ()"> |
334 | 331 | <a name="stun-usage-turn-create-refresh"></a><h3>stun_usage_turn_create_refresh ()</h3> |
335 | <pre class="programlisting"><span class="returnvalue">size_t</span> stun_usage_turn_create_refresh (<a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="returnvalue">StunAgent</span></a> *agent, | |
336 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
337 | <span class="returnvalue">uint8_t</span> *buffer, | |
338 | <span class="returnvalue">size_t</span> buffer_len, | |
339 | <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *previous_response, | |
340 | <span class="returnvalue">int32_t</span> lifetime, | |
341 | <span class="returnvalue">uint8_t</span> *username, | |
342 | <span class="returnvalue">size_t</span> username_len, | |
343 | <span class="returnvalue">uint8_t</span> *password, | |
344 | <span class="returnvalue">size_t</span> password_len, | |
345 | <a class="link" href="libnice-TURN.html#StunUsageTurnCompatibility" title="enum StunUsageTurnCompatibility"><span class="returnvalue">StunUsageTurnCompatibility</span></a> compatibility);</pre> | |
346 | <p> | |
347 | Create a new TURN Refresh request</p> | |
332 | <pre class="programlisting"><span class="returnvalue">size_t</span> stun_usage_turn_create_refresh (<em class="parameter"><code><a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> *agent</code></em>, | |
333 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
334 | <em class="parameter"><code><span class="type">uint8_t</span> *buffer</code></em>, | |
335 | <em class="parameter"><code><span class="type">size_t</span> buffer_len</code></em>, | |
336 | <em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *previous_response</code></em>, | |
337 | <em class="parameter"><code><span class="type">int32_t</span> lifetime</code></em>, | |
338 | <em class="parameter"><code><span class="type">uint8_t</span> *username</code></em>, | |
339 | <em class="parameter"><code><span class="type">size_t</span> username_len</code></em>, | |
340 | <em class="parameter"><code><span class="type">uint8_t</span> *password</code></em>, | |
341 | <em class="parameter"><code><span class="type">size_t</span> password_len</code></em>, | |
342 | <em class="parameter"><code><a class="link" href="libnice-TURN.html#StunUsageTurnCompatibility" title="enum StunUsageTurnCompatibility"><span class="type">StunUsageTurnCompatibility</span></a> compatibility</code></em>);</pre> | |
343 | <p> | |
344 | Create a new TURN Refresh request | |
345 | </p> | |
348 | 346 | <div class="variablelist"><table border="0"> |
349 | 347 | <col align="left" valign="top"> |
350 | 348 | <tbody> |
351 | 349 | <tr> |
352 | 350 | <td><p><span class="term"><em class="parameter"><code>agent</code></em> :</span></p></td> |
353 | <td> The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> to use to build the request | |
351 | <td>The <a class="link" href="libnice-StunAgent.html#StunAgent" title="StunAgent"><span class="type">StunAgent</span></a> to use to build the request | |
354 | 352 | </td> |
355 | 353 | </tr> |
356 | 354 | <tr> |
357 | 355 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> |
358 | <td> The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build | |
356 | <td>The <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> to build | |
359 | 357 | </td> |
360 | 358 | </tr> |
361 | 359 | <tr> |
362 | 360 | <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td> |
363 | <td> The buffer to use for creating the <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
361 | <td>The buffer to use for creating the <a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> | |
364 | 362 | </td> |
365 | 363 | </tr> |
366 | 364 | <tr> |
367 | 365 | <td><p><span class="term"><em class="parameter"><code>buffer_len</code></em> :</span></p></td> |
368 | <td> The size of the <em class="parameter"><code>buffer</code></em> | |
366 | <td>The size of the <em class="parameter"><code>buffer</code></em> | |
369 | 367 | </td> |
370 | 368 | </tr> |
371 | 369 | <tr> |
372 | 370 | <td><p><span class="term"><em class="parameter"><code>previous_response</code></em> :</span></p></td> |
373 | <td> If this is the first request you are sending, set this | |
371 | <td>If this is the first request you are sending, set this | |
374 | 372 | argument to NULL, if it's a subsequent request you are building, then set this |
375 | 373 | argument to the response you have received. This argument is used for building |
376 | 374 | long term credentials (using the REALM and NONCE attributes) |
378 | 376 | </tr> |
379 | 377 | <tr> |
380 | 378 | <td><p><span class="term"><em class="parameter"><code>lifetime</code></em> :</span></p></td> |
381 | <td> The lifetime of the allocation to request from the server. If | |
379 | <td>The lifetime of the allocation to request from the server. If | |
382 | 380 | this value is negative, then no LIFETIME attribute is added to the request. |
383 | 381 | This is only used if the compatibility is set to |
384 | 382 | <a class="link" href="libnice-TURN.html#STUN-USAGE-TURN-COMPATIBILITY-DRAFT9:CAPS"><span class="type">STUN_USAGE_TURN_COMPATIBILITY_DRAFT9</span></a> |
386 | 384 | </tr> |
387 | 385 | <tr> |
388 | 386 | <td><p><span class="term"><em class="parameter"><code>username</code></em> :</span></p></td> |
389 | <td> The username to use in the request | |
387 | <td>The username to use in the request | |
390 | 388 | </td> |
391 | 389 | </tr> |
392 | 390 | <tr> |
393 | 391 | <td><p><span class="term"><em class="parameter"><code>username_len</code></em> :</span></p></td> |
394 | <td> The length of <em class="parameter"><code>username</code></em> | |
392 | <td>The length of <em class="parameter"><code>username</code></em> | |
395 | 393 | </td> |
396 | 394 | </tr> |
397 | 395 | <tr> |
398 | 396 | <td><p><span class="term"><em class="parameter"><code>password</code></em> :</span></p></td> |
399 | <td> The key to use for building the MESSAGE-INTEGRITY | |
397 | <td>The key to use for building the MESSAGE-INTEGRITY | |
400 | 398 | </td> |
401 | 399 | </tr> |
402 | 400 | <tr> |
403 | 401 | <td><p><span class="term"><em class="parameter"><code>password_len</code></em> :</span></p></td> |
404 | <td> The length of <em class="parameter"><code>password</code></em> | |
402 | <td>The length of <em class="parameter"><code>password</code></em> | |
405 | 403 | </td> |
406 | 404 | </tr> |
407 | 405 | <tr> |
408 | 406 | <td><p><span class="term"><em class="parameter"><code>compatibility</code></em> :</span></p></td> |
409 | <td> The compatibility mode to use for building the Allocation | |
407 | <td>The compatibility mode to use for building the Allocation | |
410 | 408 | request |
411 | 409 | </td> |
412 | 410 | </tr> |
421 | 419 | <hr> |
422 | 420 | <div class="refsect2" title="stun_usage_turn_process ()"> |
423 | 421 | <a name="stun-usage-turn-process"></a><h3>stun_usage_turn_process ()</h3> |
424 | <pre class="programlisting"><a class="link" href="libnice-TURN.html#StunUsageTurnReturn" title="enum StunUsageTurnReturn"><span class="returnvalue">StunUsageTurnReturn</span></a> stun_usage_turn_process (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
425 | <span class="returnvalue">struct sockaddr</span> *relay_addr, | |
426 | <span class="returnvalue">socklen_t</span> *relay_addrlen, | |
427 | <span class="returnvalue">struct sockaddr</span> *addr, | |
428 | <span class="returnvalue">socklen_t</span> *addrlen, | |
429 | <span class="returnvalue">struct sockaddr</span> *alternate_server, | |
430 | <span class="returnvalue">socklen_t</span> *alternate_server_len, | |
431 | <span class="returnvalue">uint32_t</span> *bandwidth, | |
432 | <span class="returnvalue">uint32_t</span> *lifetime, | |
433 | <a class="link" href="libnice-TURN.html#StunUsageTurnCompatibility" title="enum StunUsageTurnCompatibility"><span class="returnvalue">StunUsageTurnCompatibility</span></a> compatibility);</pre> | |
422 | <pre class="programlisting"><a class="link" href="libnice-TURN.html#StunUsageTurnReturn" title="enum StunUsageTurnReturn"><span class="returnvalue">StunUsageTurnReturn</span></a> stun_usage_turn_process (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
423 | <em class="parameter"><code><span class="type">struct sockaddr</span> *relay_addr</code></em>, | |
424 | <em class="parameter"><code><span class="type">socklen_t</span> *relay_addrlen</code></em>, | |
425 | <em class="parameter"><code><span class="type">struct sockaddr</span> *addr</code></em>, | |
426 | <em class="parameter"><code><span class="type">socklen_t</span> *addrlen</code></em>, | |
427 | <em class="parameter"><code><span class="type">struct sockaddr</span> *alternate_server</code></em>, | |
428 | <em class="parameter"><code><span class="type">socklen_t</span> *alternate_server_len</code></em>, | |
429 | <em class="parameter"><code><span class="type">uint32_t</span> *bandwidth</code></em>, | |
430 | <em class="parameter"><code><span class="type">uint32_t</span> *lifetime</code></em>, | |
431 | <em class="parameter"><code><a class="link" href="libnice-TURN.html#StunUsageTurnCompatibility" title="enum StunUsageTurnCompatibility"><span class="type">StunUsageTurnCompatibility</span></a> compatibility</code></em>);</pre> | |
434 | 432 | <p> |
435 | 433 | Process a TURN Allocate response and extract the necessary information from |
436 | the message</p> | |
434 | the message | |
435 | </p> | |
437 | 436 | <div class="variablelist"><table border="0"> |
438 | 437 | <col align="left" valign="top"> |
439 | 438 | <tbody> |
440 | 439 | <tr> |
441 | 440 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> |
442 | <td> The message containing the response | |
441 | <td>The message containing the response | |
443 | 442 | </td> |
444 | 443 | </tr> |
445 | 444 | <tr> |
446 | 445 | <td><p><span class="term"><em class="parameter"><code>relay_addr</code></em> :</span></p></td> |
447 | <td> A pointer to a <span class="type">sockaddr</span> structure to fill with the relay address | |
446 | <td>A pointer to a <span class="type">sockaddr</span> structure to fill with the relay address | |
448 | 447 | that the TURN server allocated for us |
449 | 448 | </td> |
450 | 449 | </tr> |
451 | 450 | <tr> |
452 | 451 | <td><p><span class="term"><em class="parameter"><code>relay_addrlen</code></em> :</span></p></td> |
453 | <td> The length of <em class="parameter"><code>relay_addr</code></em> | |
452 | <td>The length of <em class="parameter"><code>relay_addr</code></em> | |
454 | 453 | </td> |
455 | 454 | </tr> |
456 | 455 | <tr> |
457 | 456 | <td><p><span class="term"><em class="parameter"><code>addr</code></em> :</span></p></td> |
458 | <td> A pointer to a <span class="type">sockaddr</span> structure to fill with the mapped address | |
457 | <td>A pointer to a <span class="type">sockaddr</span> structure to fill with the mapped address | |
459 | 458 | that the STUN response contains. |
460 | 459 | This argument will only be filled if the return value |
461 | 460 | of the function is <a class="link" href="libnice-TURN.html#STUN-USAGE-TURN-RETURN-MAPPED-SUCCESS:CAPS"><span class="type">STUN_USAGE_TURN_RETURN_MAPPED_SUCCESS</span></a> |
463 | 462 | </tr> |
464 | 463 | <tr> |
465 | 464 | <td><p><span class="term"><em class="parameter"><code>addrlen</code></em> :</span></p></td> |
466 | <td> The length of <em class="parameter"><code>addr</code></em> | |
465 | <td>The length of <em class="parameter"><code>addr</code></em> | |
467 | 466 | </td> |
468 | 467 | </tr> |
469 | 468 | <tr> |
470 | 469 | <td><p><span class="term"><em class="parameter"><code>alternate_server</code></em> :</span></p></td> |
471 | <td> A pointer to a <span class="type">sockaddr</span> structure to fill with the | |
470 | <td>A pointer to a <span class="type">sockaddr</span> structure to fill with the | |
472 | 471 | address of an alternate server to which we should send our new STUN |
473 | 472 | Allocate request, in case the currently used TURN server is requesting the use |
474 | 473 | of an alternate server. This argument will only be filled if the return value |
477 | 476 | </tr> |
478 | 477 | <tr> |
479 | 478 | <td><p><span class="term"><em class="parameter"><code>alternate_server_len</code></em> :</span></p></td> |
480 | <td> The length of <em class="parameter"><code>alternate_server</code></em> | |
479 | <td>The length of <em class="parameter"><code>alternate_server</code></em> | |
481 | 480 | </td> |
482 | 481 | </tr> |
483 | 482 | <tr> |
484 | 483 | <td><p><span class="term"><em class="parameter"><code>bandwidth</code></em> :</span></p></td> |
485 | <td> A pointer to fill with the bandwidth the TURN server allocated us | |
484 | <td>A pointer to fill with the bandwidth the TURN server allocated us | |
486 | 485 | </td> |
487 | 486 | </tr> |
488 | 487 | <tr> |
489 | 488 | <td><p><span class="term"><em class="parameter"><code>lifetime</code></em> :</span></p></td> |
490 | <td> A pointer to fill with the lifetime of the allocation | |
489 | <td>A pointer to fill with the lifetime of the allocation | |
491 | 490 | </td> |
492 | 491 | </tr> |
493 | 492 | <tr> |
494 | 493 | <td><p><span class="term"><em class="parameter"><code>compatibility</code></em> :</span></p></td> |
495 | <td> The compatibility mode to use for processing the Allocation | |
494 | <td>The compatibility mode to use for processing the Allocation | |
496 | 495 | response |
497 | 496 | </td> |
498 | 497 | </tr> |
507 | 506 | <hr> |
508 | 507 | <div class="refsect2" title="stun_usage_turn_refresh_process ()"> |
509 | 508 | <a name="stun-usage-turn-refresh-process"></a><h3>stun_usage_turn_refresh_process ()</h3> |
510 | <pre class="programlisting"><a class="link" href="libnice-TURN.html#StunUsageTurnReturn" title="enum StunUsageTurnReturn"><span class="returnvalue">StunUsageTurnReturn</span></a> stun_usage_turn_refresh_process (<a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="returnvalue">StunMessage</span></a> *msg, | |
511 | <span class="returnvalue">uint32_t</span> *lifetime, | |
512 | <a class="link" href="libnice-TURN.html#StunUsageTurnCompatibility" title="enum StunUsageTurnCompatibility"><span class="returnvalue">StunUsageTurnCompatibility</span></a> compatibility);</pre> | |
509 | <pre class="programlisting"><a class="link" href="libnice-TURN.html#StunUsageTurnReturn" title="enum StunUsageTurnReturn"><span class="returnvalue">StunUsageTurnReturn</span></a> stun_usage_turn_refresh_process (<em class="parameter"><code><a class="link" href="libnice-StunMessage.html#StunMessage" title="StunMessage"><span class="type">StunMessage</span></a> *msg</code></em>, | |
510 | <em class="parameter"><code><span class="type">uint32_t</span> *lifetime</code></em>, | |
511 | <em class="parameter"><code><a class="link" href="libnice-TURN.html#StunUsageTurnCompatibility" title="enum StunUsageTurnCompatibility"><span class="type">StunUsageTurnCompatibility</span></a> compatibility</code></em>);</pre> | |
513 | 512 | <p> |
514 | 513 | Process a TURN Refresh response and extract the necessary information from |
515 | the message</p> | |
514 | the message | |
515 | </p> | |
516 | 516 | <div class="variablelist"><table border="0"> |
517 | 517 | <col align="left" valign="top"> |
518 | 518 | <tbody> |
519 | 519 | <tr> |
520 | 520 | <td><p><span class="term"><em class="parameter"><code>msg</code></em> :</span></p></td> |
521 | <td> The message containing the response | |
521 | <td>The message containing the response | |
522 | 522 | </td> |
523 | 523 | </tr> |
524 | 524 | <tr> |
525 | 525 | <td><p><span class="term"><em class="parameter"><code>lifetime</code></em> :</span></p></td> |
526 | <td> A pointer to fill with the lifetime of the allocation | |
526 | <td>A pointer to fill with the lifetime of the allocation | |
527 | 527 | </td> |
528 | 528 | </tr> |
529 | 529 | <tr> |
530 | 530 | <td><p><span class="term"><em class="parameter"><code>compatibility</code></em> :</span></p></td> |
531 | <td> The compatibility mode to use for processing the Refresh | |
531 | <td>The compatibility mode to use for processing the Refresh | |
532 | 532 | response |
533 | 533 | </td> |
534 | 534 | </tr> |
546 | 546 | </div> |
547 | 547 | <div class="footer"> |
548 | 548 | <hr> |
549 | Generated by GTK-Doc V1.13</div> | |
549 | Generated by GTK-Doc V1.15</div> | |
550 | 550 | </body> |
551 | 551 | </html>⏎ |
7 | 7 | <link rel="up" href="ch04.html" title="STUN usages"> |
8 | 8 | <link rel="prev" href="libnice-TURN.html" title="TURN"> |
9 | 9 | <link rel="next" href="pt03.html" title="Part III. Pseudo TCP Socket implementation"> |
10 | <meta name="generator" content="GTK-Doc V1.13 (XML mode)"> | |
10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> | |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | <link rel="part" href="pt01.html" title="Part I. ICE Library"> | |
13 | <link rel="chapter" href="ch01.html" title=""> | |
14 | <link rel="chapter" href="ch02.html" title="Libnice helper functions"> | |
15 | <link rel="part" href="pt02.html" title="Part II. STUN Library"> | |
16 | <link rel="chapter" href="ch03.html" title=""> | |
17 | <link rel="chapter" href="ch04.html" title="STUN usages"> | |
18 | <link rel="part" href="pt03.html" title="Part III. Pseudo TCP Socket implementation"> | |
19 | <link rel="chapter" href="ch05.html" title=""> | |
20 | 12 | </head> |
21 | 13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
22 | 14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
53 | 45 | |
54 | 46 | typedef <a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer">StunTimer</a>; |
55 | 47 | enum <a class="link" href="libnice-Timer.html#StunUsageTimerReturn" title="enum StunUsageTimerReturn">StunUsageTimerReturn</a>; |
56 | <span class="returnvalue">void</span> <a class="link" href="libnice-Timer.html#stun-timer-start" title="stun_timer_start ()">stun_timer_start</a> (<a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer"><span class="returnvalue">StunTimer</span></a> *timer); | |
57 | <span class="returnvalue">void</span> <a class="link" href="libnice-Timer.html#stun-timer-start-reliable" title="stun_timer_start_reliable ()">stun_timer_start_reliable</a> (<a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer"><span class="returnvalue">StunTimer</span></a> *timer); | |
58 | <a class="link" href="libnice-Timer.html#StunUsageTimerReturn" title="enum StunUsageTimerReturn"><span class="returnvalue">StunUsageTimerReturn</span></a> <a class="link" href="libnice-Timer.html#stun-timer-refresh" title="stun_timer_refresh ()">stun_timer_refresh</a> (<a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer"><span class="returnvalue">StunTimer</span></a> *timer); | |
59 | <span class="returnvalue">unsigned</span> <a class="link" href="libnice-Timer.html#stun-timer-remainder" title="stun_timer_remainder ()">stun_timer_remainder</a> (const <a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer"><span class="returnvalue">StunTimer</span></a> *timer); | |
48 | <span class="returnvalue">void</span> <a class="link" href="libnice-Timer.html#stun-timer-start" title="stun_timer_start ()">stun_timer_start</a> (<em class="parameter"><code><a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer"><span class="type">StunTimer</span></a> *timer</code></em>); | |
49 | <span class="returnvalue">void</span> <a class="link" href="libnice-Timer.html#stun-timer-start-reliable" title="stun_timer_start_reliable ()">stun_timer_start_reliable</a> (<em class="parameter"><code><a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer"><span class="type">StunTimer</span></a> *timer</code></em>); | |
50 | <a class="link" href="libnice-Timer.html#StunUsageTimerReturn" title="enum StunUsageTimerReturn"><span class="returnvalue">StunUsageTimerReturn</span></a> <a class="link" href="libnice-Timer.html#stun-timer-refresh" title="stun_timer_refresh ()">stun_timer_refresh</a> (<em class="parameter"><code><a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer"><span class="type">StunTimer</span></a> *timer</code></em>); | |
51 | <span class="returnvalue">unsigned</span> <a class="link" href="libnice-Timer.html#stun-timer-remainder" title="stun_timer_remainder ()">stun_timer_remainder</a> (<em class="parameter"><code>const <a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer"><span class="type">StunTimer</span></a> *timer</code></em>); | |
60 | 52 | </pre> |
61 | 53 | </div> |
62 | 54 | <div class="refsect1" title="Description"> |
69 | 61 | <p> |
70 | 62 | </p> |
71 | 63 | <div class="example"> |
72 | <a name="id2694932"></a><p class="title"><b>Example 3. Simple example on how to use the timer usage</b></p> | |
64 | <a name="id2718831"></a><p class="title"><b>Example 3. Simple example on how to use the timer usage</b></p> | |
73 | 65 | <div class="example-contents"> |
74 | 66 | <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> |
75 | 67 | <tbody> |
166 | 158 | </div> |
167 | 159 | |
168 | 160 | </div> |
169 | <p><br class="example-break"></p> | |
161 | <p><br class="example-break"> | |
162 | </p> | |
170 | 163 | </div> |
171 | 164 | <div class="refsect1" title="Details"> |
172 | 165 | <a name="libnice-Timer.details"></a><h2>Details</h2> |
175 | 168 | <pre class="programlisting">typedef struct stun_timer_s StunTimer; |
176 | 169 | </pre> |
177 | 170 | <p> |
178 | An opaque structure representing a STUN transaction retransmission timer</p> | |
171 | An opaque structure representing a STUN transaction retransmission timer | |
172 | </p> | |
179 | 173 | </div> |
180 | 174 | <hr> |
181 | 175 | <div class="refsect2" title="enum StunUsageTimerReturn"> |
188 | 182 | </pre> |
189 | 183 | <p> |
190 | 184 | Return value of <code class="function">stun_usage_timer_refresh()</code> which provides you with status |
191 | information on the timer.</p> | |
185 | information on the timer. | |
186 | </p> | |
192 | 187 | <div class="variablelist"><table border="0"> |
193 | 188 | <col align="left" valign="top"> |
194 | 189 | <tbody> |
195 | 190 | <tr> |
196 | 191 | <td><p><a name="STUN-USAGE-TIMER-RETURN-SUCCESS:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_TIMER_RETURN_SUCCESS</code></span></p></td> |
197 | <td> The timer was refreshed successfully | |
192 | <td>The timer was refreshed successfully | |
198 | 193 | and there is nothing to be done |
199 | 194 | </td> |
200 | 195 | </tr> |
201 | 196 | <tr> |
202 | 197 | <td><p><a name="STUN-USAGE-TIMER-RETURN-RETRANSMIT:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_TIMER_RETURN_RETRANSMIT</code></span></p></td> |
203 | <td> The timer expired and the message | |
198 | <td>The timer expired and the message | |
204 | 199 | should be retransmitted now. |
205 | 200 | </td> |
206 | 201 | </tr> |
207 | 202 | <tr> |
208 | 203 | <td><p><a name="STUN-USAGE-TIMER-RETURN-TIMEOUT:CAPS"></a><span class="term"><code class="literal">STUN_USAGE_TIMER_RETURN_TIMEOUT</code></span></p></td> |
209 | <td> The timer expired as well as all the | |
204 | <td>The timer expired as well as all the | |
210 | 205 | retransmissions, the transaction timed out |
211 | 206 | </td> |
212 | 207 | </tr> |
216 | 211 | <hr> |
217 | 212 | <div class="refsect2" title="stun_timer_start ()"> |
218 | 213 | <a name="stun-timer-start"></a><h3>stun_timer_start ()</h3> |
219 | <pre class="programlisting"><span class="returnvalue">void</span> stun_timer_start (<a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer"><span class="returnvalue">StunTimer</span></a> *timer);</pre> | |
214 | <pre class="programlisting"><span class="returnvalue">void</span> stun_timer_start (<em class="parameter"><code><a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer"><span class="type">StunTimer</span></a> *timer</code></em>);</pre> | |
220 | 215 | <p> |
221 | 216 | Starts a STUN transaction retransmission timer. |
222 | 217 | This should be called as soon as you send the message for the first time on |
223 | a UDP socket</p> | |
218 | a UDP socket | |
219 | </p> | |
224 | 220 | <div class="variablelist"><table border="0"> |
225 | 221 | <col align="left" valign="top"> |
226 | 222 | <tbody><tr> |
227 | 223 | <td><p><span class="term"><em class="parameter"><code>timer</code></em> :</span></p></td> |
228 | <td> The <a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer"><span class="type">StunTimer</span></a> to start | |
224 | <td>The <a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer"><span class="type">StunTimer</span></a> to start | |
229 | 225 | </td> |
230 | 226 | </tr></tbody> |
231 | 227 | </table></div> |
233 | 229 | <hr> |
234 | 230 | <div class="refsect2" title="stun_timer_start_reliable ()"> |
235 | 231 | <a name="stun-timer-start-reliable"></a><h3>stun_timer_start_reliable ()</h3> |
236 | <pre class="programlisting"><span class="returnvalue">void</span> stun_timer_start_reliable (<a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer"><span class="returnvalue">StunTimer</span></a> *timer);</pre> | |
232 | <pre class="programlisting"><span class="returnvalue">void</span> stun_timer_start_reliable (<em class="parameter"><code><a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer"><span class="type">StunTimer</span></a> *timer</code></em>);</pre> | |
237 | 233 | <p> |
238 | 234 | Starts a STUN transaction retransmission timer for a reliable transport. |
239 | 235 | This should be called as soon as you send the message for the first time on |
240 | a TCP socket</p> | |
236 | a TCP socket | |
237 | </p> | |
241 | 238 | <div class="variablelist"><table border="0"> |
242 | 239 | <col align="left" valign="top"> |
243 | 240 | <tbody><tr> |
244 | 241 | <td><p><span class="term"><em class="parameter"><code>timer</code></em> :</span></p></td> |
245 | <td> The <a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer"><span class="type">StunTimer</span></a> to start | |
242 | <td>The <a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer"><span class="type">StunTimer</span></a> to start | |
246 | 243 | </td> |
247 | 244 | </tr></tbody> |
248 | 245 | </table></div> |
250 | 247 | <hr> |
251 | 248 | <div class="refsect2" title="stun_timer_refresh ()"> |
252 | 249 | <a name="stun-timer-refresh"></a><h3>stun_timer_refresh ()</h3> |
253 | <pre class="programlisting"><a class="link" href="libnice-Timer.html#StunUsageTimerReturn" title="enum StunUsageTimerReturn"><span class="returnvalue">StunUsageTimerReturn</span></a> stun_timer_refresh (<a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer"><span class="returnvalue">StunTimer</span></a> *timer);</pre> | |
254 | <p> | |
255 | Updates a STUN transaction retransmission timer.</p> | |
250 | <pre class="programlisting"><a class="link" href="libnice-Timer.html#StunUsageTimerReturn" title="enum StunUsageTimerReturn"><span class="returnvalue">StunUsageTimerReturn</span></a> stun_timer_refresh (<em class="parameter"><code><a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer"><span class="type">StunTimer</span></a> *timer</code></em>);</pre> | |
251 | <p> | |
252 | Updates a STUN transaction retransmission timer. | |
253 | </p> | |
256 | 254 | <div class="variablelist"><table border="0"> |
257 | 255 | <col align="left" valign="top"> |
258 | 256 | <tbody> |
259 | 257 | <tr> |
260 | 258 | <td><p><span class="term"><em class="parameter"><code>timer</code></em> :</span></p></td> |
261 | <td> The <a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer"><span class="type">StunTimer</span></a> to refresh | |
259 | <td>The <a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer"><span class="type">StunTimer</span></a> to refresh | |
262 | 260 | </td> |
263 | 261 | </tr> |
264 | 262 | <tr> |
272 | 270 | <hr> |
273 | 271 | <div class="refsect2" title="stun_timer_remainder ()"> |
274 | 272 | <a name="stun-timer-remainder"></a><h3>stun_timer_remainder ()</h3> |
275 | <pre class="programlisting"><span class="returnvalue">unsigned</span> stun_timer_remainder (const <a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer"><span class="returnvalue">StunTimer</span></a> *timer);</pre> | |
276 | <p> | |
277 | Query the timer on the time left before the next refresh should be done</p> | |
273 | <pre class="programlisting"><span class="returnvalue">unsigned</span> stun_timer_remainder (<em class="parameter"><code>const <a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer"><span class="type">StunTimer</span></a> *timer</code></em>);</pre> | |
274 | <p> | |
275 | Query the timer on the time left before the next refresh should be done | |
276 | </p> | |
278 | 277 | <div class="variablelist"><table border="0"> |
279 | 278 | <col align="left" valign="top"> |
280 | 279 | <tbody> |
281 | 280 | <tr> |
282 | 281 | <td><p><span class="term"><em class="parameter"><code>timer</code></em> :</span></p></td> |
283 | <td> The <a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer"><span class="type">StunTimer</span></a> to query | |
282 | <td>The <a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer"><span class="type">StunTimer</span></a> to query | |
284 | 283 | </td> |
285 | 284 | </tr> |
286 | 285 | <tr> |
295 | 294 | </div> |
296 | 295 | <div class="footer"> |
297 | 296 | <hr> |
298 | Generated by GTK-Doc V1.13</div> | |
297 | Generated by GTK-Doc V1.15</div> | |
299 | 298 | </body> |
300 | 299 | </html>⏎ |
225 | 225 | <keyword type="constant" name="NICE_PROXY_TYPE_SOCKS5" link="NiceAgent.html#NICE-PROXY-TYPE-SOCKS5:CAPS"/> |
226 | 226 | <keyword type="constant" name="NICE_PROXY_TYPE_HTTP" link="NiceAgent.html#NICE-PROXY-TYPE-HTTP:CAPS"/> |
227 | 227 | <keyword type="constant" name="NICE_PROXY_TYPE_LAST" link="NiceAgent.html#NICE-PROXY-TYPE-LAST:CAPS"/> |
228 | <keyword type="constant" name="NICE_COMPATIBILITY_DRAFT19" link="NiceAgent.html#NICE-COMPATIBILITY-DRAFT19:CAPS"/> | |
228 | <keyword type="constant" name="NICE_COMPATIBILITY_RFC5245" link="NiceAgent.html#NICE-COMPATIBILITY-RFC5245:CAPS"/> | |
229 | 229 | <keyword type="constant" name="NICE_COMPATIBILITY_GOOGLE" link="NiceAgent.html#NICE-COMPATIBILITY-GOOGLE:CAPS"/> |
230 | 230 | <keyword type="constant" name="NICE_COMPATIBILITY_MSN" link="NiceAgent.html#NICE-COMPATIBILITY-MSN:CAPS"/> |
231 | 231 | <keyword type="constant" name="NICE_COMPATIBILITY_WLM2009" link="NiceAgent.html#NICE-COMPATIBILITY-WLM2009:CAPS"/> |
232 | <keyword type="constant" name="NICE_COMPATIBILITY_DRAFT19" link="NiceAgent.html#NICE-COMPATIBILITY-DRAFT19:CAPS"/> | |
232 | 233 | <keyword type="constant" name="NICE_COMPATIBILITY_LAST" link="NiceAgent.html#NICE-COMPATIBILITY-LAST:CAPS"/> |
233 | 234 | <keyword type="constant" name="NICE_CANDIDATE_TYPE_HOST" link="libnice-NiceCandidate.html#NICE-CANDIDATE-TYPE-HOST:CAPS"/> |
234 | 235 | <keyword type="constant" name="NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE" link="libnice-NiceCandidate.html#NICE-CANDIDATE-TYPE-SERVER-REFLEXIVE:CAPS"/> |
349 | 350 | <keyword type="constant" name="STUN_USAGE_BIND_RETURN_INVALID" link="libnice-Bind.html#STUN-USAGE-BIND-RETURN-INVALID:CAPS"/> |
350 | 351 | <keyword type="constant" name="STUN_USAGE_BIND_RETURN_ALTERNATE_SERVER" link="libnice-Bind.html#STUN-USAGE-BIND-RETURN-ALTERNATE-SERVER:CAPS"/> |
351 | 352 | <keyword type="constant" name="STUN_USAGE_BIND_RETURN_TIMEOUT" link="libnice-Bind.html#STUN-USAGE-BIND-RETURN-TIMEOUT:CAPS"/> |
352 | <keyword type="constant" name="STUN_USAGE_ICE_COMPATIBILITY_DRAFT19" link="libnice-ICE.html#STUN-USAGE-ICE-COMPATIBILITY-DRAFT19:CAPS"/> | |
353 | <keyword type="constant" name="STUN_USAGE_ICE_COMPATIBILITY_RFC5245" link="libnice-ICE.html#STUN-USAGE-ICE-COMPATIBILITY-RFC5245:CAPS"/> | |
353 | 354 | <keyword type="constant" name="STUN_USAGE_ICE_COMPATIBILITY_GOOGLE" link="libnice-ICE.html#STUN-USAGE-ICE-COMPATIBILITY-GOOGLE:CAPS"/> |
354 | 355 | <keyword type="constant" name="STUN_USAGE_ICE_COMPATIBILITY_MSN" link="libnice-ICE.html#STUN-USAGE-ICE-COMPATIBILITY-MSN:CAPS"/> |
356 | <keyword type="constant" name="STUN_USAGE_ICE_COMPATIBILITY_DRAFT19" link="libnice-ICE.html#STUN-USAGE-ICE-COMPATIBILITY-DRAFT19:CAPS"/> | |
355 | 357 | <keyword type="constant" name="STUN_USAGE_ICE_RETURN_SUCCESS" link="libnice-ICE.html#STUN-USAGE-ICE-RETURN-SUCCESS:CAPS"/> |
356 | 358 | <keyword type="constant" name="STUN_USAGE_ICE_RETURN_ERROR" link="libnice-ICE.html#STUN-USAGE-ICE-RETURN-ERROR:CAPS"/> |
357 | 359 | <keyword type="constant" name="STUN_USAGE_ICE_RETURN_INVALID" link="libnice-ICE.html#STUN-USAGE-ICE-RETURN-INVALID:CAPS"/> |
7 | 7 | <link rel="up" href="index.html" title="libnice Reference Manual"> |
8 | 8 | <link rel="prev" href="index.html" title="libnice Reference Manual"> |
9 | 9 | <link rel="next" href="ch01.html" title=""> |
10 | <meta name="generator" content="GTK-Doc V1.13 (XML mode)"> | |
10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> | |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | <link rel="part" href="pt01.html" title="Part I. ICE Library"> | |
13 | <link rel="chapter" href="ch01.html" title=""> | |
14 | <link rel="chapter" href="ch02.html" title="Libnice helper functions"> | |
15 | <link rel="part" href="pt02.html" title="Part II. STUN Library"> | |
16 | <link rel="chapter" href="ch03.html" title=""> | |
17 | <link rel="chapter" href="ch04.html" title="STUN usages"> | |
18 | <link rel="part" href="pt03.html" title="Part III. Pseudo TCP Socket implementation"> | |
19 | <link rel="chapter" href="ch05.html" title=""> | |
20 | 12 | </head> |
21 | 13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
22 | 14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"> |
28 | 20 | </tr></table> |
29 | 21 | <div class="part" title="Part I. ICE Library"> |
30 | 22 | <div class="titlepage"><div><div><h1 class="title"> |
31 | <a name="id2630602"></a>Part I. ICE Library</h1></div></div></div> | |
23 | <a name="id2621732"></a>Part I. ICE Library</h1></div></div></div> | |
32 | 24 | <div class="toc"> |
33 | 25 | <p><b>Table of Contents</b></p> |
34 | 26 | <dl> |
58 | 50 | </div> |
59 | 51 | <div class="footer"> |
60 | 52 | <hr> |
61 | Generated by GTK-Doc V1.13</div> | |
53 | Generated by GTK-Doc V1.15</div> | |
62 | 54 | </body> |
63 | 55 | </html>⏎ |
7 | 7 | <link rel="up" href="index.html" title="libnice Reference Manual"> |
8 | 8 | <link rel="prev" href="libnice-Network-interfaces-discovery.html" title="Network interfaces discovery"> |
9 | 9 | <link rel="next" href="ch03.html" title=""> |
10 | <meta name="generator" content="GTK-Doc V1.13 (XML mode)"> | |
10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> | |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | <link rel="part" href="pt01.html" title="Part I. ICE Library"> | |
13 | <link rel="chapter" href="ch01.html" title=""> | |
14 | <link rel="chapter" href="ch02.html" title="Libnice helper functions"> | |
15 | <link rel="part" href="pt02.html" title="Part II. STUN Library"> | |
16 | <link rel="chapter" href="ch03.html" title=""> | |
17 | <link rel="chapter" href="ch04.html" title="STUN usages"> | |
18 | <link rel="part" href="pt03.html" title="Part III. Pseudo TCP Socket implementation"> | |
19 | <link rel="chapter" href="ch05.html" title=""> | |
20 | 12 | </head> |
21 | 13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
22 | 14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"> |
28 | 20 | </tr></table> |
29 | 21 | <div class="part" title="Part II. STUN Library"> |
30 | 22 | <div class="titlepage"><div><div><h1 class="title"> |
31 | <a name="id2600262"></a>Part II. STUN Library</h1></div></div></div> | |
23 | <a name="id2621762"></a>Part II. STUN Library</h1></div></div></div> | |
32 | 24 | <div class="toc"> |
33 | 25 | <p><b>Table of Contents</b></p> |
34 | 26 | <dl> |
61 | 53 | </div> |
62 | 54 | <div class="footer"> |
63 | 55 | <hr> |
64 | Generated by GTK-Doc V1.13</div> | |
56 | Generated by GTK-Doc V1.15</div> | |
65 | 57 | </body> |
66 | 58 | </html>⏎ |
7 | 7 | <link rel="up" href="index.html" title="libnice Reference Manual"> |
8 | 8 | <link rel="prev" href="libnice-Timer.html" title="Timer"> |
9 | 9 | <link rel="next" href="ch05.html" title=""> |
10 | <meta name="generator" content="GTK-Doc V1.13 (XML mode)"> | |
10 | <meta name="generator" content="GTK-Doc V1.15 (XML mode)"> | |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | <link rel="part" href="pt01.html" title="Part I. ICE Library"> | |
13 | <link rel="chapter" href="ch01.html" title=""> | |
14 | <link rel="chapter" href="ch02.html" title="Libnice helper functions"> | |
15 | <link rel="part" href="pt02.html" title="Part II. STUN Library"> | |
16 | <link rel="chapter" href="ch03.html" title=""> | |
17 | <link rel="chapter" href="ch04.html" title="STUN usages"> | |
18 | <link rel="part" href="pt03.html" title="Part III. Pseudo TCP Socket implementation"> | |
19 | <link rel="chapter" href="ch05.html" title=""> | |
20 | 12 | </head> |
21 | 13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
22 | 14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"> |
28 | 20 | </tr></table> |
29 | 21 | <div class="part" title="Part III. Pseudo TCP Socket implementation"> |
30 | 22 | <div class="titlepage"><div><div><h1 class="title"> |
31 | <a name="id2600317"></a>Part III. Pseudo TCP Socket implementation</h1></div></div></div> | |
23 | <a name="id2621806"></a>Part III. Pseudo TCP Socket implementation</h1></div></div></div> | |
32 | 24 | <div class="toc"> |
33 | 25 | <p><b>Table of Contents</b></p> |
34 | 26 | <dl> |
41 | 33 | </div> |
42 | 34 | <div class="footer"> |
43 | 35 | <hr> |
44 | Generated by GTK-Doc V1.13</div> | |
36 | Generated by GTK-Doc V1.15</div> | |
45 | 37 | </body> |
46 | 38 | </html>⏎ |
208 | 208 | font-weight: normal; |
209 | 209 | } |
210 | 210 | |
211 | .annotation | |
212 | { | |
213 | /* tango:aluminium 5 */ | |
214 | color: #555753; | |
215 | font-size: 80%; | |
216 | font-weight: normal; | |
217 | } | |
218 | ||
211 | 219 | /* code listings */ |
212 | 220 | |
213 | .programlisting .cbracket { color: #a40000; } /* tango: scarlet red 3 */ | |
214 | .programlisting .comment { color: #a1a39d; } /* tango: aluminium 4 */ | |
215 | .programlisting .function { color: #000000; font-weight: bold; } | |
216 | .programlisting .function a { color: #11326b; font-weight: bold; } /* tango: sky blue 4 */ | |
217 | .programlisting .keyword { color: #4e9a06; } /* tango: chameleon 3 */ | |
218 | .programlisting .linenum { color: #babdb6; } /* tango: aluminium 3 */ | |
219 | .programlisting .normal { color: #000000; } | |
220 | .programlisting .number { color: #75507b; } /* tango: plum 2 */ | |
221 | .programlisting .preproc { color: #204a87; } /* tango: sky blue 3 */ | |
222 | .programlisting .string { color: #c17d11; } /* tango: chocolate 2 */ | |
223 | .programlisting .type { color: #000000; } | |
224 | .programlisting .type a { color: #11326b; } /* tango: sky blue 4 */ | |
225 | .programlisting .symbol { color: #ce5c00; } /* tango: orange 3 */ | |
221 | .listing_code .programlisting .cbracket { color: #a40000; } /* tango: scarlet red 3 */ | |
222 | .listing_code .programlisting .comment { color: #a1a39d; } /* tango: aluminium 4 */ | |
223 | .listing_code .programlisting .function { color: #000000; font-weight: bold; } | |
224 | .listing_code .programlisting .function a { color: #11326b; font-weight: bold; } /* tango: sky blue 4 */ | |
225 | .listing_code .programlisting .keyword { color: #4e9a06; } /* tango: chameleon 3 */ | |
226 | .listing_code .programlisting .linenum { color: #babdb6; } /* tango: aluminium 3 */ | |
227 | .listing_code .programlisting .normal { color: #000000; } | |
228 | .listing_code .programlisting .number { color: #75507b; } /* tango: plum 2 */ | |
229 | .listing_code .programlisting .preproc { color: #204a87; } /* tango: sky blue 3 */ | |
230 | .listing_code .programlisting .string { color: #c17d11; } /* tango: chocolate 2 */ | |
231 | .listing_code .programlisting .type { color: #000000; } | |
232 | .listing_code .programlisting .type a { color: #11326b; } /* tango: sky blue 4 */ | |
233 | .listing_code .programlisting .symbol { color: #ce5c00; } /* tango: orange 3 */ | |
226 | 234 | |
227 | 235 | .listing_frame { |
228 | 236 | /* tango:sky blue 1 */ |
0 | nice_agent_get_type | |
1 | 0 | nice_agent_get_type |
2 | 1 | pseudo_tcp_socket_get_type |
3 | pseudo_tcp_socket_get_type |
14 | 14 | </para> |
15 | 15 | |
16 | 16 | <!-- ##### SECTION Stability_Level ##### --> |
17 | ||
18 | ||
19 | <!-- ##### SECTION Image ##### --> | |
17 | 20 | |
18 | 21 | |
19 | 22 | <!-- ##### STRUCT NiceAddress ##### --> |
42 | 45 | |
43 | 46 | </para> |
44 | 47 | |
48 | @void: | |
45 | 49 | @Returns: |
46 | 50 | |
47 | 51 |
14 | 14 | </para> |
15 | 15 | |
16 | 16 | <!-- ##### SECTION Stability_Level ##### --> |
17 | ||
18 | ||
19 | <!-- ##### SECTION Image ##### --> | |
17 | 20 | |
18 | 21 | |
19 | 22 | <!-- ##### STRUCT NiceAgent ##### --> |
204 | 207 | |
205 | 208 | </para> |
206 | 209 | |
207 | @NICE_COMPATIBILITY_DRAFT19: | |
210 | @NICE_COMPATIBILITY_RFC5245: | |
208 | 211 | @NICE_COMPATIBILITY_GOOGLE: |
209 | 212 | @NICE_COMPATIBILITY_MSN: |
210 | 213 | @NICE_COMPATIBILITY_WLM2009: |
214 | @NICE_COMPATIBILITY_DRAFT19: | |
211 | 215 | @NICE_COMPATIBILITY_LAST: |
212 | 216 | |
213 | 217 | <!-- ##### USER_FUNCTION NiceAgentRecvFunc ##### --> |
302 | 306 | |
303 | 307 | @agent: |
304 | 308 | @stream_id: |
309 | @Returns: | |
305 | 310 | |
306 | 311 | |
307 | 312 | <!-- ##### FUNCTION nice_agent_set_remote_credentials ##### --> |
14 | 14 | </para> |
15 | 15 | |
16 | 16 | <!-- ##### SECTION Stability_Level ##### --> |
17 | ||
18 | ||
19 | <!-- ##### SECTION Image ##### --> | |
17 | 20 | |
18 | 21 | |
19 | 22 | <!-- ##### ENUM StunUsageBindReturn ##### --> |
14 | 14 | </para> |
15 | 15 | |
16 | 16 | <!-- ##### SECTION Stability_Level ##### --> |
17 | ||
18 | ||
19 | <!-- ##### SECTION Image ##### --> | |
17 | 20 | |
18 | 21 | |
19 | 22 | <!-- ##### STRUCT NiceCandidate ##### --> |
16 | 16 | <!-- ##### SECTION Stability_Level ##### --> |
17 | 17 | |
18 | 18 | |
19 | <!-- ##### SECTION Image ##### --> | |
20 | ||
21 | ||
19 | 22 | <!-- ##### FUNCTION nice_debug_enable ##### --> |
20 | 23 | <para> |
21 | 24 |
16 | 16 | <!-- ##### SECTION Stability_Level ##### --> |
17 | 17 | |
18 | 18 | |
19 | <!-- ##### SECTION Image ##### --> | |
20 | ||
21 | ||
19 | 22 | <!-- ##### ENUM StunUsageIceCompatibility ##### --> |
20 | 23 | <para> |
21 | 24 | |
22 | 25 | </para> |
23 | 26 | |
24 | @STUN_USAGE_ICE_COMPATIBILITY_DRAFT19: | |
27 | @STUN_USAGE_ICE_COMPATIBILITY_RFC5245: | |
25 | 28 | @STUN_USAGE_ICE_COMPATIBILITY_GOOGLE: |
26 | 29 | @STUN_USAGE_ICE_COMPATIBILITY_MSN: |
30 | @STUN_USAGE_ICE_COMPATIBILITY_DRAFT19: | |
27 | 31 | |
28 | 32 | <!-- ##### ENUM StunUsageIceReturn ##### --> |
29 | 33 | <para> |
16 | 16 | <!-- ##### SECTION Stability_Level ##### --> |
17 | 17 | |
18 | 18 | |
19 | <!-- ##### SECTION Image ##### --> | |
20 | ||
21 | ||
19 | 22 | <!-- ##### FUNCTION nice_interfaces_get_ip_for_interface ##### --> |
20 | 23 | <para> |
21 | 24 | |
30 | 33 | |
31 | 34 | </para> |
32 | 35 | |
36 | @void: | |
33 | 37 | @Returns: |
34 | 38 | |
35 | 39 |
14 | 14 | </para> |
15 | 15 | |
16 | 16 | <!-- ##### SECTION Stability_Level ##### --> |
17 | ||
18 | ||
19 | <!-- ##### SECTION Image ##### --> | |
17 | 20 | |
18 | 21 | |
19 | 22 | <!-- ##### STRUCT PseudoTcpSocket ##### --> |
14 | 14 | </para> |
15 | 15 | |
16 | 16 | <!-- ##### SECTION Stability_Level ##### --> |
17 | ||
18 | ||
19 | <!-- ##### SECTION Image ##### --> | |
17 | 20 | |
18 | 21 | |
19 | 22 | <!-- ##### TYPEDEF StunAgent ##### --> |
227 | 230 | |
228 | 231 | </para> |
229 | 232 | |
233 | @void: | |
230 | 234 | |
231 | 235 | |
232 | 236 | <!-- ##### FUNCTION stun_debug_disable ##### --> |
234 | 238 | |
235 | 239 | </para> |
236 | 240 | |
237 | ||
238 | ||
241 | @void: | |
242 | ||
243 |
14 | 14 | </para> |
15 | 15 | |
16 | 16 | <!-- ##### SECTION Stability_Level ##### --> |
17 | ||
18 | ||
19 | <!-- ##### SECTION Image ##### --> | |
17 | 20 | |
18 | 21 | |
19 | 22 | <!-- ##### STRUCT StunMessage ##### --> |
14 | 14 | </para> |
15 | 15 | |
16 | 16 | <!-- ##### SECTION Stability_Level ##### --> |
17 | ||
18 | ||
19 | <!-- ##### SECTION Image ##### --> | |
17 | 20 | |
18 | 21 | |
19 | 22 | <!-- ##### TYPEDEF StunTimer ##### --> |
14 | 14 | </para> |
15 | 15 | |
16 | 16 | <!-- ##### SECTION Stability_Level ##### --> |
17 | ||
18 | ||
19 | <!-- ##### SECTION Image ##### --> | |
17 | 20 | |
18 | 21 | |
19 | 22 | <!-- ##### ENUM StunUsageTurnCompatibility ##### --> |
170 | 170 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
171 | 171 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
172 | 172 | PKG_CONFIG = @PKG_CONFIG@ |
173 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | |
174 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | |
173 | 175 | RANLIB = @RANLIB@ |
174 | 176 | SED = @SED@ |
175 | 177 | SET_MAKE = @SET_MAKE@ |
74 | 74 | scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) |
75 | 75 | @echo 'gtk-doc: Scanning header files' |
76 | 76 | @-chmod -R u+w $(srcdir) |
77 | @cd $(srcdir) && \ | |
78 | gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) | |
77 | @_source_dir='' ; for i in $(DOC_SOURCE_DIR) ; do \ | |
78 | _source_dir="$${_source_dir} --source-dir=$$i" ; \ | |
79 | done ; \ | |
80 | cd $(srcdir) && \ | |
81 | gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) | |
79 | 82 | @if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ |
80 | 83 | CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ |
81 | 84 | else \ |
108 | 111 | sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) |
109 | 112 | @echo 'gtk-doc: Building XML' |
110 | 113 | @-chmod -R u+w $(srcdir) |
111 | @cd $(srcdir) && \ | |
112 | gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS) | |
114 | @_source_dir='' ; for i in $(DOC_SOURCE_DIR) ; do \ | |
115 | _source_dir="$${_source_dir} --source-dir=$$i" ; \ | |
116 | done ; \ | |
117 | cd $(srcdir) && \ | |
118 | gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) | |
113 | 119 | @touch sgml-build.stamp |
114 | 120 | |
115 | 121 | sgml.stamp: sgml-build.stamp |
173 | 173 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
174 | 174 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
175 | 175 | PKG_CONFIG = @PKG_CONFIG@ |
176 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | |
177 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | |
176 | 178 | RANLIB = @RANLIB@ |
177 | 179 | SED = @SED@ |
178 | 180 | SET_MAKE = @SET_MAKE@ |
150 | 150 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
151 | 151 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
152 | 152 | PKG_CONFIG = @PKG_CONFIG@ |
153 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | |
154 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | |
153 | 155 | RANLIB = @RANLIB@ |
154 | 156 | SED = @SED@ |
155 | 157 | SET_MAKE = @SET_MAKE@ |
144 | 144 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
145 | 145 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
146 | 146 | PKG_CONFIG = @PKG_CONFIG@ |
147 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | |
148 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | |
147 | 149 | RANLIB = @RANLIB@ |
148 | 150 | SED = @SED@ |
149 | 151 | SET_MAKE = @SET_MAKE@ |
192 | 192 | |
193 | 193 | if (priv->username) |
194 | 194 | ulen = strlen (priv->username); |
195 | if (ulen > 255) { | |
196 | nice_debug ("Socks5 username length > 255"); | |
197 | goto error; | |
198 | } | |
195 | 199 | |
196 | 200 | if (priv->password) |
197 | 201 | plen = strlen (priv->password); |
202 | if (plen > 255) { | |
203 | nice_debug ("Socks5 password length > 255"); | |
204 | goto error; | |
205 | } | |
198 | 206 | |
199 | 207 | msg[len++] = 0x01; /* auth version */ |
200 | 208 | msg[len++] = ulen; /* username length */ |
90 | 90 | int ret; |
91 | 91 | struct sockaddr_storage name; |
92 | 92 | guint name_len = sizeof (name); |
93 | NiceSocket *sock = g_slice_new0 (NiceSocket); | |
93 | NiceSocket *sock; | |
94 | 94 | TcpPriv *priv; |
95 | 95 | |
96 | 96 | if (addr == NULL) { |
98 | 98 | return NULL; |
99 | 99 | } |
100 | 100 | |
101 | sock = g_slice_new0 (NiceSocket); | |
102 | ||
101 | 103 | nice_address_copy_to_sockaddr(addr, (struct sockaddr *)&name); |
102 | 104 | |
103 | if ((sockfd == -1) && | |
104 | ((name.ss_family == AF_UNSPEC) || | |
105 | (name.ss_family == AF_INET))) { | |
106 | sockfd = socket (PF_INET, SOCK_STREAM, 0); | |
107 | name.ss_family = AF_INET; | |
105 | if (sockfd == -1) { | |
106 | if (name.ss_family == AF_UNSPEC || name.ss_family == AF_INET) { | |
107 | sockfd = socket (PF_INET, SOCK_STREAM, 0); | |
108 | name.ss_family = AF_INET; | |
108 | 109 | #ifdef HAVE_SA_LEN |
109 | name.ss_len = sizeof (struct sockaddr_in); | |
110 | #endif | |
110 | name.ss_len = sizeof (struct sockaddr_in); | |
111 | #endif | |
112 | } else if (name.ss_family == AF_INET6) { | |
113 | sockfd = socket (PF_INET6, SOCK_STREAM, 0); | |
114 | name.ss_family = AF_INET6; | |
115 | #ifdef HAVE_SA_LEN | |
116 | name.ss_len = sizeof (struct sockaddr_in6); | |
117 | #endif | |
118 | } | |
111 | 119 | } |
112 | 120 | |
113 | 121 | if (sockfd == -1) { |
72 | 72 | socklen_t name_len = sizeof (name); |
73 | 73 | NiceSocket *sock = g_slice_new0 (NiceSocket); |
74 | 74 | |
75 | if (!sock) { | |
76 | return NULL; | |
77 | } | |
78 | ||
79 | 75 | if (addr != NULL) { |
80 | 76 | nice_address_copy_to_sockaddr(addr, (struct sockaddr *)&name); |
81 | 77 | } else { |
89 | 85 | #ifdef HAVE_SA_LEN |
90 | 86 | name.ss_len = sizeof (struct sockaddr_in); |
91 | 87 | #endif |
88 | } else if (name.ss_family == AF_INET6) { | |
89 | sockfd = socket (PF_INET6, SOCK_DGRAM, IPPROTO_UDP); | |
90 | name.ss_family = AF_INET6; | |
91 | #ifdef HAVE_SA_LEN | |
92 | name.ss_len = sizeof (struct sockaddr_in6); | |
93 | #endif | |
92 | 94 | } |
93 | 95 | |
94 | 96 | if (sockfd == -1) { |
211 | 211 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
212 | 212 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
213 | 213 | PKG_CONFIG = @PKG_CONFIG@ |
214 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | |
215 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | |
214 | 216 | RANLIB = @RANLIB@ |
215 | 217 | SED = @SED@ |
216 | 218 | SET_MAKE = @SET_MAKE@ |
82 | 82 | /* first 4 bytes done, last 8 bytes not summed */ |
83 | 83 | data[2].len = len - 12u; |
84 | 84 | |
85 | return htonl (crc32 (data, 3, wlm2009_stupid_crc32_typo) ^ 0x5354554e); | |
85 | return htonl (stun_crc32 (data, 3, wlm2009_stupid_crc32_typo) ^ 0x5354554e); | |
86 | 86 | } |
87 | 87 | |
88 | 88 | bool stun_message_has_cookie (const StunMessage *msg) |
139 | 139 | }; |
140 | 140 | |
141 | 141 | |
142 | uint32_t crc32 (const crc_data *data, size_t n, bool wlm2009_stupid_crc32_typo) | |
142 | uint32_t stun_crc32 (const crc_data *data, size_t n, bool wlm2009_stupid_crc32_typo) | |
143 | 143 | { |
144 | 144 | size_t i; |
145 | 145 | uint32_t crc = 0xffffffff; |
53 | 53 | } crc_data; |
54 | 54 | |
55 | 55 | |
56 | uint32_t crc32 (const crc_data *data, size_t n, bool wlm2009_stupid_crc32_typo); | |
56 | uint32_t stun_crc32 (const crc_data *data, size_t n, bool wlm2009_stupid_crc32_typo); | |
57 | 57 | |
58 | 58 | #endif /* _CRC32_H */ |
163 | 163 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
164 | 164 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
165 | 165 | PKG_CONFIG = @PKG_CONFIG@ |
166 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | |
167 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | |
166 | 168 | RANLIB = @RANLIB@ |
167 | 169 | SED = @SED@ |
168 | 170 | SET_MAKE = @SET_MAKE@ |
110 | 110 | len = sizeof (resp_buf); |
111 | 111 | val2 = stun_usage_ice_conncheck_create_reply (&agent, &req, |
112 | 112 | &resp, resp_buf, &len, (struct sockaddr *)&ip4, |
113 | sizeof (ip4), &control, tie, STUN_USAGE_ICE_COMPATIBILITY_DRAFT19); | |
113 | sizeof (ip4), &control, tie, STUN_USAGE_ICE_COMPATIBILITY_RFC5245); | |
114 | 114 | assert (val2 == STUN_USAGE_ICE_RETURN_INVALID_REQUEST); |
115 | 115 | assert (len == 0); |
116 | 116 | |
124 | 124 | len = sizeof (resp_buf); |
125 | 125 | val2 = stun_usage_ice_conncheck_create_reply (&agent, &req, |
126 | 126 | &resp, resp_buf, &len, (struct sockaddr *)&ip4, |
127 | sizeof (ip4), &control, tie, STUN_USAGE_ICE_COMPATIBILITY_DRAFT19); | |
127 | sizeof (ip4), &control, tie, STUN_USAGE_ICE_COMPATIBILITY_RFC5245); | |
128 | 128 | assert (val2 == STUN_USAGE_ICE_RETURN_INVALID_METHOD); |
129 | 129 | assert (len > 0); |
130 | 130 | |
178 | 178 | len = sizeof (resp_buf); |
179 | 179 | val2 = stun_usage_ice_conncheck_create_reply (&agent, &req, |
180 | 180 | &resp, resp_buf, &len, (struct sockaddr *)&ip4, |
181 | sizeof (ip4), &control, tie, STUN_USAGE_ICE_COMPATIBILITY_DRAFT19); | |
181 | sizeof (ip4), &control, tie, STUN_USAGE_ICE_COMPATIBILITY_RFC5245); | |
182 | 182 | assert (val == STUN_USAGE_ICE_RETURN_SUCCESS); |
183 | 183 | assert (len > 0); |
184 | 184 | assert (stun_agent_validate (&agent, &resp, resp_buf, len, |
198 | 198 | len = sizeof (resp_buf); |
199 | 199 | val2 = stun_usage_ice_conncheck_create_reply (&agent, &req, |
200 | 200 | &resp, resp_buf, &len, (struct sockaddr *)&ip4, |
201 | sizeof (ip4), &control, tie, STUN_USAGE_ICE_COMPATIBILITY_DRAFT19); | |
201 | sizeof (ip4), &control, tie, STUN_USAGE_ICE_COMPATIBILITY_RFC5245); | |
202 | 202 | assert (val2 == STUN_USAGE_ICE_RETURN_INVALID_ADDRESS); |
203 | 203 | assert (len == 0); |
204 | 204 | |
218 | 218 | control = true; |
219 | 219 | val2 = stun_usage_ice_conncheck_create_reply (&agent, &req, |
220 | 220 | &resp, resp_buf, &len, (struct sockaddr *)&ip4, |
221 | sizeof (ip4), &control, tie, STUN_USAGE_ICE_COMPATIBILITY_DRAFT19); | |
221 | sizeof (ip4), &control, tie, STUN_USAGE_ICE_COMPATIBILITY_RFC5245); | |
222 | 222 | assert (val2 == STUN_USAGE_ICE_RETURN_ROLE_CONFLICT); |
223 | 223 | assert (len > 0); |
224 | 224 | assert (control == false); |
239 | 239 | control = false; |
240 | 240 | val2 = stun_usage_ice_conncheck_create_reply (&agent, &req, |
241 | 241 | &resp, resp_buf, &len, (struct sockaddr *)&ip4, |
242 | sizeof (ip4), &control, tie, STUN_USAGE_ICE_COMPATIBILITY_DRAFT19); | |
242 | sizeof (ip4), &control, tie, STUN_USAGE_ICE_COMPATIBILITY_RFC5245); | |
243 | 243 | assert (val2 == STUN_USAGE_ICE_RETURN_SUCCESS); |
244 | 244 | assert (len > 0); |
245 | 245 | assert (control == false); |
150 | 150 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
151 | 151 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
152 | 152 | PKG_CONFIG = @PKG_CONFIG@ |
153 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | |
154 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | |
153 | 155 | RANLIB = @RANLIB@ |
154 | 156 | SED = @SED@ |
155 | 157 | SET_MAKE = @SET_MAKE@ |
69 | 69 | |
70 | 70 | stun_agent_init_request (agent, msg, buffer, buffer_len, STUN_BINDING); |
71 | 71 | |
72 | if (compatibility == STUN_USAGE_ICE_COMPATIBILITY_DRAFT19) { | |
72 | if (compatibility == STUN_USAGE_ICE_COMPATIBILITY_RFC5245) { | |
73 | 73 | if (cand_use) |
74 | 74 | { |
75 | 75 | val = stun_message_append_flag (msg, STUN_ATTRIBUTE_USE_CANDIDATE); |
59 | 59 | |
60 | 60 | /** |
61 | 61 | * StunUsageIceCompatibility: |
62 | * @STUN_USAGE_ICE_COMPATIBILITY_DRAFT19: The ICE compatibility with draft 19 | |
62 | * @STUN_USAGE_ICE_COMPATIBILITY_RFC5245: The ICE compatibility with RFC 5245 | |
63 | 63 | * @STUN_USAGE_ICE_COMPATIBILITY_GOOGLE: The ICE compatibility with Google's |
64 | 64 | * implementation of ICE |
65 | 65 | * @STUN_USAGE_ICE_COMPATIBILITY_MSN: The ICE compatibility with MSN's |
66 | 66 | * implementation of ICE |
67 | * @STUN_USAGE_ICE_COMPATIBILITY_DRAFT19: The ICE compatibility with draft 19 | |
67 | 68 | * |
68 | 69 | * This enum defines which compatibility modes this ICE usage can use |
70 | * | |
71 | * <warning>@STUN_USAGE_ICE_COMPATIBILITY_DRAFT19 is deprecated and should not | |
72 | * be used in newly-written code. It is kept for compatibility reasons and | |
73 | * represents the same compatibility as @STUN_USAGE_ICE_COMPATIBILITY_RFC5245 | |
74 | * </warning> | |
69 | 75 | */ |
70 | 76 | typedef enum { |
71 | STUN_USAGE_ICE_COMPATIBILITY_DRAFT19, | |
77 | STUN_USAGE_ICE_COMPATIBILITY_RFC5245, | |
72 | 78 | STUN_USAGE_ICE_COMPATIBILITY_GOOGLE, |
73 | 79 | STUN_USAGE_ICE_COMPATIBILITY_MSN, |
80 | STUN_USAGE_ICE_COMPATIBILITY_DRAFT19 = STUN_USAGE_ICE_COMPATIBILITY_RFC5245, | |
74 | 81 | } StunUsageIceCompatibility; |
75 | 82 | |
76 | 83 | |
126 | 133 | * request |
127 | 134 | * |
128 | 135 | * Builds an ICE connectivity check STUN message. |
129 | * If the compatibility is not #STUN_USAGE_ICE_COMPATIBILITY_DRAFT19, the | |
136 | * If the compatibility is not #STUN_USAGE_ICE_COMPATIBILITY_RFC5245, the | |
130 | 137 | * @cand_use, @controlling, @priority and @tie arguments are not used. |
131 | 138 | * Returns: The length of the message built. |
132 | 139 | */ |
191 | 191 | PACKAGE_VERSION = @PACKAGE_VERSION@ |
192 | 192 | PATH_SEPARATOR = @PATH_SEPARATOR@ |
193 | 193 | PKG_CONFIG = @PKG_CONFIG@ |
194 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | |
195 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | |
194 | 196 | RANLIB = @RANLIB@ |
195 | 197 | SED = @SED@ |
196 | 198 | SET_MAKE = @SET_MAKE@ |
56 | 56 | if (!nice_address_set_from_string (&addr, "127.0.0.1")) |
57 | 57 | g_assert_not_reached (); |
58 | 58 | |
59 | agent = nice_agent_new (NULL, NICE_COMPATIBILITY_DRAFT19); | |
59 | agent = nice_agent_new (NULL, NICE_COMPATIBILITY_RFC5245); | |
60 | 60 | nice_agent_add_local_address (agent, &addr); |
61 | 61 | |
62 | 62 | g_assert (nice_agent_add_stream (agent, 1) == 1); |
492 | 492 | */ |
493 | 493 | |
494 | 494 | /* step: create the agents L and R */ |
495 | lagent = nice_agent_new (g_main_loop_get_context (global_mainloop), NICE_COMPATIBILITY_DRAFT19); | |
496 | ragent = nice_agent_new (g_main_loop_get_context (global_mainloop), NICE_COMPATIBILITY_DRAFT19); | |
495 | lagent = nice_agent_new (g_main_loop_get_context (global_mainloop), NICE_COMPATIBILITY_RFC5245); | |
496 | ragent = nice_agent_new (g_main_loop_get_context (global_mainloop), NICE_COMPATIBILITY_RFC5245); | |
497 | 497 | |
498 | 498 | |
499 | 499 |
72 | 72 | #endif |
73 | 73 | |
74 | 74 | #else |
75 | #define NICE_COMPATIBILITY NICE_COMPATIBILITY_DRAFT19 | |
75 | #define NICE_COMPATIBILITY NICE_COMPATIBILITY_RFC5245 | |
76 | 76 | #if USE_LOOPBACK |
77 | 77 | #define USE_TURN_SERVER_ORG 1 |
78 | 78 | #else |
75 | 75 | g_thread_init (NULL); |
76 | 76 | loop = g_main_loop_new (NULL, FALSE); |
77 | 77 | |
78 | agent = nice_agent_new (g_main_loop_get_context (loop), NICE_COMPATIBILITY_DRAFT19); | |
78 | agent = nice_agent_new (g_main_loop_get_context (loop), NICE_COMPATIBILITY_RFC5245); | |
79 | 79 | nice_address_set_ipv4 (&addr, 0x7f000001); |
80 | 80 | nice_agent_add_local_address (agent, &addr); |
81 | 81 | stream = nice_agent_add_stream (agent, 1); |
403 | 403 | |
404 | 404 | |
405 | 405 | /* step: create the agents L and R */ |
406 | lagent = nice_agent_new (g_main_loop_get_context (global_mainloop), NICE_COMPATIBILITY_DRAFT19); | |
407 | ragent = nice_agent_new (g_main_loop_get_context (global_mainloop), NICE_COMPATIBILITY_DRAFT19); | |
406 | lagent = nice_agent_new (g_main_loop_get_context (global_mainloop), NICE_COMPATIBILITY_RFC5245); | |
407 | ragent = nice_agent_new (g_main_loop_get_context (global_mainloop), NICE_COMPATIBILITY_RFC5245); | |
408 | 408 | |
409 | 409 | |
410 | 410 | /* step: add a timer to catch state changes triggered by signals */ |
61 | 61 | g_assert (nice_address_set_from_string (&addr_remote, "127.0.0.1")); |
62 | 62 | nice_address_set_port (&addr_remote, 2345); |
63 | 63 | |
64 | agent = nice_agent_new ( NULL, NICE_COMPATIBILITY_DRAFT19); | |
64 | agent = nice_agent_new ( NULL, NICE_COMPATIBILITY_RFC5245); | |
65 | 65 | |
66 | 66 | g_assert (agent->local_addresses == NULL); |
67 | 67 |