Codebase list libnice / upstream/0.0.13
Imported Upstream version 0.0.13 Laurent Bigonville 13 years ago
80 changed file(s) with 3628 addition(s) and 3581 deletion(s). Raw diff Collapse all Expand all
179179 PACKAGE_VERSION = @PACKAGE_VERSION@
180180 PATH_SEPARATOR = @PATH_SEPARATOR@
181181 PKG_CONFIG = @PKG_CONFIG@
182 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
183 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
182184 RANLIB = @RANLIB@
183185 SED = @SED@
184186 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
015 libnice 0.0.11 (2010-03-18)
116 ===========================
217
80478047 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
80488048
80498049 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
8050 # serial 1 (pkg-config-0.24)
80508051 #
80518052 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
80528053 #
80748075 AC_DEFUN([PKG_PROG_PKG_CONFIG],
80758076 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
80768077 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
80788082 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
80798083 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
80808084 fi
80878091 AC_MSG_RESULT([no])
80888092 PKG_CONFIG=""
80898093 fi
8090
80918094 fi[]dnl
80928095 ])# PKG_PROG_PKG_CONFIG
80938096
80968099 # Check to see whether a particular set of modules exists. Similar
80978100 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
80988101 #
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
81038106 # --------------------------------------------------------------
81048107 AC_DEFUN([PKG_CHECK_EXISTS],
81058108 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
81068109 if test -n "$PKG_CONFIG" && \
81078110 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8108 m4_ifval([$2], [$2], [:])
8111 m4_default([$2], [:])
81098112 m4_ifvaln([$3], [else
81108113 $3])dnl
81118114 fi])
81128115
8113
81148116 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
81158117 # ---------------------------------------------
81168118 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
81278127 fi[]dnl
81288128 ])# _PKG_CONFIG
81298129
81658165 See the pkg-config man page for more details.])
81668166
81678167 if test $pkg_failed = yes; then
8168 AC_MSG_RESULT([no])
81688169 _PKG_SHORT_ERRORS_SUPPORTED
81698170 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`
81718172 else
8172 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
8173 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
81738174 fi
81748175 # Put the nasty error message in config.log where it belongs
81758176 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
81768177
8177 ifelse([$4], , [AC_MSG_ERROR(dnl
8178 m4_default([$4], [AC_MSG_ERROR(
81788179 [Package requirements ($2) were not met:
81798180
81808181 $$1_PKG_ERRORS
81828183 Consider adjusting the PKG_CONFIG_PATH environment variable if you
81838184 installed software in a non-standard prefix.
81848185
8185 _PKG_TEXT
8186 ])],
8187 [AC_MSG_RESULT([no])
8188 $4])
8186 _PKG_TEXT])dnl
8187 ])
81898188 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(
81918191 [The pkg-config script could not be found or is too old. Make sure it
81928192 is in your PATH or set the PKG_CONFIG environment variable to the full
81938193 path to pkg-config.
81948194
81958195 _PKG_TEXT
81968196
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 ])
81998199 else
82008200 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
82018201 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
82028202 AC_MSG_RESULT([yes])
8203 ifelse([$3], , :, [$3])
8203 $3
82048204 fi[]dnl
82058205 ])# PKG_CHECK_MODULES
82068206
172172 PACKAGE_VERSION = @PACKAGE_VERSION@
173173 PATH_SEPARATOR = @PATH_SEPARATOR@
174174 PKG_CONFIG = @PKG_CONFIG@
175 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
176 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
175177 RANLIB = @RANLIB@
176178 SED = @SED@
177179 SET_MAKE = @SET_MAKE@
148148 STUN_USAGE_ICE_COMPATIBILITY_GOOGLE :
149149 agent->compatibility == NICE_COMPATIBILITY_MSN ?
150150 STUN_USAGE_ICE_COMPATIBILITY_MSN :
151 STUN_USAGE_ICE_COMPATIBILITY_DRAFT19;
151 STUN_USAGE_ICE_COMPATIBILITY_RFC5245;
152152 }
153153
154154
275275 "compatibility",
276276 "ICE specification compatibility",
277277 "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,
280280 G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
281281
282282 g_object_class_install_property (gobject_class, PROP_STUN_SERVER,
670670 agent->media_after_tick = FALSE;
671671 agent->software_attribute = NULL;
672672
673 agent->compatibility = NICE_COMPATIBILITY_DRAFT19;
673 agent->compatibility = NICE_COMPATIBILITY_RFC5245;
674674 agent->reliable = FALSE;
675675
676676 stun_agent_init (&agent->stun_agent, STUN_ALL_KNOWN_ATTRIBUTES,
818818 {
819819 case PROP_MAIN_CONTEXT:
820820 agent->main_context = g_value_get_pointer (value);
821 if (agent->main_context != NULL)
822 g_main_context_ref (agent->main_context);
821823 break;
822824
823825 case PROP_COMPATIBILITY:
12911293 return nice_candidate_pair_priority (remote->priority, local->priority);
12921294 }
12931295
1294 static gboolean
1296 static void
12951297 priv_add_new_candidate_discovery_stun (NiceAgent *agent,
12961298 NiceSocket *socket, NiceAddress server,
12971299 Stream *stream, guint component_id)
12981300 {
12991301 CandidateDiscovery *cdisco;
1300 GSList *modified_list;
13011302
13021303 /* note: no need to check for redundant candidates, as this is
13031304 * done later on in the process */
13041305
13051306 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
13321325 priv_add_new_candidate_discovery_turn (NiceAgent *agent,
13331326 NiceSocket *socket, TurnServer *turn,
13341327 Stream *stream, guint component_id)
13351328 {
13361329 CandidateDiscovery *cdisco;
1337 GSList *modified_list;
1338 GSList *socket_modified_list;
1330 Component *component = stream_find_component_by_id (stream, component_id);
13391331
13401332 /* note: no need to check for redundant candidates, as this is
13411333 * done later on in the process */
13421334
13431335 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);
14161347 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;
14221375 }
14231376 }
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;
14591424 }
14601425
14611426 NICEAPI_EXPORT guint
14641429 guint n_components)
14651430 {
14661431 Stream *stream;
1467 GSList *modified_list = NULL;
14681432 guint ret = 0;
14691433 guint i;
14701434
14711435 agent_lock();
14721436 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);
15021463 }
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);
15111468
15121469 ret = stream->id;
15131470
17001657
17011658 #endif
17021659
1703 NICEAPI_EXPORT void
1660 NICEAPI_EXPORT gboolean
17041661 nice_agent_gather_candidates (
17051662 NiceAgent *agent,
17061663 guint stream_id)
17851742 n + 1, addr);
17861743
17871744 if (!host_candidate) {
1788 g_error ("No host candidate??");
1789 break;
1745 g_warning ("No host candidate??");
1746 return FALSE;
17901747 }
17911748
17921749 #ifdef HAVE_GUPNP
18051762 agent->stun_server_ip) {
18061763 NiceAddress stun_server;
18071764 if (nice_address_set_from_string (&stun_server, agent->stun_server_ip)) {
1808 gboolean res;
18091765 nice_address_set_port (&stun_server, agent->stun_server_port);
18101766
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);
18221772 }
18231773 }
18241774
18281778 for (item = component->turn_servers; item; item = item->next) {
18291779 TurnServer *turn = item->data;
18301780
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);
18421786 }
18431787 }
18441788 }
18601804 done:
18611805
18621806 agent_unlock();
1807
1808 return TRUE;
18631809 }
18641810
18651811 static void priv_free_upnp (NiceAgent *agent)
19321878 nice_agent_add_local_address (NiceAgent *agent, NiceAddress *addr)
19331879 {
19341880 NiceAddress *dup;
1935 GSList *modified_list;
1936 gboolean ret = FALSE;
19371881
19381882 agent_lock();
19391883
19401884 dup = nice_address_dup (addr);
19411885 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
19511888 agent_unlock();
1952 return ret;
1889 return TRUE;
19531890 }
19541891
19551892 static gboolean priv_add_remote_candidate (
19671904 {
19681905 Component *component;
19691906 NiceCandidate *candidate;
1970 gboolean error_flag = FALSE;
19711907
19721908 if (!agent_find_component (agent, stream_id, component_id, NULL, &component))
19731909 return FALSE;
20101946 candidate->password = g_strdup (password);
20111947 }
20121948 if (conn_check_add_for_candidate (agent, stream_id, component, candidate) < 0)
2013 error_flag = TRUE;
1949 goto errors;
20141950 }
20151951 else {
20161952 /* case 2: add a new candidate */
20171953
20181954 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;
20661989 }
20671990
20681991 return TRUE;
1992
1993 errors:
1994 nice_candidate_free (candidate);
1995 return FALSE;
20691996 }
20701997
20711998 NICEAPI_EXPORT gboolean
21622089
21632090 for (i = candidates; i && added >= 0; i = i->next) {
21642091 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 }
21812109 }
21822110
21832111 conn_check_remote_candidates_set(agent);
24512379 g_free (agent->software_attribute);
24522380 agent->software_attribute = NULL;
24532381
2382 if (agent->main_context != NULL)
2383 g_main_context_unref (agent->main_context);
2384 agent->main_context = NULL;
2385
24542386 if (G_OBJECT_CLASS (nice_agent_parent_class)->dispose)
24552387 G_OBJECT_CLASS (nice_agent_parent_class)->dispose (object);
24562388
24822414 IOCtx *ctx;
24832415
24842416 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
24932424 return ctx;
24942425 }
24952426
6060 GSList *lcands = NULL;
6161
6262 // Create a nice agent
63 NiceAgent *agent = nice_agent_new (NULL, NICE_COMPATIBILITY_DRAFT19);
63 NiceAgent *agent = nice_agent_new (NULL, NICE_COMPATIBILITY_RFC5245);
6464
6565 // Connect the signals
6666 g_signal_connect (G_OBJECT (agent), "candidate-gathering-done",
207207
208208 /**
209209 * NiceCompatibility:
210 * @NICE_COMPATIBILITY_DRAFT19: Use compatibility for ICE Draft 19 specs
210 * @NICE_COMPATIBILITY_RFC5245: Use compatibility with the RFC5245 ICE specs
211211 * @NICE_COMPATIBILITY_GOOGLE: Use compatibility for Google Talk specs
212212 * @NICE_COMPATIBILITY_MSN: Use compatibility for MSN Messenger specs
213213 * @NICE_COMPATIBILITY_WLM2009: Use compatibility with Windows Live Messenger
214214 * 2009
215 * @NICE_COMPATIBILITY_DRAFT19: Use compatibility for ICE Draft 19 specs
215216 * @NICE_COMPATIBILITY_LAST: Dummy last compatibility mode
216217 *
217218 * An enum to specify which compatible specifications the #NiceAgent should use.
218219 * 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>
219224 */
220225 typedef enum
221226 {
222 NICE_COMPATIBILITY_DRAFT19 = 0,
227 NICE_COMPATIBILITY_RFC5245 = 0,
223228 NICE_COMPATIBILITY_GOOGLE,
224229 NICE_COMPATIBILITY_MSN,
225230 NICE_COMPATIBILITY_WLM2009,
226 NICE_COMPATIBILITY_LAST = NICE_COMPATIBILITY_WLM2009
231 NICE_COMPATIBILITY_DRAFT19 = NICE_COMPATIBILITY_RFC5245,
232 NICE_COMPATIBILITY_LAST = NICE_COMPATIBILITY_WLM2009,
227233 } NiceCompatibility;
228234
229235 /**
377383 *
378384 * Start the candidate gathering process.
379385 * 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.
380388 *
381389 * See also: nice_agent_add_local_address()
382390 <note>
390398 </para>
391399 </note>
392400 */
393 void
401 gboolean
394402 nice_agent_gather_candidates (
395403 NiceAgent *agent,
396404 guint stream_id);
674682 * This function will set the value of the SOFTWARE attribute to be added to
675683 * STUN requests, responses and error responses sent during connectivity checks.
676684 * <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
678686 * and #NICE_COMPATIBILITY_WLM2009 compatibility modes.
679687 *
680688 * </para>
309309 candidate->transport);
310310
311311 if (!remote) {
312 GSList *modified_list = NULL;
313
314312 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);
326316 }
327317
328318 if (component->selected_pair.keepalive.tick_source != NULL) {
10351035 }
10361036 }
10371037 }
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;
10491050 }
10501051 }
10511052 }
12471248 * Creates a new connectivity check pair and adds it to
12481249 * the agent's list of checks.
12491250 */
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 {
12531253 Stream *stream = agent_find_stream (agent, stream_id);
12541254 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 }
13041284 }
13051285
13061286 /*
13281308 if (local->transport == remote->transport &&
13291309 local->addr.s.addr.sa_family == remote->addr.s.addr.sa_family) {
13301310
1331 gboolean result;
1332
13331311 /* note: do not create pairs where local candidate is
13341312 * 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 ||
13361314 agent->compatibility == NICE_COMPATIBILITY_WLM2009) &&
13371315 local->type == NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE)
13381316 continue;
13391317
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);
13581330 }
13591331 }
13601332 }
14511423 gsize local_len = strlen (local);
14521424
14531425 if (remote_len > 0 && local_len > 0) {
1454 if (agent->compatibility == NICE_COMPATIBILITY_DRAFT19 &&
1426 if (agent->compatibility == NICE_COMPATIBILITY_RFC5245 &&
14551427 dest_len >= remote_len + local_len + 1) {
14561428 memcpy (dest, remote, remote_len);
14571429 len += remote_len;
16401612 {
16411613 gchar tmpbuf[INET6_ADDRSTRLEN];
16421614 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,
16441616 tmpbuf,
1645 ntohs(nice_address_get_port (&pair->remote->addr)),
1617 nice_address_get_port (&pair->remote->addr),
16461618 ((NiceSocket *)pair->local->sockptr)->fileno,
16471619 pair->foundation, pair->component_id,
16481620 (unsigned long long)agent->tie_breaker,
16501622
16511623 }
16521624
1653 if (cand_use)
1625 if (cand_use)
16541626 pair->nominated = controlling;
16551627
16561628 if (uname_len > 0) {
17641736 static gboolean priv_schedule_triggered_check (NiceAgent *agent, Stream *stream, Component *component, NiceSocket *local_socket, NiceCandidate *remote_cand, gboolean use_candidate)
17651737 {
17661738 GSList *i;
1767 gboolean result = FALSE;
1739 NiceCandidate *local = NULL;
17681740
17691741 for (i = stream->conncheck_list; i ; i = i->next) {
17701742 CandidateCheckPair *p = i->data;
17921764 /* note: to take care of the controlling-controlling case in
17931765 * aggressive nomination mode, send a new triggered
17941766 * check to nominate the pair */
1795 if ((agent->compatibility == NICE_COMPATIBILITY_DRAFT19 ||
1767 if ((agent->compatibility == NICE_COMPATIBILITY_RFC5245 ||
17961768 agent->compatibility == NICE_COMPATIBILITY_WLM2009) &&
17971769 agent->controlling_mode)
17981770 priv_conn_check_initiate (agent, p);
18051777 }
18061778 }
18071779
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 }
18251795 }
18261796
18271797
18931863 }
18941864
18951865 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;
19131877 }
19141878
19151879 /*
19211885 static CandidateCheckPair *priv_add_peer_reflexive_pair (NiceAgent *agent, guint stream_id, guint component_id, NiceCandidate *local_cand, CandidateCheckPair *parent_pair)
19221886 {
19231887 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;
19491911 }
19501912
19511913 /*
22522214 {
22532215 CandidateRefresh *cand;
22542216 NiceAgent *agent = cdisco->agent;
2255 GSList *modified_list;
22562217
22572218 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);
22832239
22842240 return cand;
22852241 }
23812337 STUN_ATTRIBUTE_REALM, &recv_realm_len);
23822338
23832339 /* check for unauthorized error response */
2384 if (agent->compatibility == NICE_COMPATIBILITY_DRAFT19 &&
2340 if (agent->compatibility == NICE_COMPATIBILITY_RFC5245 &&
23852341 stun_message_get_class (resp) == STUN_ERROR &&
23862342 stun_message_find_error (resp, &code) ==
23872343 STUN_MESSAGE_RETURN_SUCCESS &&
24692425 STUN_ATTRIBUTE_REALM, &recv_realm_len);
24702426
24712427 /* check for unauthorized error response */
2472 if (cand->agent->compatibility == NICE_COMPATIBILITY_DRAFT19 &&
2428 if (cand->agent->compatibility == NICE_COMPATIBILITY_RFC5245 &&
24732429 stun_message_get_class (resp) == STUN_ERROR &&
24742430 stun_message_find_error (resp, &code) ==
24752431 STUN_MESSAGE_RETURN_SUCCESS &&
25752531
25762532 if (cand->password)
25772533 pass = cand->password;
2578 else if(data->stream->local_password)
2534 else if(data->stream->local_password[0])
25792535 pass = data->stream->local_password;
25802536
25812537 if (pass) {
26982654 }
26992655 }
27002656
2701
2702 if (validater_data.password)
2703 g_free (validater_data.password);
2657 g_free (validater_data.password);
27042658
27052659 if (valid == STUN_VALIDATION_NOT_STUN ||
27062660 valid == STUN_VALIDATION_INCOMPLETE_STUN ||
8686 */
8787 void discovery_free (NiceAgent *agent)
8888 {
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
9895 if (agent->discovery_timer_source != NULL) {
9996 g_source_destroy (agent->discovery_timer_source);
10097 g_source_unref (agent->discovery_timer_source);
203200 */
204201 void refresh_free (NiceAgent *agent)
205202 {
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;
214206 }
215207
216208 /*
251243 */
252244 static gboolean priv_add_local_candidate_pruned (Component *component, NiceCandidate *candidate)
253245 {
254 GSList *modified_list, *i;
246 GSList *i;
255247
256248 for (i = component->local_candidates; i ; i = i->next) {
257249 NiceCandidate *c = i->data;
258
250
259251 if (nice_address_equal (&c->base_addr, &candidate->base_addr) &&
260252 nice_address_equal (&c->addr, &candidate->addr)) {
261253 nice_debug ("Candidate %p (component-id %u) redundant, ignoring.", candidate, component->id);
263255 }
264256 }
265257
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);
271260
272261 return TRUE;
273262 }
417406 guchar username[32];
418407 guchar password[16];
419408
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);
424411
425412 nice_rng_generate_bytes (agent->rng, 32, (gchar *)username);
426413 nice_rng_generate_bytes (agent->rng, 16, (gchar *)password);
431418 } else if (agent->compatibility == NICE_COMPATIBILITY_GOOGLE) {
432419 gchar username[16];
433420
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);
438423 candidate->password = NULL;
439424
440425 nice_rng_generate_bytes_print (agent->rng, 16, (gchar *)username);
461446 Component *component;
462447 Stream *stream;
463448 NiceSocket *udp_socket = NULL;
464 gboolean errors = FALSE;
465449
466450 if (!agent_find_component (agent, stream_id, component_id, &stream, &component))
467451 return NULL;
468452
469453 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);
528489
529490 return candidate;
491
492 errors:
493 nice_candidate_free (candidate);
494 if (udp_socket)
495 nice_socket_free (udp_socket);
496 return NULL;
530497 }
531498
532499 /*
552519 return NULL;
553520
554521 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
562529 (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;
583549 }
584550
585551 return candidate;
604570 NiceCandidate *candidate;
605571 Component *component;
606572 Stream *stream;
607 gboolean result = FALSE;
608 gboolean errors = FALSE;
609573 NiceSocket *relay_socket = NULL;
610574
611575 if (!agent_find_component (agent, stream_id, component_id, &stream, &component))
612576 return NULL;
613577
614578 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);
664584 } 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
676620 return candidate;
621
622 errors:
623 nice_candidate_free (candidate);
624 if (relay_socket)
625 nice_socket_free (relay_socket);
626 return NULL;
677627 }
678628
679629 /*
682632 *
683633 * @return pointer to the created candidate, or NULL on error
684634 */
685 NiceCandidate*
635 NiceCandidate*
686636 discovery_add_peer_reflexive_candidate (
687637 NiceAgent *agent,
688638 guint stream_id,
695645 NiceCandidate *candidate;
696646 Component *component;
697647 Stream *stream;
648 gboolean result;
698649
699650 if (!agent_find_component (agent, stream_id, component_id, &stream, &component))
700651 return NULL;
701652
702653 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
713662 (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;
763711 }
764712
765713 return candidate;
791739 (void)udp_socket;
792740
793741 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
811757 (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);
864803
865804 return candidate;
866805 }
6767 if ((ifa->ifa_flags & IFF_UP) == 0)
6868 continue;
6969
70 if (ifa->ifa_addr == NULL || ifa->ifa_addr->sa_family != AF_INET)
70 if (ifa->ifa_addr == NULL)
7171 continue;
7272
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 }
7577 }
7678
7779 freeifaddrs (results);
136138
137139
138140 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
157163 return FALSE;
158164 }
159165
163169 nice_interfaces_get_local_ips (gboolean include_loopback)
164170 {
165171 GList *ips = NULL;
166 struct sockaddr_in *sa;
167172 struct ifaddrs *ifa, *results;
168 gchar *loopback = NULL;
173 GList *loopbacks = NULL;
169174
170175
171176 if (getifaddrs (&results) < 0)
173178
174179 /* Loop through the interface list and get the IP address of each IF */
175180 for (ifa = results; ifa; ifa = ifa->ifa_next) {
181 char addr_as_string[INET6_ADDRSTRLEN+1];
182 int ret;
183
176184 /* no ip address from interface that is down */
177185 if ((ifa->ifa_flags & IFF_UP) == 0)
178186 continue;
179187
180 if (ifa->ifa_addr == NULL || ifa->ifa_addr->sa_family != AF_INET)
188 if (ifa->ifa_addr == NULL) {
181189 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
184209
185210 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);
187212 if ((ifa->ifa_flags & IFF_LOOPBACK) == IFF_LOOPBACK) {
188213 if (include_loopback)
189 loopback = g_strdup (inet_ntoa (sa->sin_addr));
214 loopbacks = g_list_append (loopbacks, g_strdup (addr_as_string));
190215 else
191216 nice_debug ("Ignoring loopback interface");
192217 } 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));
195220 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));
197222 }
198223 }
199224
200225 freeifaddrs (results);
201226
202 if (loopback)
203 ips = g_list_append (ips, loopback);
227 if (loopbacks)
228 ips = g_list_concat (ips, loopbacks);
204229
205230 return ips;
206231 }
266291 else
267292 nice_debug ("Ignoring loopback interface");
268293 } else {
269 if (nice_interfaces_is_private_ip (sa->sin_addr)) {
294 if (nice_interfaces_is_private_ip (sa)) {
270295 ips = g_list_append (ips, g_strdup (inet_ntoa (sa->sin_addr)));
271296 } else {
272297 ips = g_list_prepend (ips, g_strdup (inet_ntoa (sa->sin_addr)));
803803 *((uint32_t *) (buffer + 20)) = htonl(priv->ts_recent);
804804 priv->ts_lastack = priv->rcv_nxt;
805805
806 memcpy(buffer + HEADER_SIZE, data, len);
806 if (data != NULL)
807 memcpy(buffer + HEADER_SIZE, data, len);
807808
808809 DEBUG (PSEUDO_TCP_DEBUG_VERBOSE, "<-- <CONV=%d><FLG=%d><SEQ=%d:%d><ACK=%d>"
809810 "<WND=%d><TS=%d><TSR=%d><LEN=%d>",
5151 {
5252 Stream *stream;
5353 guint n;
54 gboolean errors = FALSE;
55 GSList *modified_list;
5654 Component *component;
5755
5856 stream = g_slice_new0 (Stream);
5957 for (n = 0; n < n_components; n++) {
6058 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);
7560 }
7661
7762 stream->n_components = n_components;
00 #! /bin/sh
11 # Attempt to guess a canonical system name.
22 # 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
44 # Free Software Foundation, Inc.
55
6 timestamp='2009-06-10'
6 timestamp='2009-12-30'
77
88 # This file is free software; you can redistribute it and/or modify it
99 # under the terms of the GNU General Public License as published by
2626 # the same distribution terms that you use for the rest of that program.
2727
2828
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.
3232 #
3333 # This script attempts to guess a canonical system name similar to
3434 # config.sub. If it succeeds, it prints the system name on stdout, and
3535 # exits with 0. Otherwise, it exits with 1.
3636 #
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
3939
4040 me=`echo "$0" | sed -e 's,.*/,,'`
4141
5555 GNU config.guess ($timestamp)
5656
5757 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.
6061
6162 This is free software; see the source for copying conditions. There is NO
6263 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
332333 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
333334 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
334335 exit ;;
336 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
337 echo i386-pc-auroraux${UNAME_RELEASE}
338 exit ;;
335339 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
336340 eval $set_cc_for_build
337341 SUN_ARCH="i386"
806810 i*:PW*:*)
807811 echo ${UNAME_MACHINE}-pc-pw32
808812 exit ;;
809 *:Interix*:[3456]*)
813 *:Interix*:*)
810814 case ${UNAME_MACHINE} in
811815 x86)
812816 echo i586-pc-interix${UNAME_RELEASE}
813817 exit ;;
814 EM64T | authenticamd | genuineintel)
818 authenticamd | genuineintel | EM64T)
815819 echo x86_64-unknown-interix${UNAME_RELEASE}
816820 exit ;;
817821 IA64)
853857 i*86:Minix:*:*)
854858 echo ${UNAME_MACHINE}-pc-minix
855859 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 ;;
856874 arm*:Linux:*:*)
857875 eval $set_cc_for_build
858876 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
874892 exit ;;
875893 frv:Linux:*:*)
876894 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}"
877906 exit ;;
878907 ia64:Linux:*:*)
879908 echo ${UNAME_MACHINE}-unknown-linux-gnu
900929 #endif
901930 #endif
902931 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'`
908933 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
909934 ;;
910935 or32:Linux:*:*)
911936 echo or32-unknown-linux-gnu
912937 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 ;;
933938 padre:Linux:*:*)
934939 echo sparc-unknown-linux-gnu
940 exit ;;
941 parisc64:Linux:*:* | hppa64:Linux:*:*)
942 echo hppa64-unknown-linux-gnu
935943 exit ;;
936944 parisc:Linux:*:* | hppa:Linux:*:*)
937945 # Look for CPU level
941949 *) echo hppa-unknown-linux-gnu ;;
942950 esac
943951 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
946957 exit ;;
947958 s390:Linux:*:* | s390x:Linux:*:*)
948959 echo ${UNAME_MACHINE}-ibm-linux
965976 xtensa*:Linux:*:*)
966977 echo ${UNAME_MACHINE}-unknown-linux-gnu
967978 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 ;;
1020979 i*86:DYNIX/ptx:4*:*)
1021980 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1022981 # earlier versions are messed up and put the nodename in both
12461205 *:Darwin:*:*)
12471206 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
12481207 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 ;;
12491218 unknown) UNAME_PROCESSOR=powerpc ;;
12501219 esac
12511220 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
00 #! /bin/sh
11 # Configuration validation subroutine script.
22 # 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
44 # Free Software Foundation, Inc.
55
6 timestamp='2009-06-11'
6 timestamp='2010-01-22'
77
88 # This file is (in principle) common to ALL GNU software.
99 # The presence of a machine in this file suggests that SOME GNU software
3131
3232
3333 # 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.
3535 #
3636 # Configuration subroutine to validate and canonicalize a configuration type.
3737 # Supply the specified configuration type as an argument.
3838 # If it is invalid, we print an error message on stderr and exit with code 1.
3939 # 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
4043
4144 # This file is supposed to be the same for all GNU packages
4245 # and recognize all the CPU types, system types and aliases
7174 version="\
7275 GNU config.sub ($timestamp)
7376
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.
7680
7781 This is free software; see the source for copying conditions. There is NO
7882 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
148152 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
149153 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
150154 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
151 -apple | -axis | -knuth | -cray)
155 -apple | -axis | -knuth | -cray | -microblaze)
152156 os=
153157 basic_machine=$1
154158 ;;
283287 | pdp10 | pdp11 | pj | pjl \
284288 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
285289 | pyramid \
290 | rx \
286291 | score \
287292 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
288293 | sh64 | sh64le \
290295 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
291296 | spu | strongarm \
292297 | tahoe | thumb | tic4x | tic80 | tron \
298 | ubicom32 \
293299 | v850 | v850e \
294300 | we32k \
295301 | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
296302 | z8k | z80)
297303 basic_machine=$basic_machine-unknown
298304 ;;
299 m6811 | m68hc11 | m6812 | m68hc12)
305 m6811 | m68hc11 | m6812 | m68hc12 | picochip)
300306 # Motorola 68HC11/12.
301307 basic_machine=$basic_machine-unknown
302308 os=-none
339345 | lm32-* \
340346 | m32c-* | m32r-* | m32rle-* \
341347 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
342 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
348 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
343349 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
344350 | mips16-* \
345351 | mips64-* | mips64el-* \
367373 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
368374 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
369375 | pyramid-* \
370 | romp-* | rs6000-* \
376 | romp-* | rs6000-* | rx-* \
371377 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
372378 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
373379 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
374380 | sparclite-* \
375381 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
376382 | tahoe-* | thumb-* \
377 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
383 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
384 | tile-* | tilegx-* \
378385 | tron-* \
386 | ubicom32-* \
379387 | v850-* | v850e-* | vax-* \
380388 | we32k-* \
381389 | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
724732 merlin)
725733 basic_machine=ns32k-utek
726734 os=-sysv
735 ;;
736 microblaze)
737 basic_machine=microblaze-xilinx
727738 ;;
728739 mingw32)
729740 basic_machine=i386-pc
10751086 basic_machine=tic6x-unknown
10761087 os=-coff
10771088 ;;
1089 # This must be matched before tile*.
1090 tilegx*)
1091 basic_machine=tilegx-unknown
1092 os=-linux-gnu
1093 ;;
10781094 tile*)
10791095 basic_machine=tile-unknown
10801096 os=-linux-gnu
12461262 # First match some system type aliases
12471263 # that might get confused with valid system types.
12481264 # -solaris* is a basic system type, with this one exception.
1265 -auroraux)
1266 os=-auroraux
1267 ;;
12491268 -solaris1 | -solaris1.*)
12501269 os=`echo $os | sed -e 's|solaris1|sunos4|'`
12511270 ;;
12671286 # -sysv* is not here because it comes later, after sysvr4.
12681287 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
12691288 | -*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* \
12721291 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
12731292 | -aos* | -aros* \
12741293 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
12891308 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
12901309 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
12911310 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1292 | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
1311 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
12931312 # Remember, each alternative MUST END IN *, to match a version number.
12941313 ;;
12951314 -qnx*)
14221441 -dicos*)
14231442 os=-dicos
14241443 ;;
1444 -nacl*)
1445 ;;
14251446 -none)
14261447 ;;
14271448 *)
00 #! /bin/sh
11 # 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.
33 #
44 #
55 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
697697 # Identity of this package.
698698 PACKAGE_NAME='libnice'
699699 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'
702702 PACKAGE_BUGREPORT=''
703703 PACKAGE_URL=''
704704
768768 GST_CFLAGS
769769 GLIB_LIBS
770770 GLIB_CFLAGS
771 PKG_CONFIG_LIBDIR
772 PKG_CONFIG_PATH
771773 PKG_CONFIG
772774 LIBRT
773775 LIBNICE_CFLAGS
906908 CPPFLAGS
907909 CPP
908910 PKG_CONFIG
911 PKG_CONFIG_PATH
912 PKG_CONFIG_LIBDIR
909913 GLIB_CFLAGS
910914 GLIB_LIBS
911915 GST_CFLAGS
14531457 # Omit some internal or obsolete options to make the list less imposing.
14541458 # This message is too long to be a string in the A/UX 3.1 sh.
14551459 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.
14571461
14581462 Usage: $0 [OPTION]... [VAR=VALUE]...
14591463
15231527
15241528 if test -n "$ac_init_help"; then
15251529 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:";;
15271531 esac
15281532 cat <<\_ACEOF
15291533
15641568 you have headers in a nonstandard directory <include dir>
15651569 CPP C preprocessor
15661570 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
15671575 GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config
15681576 GLIB_LIBS linker flags for GLIB, overriding pkg-config
15691577 GST_CFLAGS C compiler flags for GST, overriding pkg-config
16381646 test -n "$ac_init_help" && exit $ac_status
16391647 if $ac_init_version; then
16401648 cat <<\_ACEOF
1641 libnice configure 0.0.11
1649 libnice configure 0.0.13
16421650 generated by GNU Autoconf 2.65
16431651
16441652 Copyright (C) 2009 Free Software Foundation, Inc.
20572065 This file contains any messages produced by compilers while
20582066 running configure, to aid debugging if configure makes a mistake.
20592067
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
20612069 generated by GNU Autoconf 2.65. Invocation command line was
20622070
20632071 $ $0 $@
28702878
28712879 # Define the identity of the package.
28722880 PACKAGE='libnice'
2873 VERSION='0.0.11'
2881 VERSION='0.0.13'
28742882
28752883
28762884 cat >>confdefs.h <<_ACEOF
29202928 # Increment CURRENT and AGE. Set REVISION to 0
29212929 # If there was an incompatible interface change:
29222930 # Increment CURRENT. Set AGE and REVISION to 0
2923 LIBNICE_CURRENT=7
2931 LIBNICE_CURRENT=9
29242932 LIBNICE_REVISION=0
2925 LIBNICE_AGE=7
2933 LIBNICE_AGE=9
29262934 LIBNICE_LIBVERSION=${LIBNICE_CURRENT}:${LIBNICE_REVISION}:${LIBNICE_AGE}
29272935 LIBNICE_LT_LDFLAGS="-version-info ${LIBNICE_LIBVERSION}"
29282936
49204928 else
49214929 lt_cv_nm_interface="BSD nm"
49224930 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)
49244932 (eval "$ac_compile" 2>conftest.err)
49254933 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)
49274935 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
49284936 cat conftest.err >&5
4929 (eval echo "\"\$as_me:4930: output\"" >&5)
4937 (eval echo "\"\$as_me:4938: output\"" >&5)
49304938 cat conftest.out >&5
49314939 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
49324940 lt_cv_nm_interface="MS dumpbin"
61316139 ;;
61326140 *-*-irix6*)
61336141 # Find out which ABI we are using.
6134 echo '#line 6135 "configure"' > conftest.$ac_ext
6142 echo '#line 6143 "configure"' > conftest.$ac_ext
61356143 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
61366144 (eval $ac_compile) 2>&5
61376145 ac_status=$?
73897397 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
73907398 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
73917399 -e 's:$: $lt_compiler_flag:'`
7392 (eval echo "\"\$as_me:7393: $lt_compile\"" >&5)
7400 (eval echo "\"\$as_me:7401: $lt_compile\"" >&5)
73937401 (eval "$lt_compile" 2>conftest.err)
73947402 ac_status=$?
73957403 cat conftest.err >&5
7396 echo "$as_me:7397: \$? = $ac_status" >&5
7404 echo "$as_me:7405: \$? = $ac_status" >&5
73977405 if (exit $ac_status) && test -s "$ac_outfile"; then
73987406 # The compiler can only warn and ignore the option if not recognized
73997407 # So say no if there are warnings other than the usual output.
77287736 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
77297737 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
77307738 -e 's:$: $lt_compiler_flag:'`
7731 (eval echo "\"\$as_me:7732: $lt_compile\"" >&5)
7739 (eval echo "\"\$as_me:7740: $lt_compile\"" >&5)
77327740 (eval "$lt_compile" 2>conftest.err)
77337741 ac_status=$?
77347742 cat conftest.err >&5
7735 echo "$as_me:7736: \$? = $ac_status" >&5
7743 echo "$as_me:7744: \$? = $ac_status" >&5
77367744 if (exit $ac_status) && test -s "$ac_outfile"; then
77377745 # The compiler can only warn and ignore the option if not recognized
77387746 # So say no if there are warnings other than the usual output.
78337841 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
78347842 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
78357843 -e 's:$: $lt_compiler_flag:'`
7836 (eval echo "\"\$as_me:7837: $lt_compile\"" >&5)
7844 (eval echo "\"\$as_me:7845: $lt_compile\"" >&5)
78377845 (eval "$lt_compile" 2>out/conftest.err)
78387846 ac_status=$?
78397847 cat out/conftest.err >&5
7840 echo "$as_me:7841: \$? = $ac_status" >&5
7848 echo "$as_me:7849: \$? = $ac_status" >&5
78417849 if (exit $ac_status) && test -s out/conftest2.$ac_objext
78427850 then
78437851 # The compiler can only warn and ignore the option if not recognized
78887896 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
78897897 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
78907898 -e 's:$: $lt_compiler_flag:'`
7891 (eval echo "\"\$as_me:7892: $lt_compile\"" >&5)
7899 (eval echo "\"\$as_me:7900: $lt_compile\"" >&5)
78927900 (eval "$lt_compile" 2>out/conftest.err)
78937901 ac_status=$?
78947902 cat out/conftest.err >&5
7895 echo "$as_me:7896: \$? = $ac_status" >&5
7903 echo "$as_me:7904: \$? = $ac_status" >&5
78967904 if (exit $ac_status) && test -s out/conftest2.$ac_objext
78977905 then
78987906 # The compiler can only warn and ignore the option if not recognized
1027210280 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1027310281 lt_status=$lt_dlunknown
1027410282 cat > conftest.$ac_ext <<_LT_EOF
10275 #line 10276 "configure"
10283 #line 10284 "configure"
1027610284 #include "confdefs.h"
1027710285
1027810286 #if HAVE_DLFCN_H
1036810376 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1036910377 lt_status=$lt_dlunknown
1037010378 cat > conftest.$ac_ext <<_LT_EOF
10371 #line 10372 "configure"
10379 #line 10380 "configure"
1037210380 #include "confdefs.h"
1037310381
1037410382 #if HAVE_DLFCN_H
1090010908
1090110909
1090210910
10911
10912
10913
10914
1090310915 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1090410916 if test -n "$ac_tool_prefix"; then
1090510917 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
1101211024 $as_echo "no" >&6; }
1101311025 PKG_CONFIG=""
1101411026 fi
11015
1101611027 fi
1101711028
1101811029 pkg_failed=no
1101911030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5
1102011031 $as_echo_n "checking for GLIB... " >&6; }
1102111032
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" && \
1102711037 { { $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
1102811038 ($PKG_CONFIG --exists --print-errors " glib-2.0 >= 2.10 gobject-2.0 >= 2.10 gthread-2.0 >= 2.10 ") 2>&5
1102911039 ac_status=$?
1103311043 else
1103411044 pkg_failed=yes
1103511045 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" && \
1104511053 { { $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
1104611054 ($PKG_CONFIG --exists --print-errors " glib-2.0 >= 2.10 gobject-2.0 >= 2.10 gthread-2.0 >= 2.10 ") 2>&5
1104711055 ac_status=$?
1105111059 else
1105211060 pkg_failed=yes
1105311061 fi
11054 fi
11055 else
11056 pkg_failed=untried
11062 else
11063 pkg_failed=untried
1105711064 fi
1105811065
1105911066
1106011067
1106111068 if test $pkg_failed = yes; then
11069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11070 $as_echo "no" >&6; }
1106211071
1106311072 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1106411073 _pkg_short_errors_supported=yes
1106611075 _pkg_short_errors_supported=no
1106711076 fi
1106811077 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`
1107011079 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`
1107211081 fi
1107311082 # Put the nasty error message in config.log where it belongs
1107411083 echo "$GLIB_PKG_ERRORS" >&5
1108211091
1108311092 Alternatively, you may set the environment variables GLIB_CFLAGS
1108411093 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
1108711095 elif test $pkg_failed = untried; then
11096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11097 $as_echo "no" >&6; }
1108811098 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1108911099 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1109011100 as_fn_error "The pkg-config script could not be found or is too old. Make sure it
1110211112 GLIB_LIBS=$pkg_cv_GLIB_LIBS
1110311113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1110411114 $as_echo "yes" >&6; }
11105 :
11115
1110611116 fi
1110711117
1110811118
1112211132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GST" >&5
1112311133 $as_echo_n "checking for GST... " >&6; }
1112411134
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" && \
1113011139 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
1113111140 gstreamer-0.10 >= 0.10.0
1113211141 gstreamer-base-0.10 >= 0.10.0
1114511154 else
1114611155 pkg_failed=yes
1114711156 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" && \
1115711164 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
1115811165 gstreamer-0.10 >= 0.10.0
1115911166 gstreamer-base-0.10 >= 0.10.0
1117211179 else
1117311180 pkg_failed=yes
1117411181 fi
11175 fi
11176 else
11177 pkg_failed=untried
11182 else
11183 pkg_failed=untried
1117811184 fi
1117911185
1118011186
1118111187
1118211188 if test $pkg_failed = yes; then
11189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11190 $as_echo "no" >&6; }
1118311191
1118411192 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1118511193 _pkg_short_errors_supported=yes
1118711195 _pkg_short_errors_supported=no
1118811196 fi
1118911197 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 "
1119111199 gstreamer-0.10 >= 0.10.0
1119211200 gstreamer-base-0.10 >= 0.10.0
11193 "`
11201 " 2>&1`
1119411202 else
11195 GST_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "
11203 GST_PKG_ERRORS=`$PKG_CONFIG --print-errors "
1119611204 gstreamer-0.10 >= 0.10.0
1119711205 gstreamer-base-0.10 >= 0.10.0
11198 "`
11206 " 2>&1`
1119911207 fi
1120011208 # Put the nasty error message in config.log where it belongs
1120111209 echo "$GST_PKG_ERRORS" >&5
1120211210
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
1120411222 $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
1121511223
1121611224 if test "$with_gstreamer" = yes; then :
1121711225
1126711275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUPNP" >&5
1126811276 $as_echo_n "checking for GUPNP... " >&6; }
1126911277
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" && \
1127511282 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gupnp-igd-1.0 >= \$GUPNP_IGD_REQUIRED\""; } >&5
1127611283 ($PKG_CONFIG --exists --print-errors "gupnp-igd-1.0 >= $GUPNP_IGD_REQUIRED") 2>&5
1127711284 ac_status=$?
1128111288 else
1128211289 pkg_failed=yes
1128311290 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" && \
1129311298 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gupnp-igd-1.0 >= \$GUPNP_IGD_REQUIRED\""; } >&5
1129411299 ($PKG_CONFIG --exists --print-errors "gupnp-igd-1.0 >= $GUPNP_IGD_REQUIRED") 2>&5
1129511300 ac_status=$?
1129911304 else
1130011305 pkg_failed=yes
1130111306 fi
11302 fi
11303 else
11304 pkg_failed=untried
11307 else
11308 pkg_failed=untried
1130511309 fi
1130611310
1130711311
1130811312
1130911313 if test $pkg_failed = yes; then
11314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11315 $as_echo "no" >&6; }
1131011316
1131111317 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1131211318 _pkg_short_errors_supported=yes
1131411320 _pkg_short_errors_supported=no
1131511321 fi
1131611322 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`
1131811324 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`
1132011326 fi
1132111327 # Put the nasty error message in config.log where it belongs
1132211328 echo "$GUPNP_PKG_ERRORS" >&5
1132311329
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
1132511333 $as_echo "no" >&6; }
11326 HAVE_GUPNP=no
11327 elif test $pkg_failed = untried; then
1132811334 HAVE_GUPNP=no
1132911335 else
1133011336 GUPNP_CFLAGS=$pkg_cv_GUPNP_CFLAGS
1213712143 # report actual input values of CONFIG_FILES etc. instead of their
1213812144 # values after options handling.
1213912145 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
1214112147 generated by GNU Autoconf 2.65. Invocation command line was
1214212148
1214312149 CONFIG_FILES = $CONFIG_FILES
1220312209 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1220412210 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1220512211 ac_cs_version="\\
12206 libnice config.status 0.0.11
12212 libnice config.status 0.0.13
1220712213 configured by $0, generated by GNU Autoconf 2.65,
1220812214 with options \\"\$ac_cs_config\\"
1220912215
22
33 dnl releases only do -Wall, cvs and prerelease does -Werror too
44 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)
66 LIBNICE_RELEASE="yes"
77
88 AC_CONFIG_SRCDIR([agent/agent.c])
3232 # Increment CURRENT and AGE. Set REVISION to 0
3333 # If there was an incompatible interface change:
3434 # Increment CURRENT. Set AGE and REVISION to 0
35 LIBNICE_CURRENT=7
35 LIBNICE_CURRENT=9
3636 LIBNICE_REVISION=0
37 LIBNICE_AGE=7
37 LIBNICE_AGE=9
3838 LIBNICE_LIBVERSION=${LIBNICE_CURRENT}:${LIBNICE_REVISION}:${LIBNICE_AGE}
3939 LIBNICE_LT_LDFLAGS="-version-info ${LIBNICE_LIBVERSION}"
4040 AC_SUBST(LIBNICE_LT_LDFLAGS)
154154 PACKAGE_VERSION = @PACKAGE_VERSION@
155155 PATH_SEPARATOR = @PATH_SEPARATOR@
156156 PKG_CONFIG = @PKG_CONFIG@
157 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
158 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
157159 RANLIB = @RANLIB@
158160 SED = @SED@
159161 SET_MAKE = @SET_MAKE@
154154 PACKAGE_VERSION = @PACKAGE_VERSION@
155155 PATH_SEPARATOR = @PATH_SEPARATOR@
156156 PKG_CONFIG = @PKG_CONFIG@
157 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
158 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
157159 RANLIB = @RANLIB@
158160 SED = @SED@
159161 SET_MAKE = @SET_MAKE@
121121 PACKAGE_VERSION = @PACKAGE_VERSION@
122122 PATH_SEPARATOR = @PATH_SEPARATOR@
123123 PKG_CONFIG = @PKG_CONFIG@
124 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
125 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
124126 RANLIB = @RANLIB@
125127 SED = @SED@
126128 SET_MAKE = @SET_MAKE@
512514 scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
513515 @echo 'gtk-doc: Scanning header files'
514516 @-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)
517522 @if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \
518523 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) ; \
519524 else \
546551 sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
547552 @echo 'gtk-doc: Building XML'
548553 @-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)
551559 @touch sgml-build.stamp
552560
553561 sgml.stamp: sgml-build.stamp
77 <link rel="up" href="ch01.html" title="">
88 <link rel="prev" href="ch01.html" title="">
99 <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)">
1111 <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="">
2012 </head>
2113 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
2214 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
6254 enum <a class="link" href="NiceAgent.html#NiceComponentType" title="enum NiceComponentType">NiceComponentType</a>;
6355 enum <a class="link" href="NiceAgent.html#NiceProxyType" title="enum NiceProxyType">NiceProxyType</a>;
6456 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>);
7163 #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>);
137129 </pre>
138130 </div>
139131 <div class="refsect1" title="Object Hierarchy">
140132 <a name="NiceAgent.object-hierarchy"></a><h2>Object Hierarchy</h2>
141133 <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>
143135 +----NiceAgent
144136 </pre>
145137 </div>
146138 <div class="refsect1" title="Properties">
147139 <a name="NiceAgent.properties"></a><h2>Properties</h2>
148140 <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
165157 </pre>
166158 </div>
167159 <div class="refsect1" title="Signals">
187179 <p>
188180 </p>
189181 <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>
191183 <div class="example-contents">
192184 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
193185 <tbody>
234226 GSList <span class="symbol">*</span>lcands <span class="symbol">=</span> NULL<span class="symbol">;</span>
235227
236228 <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>
238230
239231 <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">&quot;candidate-gathering-done&quot;</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">&quot;component-state-changed&quot;</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">&quot;new-selected-pair&quot;</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">&quot;candidate-gathering-done&quot;</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">&quot;component-state-changed&quot;</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">&quot;new-selected-pair&quot;</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>
246238
247239 <span class="gtkdoc slc">// Create a new stream with one component and start gathering candidates</span>
248240 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>
265257 <span class="gtkdoc slc">// Anything received will be received through the cb_nice_recv callback</span>
266258
267259 <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>
269261 </tr>
270262 </tbody>
271263 </table>
272264 </div>
273265
274266 </div>
275 <p><br class="example-break"></p>
267 <p><br class="example-break">
268 </p>
276269 </div>
277270 <div class="refsect1" title="Details">
278271 <a name="NiceAgent.details"></a><h2>Details</h2>
281274 <pre class="programlisting">typedef struct _NiceAgent NiceAgent;</pre>
282275 <p>
283276 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>
285279 </div>
286280 <hr>
287281 <div class="refsect2" title="enum NiceComponentState">
301295 An enum representing the state of a component.
302296 </p>
303297 <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>
304300 <div class="variablelist"><table border="0">
305301 <col align="left" valign="top">
306302 <tbody>
307303 <tr>
308304 <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
310306 </td>
311307 </tr>
312308 <tr>
313309 <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
315311 </td>
316312 </tr>
317313 <tr>
318314 <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
320316 </td>
321317 </tr>
322318 <tr>
323319 <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
325321 </td>
326322 </tr>
327323 <tr>
328324 <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
330326 is now final
331327 </td>
332328 </tr>
333329 <tr>
334330 <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,
336332 but connectivity was not established
337333 </td>
338334 </tr>
339335 <tr>
340336 <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
342338 </td>
343339 </tr>
344340 </tbody>
358354 component_id for RTP/RTCP usages.
359355 </p>
360356 <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>
362358 <div class="example-contents">
363359 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
364360 <tbody>
371367 </div>
372368
373369 </div>
374 <p><br class="example-break"></p>
370 <p><br class="example-break">
371 </p>
375372 <div class="variablelist"><table border="0">
376373 <col align="left" valign="top">
377374 <tbody>
378375 <tr>
379376 <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
381378 </td>
382379 </tr>
383380 <tr>
384381 <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
386383 </td>
387384 </tr>
388385 </tbody>
404401 Note that the proxies will only be used with TCP TURN relaying.
405402 </p>
406403 <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>
407406 <div class="variablelist"><table border="0">
408407 <col align="left" valign="top">
409408 <tbody>
410409 <tr>
411410 <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
413412 </td>
414413 </tr>
415414 <tr>
416415 <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
418417 </td>
419418 </tr>
420419 <tr>
421420 <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
423422 </td>
424423 </tr>
425424 <tr>
426425 <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
428427 </td>
429428 </tr>
430429 </tbody>
436435 <a name="NiceCompatibility"></a><h3>enum NiceCompatibility</h3>
437436 <pre class="programlisting">typedef enum
438437 {
439 NICE_COMPATIBILITY_DRAFT19 = 0,
438 NICE_COMPATIBILITY_RFC5245 = 0,
440439 NICE_COMPATIBILITY_GOOGLE,
441440 NICE_COMPATIBILITY_MSN,
442441 NICE_COMPATIBILITY_WLM2009,
443 NICE_COMPATIBILITY_LAST = NICE_COMPATIBILITY_WLM2009
442 NICE_COMPATIBILITY_DRAFT19 = NICE_COMPATIBILITY_RFC5245,
443 NICE_COMPATIBILITY_LAST = NICE_COMPATIBILITY_WLM2009,
444444 } NiceCompatibility;
445445 </pre>
446446 <p>
447447 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>
452484 <tr>
453485 <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
471487 </td>
472488 </tr>
473489 <tr>
474490 <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
476492 </td>
477493 </tr>
478494 </tbody>
481497 <hr>
482498 <div class="refsect2" title="NiceAgentRecvFunc ()">
483499 <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
503520 </td>
504521 </tr>
505522 <tr>
506523 <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
508525 which received the data
509526 </td>
510527 </tr>
511528 <tr>
512529 <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
514531 </td>
515532 </tr>
516533 <tr>
517534 <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
519536 </td>
520537 </tr>
521538 <tr>
522539 <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>
524541 </td>
525542 </tr>
526543 </tbody>
534551 <p>
535552 A hard limit for the number of remote candidates. This
536553 limit is enforced to protect against malevolent remote
537 clients.</p>
554 clients.
555 </p>
538556 </div>
539557 <hr>
540558 <div class="refsect2" title="nice_agent_new ()">
541559 <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>
544562 <p>
545563 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>
547566 <div class="variablelist"><table border="0">
548567 <col align="left" valign="top">
549568 <tbody>
550569 <tr>
551570 <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
553572 </td>
554573 </tr>
555574 <tr>
556575 <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
558577 </td>
559578 </tr>
560579 <tr>
568587 <hr>
569588 <div class="refsect2" title="nice_agent_new_reliable ()">
570589 <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>
573592 <p>
574593 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
575594 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>
577596 </p>
578597 <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>
579600 <div class="variablelist"><table border="0">
580601 <col align="left" valign="top">
581602 <tbody>
582603 <tr>
583604 <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
585606 </td>
586607 </tr>
587608 <tr>
588609 <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
590611 </td>
591612 </tr>
592613 <tr>
601622 <hr>
602623 <div class="refsect2" title="nice_agent_add_local_address ()">
603624 <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>
606627 <p>
607628 Add a local address from which to derive local host candidates for
608629 candidate gathering.
614635 <p>
615636 </p>
616637 <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
624646 </td>
625647 </tr>
626648 <tr>
627649 <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
629651 If the port is 0, then a random port will be chosen by the system
630652 </td>
631653 </tr>
632654 <tr>
633655 <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
635657 </td>
636658 </tr>
637659 </tbody>
640662 <hr>
641663 <div class="refsect2" title="nice_agent_add_stream ()">
642664 <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
653676 </td>
654677 </tr>
655678 <tr>
656679 <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
658681 </td>
659682 </tr>
660683 <tr>
668691 <hr>
669692 <div class="refsect2" title="nice_agent_remove_stream ()">
670693 <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
686710 </td>
687711 </tr>
688712 </tbody>
691715 <hr>
692716 <div class="refsect2" title="nice_agent_set_relay_info ()">
693717 <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
715740 </td>
716741 </tr>
717742 <tr>
718743 <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
720745 </td>
721746 </tr>
722747 <tr>
723748 <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
725750 </td>
726751 </tr>
727752 <tr>
728753 <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
730755 </td>
731756 </tr>
732757 <tr>
733758 <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
735760 </td>
736761 </tr>
737762 <tr>
738763 <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
740765 </td>
741766 </tr>
742767 <tr>
743768 <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
745770 </td>
746771 </tr>
747772 <tr>
748773 <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.
751776 </td>
752777 </tr>
753778 </tbody>
756781 <hr>
757782 <div class="refsect2" title="nice_agent_gather_candidates ()">
758783 <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>
761786 <p>
762787 Start the candidate gathering process.
763788 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
764789 </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
766807 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;">
769809 <h3 class="title">Note</h3>
770810 <p>
771811 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>
776816 <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>
777817 </p>
778818 </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
790819 </td>
791820 </tr>
792821 </tbody>
795824 <hr>
796825 <div class="refsect2" title="nice_agent_set_remote_credentials ()">
797826 <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>
802831 <p>
803832 Sets the remote credentials for stream <em class="parameter"><code>stream_id</code></em>.
804833 </p>
810839 Stream credentials do not override per-candidate credentials if set
811840 </p>
812841 </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
824855 </td>
825856 </tr>
826857 <tr>
827858 <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
829860 (length must be between 22 and 256 chars)
830861 </td>
831862 </tr>
832863 <tr>
833864 <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
835866 (length must be between 4 and 256 chars)
836867 </td>
837868 </tr>
838869 <tr>
839870 <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.
841872 </td>
842873 </tr>
843874 </tbody>
846877 <hr>
847878 <div class="refsect2" title="nice_agent_get_local_credentials ()">
848879 <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
866898 </td>
867899 </tr>
868900 <tr>
869901 <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
871903 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>
873905 </td>
874906 </tr>
875907 <tr>
876908 <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
878910 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>
880912 </td>
881913 </tr>
882914 <tr>
883915 <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.
885917 </td>
886918 </tr>
887919 </tbody>
890922 <hr>
891923 <div class="refsect2" title="nice_agent_set_remote_candidates ()">
892924 <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>
897929 <p>
898930 Sets, adds or updates the remote candidates for a component of a stream.
899931 </p>
911943 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>
912944 </p>
913945 </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
925959 </td>
926960 </tr>
927961 <tr>
928962 <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
930964 </td>
931965 </tr>
932966 <tr>
933967 <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
935969 </td>
936970 </tr>
937971 <tr>
946980 <hr>
947981 <div class="refsect2" title="nice_agent_get_remote_candidates ()">
948982 <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>
952986 <p>
953987 Get a list of the remote candidates set on a stream's component
954988 </p>
9661000 to get notified of new remote candidates.
9671001 </p>
9681002 </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
9801016 </td>
9811017 </tr>
9821018 <tr>
9831019 <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
9851021 </td>
9861022 </tr>
9871023 <tr>
9881024 <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
9901026 the remote candidates set on the <em class="parameter"><code>agent</code></em>
9911027 </td>
9921028 </tr>
9961032 <hr>
9971033 <div class="refsect2" title="nice_agent_get_local_candidates ()">
9981034 <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>
10021038 <p>
10031039 Retreive from the agent the list of all local candidates
10041040 for a stream's component
10141050 <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.
10151051 </p>
10161052 </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
10281066 </td>
10291067 </tr>
10301068 <tr>
10311069 <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
10331071 </td>
10341072 </tr>
10351073 <tr>
10361074 <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
10381076 the local candidates of <em class="parameter"><code>agent</code></em>
10391077 </td>
10401078 </tr>
10441082 <hr>
10451083 <div class="refsect2" title="nice_agent_send ()">
10461084 <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>
10521090 <p>
10531091 Sends a data payload over a stream's component.
10541092 </p>
10611099 in any state if component was in READY state before and was then restarted
10621100 </p>
10631101 </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
10751115 </td>
10761116 </tr>
10771117 <tr>
10781118 <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
10801120 </td>
10811121 </tr>
10821122 <tr>
10831123 <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
10851125 </td>
10861126 </tr>
10871127 <tr>
10881128 <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
10901130 </td>
10911131 </tr>
10921132 <tr>
11001140 <hr>
11011141 <div class="refsect2" title="nice_agent_attach_recv ()">
11021142 <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>
11091149 <p>
11101150 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
11231164 </td>
11241165 </tr>
11251166 <tr>
11261167 <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
11281169 </td>
11291170 </tr>
11301171 <tr>
11311172 <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
11331174 </td>
11341175 </tr>
11351176 <tr>
11361177 <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
11381179 the stream's component
11391180 </td>
11401181 </tr>
11411182 <tr>
11421183 <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
11441185 </td>
11451186 </tr>
11461187 <tr>
11471188 <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.
11491190 </td>
11501191 </tr>
11511192 </tbody>
11541195 <hr>
11551196 <div class="refsect2" title="nice_agent_set_selected_pair ()">
11561197 <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>
11621203 <p>
11631204 Sets the selected candidate pair for media transmission
11641205 for a given stream's component. Calling this function will
11651206 disable all further ICE processing (connection check,
11661207 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
11791221 </td>
11801222 </tr>
11811223 <tr>
11821224 <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
11841226 </td>
11851227 </tr>
11861228 <tr>
11871229 <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
11891231 </td>
11901232 </tr>
11911233 <tr>
11921234 <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
11941236 </td>
11951237 </tr>
11961238 <tr>
11971239 <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
11991241 </td>
12001242 </tr>
12011243 </tbody>
12041246 <hr>
12051247 <div class="refsect2" title="nice_agent_set_selected_remote_candidate ()">
12061248 <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>
12121254 <p>
12131255 Sets the selected remote candidate for media transmission
12141256 for a given stream's component. This is used to force the selection of
12161258 (e.g. non-ICE compatible candidates).
12171259 Calling this function will disable all further ICE processing
12181260 (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
12311274 </td>
12321275 </tr>
12331276 <tr>
12341277 <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
12361279 </td>
12371280 </tr>
12381281 <tr>
12391282 <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
12411284 </td>
12421285 </tr>
12431286 <tr>
12441287 <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
12461289 </td>
12471290 </tr>
12481291 </tbody>
12511294 <hr>
12521295 <div class="refsect2" title="nice_agent_set_stream_tos ()">
12531296 <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
12701314 </td>
12711315 </tr>
12721316 <tr>
12731317 <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
12751319 </td>
12761320 </tr>
12771321 </tbody>
12811325 <hr>
12821326 <div class="refsect2" title="nice_agent_set_software ()">
12831327 <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>
12861330 <p>
12871331 This function will set the value of the SOFTWARE attribute to be added to
12881332 STUN requests, responses and error responses sent during connectivity checks.
12891333 </p>
12901334 <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>
12921336 and <a class="link" href="NiceAgent.html#NICE-COMPATIBILITY-WLM2009:CAPS"><span class="type">NICE_COMPATIBILITY_WLM2009</span></a> compatibility modes.
12931337 </p>
12941338 <p>
13081352 128 characters will be sent.
13091353 </p>
13101354 </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
13171363 </td>
13181364 </tr>
13191365 <tr>
13201366 <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.
13221368 </td>
13231369 </tr>
13241370 </tbody>
13281374 <hr>
13291375 <div class="refsect2" title="nice_agent_restart ()">
13301376 <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>
13321378 <p>
13331379 Restarts the session as defined in ICE draft 19. This function
13341380 needs to be called both when initiating (ICE spec section 9.1.1.1.
13351381 "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
13431390 </td>
13441391 </tr>
13451392 <tr>
13461393 <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
13481395 </td>
13491396 </tr>
13501397 </tbody>
13551402 <a name="NiceAgent.property-details"></a><h2>Property Details</h2>
13561403 <div class="refsect2" title='The "compatibility" property'>
13571404 <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>
13591406 <p>
13601407 The Nice agent can work in various compatibility modes depending on
13611408 what the application/peer needs.
13621409 </p>
13631410 <p> See also: <a class="link" href="NiceAgent.html#NiceCompatibility" title="enum NiceCompatibility"><span class="type">NiceCompatibility</span></a></p>
1411 <p>
1412 </p>
13641413 <p>Allowed values: &lt;= 3</p>
13651414 <p>Default value: 0</p>
13661415 </div>
13671416 <hr>
13681417 <div class="refsect2" title='The "controlling-mode" property'>
13691418 <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>
13711420 <p>Whether the agent is in controlling mode.</p>
13721421 <p>Default value: FALSE</p>
13731422 </div>
13741423 <hr>
13751424 <div class="refsect2" title='The "full-mode" property'>
13761425 <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>
13781427 <p>Whether agent runs in ICE full mode.</p>
13791428 <p>Default value: TRUE</p>
13801429 </div>
13811430 <hr>
13821431 <div class="refsect2" title='The "main-context" property'>
13831432 <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>
13851434 <p>
13861435 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>
13881438 </div>
13891439 <hr>
13901440 <div class="refsect2" title='The "max-connectivity-checks" property'>
13911441 <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>
13931443 <p>Upper limit for the total number of connectivity checks performed.</p>
13941444 <p>Default value: 0</p>
13951445 </div>
13961446 <hr>
13971447 <div class="refsect2" title='The "proxy-ip" property'>
13981448 <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>
14021453 <p>Default value: NULL</p>
14031454 <p class="since">Since 0.0.4</p>
14041455 </div>
14051456 <hr>
14061457 <div class="refsect2" title='The "proxy-password" property'>
14071458 <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>
14111463 <p>Default value: NULL</p>
14121464 <p class="since">Since 0.0.4</p>
14131465 </div>
14141466 <hr>
14151467 <div class="refsect2" title='The "proxy-port" property'>
14161468 <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>
14201473 <p>Allowed values: [1,65536]</p>
14211474 <p>Default value: 1</p>
14221475 <p class="since">Since 0.0.4</p>
14241477 <hr>
14251478 <div class="refsect2" title='The "proxy-type" property'>
14261479 <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>
14301484 <p>Allowed values: &lt;= 2</p>
14311485 <p>Default value: 0</p>
14321486 <p class="since">Since 0.0.4</p>
14341488 <hr>
14351489 <div class="refsect2" title='The "proxy-username" property'>
14361490 <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>
14401495 <p>Default value: NULL</p>
14411496 <p class="since">Since 0.0.4</p>
14421497 </div>
14431498 <hr>
14441499 <div class="refsect2" title='The "reliable" property'>
14451500 <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>
14471502 <p>
14481503 Whether the agent should use PseudoTcp to ensure a reliable transport
1449 of messages</p>
1504 of messages
1505 </p>
14501506 <p>Default value: FALSE</p>
14511507 <p class="since">Since 0.0.11</p>
14521508 </div>
14531509 <hr>
14541510 <div class="refsect2" title='The "stun-pacing-timer" property'>
14551511 <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>
14571513 <p>Timer 'Ta' (msecs) used in the IETF ICE specification for pacing candidate gathering and sending of connectivity checks.</p>
14581514 <p>Allowed values: &gt;= 1</p>
14591515 <p>Default value: 20</p>
14611517 <hr>
14621518 <div class="refsect2" title='The "stun-server" property'>
14631519 <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>
14651521 <p>The STUN server used to obtain server-reflexive candidates.</p>
14661522 <p>Default value: NULL</p>
14671523 </div>
14681524 <hr>
14691525 <div class="refsect2" title='The "stun-server-port" property'>
14701526 <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>
14721528 <p>The STUN server used to obtain server-reflexive candidates.</p>
14731529 <p>Allowed values: [1,65536]</p>
14741530 <p>Default value: 1</p>
14761532 <hr>
14771533 <div class="refsect2" title='The "upnp" property'>
14781534 <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>
14801536 <p>
14811537 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>
14831540 <p>Default value: TRUE</p>
14841541 <p class="since">Since 0.0.7</p>
14851542 </div>
14861543 <hr>
14871544 <div class="refsect2" title='The "upnp-timeout" property'>
14881545 <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>
14901547 <p>
14911548 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>
14931551 <p>Allowed values: [100,60000]</p>
14941552 <p>Default value: 200</p>
14951553 <p class="since">Since 0.0.7</p>
15001558 <div class="refsect2" title='The "candidate-gathering-done" signal'>
15011559 <a name="NiceAgent-candidate-gathering-done"></a><h3>The <code class="literal">"candidate-gathering-done"</code> signal</h3>
15021560 <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>
15051563 <p>
15061564 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
15191578 </td>
15201579 </tr>
15211580 <tr>
15291588 <div class="refsect2" title='The "component-state-changed" signal'>
15301589 <a name="NiceAgent-component-state-changed"></a><h3>The <code class="literal">"component-state-changed"</code> signal</h3>
15311590 <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
15491609 </td>
15501610 </tr>
15511611 <tr>
15521612 <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
15541614 </td>
15551615 </tr>
15561616 <tr>
15571617 <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
15591619 </td>
15601620 </tr>
15611621 <tr>
15691629 <div class="refsect2" title='The "initial-binding-request-received" signal'>
15701630 <a name="NiceAgent-initial-binding-request-received"></a><h3>The <code class="literal">"initial-binding-request-received"</code> signal</h3>
15711631 <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>
15741634 <p>
15751635 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
15881649 </td>
15891650 </tr>
15901651 <tr>
15981659 <div class="refsect2" title='The "new-candidate" signal'>
15991660 <a name="NiceAgent-new-candidate"></a><h3>The <code class="literal">"new-candidate"</code> signal</h3>
16001661 <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>
16051666 <p>
16061667 This signal is fired when the agent discovers a new candidate
16071668 </p>
16081669 <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
16201683 </td>
16211684 </tr>
16221685 <tr>
16231686 <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
16251688 </td>
16261689 </tr>
16271690 <tr>
16281691 <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
16301693 </td>
16311694 </tr>
16321695 <tr>
16401703 <div class="refsect2" title='The "new-remote-candidate" signal'>
16411704 <a name="NiceAgent-new-remote-candidate"></a><h3>The <code class="literal">"new-remote-candidate"</code> signal</h3>
16421705 <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>
16471710 <p>
16481711 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
16611725 </td>
16621726 </tr>
16631727 <tr>
16641728 <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
16661730 </td>
16671731 </tr>
16681732 <tr>
16691733 <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
16711735 </td>
16721736 </tr>
16731737 <tr>
16811745 <div class="refsect2" title='The "new-selected-pair" signal'>
16821746 <a name="NiceAgent-new-selected-pair"></a><h3>The <code class="literal">"new-selected-pair"</code> signal</h3>
16831747 <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>
16891753 <p>
16901754 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
17031768 </td>
17041769 </tr>
17051770 <tr>
17061771 <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
17081773 </td>
17091774 </tr>
17101775 <tr>
17111776 <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
17131778 </td>
17141779 </tr>
17151780 <tr>
17161781 <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
17181783 </td>
17191784 </tr>
17201785 <tr>
17281793 <div class="refsect2" title='The "reliable-transport-writable" signal'>
17291794 <a name="NiceAgent-reliable-transport-writable"></a><h3>The <code class="literal">"reliable-transport-writable"</code> signal</h3>
17301795 <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>
17341799 <p>
17351800 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
17361801 transport becomes writable.
17371802 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
17381803 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
17511817 </td>
17521818 </tr>
17531819 <tr>
17541820 <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
17561822 </td>
17571823 </tr>
17581824 <tr>
17711837 </div>
17721838 <div class="footer">
17731839 <hr>
1774 Generated by GTK-Doc V1.13</div>
1840 Generated by GTK-Doc V1.15</div>
17751841 </body>
17761842 </html>
77 <link rel="up" href="pt01.html" title="Part I. ICE Library">
88 <link rel="prev" href="pt01.html" title="Part I. ICE Library">
99 <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)">
1111 <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="">
2012 </head>
2113 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
2214 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
4234 </div>
4335 <div class="footer">
4436 <hr>
45 Generated by GTK-Doc V1.13</div>
37 Generated by GTK-Doc V1.15</div>
4638 </body>
4739 </html>
77 <link rel="up" href="pt01.html" title="Part I. ICE Library">
88 <link rel="prev" href="libnice-NiceCandidate.html" title="NiceCandidate">
99 <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)">
1111 <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="">
2012 </head>
2113 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
2214 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
2820 </tr></table>
2921 <div class="chapter" title="Libnice helper functions">
3022 <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>
3224 <div class="toc"><dl>
3325 <dt>
3426 <span class="refentrytitle"><a href="libnice-Debug-messages.html">Debug messages</a></span><span class="refpurpose"> — Debug messages utility functions</span>
4032 </div>
4133 <div class="footer">
4234 <hr>
43 Generated by GTK-Doc V1.13</div>
35 Generated by GTK-Doc V1.15</div>
4436 </body>
4537 </html>
77 <link rel="up" href="pt02.html" title="Part II. STUN Library">
88 <link rel="prev" href="pt02.html" title="Part II. STUN Library">
99 <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)">
1111 <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="">
2012 </head>
2113 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
2214 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
3931 </div>
4032 <div class="footer">
4133 <hr>
42 Generated by GTK-Doc V1.13</div>
34 Generated by GTK-Doc V1.15</div>
4335 </body>
4436 </html>
77 <link rel="up" href="pt02.html" title="Part II. STUN Library">
88 <link rel="prev" href="libnice-StunMessage.html" title="StunMessage">
99 <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)">
1111 <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="">
2012 </head>
2113 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
2214 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
2820 </tr></table>
2921 <div class="chapter" title="STUN usages">
3022 <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>
3224 <div class="toc"><dl>
3325 <dt>
3426 <span class="refentrytitle"><a href="libnice-Bind.html">Bind</a></span><span class="refpurpose"> — STUN Binding Usage</span>
4638 </div>
4739 <div class="footer">
4840 <hr>
49 Generated by GTK-Doc V1.13</div>
41 Generated by GTK-Doc V1.15</div>
5042 </body>
5143 </html>
77 <link rel="up" href="pt03.html" title="Part III. Pseudo TCP Socket implementation">
88 <link rel="prev" href="pt03.html" title="Part III. Pseudo TCP Socket implementation">
99 <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)">
1111 <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="">
2012 </head>
2113 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
2214 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
3426 </div>
3527 <div class="footer">
3628 <hr>
37 Generated by GTK-Doc V1.13</div>
29 Generated by GTK-Doc V1.15</div>
3830 </body>
3931 </html>
55 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
66 <link rel="home" href="index.html" title="libnice Reference Manual">
77 <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)">
99 <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="">
1810 </head>
1911 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
2012 <div class="book" title="libnice Reference Manual">
9486 </div>
9587 <div class="footer">
9688 <hr>
97 Generated by GTK-Doc V1.13</div>
89 Generated by GTK-Doc V1.15</div>
9890 </body>
9991 </html>
2424 <ANCHOR id="NICE-PROXY-TYPE-HTTP:CAPS" href="libnice/NiceAgent.html#NICE-PROXY-TYPE-HTTP:CAPS">
2525 <ANCHOR id="NICE-PROXY-TYPE-LAST:CAPS" href="libnice/NiceAgent.html#NICE-PROXY-TYPE-LAST:CAPS">
2626 <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">
2828 <ANCHOR id="NICE-COMPATIBILITY-GOOGLE:CAPS" href="libnice/NiceAgent.html#NICE-COMPATIBILITY-GOOGLE:CAPS">
2929 <ANCHOR id="NICE-COMPATIBILITY-MSN:CAPS" href="libnice/NiceAgent.html#NICE-COMPATIBILITY-MSN:CAPS">
3030 <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">
3132 <ANCHOR id="NICE-COMPATIBILITY-LAST:CAPS" href="libnice/NiceAgent.html#NICE-COMPATIBILITY-LAST:CAPS">
3233 <ANCHOR id="NiceAgentRecvFunc" href="libnice/NiceAgent.html#NiceAgentRecvFunc">
3334 <ANCHOR id="NICE-AGENT-MAX-REMOTE-CANDIDATES:CAPS" href="libnice/NiceAgent.html#NICE-AGENT-MAX-REMOTE-CANDIDATES:CAPS">
332333 <ANCHOR id="libnice-ICE.description" href="libnice/libnice-ICE.html#libnice-ICE.description">
333334 <ANCHOR id="libnice-ICE.details" href="libnice/libnice-ICE.html#libnice-ICE.details">
334335 <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">
336337 <ANCHOR id="STUN-USAGE-ICE-COMPATIBILITY-GOOGLE:CAPS" href="libnice/libnice-ICE.html#STUN-USAGE-ICE-COMPATIBILITY-GOOGLE:CAPS">
337338 <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">
338340 <ANCHOR id="StunUsageIceReturn" href="libnice/libnice-ICE.html#StunUsageIceReturn">
339341 <ANCHOR id="STUN-USAGE-ICE-RETURN-SUCCESS:CAPS" href="libnice/libnice-ICE.html#STUN-USAGE-ICE-RETURN-SUCCESS:CAPS">
340342 <ANCHOR id="STUN-USAGE-ICE-RETURN-ERROR:CAPS" href="libnice/libnice-ICE.html#STUN-USAGE-ICE-RETURN-ERROR:CAPS">
77 <link rel="up" href="ch04.html" title="STUN usages">
88 <link rel="prev" href="ch04.html" title="STUN usages">
99 <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)">
1111 <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="">
2012 </head>
2113 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
2214 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
5244 #include &lt;stun/usages/bind.h&gt;
5345
5446 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>);
7264 </pre>
7365 </div>
7466 <div class="refsect1" title="Description">
7668 <p>
7769 The STUN Binding usage allows for easily creating and parsing STUN Binding
7870 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>
8073 </div>
8174 <div class="refsect1" title="Details">
8275 <a name="libnice-Bind.details"></a><h2>Details</h2>
9285 </pre>
9386 <p>
9487 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>
9690 <div class="variablelist"><table border="0">
9791 <col align="left" valign="top">
9892 <tbody>
9993 <tr>
10094 <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
10296 </td>
10397 </tr>
10498 <tr>
10599 <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
107101 </td>
108102 </tr>
109103 <tr>
110104 <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
112106 </td>
113107 </tr>
114108 <tr>
115109 <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
117111 ALTERNATE-SERVER attribute
118112 </td>
119113 </tr>
120114 <tr>
121115 <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
123117 timed out.
124118 </td>
125119 </tr>
129123 <hr>
130124 <div class="refsect2" title="stun_usage_bind_create ()">
131125 <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>
138133 <div class="variablelist"><table border="0">
139134 <col align="left" valign="top">
140135 <tbody>
141136 <tr>
142137 <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
144139 </td>
145140 </tr>
146141 <tr>
147142 <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
149144 </td>
150145 </tr>
151146 <tr>
152147 <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>
154149 </td>
155150 </tr>
156151 <tr>
157152 <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>
159154 </td>
160155 </tr>
161156 <tr>
169164 <hr>
170165 <div class="refsect2" title="stun_usage_bind_process ()">
171166 <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>
177172 <p>
178173 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>
180176 <div class="variablelist"><table border="0">
181177 <col align="left" valign="top">
182178 <tbody>
183179 <tr>
184180 <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
186182 </td>
187183 </tr>
188184 <tr>
189185 <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
191187 that the STUN server gives us
192188 </td>
193189 </tr>
194190 <tr>
195191 <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
197193 address and will be set to the actual length of the socket address.
198194 </td>
199195 </tr>
200196 <tr>
201197 <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
203199 address of an alternate server to which we should send our new STUN
204200 binding request, in case the currently used STUN server is requesting the use
205201 of an alternate server. This argument will only be filled if the return value
208204 </tr>
209205 <tr>
210206 <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
212208 the size of the <em class="parameter"><code>alternate_server</code></em> socket address and will be set to the
213209 actual length of the socket address.
214210 </td>
225221 <hr>
226222 <div class="refsect2" title="stun_usage_bind_keepalive ()">
227223 <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>
232228 <p>
233229 Creates a STUN binding indication that can be used for a keepalive.
234230 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>
236233 <div class="variablelist"><table border="0">
237234 <col align="left" valign="top">
238235 <tbody>
239236 <tr>
240237 <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
242239 </td>
243240 </tr>
244241 <tr>
245242 <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
247244 </td>
248245 </tr>
249246 <tr>
250247 <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>
252249 </td>
253250 </tr>
254251 <tr>
255252 <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>
257254 </td>
258255 </tr>
259256 <tr>
267264 <hr>
268265 <div class="refsect2" title="stun_usage_bind_run ()">
269266 <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>
274271 <p>
275272 This is a convenience function that will do a synchronous Binding request to
276273 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>
278276 <div class="variablelist"><table border="0">
279277 <col align="left" valign="top">
280278 <tbody>
281279 <tr>
282280 <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
284282 address
285283 </td>
286284 </tr>
287285 <tr>
288286 <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>
290288 </td>
291289 </tr>
292290 <tr>
293291 <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
295293 that the STUN server gives us
296294 </td>
297295 </tr>
298296 <tr>
299297 <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>
301299 </td>
302300 </tr>
303301 <tr>
314312 </div>
315313 <div class="footer">
316314 <hr>
317 Generated by GTK-Doc V1.13</div>
315 Generated by GTK-Doc V1.15</div>
318316 </body>
319317 </html>
77 <link rel="up" href="ch02.html" title="Libnice helper functions">
88 <link rel="prev" href="ch02.html" title="Libnice helper functions">
99 <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)">
1111 <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="">
2012 </head>
2113 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
2214 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
4840 </div>
4941 <div class="refsynopsisdiv" title="Synopsis">
5042 <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>);
5345 </pre>
5446 </div>
5547 <div class="refsect1" title="Description">
9183 <p>This API is unstable and is subject to change at any time...
9284 More flags are to come and a better API to enable/disable each flag
9385 should be added.</p>
86 <p>
87 </p>
9488 </div>
9589 <div class="refsect1" title="Details">
9690 <a name="libnice-Debug-messages.details"></a><h2>Details</h2>
9791 <div class="refsect2" title="nice_debug_enable ()">
9892 <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>
10094 <p>
101 Enables libnice debug output to the terminal</p>
95 Enables libnice debug output to the terminal
96 </p>
10297 <div class="variablelist"><table border="0">
10398 <col align="left" valign="top">
10499 <tbody><tr>
105100 <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
107102 </td>
108103 </tr></tbody>
109104 </table></div>
111106 <hr>
112107 <div class="refsect2" title="nice_debug_disable ()">
113108 <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>
115110 <p>
116 Disables libnice debug output to the terminal</p>
111 Disables libnice debug output to the terminal
112 </p>
117113 <div class="variablelist"><table border="0">
118114 <col align="left" valign="top">
119115 <tbody><tr>
120116 <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
122118 </td>
123119 </tr></tbody>
124120 </table></div>
127123 </div>
128124 <div class="footer">
129125 <hr>
130 Generated by GTK-Doc V1.13</div>
126 Generated by GTK-Doc V1.15</div>
131127 </body>
132128 </html>
77 <link rel="up" href="ch04.html" title="STUN usages">
88 <link rel="prev" href="libnice-Bind.html" title="Bind">
99 <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)">
1111 <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="">
2012 </head>
2113 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
2214 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
5345
5446 enum <a class="link" href="libnice-ICE.html#StunUsageIceCompatibility" title="enum StunUsageIceCompatibility">StunUsageIceCompatibility</a>;
5547 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>);
7365 <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>);
8577 <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>);
8779 </pre>
8880 </div>
8981 <div class="refsect1" title="Description">
9284 The STUN ICE usage allows for easily creating and parsing STUN Binding
9385 requests and responses used for ICE connectivity checks. The API allows you
9486 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>
9689 </div>
9790 <div class="refsect1" title="Details">
9891 <a name="libnice-ICE.details"></a><h2>Details</h2>
9992 <div class="refsect2" title="enum StunUsageIceCompatibility">
10093 <a name="StunUsageIceCompatibility"></a><h3>enum StunUsageIceCompatibility</h3>
10194 <pre class="programlisting">typedef enum {
102 STUN_USAGE_ICE_COMPATIBILITY_DRAFT19,
95 STUN_USAGE_ICE_COMPATIBILITY_RFC5245,
10396 STUN_USAGE_ICE_COMPATIBILITY_GOOGLE,
10497 STUN_USAGE_ICE_COMPATIBILITY_MSN,
98 STUN_USAGE_ICE_COMPATIBILITY_DRAFT19 = STUN_USAGE_ICE_COMPATIBILITY_RFC5245,
10599 } StunUsageIceCompatibility;
106100 </pre>
107101 <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>
112134 <tr>
113135 <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
127137 </td>
128138 </tr>
129139 </tbody>
147157 <p>
148158 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
149159 <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>
151162 <div class="variablelist"><table border="0">
152163 <col align="left" valign="top">
153164 <tbody>
154165 <tr>
155166 <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
157168 </td>
158169 </tr>
159170 <tr>
160171 <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
162173 </td>
163174 </tr>
164175 <tr>
165176 <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
167178 </td>
168179 </tr>
169180 <tr>
170181 <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
172183 </td>
173184 </tr>
174185 <tr>
175186 <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
177188 </td>
178189 </tr>
179190 <tr>
180191 <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
182193 </td>
183194 </tr>
184195 <tr>
185196 <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
187198 the STUN reply
188199 </td>
189200 </tr>
190201 <tr>
191202 <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
193204 an invalid address family
194205 </td>
195206 </tr>
196207 <tr>
197208 <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
199210 MAPPED-ADDRESS or XOR-MAPPED-ADDRESS attribute was found
200211 </td>
201212 </tr>
205216 <hr>
206217 <div class="refsect2" title="stun_usage_ice_conncheck_create ()">
207218 <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>
221232 <p>
222233 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>
225237 <div class="variablelist"><table border="0">
226238 <col align="left" valign="top">
227239 <tbody>
228240 <tr>
229241 <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
231243 </td>
232244 </tr>
233245 <tr>
234246 <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
236248 </td>
237249 </tr>
238250 <tr>
239251 <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>
241253 </td>
242254 </tr>
243255 <tr>
244256 <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>
246258 </td>
247259 </tr>
248260 <tr>
249261 <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
251263 </td>
252264 </tr>
253265 <tr>
254266 <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>
256268 </td>
257269 </tr>
258270 <tr>
259271 <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
261273 </td>
262274 </tr>
263275 <tr>
264276 <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>
266278 </td>
267279 </tr>
268280 <tr>
269281 <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
271283 </td>
272284 </tr>
273285 <tr>
274286 <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.
277289 </td>
278290 </tr>
279291 <tr>
280292 <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
282294 </td>
283295 </tr>
284296 <tr>
285297 <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
287299 ICE-CONTROLLING attribute
288300 </td>
289301 </tr>
290302 <tr>
291303 <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
293305 request
294306 </td>
295307 </tr>
304316 <hr>
305317 <div class="refsect2" title="stun_usage_ice_conncheck_process ()">
306318 <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>
311323 <p>
312324 Process an ICE connectivity check STUN message and retreive the
313325 mapped address from the message
314326 </p>
315327 <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
316328 <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>
317331 <div class="variablelist"><table border="0">
318332 <col align="left" valign="top">
319333 <tbody>
320334 <tr>
321335 <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
323337 </td>
324338 </tr>
325339 <tr>
326340 <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
328342 that the STUN connectivity check response contains
329343 </td>
330344 </tr>
331345 <tr>
332346 <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>
334348 </td>
335349 </tr>
336350 <tr>
337351 <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
339353 response
340354 </td>
341355 </tr>
351365 <div class="refsect2" title="stun_usage_ice_conncheck_create_reply ()">
352366 <a name="stun-usage-ice-conncheck-create-reply"></a><h3>stun_usage_ice_conncheck_create_reply ()</h3>
353367 <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>
364378 <p>
365379 Tries to parse a STUN connectivity check request and builds a
366380 response accordingly.
373387 If <em class="parameter"><code>plen</code></em> has a size of 0, then no error response should be sent.
374388 </p>
375389 </div>
390 <p>
391 </p>
376392 <div class="variablelist"><table border="0">
377393 <col align="left" valign="top">
378394 <tbody>
379395 <tr>
380396 <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
382398 </td>
383399 </tr>
384400 <tr>
385401 <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
387403 </td>
388404 </tr>
389405 <tr>
390406 <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
392408 </td>
393409 </tr>
394410 <tr>
395411 <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>
397413 </td>
398414 </tr>
399415 <tr>
400416 <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.
402418 Will contain the length of the message built on output.
403419 </td>
404420 </tr>
405421 <tr>
406422 <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
408424 which the request was received. Will be used as the mapped address in the
409425 response
410426 </td>
411427 </tr>
412428 <tr>
413429 <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>
415431 </td>
416432 </tr>
417433 <tr>
418434 <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.
421437 </td>
422438 </tr>
423439 <tr>
424440 <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
426442 ICE-CONTROLLING attribute
427443 </td>
428444 </tr>
429445 <tr>
430446 <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
432448 response
433449 </td>
434450 </tr>
443459 <hr>
444460 <div class="refsect2" title="stun_usage_ice_conncheck_priority ()">
445461 <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>
449466 <div class="variablelist"><table border="0">
450467 <col align="left" valign="top">
451468 <tbody>
452469 <tr>
453470 <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
455472 </td>
456473 </tr>
457474 <tr>
466483 <div class="refsect2" title="stun_usage_ice_conncheck_use_candidate ()">
467484 <a name="stun-usage-ice-conncheck-use-candidate"></a><h3>stun_usage_ice_conncheck_use_candidate ()</h3>
468485 <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>
472490 <div class="variablelist"><table border="0">
473491 <col align="left" valign="top">
474492 <tbody>
475493 <tr>
476494 <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
478496 </td>
479497 </tr>
480498 <tr>
481499 <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.
483501 </td>
484502 </tr>
485503 </tbody>
489507 </div>
490508 <div class="footer">
491509 <hr>
492 Generated by GTK-Doc V1.13</div>
510 Generated by GTK-Doc V1.15</div>
493511 </body>
494512 </html>
77 <link rel="up" href="ch02.html" title="Libnice helper functions">
88 <link rel="prev" href="libnice-Debug-messages.html" title="Debug messages">
99 <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)">
1111 <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="">
2012 </head>
2113 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
2214 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
5143 <pre class="synopsis">
5244 #include &lt;interfaces.h&gt;
5345
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>);
5951 </pre>
6052 </div>
6153 <div class="refsect1" title="Description">
6355 <p>
6456 These utility functions allow the discovery of local network interfaces
6557 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>
6760 </div>
6861 <div class="refsect1" title="Details">
6962 <a name="libnice-Network-interfaces-discovery.details"></a><h2>Details</h2>
7063 <div class="refsect2" title="nice_interfaces_get_ip_for_interface ()">
7164 <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>
7467 <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>
7670 <div class="variablelist"><table border="0">
7771 <col align="left" valign="top">
7872 <tbody>
7973 <tr>
8074 <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
8276 </td>
8377 </tr>
8478 <tr>
9286 <hr>
9387 <div class="refsect2" title="nice_interfaces_get_local_interfaces ()">
9488 <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>
9791 <p>
98 Get the list of local interfaces</p>
92 Get the list of local interfaces
93 </p>
9994 <div class="variablelist"><table border="0">
10095 <col align="left" valign="top">
10196 <tbody><tr>
10297 <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.
10499 </td>
105100 </tr></tbody>
106101 </table></div>
108103 <hr>
109104 <div class="refsect2" title="nice_interfaces_get_local_ips ()">
110105 <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>
112107 <p>
113 Get a list of local ipv4 interface addresses</p>
108 Get a list of local ipv4 interface addresses
109 </p>
114110 <div class="variablelist"><table border="0">
115111 <col align="left" valign="top">
116112 <tbody>
117113 <tr>
118114 <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
120116 </td>
121117 </tr>
122118 <tr>
123119 <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.
125121 </td>
126122 </tr>
127123 </tbody>
131127 </div>
132128 <div class="footer">
133129 <hr>
134 Generated by GTK-Doc V1.13</div>
130 Generated by GTK-Doc V1.15</div>
135131 </body>
136132 </html>
77 <link rel="up" href="ch01.html" title="">
88 <link rel="prev" href="NiceAgent.html" title="NiceAgent">
99 <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)">
1111 <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="">
2012 </head>
2113 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
2214 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
5042 <a name="libnice-NiceAddress.synopsis"></a><h2>Synopsis</h2>
5143 <pre class="synopsis"> <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress">NiceAddress</a>;
5244 #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>);
7668 </pre>
7769 </div>
7870 <div class="refsect1" title="Description">
7971 <a name="libnice-NiceAddress.description"></a><h2>Description</h2>
8072 <p>
8173 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>
8376 </div>
8477 <div class="refsect1" title="Details">
8578 <a name="libnice-NiceAddress.details"></a><h2>Details</h2>
9588 } NiceAddress;
9689 </pre>
9790 <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>
9993 <div class="variablelist"><table border="0">
10094 <col align="left" valign="top">
10195 <tbody></tbody>
109103 <p>
110104 The maximum string length representation of an address.
111105 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>
113108 </div>
114109 <hr>
115110 <div class="refsect2" title="nice_address_init ()">
116111 <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>
120116 <div class="variablelist"><table border="0">
121117 <col align="left" valign="top">
122118 <tbody><tr>
123119 <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
125121 </td>
126122 </tr></tbody>
127123 </table></div>
129125 <hr>
130126 <div class="refsect2" title="nice_address_new ()">
131127 <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>
133129 <p>
134130 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>
136133 <div class="variablelist"><table border="0">
137134 <col align="left" valign="top">
138135 <tbody><tr>
145142 <hr>
146143 <div class="refsect2" title="nice_address_free ()">
147144 <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>
151149 <div class="variablelist"><table border="0">
152150 <col align="left" valign="top">
153151 <tbody><tr>
154152 <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
156154 </td>
157155 </tr></tbody>
158156 </table></div>
160158 <hr>
161159 <div class="refsect2" title="nice_address_dup ()">
162160 <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
172171 </td>
173172 </tr>
174173 <tr>
182181 <hr>
183182 <div class="refsect2" title="nice_address_set_ipv4 ()">
184183 <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>
187186 <p>
188187 Set <em class="parameter"><code>addr</code></em> to an IPv4 address using the data from <em class="parameter"><code>addr_ipv4</code></em>
189188 </p>
196195 <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>
197196 </p>
198197 </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
205206 </td>
206207 </tr>
207208 <tr>
208209 <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
210211 </td>
211212 </tr>
212213 </tbody>
215216 <hr>
216217 <div class="refsect2" title="nice_address_set_ipv6 ()">
217218 <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>
220221 <p>
221222 Set <em class="parameter"><code>addr</code></em> to an IPv6 address using the data from <em class="parameter"><code>addr_ipv6</code></em>
222223 </p>
229230 <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>
230231 </p>
231232 </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
238241 </td>
239242 </tr>
240243 <tr>
241244 <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
243246 </td>
244247 </tr>
245248 </tbody>
248251 <hr>
249252 <div class="refsect2" title="nice_address_set_port ()">
250253 <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
261265 </td>
262266 </tr>
263267 <tr>
264268 <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
266270 </td>
267271 </tr>
268272 </tbody>
271275 <hr>
272276 <div class="refsect2" title="nice_address_get_port ()">
273277 <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
283288 </td>
284289 </tr>
285290 <tr>
293298 <hr>
294299 <div class="refsect2" title="nice_address_set_from_string ()">
295300 <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
306312 </td>
307313 </tr>
308314 <tr>
309315 <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
316322 </td>
317323 </tr>
318324 </tbody>
321327 <hr>
322328 <div class="refsect2" title="nice_address_set_from_sockaddr ()">
323329 <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
334341 </td>
335342 </tr>
336343 <tr>
337344 <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
339346 </td>
340347 </tr>
341348 </tbody>
344351 <hr>
345352 <div class="refsect2" title="nice_address_copy_to_sockaddr ()">
346353 <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
357365 </td>
358366 </tr>
359367 <tr>
360368 <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
362370 </td>
363371 </tr>
364372 </tbody>
367375 <hr>
368376 <div class="refsect2" title="nice_address_equal ()">
369377 <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>
374383 <div class="variablelist"><table border="0">
375384 <col align="left" valign="top">
376385 <tbody>
377386 <tr>
378387 <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
380389 </td>
381390 </tr>
382391 <tr>
383392 <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
390399 </td>
391400 </tr>
392401 </tbody>
395404 <hr>
396405 <div class="refsect2" title="nice_address_to_string ()">
397406 <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
408418 </td>
409419 </tr>
410420 <tr>
411421 <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
413423 </td>
414424 </tr>
415425 </tbody>
418428 <hr>
419429 <div class="refsect2" title="nice_address_is_private ()">
420430 <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
435446 </td>
436447 </tr>
437448 </tbody>
440451 <hr>
441452 <div class="refsect2" title="nice_address_is_valid ()">
442453 <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
457469 </td>
458470 </tr>
459471 </tbody>
463475 </div>
464476 <div class="footer">
465477 <hr>
466 Generated by GTK-Doc V1.13</div>
478 Generated by GTK-Doc V1.15</div>
467479 </body>
468480 </html>
77 <link rel="up" href="ch01.html" title="">
88 <link rel="prev" href="libnice-NiceAddress.html" title="NiceAddress">
99 <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)">
1111 <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="">
2012 </head>
2113 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
2214 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
5446 <a class="link" href="libnice-NiceCandidate.html#TurnServer" title="TurnServer">TurnServer</a>;
5547 enum <a class="link" href="libnice-NiceCandidate.html#NiceRelayType" title="enum NiceRelayType">NiceRelayType</a>;
5648 #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>);
6052 </pre>
6153 </div>
6254 <div class="refsect1" title="Description">
6658 understand correctly the concept of ICE candidates.
6759 </p>
6860 <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>
7063 </div>
7164 <div class="refsect1" title="Details">
7265 <a name="libnice-NiceCandidate.details"></a><h2>Details</h2>
9992 value will represent the qvalue multiplied by 1000.
10093 </p>
10194 </div>
95 <p>
96 </p>
10297 <div class="variablelist"><table border="0">
10398 <col align="left" valign="top">
10499 <tbody>
105100 <tr>
106101 <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
108103 </td>
109104 </tr>
110105 <tr>
111106 <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
113108 </td>
114109 </tr>
115110 <tr>
116111 <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
118113 </td>
119114 </tr>
120115 <tr>
121116 <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
148143 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>)
149144 </td>
150145 </tr>
151146 <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
154149 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>)
155150 </td>
156151 </tr>
157152 <tr>
158153 <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
160155 of type <a class="link" href="libnice-NiceCandidate.html#NICE-CANDIDATE-TYPE-RELAYED:CAPS"><code class="literal">NICE_CANDIDATE_TYPE_RELAYED</code></a>
161156 </td>
162157 </tr>
163158 <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
166161 </td>
167162 </tr>
168163 </tbody>
180175 } NiceCandidateType;
181176 </pre>
182177 <p>
183 An enum represneting the type of a candidate</p>
178 An enum represneting the type of a candidate
179 </p>
184180 <div class="variablelist"><table border="0">
185181 <col align="left" valign="top">
186182 <tbody>
187183 <tr>
188184 <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
190186 </td>
191187 </tr>
192188 <tr>
193189 <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
195191 </td>
196192 </tr>
197193 <tr>
198194 <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
200196 </td>
201197 </tr>
202198 <tr>
203199 <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
205201 </td>
206202 </tr>
207203 </tbody>
216212 } NiceCandidateTransport;
217213 </pre>
218214 <p>
219 An enum representing the type of transport to use</p>
215 An enum representing the type of transport to use
216 </p>
220217 <div class="variablelist"><table border="0">
221218 <col align="left" valign="top">
222219 <tbody><tr>
223220 <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
225222 </td>
226223 </tr></tbody>
227224 </table></div>
237234 } TurnServer;
238235 </pre>
239236 <p>
240 A structure to store the TURN relay settings</p>
237 A structure to store the TURN relay settings
238 </p>
241239 <div class="variablelist"><table border="0">
242240 <col align="left" valign="top">
243241 <tbody>
244242 <tr>
245243 <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
257255 </td>
258256 </tr>
259257 <tr>
260258 <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
262260 </td>
263261 </tr>
264262 </tbody>
274272 } NiceRelayType;
275273 </pre>
276274 <p>
277 An enum representing the type of relay to use</p>
275 An enum representing the type of relay to use
276 </p>
278277 <div class="variablelist"><table border="0">
279278 <col align="left" valign="top">
280279 <tbody>
281280 <tr>
282281 <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
284283 </td>
285284 </tr>
286285 <tr>
287286 <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
289288 </td>
290289 </tr>
291290 <tr>
292291 <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
294293 </td>
295294 </tr>
296295 </tbody>
302301 <pre class="programlisting">#define NICE_CANDIDATE_MAX_FOUNDATION 32+1
303302 </pre>
304303 <p>
305 The maximum size a candidate foundation can have.</p>
304 The maximum size a candidate foundation can have.
305 </p>
306306 </div>
307307 <hr>
308308 <div class="refsect2" title="nice_candidate_new ()">
309309 <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>
313314 <div class="variablelist"><table border="0">
314315 <col align="left" valign="top">
315316 <tbody>
316317 <tr>
317318 <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
319320 </td>
320321 </tr>
321322 <tr>
329330 <hr>
330331 <div class="refsect2" title="nice_candidate_free ()">
331332 <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>
335337 <div class="variablelist"><table border="0">
336338 <col align="left" valign="top">
337339 <tbody><tr>
338340 <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
340342 </td>
341343 </tr></tbody>
342344 </table></div>
344346 <hr>
345347 <div class="refsect2" title="nice_candidate_copy ()">
346348 <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>
350353 <div class="variablelist"><table border="0">
351354 <col align="left" valign="top">
352355 <tbody>
353356 <tr>
354357 <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
356359 </td>
357360 </tr>
358361 <tr>
371374 </div>
372375 <div class="footer">
373376 <hr>
374 Generated by GTK-Doc V1.13</div>
377 Generated by GTK-Doc V1.15</div>
375378 </body>
376379 </html>
66 <link rel="home" href="index.html" title="libnice Reference Manual">
77 <link rel="up" href="ch05.html" title="">
88 <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)">
1010 <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="">
1911 </head>
2012 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
2113 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
5951 enum <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpWriteResult" title="enum PseudoTcpWriteResult">PseudoTcpWriteResult</a>;
6052 <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpCallbacks" title="PseudoTcpCallbacks">PseudoTcpCallbacks</a>;
6153 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>);
8375 </pre>
8476 </div>
8577 <div class="refsect1" title="Object Hierarchy">
8678 <a name="libnice-Pseudo-TCP-Socket.object-hierarchy"></a><h2>Object Hierarchy</h2>
8779 <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>
8981 +----PseudoTcpSocket
9082 </pre>
9183 </div>
9284 <div class="refsect1" title="Properties">
9385 <a name="libnice-Pseudo-TCP-Socket.properties"></a><h2>Properties</h2>
9486 <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
9890 </pre>
9991 </div>
10092 <div class="refsect1" title="Description">
10799 </p>
108100 <p>
109101 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>
111104 </div>
112105 <div class="refsect1" title="Details">
113106 <a name="libnice-Pseudo-TCP-Socket.details"></a><h2>Details</h2>
115108 <a name="PseudoTcpSocket-struct"></a><h3>PseudoTcpSocket</h3>
116109 <pre class="programlisting">typedef struct _PseudoTcpSocket PseudoTcpSocket;</pre>
117110 <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>
119113 <p class="since">Since 0.0.11</p>
120114 </div>
121115 <hr>
133127 An enum representing the state of the <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a>.
134128 </p>
135129 <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>
136132 <div class="variablelist"><table border="0">
137133 <col align="left" valign="top">
138134 <tbody>
139135 <tr>
140136 <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
142138 listening for an incoming connection
143139 </td>
144140 </tr>
145141 <tr>
146142 <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
148144 waiting for an answer
149145 </td>
150146 </tr>
151147 <tr>
152148 <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.
154150 </td>
155151 </tr>
156152 <tr>
157153 <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
159155 </td>
160156 </tr>
161157 <tr>
162158 <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
164160 </td>
165161 </tr>
166162 </tbody>
181177 the <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a>.
182178 </p>
183179 <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>
184182 <div class="variablelist"><table border="0">
185183 <col align="left" valign="top">
186184 <tbody>
187185 <tr>
188186 <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
190188 </td>
191189 </tr>
192190 <tr>
193191 <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
195193 and the size of the message to be sent made this impossible.
196194 </td>
197195 </tr>
198196 <tr>
199197 <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
201199 </td>
202200 </tr>
203201 </tbody>
222220 <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> when some events happen.
223221 </p>
224222 <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
231231 </td>
232232 </tr>
233233 <tr>
234234 <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
236236 </td>
237237 </tr>
238238 <tr>
239239 <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
241241 </td>
242242 </tr>
243243 <tr>
244244 <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
246246 </td>
247247 </tr>
248248 <tr>
249249 <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
251251 </td>
252252 </tr>
253253 <tr>
254254 <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.
256256 </td>
257257 </tr>
258258 </tbody>
269269 } PseudoTcpDebugLevel;
270270 </pre>
271271 <p>
272 Valid values of debug levels to be set.</p>
272 Valid values of debug levels to be set.
273 </p>
273274 <div class="variablelist"><table border="0">
274275 <col align="left" valign="top">
275276 <tbody>
276277 <tr>
277278 <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
279280 </td>
280281 </tr>
281282 <tr>
282283 <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
284285 </td>
285286 </tr>
286287 <tr>
287288 <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
289290 </td>
290291 </tr>
291292 </tbody>
295296 <hr>
296297 <div class="refsect2" title="pseudo_tcp_socket_new ()">
297298 <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>
300301 <p>
301302 Creates a new <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> for the specified conversation
302303 </p>
313314 after the call <em class="parameter"><code>pseudo_tcp_socket_new</code></em>
314315 </p>
315316 </div>
317 <p>
318 </p>
316319 <div class="variablelist"><table border="0">
317320 <col align="left" valign="top">
318321 <tbody>
319322 <tr>
320323 <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.
322325 </td>
323326 </tr>
324327 <tr>
325328 <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
327330 notified of the <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> events.
328331 </td>
329332 </tr>
330333 <tr>
331334 <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
333336
334337 </td>
335338 </tr>
340343 <hr>
341344 <div class="refsect2" title="pseudo_tcp_socket_connect ()">
342345 <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>
344347 <p>
345348 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.
346349 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.
354358 </td>
355359 </tr>
356360 <tr>
357361 <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)
359363 <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>
360364
361365 </td>
367371 <hr>
368372 <div class="refsect2" title="pseudo_tcp_socket_recv ()">
369373 <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>
373377 <p>
374378 Receive data from the socket.
375379 </p>
386390 <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.
387391 </p>
388392 </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.
395401 </td>
396402 </tr>
397403 <tr>
398404 <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
400406 </td>
401407 </tr>
402408 <tr>
403409 <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>
405411 </td>
406412 </tr>
407413 <tr>
418424 <hr>
419425 <div class="refsect2" title="pseudo_tcp_socket_send ()">
420426 <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>
424430 <p>
425431 Send data on the socket.
426432 </p>
434440 callback will be called when the socket will become writable.
435441 </p>
436442 </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.
443451 </td>
444452 </tr>
445453 <tr>
446454 <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
448456 </td>
449457 </tr>
450458 <tr>
451459 <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>
453461 </td>
454462 </tr>
455463 <tr>
466474 <hr>
467475 <div class="refsect2" title="pseudo_tcp_socket_close ()">
468476 <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
473481 pending data before closing.
474482 </p>
475483 <p>
488496 <p>
489497 </p>
490498 <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.
497507 </td>
498508 </tr>
499509 <tr>
500510 <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
502513 </td>
503514 </tr>
504515 </tbody>
508519 <hr>
509520 <div class="refsect2" title="pseudo_tcp_socket_get_error ()">
510521 <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>
512523 <p>
513524 Return the last encountered error.
514525 </p>
531542 <p>
532543 </p>
533544 </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.
540553 </td>
541554 </tr>
542555 <tr>
555568 <hr>
556569 <div class="refsect2" title="pseudo_tcp_socket_get_next_clock ()">
557570 <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>
560573 <p>
561574 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.
569583 </td>
570584 </tr>
571585 <tr>
572586 <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.
574588 </td>
575589 </tr>
576590 <tr>
577591 <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
579593 ready to be destroyed.
580594
581595 <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>
589603 <hr>
590604 <div class="refsect2" title="pseudo_tcp_socket_notify_clock ()">
591605 <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>
593607 <p>
594608 Start the processing of receiving data, pending data or syn/acks.
595609 Call this based on timeout value returned by
599613 <p>
600614 </p>
601615 <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>
602618 <div class="variablelist"><table border="0">
603619 <col align="left" valign="top">
604620 <tbody><tr>
605621 <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.
607623 </td>
608624 </tr></tbody>
609625 </table></div>
612628 <hr>
613629 <div class="refsect2" title="pseudo_tcp_socket_notify_mtu ()">
614630 <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.
625642 </td>
626643 </tr>
627644 <tr>
628645 <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
630647 </td>
631648 </tr>
632649 </tbody>
636653 <hr>
637654 <div class="refsect2" title="pseudo_tcp_socket_notify_packet ()">
638655 <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.
650668 </td>
651669 </tr>
652670 <tr>
653671 <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
655673 </td>
656674 </tr>
657675 <tr>
658676 <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>
660678 </td>
661679 </tr>
662680 <tr>
663681 <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
665683
666684 </td>
667685 </tr>
672690 <hr>
673691 <div class="refsect2" title="pseudo_tcp_set_debug_level ()">
674692 <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>
678697 <div class="variablelist"><table border="0">
679698 <col align="left" valign="top">
680699 <tbody><tr>
681700 <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
683702 </td>
684703 </tr></tbody>
685704 </table></div>
690709 <a name="libnice-Pseudo-TCP-Socket.property-details"></a><h2>Property Details</h2>
691710 <div class="refsect2" title='The "callbacks" property'>
692711 <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>
694713 <p>Structure with the callbacks to call when PseudoTcp events happen.</p>
695714 </div>
696715 <hr>
697716 <div class="refsect2" title='The "conversation" property'>
698717 <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>
700719 <p>The TCP Conversation ID.</p>
701720 <p>Default value: 0</p>
702721 </div>
703722 <hr>
704723 <div class="refsect2" title='The "state" property'>
705724 <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>
707726 <p>The current state (enum PseudoTcpState) of the PseudoTcp socket.</p>
708727 <p>Allowed values: &lt;= 4</p>
709728 <p>Default value: 0</p>
712731 </div>
713732 <div class="footer">
714733 <hr>
715 Generated by GTK-Doc V1.13</div>
734 Generated by GTK-Doc V1.15</div>
716735 </body>
717736 </html>
77 <link rel="up" href="ch03.html" title="">
88 <link rel="prev" href="ch03.html" title="">
99 <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)">
1111 <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="">
2012 </head>
2113 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
2214 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
5547 enum <a class="link" href="libnice-StunAgent.html#StunCompatibility" title="enum StunCompatibility">StunCompatibility</a>;
5648 enum <a class="link" href="libnice-StunAgent.html#StunAgentUsageFlags" title="enum StunAgentUsageFlags">StunAgentUsageFlags</a>;
5749 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>);
6557 <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>);
10496 <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>);
120112 </pre>
121113 </div>
122114 <div class="refsect1" title="Description">
126118 It's main purpose is to make sure the building and validation methods used
127119 are compatible with the RFC you create it with. It also tracks the transaction
128120 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>
130123 </div>
131124 <div class="refsect1" title="Details">
132125 <a name="libnice-StunAgent.details"></a><h2>Details</h2>
135128 <pre class="programlisting">typedef struct stun_agent_t StunAgent;
136129 </pre>
137130 <p>
138 An opaque structure representing the STUN agent.</p>
131 An opaque structure representing the STUN agent.
132 </p>
139133 </div>
140134 <hr>
141135 <div class="refsect2" title="enum StunCompatibility">
148142 } StunCompatibility;
149143 </pre>
150144 <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>
152147 <div class="variablelist"><table border="0">
153148 <col align="left" valign="top">
154149 <tbody>
155150 <tr>
156151 <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
158153 RFC 3489
159154 </td>
160155 </tr>
161156 <tr>
162157 <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
164159 RFC 5389
165160 </td>
166161 </tr>
167162 <tr>
168163 <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
170165 Windows Live Messenger 2009 (a mix between RFC3489 and RFC5389, as well as
171166 a special usecase against a typo in their code)
172167 </td>
173168 </tr>
174169 <tr>
175170 <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
177172 </td>
178173 </tr>
179174 </tbody>
200195 <p>
201196 </p>
202197 <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>
203200 <div class="variablelist"><table border="0">
204201 <col align="left" valign="top">
205202 <tbody>
206203 <tr>
207204 <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
209206 term credentials mechanism for authenticating STUN messages
210207 </td>
211208 </tr>
212209 <tr>
213210 <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
215212 term credentials mechanism for authenticating STUN messages
216213 </td>
217214 </tr>
218215 <tr>
219216 <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
221218 attribute to the STUN messages it creates.
222219 </td>
223220 </tr>
224221 <tr>
225222 <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
227224 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
228225 the same effect as enabling this Usage. STUN Indications do not have the
229226 SOFTWARE attributes added to them though. The SOFTWARE attribute is only
232229 </tr>
233230 <tr>
234231 <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
236233 in the STUN messages it receives (the MESSAGE-INTEGRITY attribute
237234 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>)
238235 </td>
239236 </tr>
240237 <tr>
241238 <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
243240 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
244241 <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
245242 be authenticated, while others never add a MESSAGE-INTEGRITY attribute to a
248245 </tr>
249246 <tr>
250247 <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
252249 the password of a STUN message, even if it already knows what the password
253250 should be (a response to a previously created request). This means that the
254251 <a class="link" href="libnice-StunAgent.html#StunMessageIntegrityValidate" title="StunMessageIntegrityValidate ()"><span class="type">StunMessageIntegrityValidate</span></a> callback will always be called when there is
275272 </pre>
276273 <p>
277274 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>
279277 <div class="variablelist"><table border="0">
280278 <col align="left" valign="top">
281279 <tbody>
282280 <tr>
283281 <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
285283 </td>
286284 </tr>
287285 <tr>
288286 <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
290288 </td>
291289 </tr>
292290 <tr>
293291 <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
295293 </td>
296294 </tr>
297295 <tr>
298296 <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
300298 fingerprint while the agent needs it with its usage
301299 </td>
302300 </tr>
303301 <tr>
304302 <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
306304 unauthorized with no username and message-integrity attributes.
307305 A BAD_REQUEST error must be generated
308306 </td>
309307 </tr>
310308 <tr>
311309 <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
313311 the username/password do not match.
314312 An UNAUTHORIZED error must be generated
315313 </td>
316314 </tr>
317315 <tr>
318316 <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
320318 response/error that doesn't match a previously sent request
321319 </td>
322320 </tr>
323321 <tr>
324322 <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
326324 contains one or more unknown comprehension attributes.
327325 <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
328326 </td>
329327 </tr>
330328 <tr>
331329 <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
333331 or more unknown comprehension attributes. This is a response, or error,
334332 or indication message and no error response should be sent
335333 </td>
340338 <hr>
341339 <div class="refsect2" title="StunMessageIntegrityValidate ()">
342340 <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>
350348 <p>
351349 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>
352350 function.
353351 </p>
354352 <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>
361361 </td>
362362 </tr>
363363 <tr>
364364 <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
366366 </td>
367367 </tr>
368368 <tr>
369369 <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>
371371 </td>
372372 </tr>
373373 <tr>
374374 <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>
376376 </td>
377377 </tr>
378378 <tr>
379379 <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
381381 pointer to a byte array that must be set by the validater function.
382382 </td>
383383 </tr>
384384 <tr>
385385 <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
387387 validater function.
388388 </td>
389389 </tr>
390390 <tr>
391391 <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
393393 </td>
394394 </tr>
395395 <tr>
396396 <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
399399 </td>
400400 </tr>
401401 </tbody>
417417 message during validationg.
418418 </p>
419419 <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>
420422 <div class="variablelist"><table border="0">
421423 <col align="left" valign="top">
422424 <tbody>
423425 <tr>
424426 <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
426428 </td>
427429 </tr>
428430 <tr>
429431 <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>
431433 </td>
432434 </tr>
433435 <tr>
434436 <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
436438 </td>
437439 </tr>
438440 <tr>
439441 <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>
441443 </td>
442444 </tr>
443445 </tbody>
446448 <hr>
447449 <div class="refsect2" title="stun_agent_init ()">
448450 <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>
453455 <p>
454456 This function must be called to initialize an agent before it is being used.
455457 </p>
471473 <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
472474 </p>
473475 </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
480484 </td>
481485 </tr>
482486 <tr>
483487 <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
485489 be known by the agent. Any STUN message received that contains a mandatory
486490 attribute that is not in this array will yield a
487491 <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
490494 </tr>
491495 <tr>
492496 <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
494498 how the agent builds and validates the STUN messages
495499 </td>
496500 </tr>
497501 <tr>
498502 <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
500504 STUN usages the agent should use.
501505 </td>
502506 </tr>
506510 <hr>
507511 <div class="refsect2" title="stun_agent_validate ()">
508512 <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>
515519 <p>
516520 This function is used to validate an inbound STUN message and transform its
517521 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
519523 authenticated.
520524 </p>
521525 <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>
528534 </td>
529535 </tr>
530536 <tr>
531537 <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
533539 </td>
534540 </tr>
535541 <tr>
536542 <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
538544 </td>
539545 </tr>
540546 <tr>
541547 <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>
543549 </td>
544550 </tr>
545551 <tr>
546552 <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
548554 be called if the agent needs to validate a MESSAGE-INTEGRITY attribute. It
549555 will only be called if the agent finds a message that needs authentication
550556 and a USERNAME is present in the STUN message, but no password is known.
555561 </tr>
556562 <tr>
557563 <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
559565 called.
560566 </td>
561567 </tr>
585591 <hr>
586592 <div class="refsect2" title="stun_agent_default_validater ()">
587593 <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>
595601 <p>
596602 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
597603 complicated processing of the username needs to be done, this function can
601607 password
602608 </p>
603609 <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>
610618 </td>
611619 </tr>
612620 <tr>
613621 <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
615623 </td>
616624 </tr>
617625 <tr>
618626 <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>
620628 </td>
621629 </tr>
622630 <tr>
623631 <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>
625633 </td>
626634 </tr>
627635 <tr>
628636 <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
630638 pointer to a byte array that must be set by the validater function.
631639 </td>
632640 </tr>
633641 <tr>
634642 <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
636644 validater function.
637645 </td>
638646 </tr>
639647 <tr>
640648 <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.
642650 The last element in the array must have a username set to NULL
643651 </td>
644652 </tr>
645653 <tr>
646654 <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
649657 </td>
650658 </tr>
651659 </tbody>
654662 <hr>
655663 <div class="refsect2" title="stun_agent_init_request ()">
656664 <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>
670679 </td>
671680 </tr>
672681 <tr>
673682 <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
675684 </td>
676685 </tr>
677686 <tr>
678687 <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>
680689 </td>
681690 </tr>
682691 <tr>
683692 <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
685694 </td>
686695 </tr>
687696 <tr>
688697 <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
690699 </td>
691700 </tr>
692701 <tr>
693702 <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
695704 </td>
696705 </tr>
697706 </tbody>
700709 <hr>
701710 <div class="refsect2" title="stun_agent_init_indication ()">
702711 <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>
716726 </td>
717727 </tr>
718728 <tr>
719729 <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
721731 </td>
722732 </tr>
723733 <tr>
724734 <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>
726736 </td>
727737 </tr>
728738 <tr>
729739 <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
731741 </td>
732742 </tr>
733743 <tr>
734744 <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
736746 </td>
737747 </tr>
738748 <tr>
739749 <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
741751 </td>
742752 </tr>
743753 </tbody>
746756 <hr>
747757 <div class="refsect2" title="stun_agent_init_response ()">
748758 <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>
754764 <p>
755765 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
756766 and transaction ID as the message <em class="parameter"><code>request</code></em>. This will also copy the pointer
757767 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>
765776 </td>
766777 </tr>
767778 <tr>
768779 <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
770781 </td>
771782 </tr>
772783 <tr>
773784 <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>
775786 </td>
776787 </tr>
777788 <tr>
778789 <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
780791 </td>
781792 </tr>
782793 <tr>
783794 <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
785796 </td>
786797 </tr>
787798 <tr>
788799 <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
790801 </td>
791802 </tr>
792803 </tbody>
795806 <hr>
796807 <div class="refsect2" title="stun_agent_init_error ()">
797808 <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>
804815 <p>
805816 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
806817 and transaction ID as the message <em class="parameter"><code>request</code></em>. This will also copy the pointer
807818 to the key that was used to authenticate the request (if authenticated),
808819 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>.
809820 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>
817829 </td>
818830 </tr>
819831 <tr>
820832 <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
822834 </td>
823835 </tr>
824836 <tr>
825837 <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>
827839 </td>
828840 </tr>
829841 <tr>
830842 <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
832844 </td>
833845 </tr>
834846 <tr>
835847 <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
837849 is for
838850 </td>
839851 </tr>
840852 <tr>
841853 <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
843855 </td>
844856 </tr>
845857 <tr>
846858 <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
848860 </td>
849861 </tr>
850862 </tbody>
854866 <div class="refsect2" title="stun_agent_build_unknown_attributes_error ()">
855867 <a name="stun-agent-build-unknown-attributes-error"></a><h3>stun_agent_build_unknown_attributes_error ()</h3>
856868 <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>
862874 <p>
863875 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
864876 and transaction ID as the message <em class="parameter"><code>request</code></em>. It will then add the ERROR-CODE
865877 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
866878 mandatory attributes from the <em class="parameter"><code>request</code></em> STUN message in the
867879 <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>
875888 </td>
876889 </tr>
877890 <tr>
878891 <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
880893 </td>
881894 </tr>
882895 <tr>
883896 <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>
885898 </td>
886899 </tr>
887900 <tr>
888901 <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
890903 </td>
891904 </tr>
892905 <tr>
893906 <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
895908 </td>
896909 </tr>
897910 <tr>
905918 <hr>
906919 <div class="refsect2" title="stun_agent_finish_message ()">
907920 <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>
912925 <p>
913926 This function will 'finish' a message and make it ready to be sent. It will
914927 add the MESSAGE-INTEGRITY and FINGERPRINT attributes if necessary. If the
916929 the message in the agent for future matching of the response.
917930 </p>
918931 <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>
925940 </td>
926941 </tr>
927942 <tr>
928943 <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
930945 </td>
931946 </tr>
932947 <tr>
933948 <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
935950 </td>
936951 </tr>
937952 <tr>
938953 <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>
940955 </td>
941956 </tr>
942957 <tr>
966981 <hr>
967982 <div class="refsect2" title="stun_agent_forget_transaction ()">
968983 <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>
971986 <p>
972987 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
973988 created transaction.
980995 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
981996 free its slot for future transactions.
982997 </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>
9891006 </td>
9901007 </tr>
9911008 <tr>
9921009 <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
9941011 </td>
9951012 </tr>
9961013 <tr>
9971014 <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
9991016 </td>
10001017 </tr>
10011018 </tbody>
10051022 <hr>
10061023 <div class="refsect2" title="stun_agent_set_software ()">
10071024 <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>
10101027 <p>
10111028 This function will set the value of the SOFTWARE attribute to be added to
10121029 STUN requests, responses and error responses.
10321049 the StunAgent's life. Do not free its content.
10331050 </p>
10341051 </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>
10411060 </td>
10421061 </tr>
10431062 <tr>
10441063 <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.
10461065 </td>
10471066 </tr>
10481067 </tbody>
10521071 <hr>
10531072 <div class="refsect2" title="stun_debug_enable ()">
10541073 <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>
10581078 </div>
10591079 <hr>
10601080 <div class="refsect2" title="stun_debug_disable ()">
10611081 <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>
10651086 </div>
10661087 </div>
10671088 <div class="refsect1" title="See Also">
10711092 </div>
10721093 <div class="footer">
10731094 <hr>
1074 Generated by GTK-Doc V1.13</div>
1095 Generated by GTK-Doc V1.15</div>
10751096 </body>
10761097 </html>
77 <link rel="up" href="ch03.html" title="">
88 <link rel="prev" href="libnice-StunAgent.html" title="StunAgent">
99 <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)">
1111 <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="">
2012 </head>
2113 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
2214 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
6052 enum <a class="link" href="libnice-StunMessage.html#StunMessageReturn" title="enum StunMessageReturn">StunMessageReturn</a>;
6153 #define <a class="link" href="libnice-StunMessage.html#STUN-MESSAGE-BUFFER-INCOMPLETE:CAPS" title="STUN_MESSAGE_BUFFER_INCOMPLETE">STUN_MESSAGE_BUFFER_INCOMPLETE</a>
6254 #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>);
142134 </pre>
143135 </div>
144136 <div class="refsect1" title="Description">
145137 <a name="libnice-StunMessage.description"></a><h2>Description</h2>
146138 <p>
147139 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>
149142 </div>
150143 <div class="refsect1" title="Details">
151144 <a name="libnice-StunMessage.details"></a><h2>Details</h2>
162155 } StunMessage;
163156 </pre>
164157 <p>
165 This structure represents a STUN message</p>
158 This structure represents a STUN message
159 </p>
166160 <div class="variablelist"><table border="0">
167161 <col align="left" valign="top">
168162 <tbody>
169163 <tr>
170164 <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
172166 </td>
173167 </tr>
174168 <tr>
175169 <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
177171 </td>
178172 </tr>
179173 <tr>
180174 <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)
182176 </td>
183177 </tr>
184178 <tr>
185179 <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
187181 or that was used to finalize this message
188182 </td>
189183 </tr>
190184 <tr>
191185 <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
193187 </td>
194188 </tr>
195189 <tr>
196190 <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
198192 validation or that was used to finalize this message
199193 </td>
200194 </tr>
201195 <tr>
202196 <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
204198 data
205199 </td>
206200 </tr>
220214 </pre>
221215 <p>
222216 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>
224219 <div class="variablelist"><table border="0">
225220 <col align="left" valign="top">
226221 <tbody>
227222 <tr>
228223 <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
230225 </td>
231226 </tr>
232227 <tr>
233228 <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
235230 </td>
236231 </tr>
237232 <tr>
238233 <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
240235 </td>
241236 </tr>
242237 <tr>
243238 <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
245240 </td>
246241 </tr>
247242 </tbody>
269264 </pre>
270265 <p>
271266 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>
273269 <div class="variablelist"><table border="0">
274270 <col align="left" valign="top">
275271 <tbody>
276272 <tr>
277273 <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
279275 </td>
280276 </tr>
281277 <tr>
282278 <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
284280 </td>
285281 </tr>
286282 <tr>
287283 <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
289285 </td>
290286 </tr>
291287 <tr>
292288 <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
294290 the TURN draft 4
295291 </td>
296292 </tr>
297293 <tr>
298294 <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
300296 </td>
301297 </tr>
302298 <tr>
303299 <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
305301 </td>
306302 </tr>
307303 <tr>
308304 <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
310306 </td>
311307 </tr>
312308 <tr>
313309 <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
315311 defined by the TURN draft 0
316312 </td>
317313 </tr>
318314 <tr>
319315 <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
321317 by the TURN draft 12
322318 </td>
323319 </tr>
324320 <tr>
325321 <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
327323 by the TURN draft 12
328324 </td>
329325 </tr>
330326 <tr>
331327 <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
333329 messages as defined by the TURN draft 4
334330 </td>
335331 </tr>
336332 <tr>
337333 <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
339335 the TURN draft 12
340336 </td>
341337 </tr>
342338 <tr>
343339 <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
345341 </td>
346342 </tr>
347343 </tbody>
420416 } StunAttribute;
421417 </pre>
422418 <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>
424421 <div class="variablelist"><table border="0">
425422 <col align="left" valign="top">
426423 <tbody>
427424 <tr>
428425 <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
430427 by RFC5389
431428 </td>
432429 </tr>
433430 <tr>
434431 <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
436433 by RFC3489
437434 </td>
438435 </tr>
439436 <tr>
440437 <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
442439 RFC3489
443440 </td>
444441 </tr>
445442 <tr>
446443 <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
448445 RFC3489
449446 </td>
450447 </tr>
451448 <tr>
452449 <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
454451 by RFC3489
455452 </td>
456453 </tr>
457454 <tr>
458455 <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
460457 </td>
461458 </tr>
462459 <tr>
463460 <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
465462 </td>
466463 </tr>
467464 <tr>
468465 <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
470467 by RFC5389
471468 </td>
472469 </tr>
473470 <tr>
474471 <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
476473 </td>
477474 </tr>
478475 <tr>
479476 <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
481478 defined by RFC5389
482479 </td>
483480 </tr>
484481 <tr>
485482 <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
487484 by RFC3489
488485 </td>
489486 </tr>
490487 <tr>
491488 <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
493490 TURN draft 09 and 12
494491 </td>
495492 </tr>
496493 <tr>
497494 <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
499496 draft 04, 09 and 12
500497 </td>
501498 </tr>
502499 <tr>
503500 <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
505502 the rosenberg-midcom TURN draft 08
506503 </td>
507504 </tr>
508505 <tr>
509506 <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
511508 </td>
512509 </tr>
513510 <tr>
514511 <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
516513 defined by the rosenberg-midcom TURN draft 08
517514 </td>
518515 </tr>
519516 <tr>
520517 <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
522519 TURN draft 04
523520 </td>
524521 </tr>
525522 <tr>
526523 <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
528525 TURN draft 09
529526 </td>
530527 </tr>
531528 <tr>
532529 <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
534531 by TURN draft 12
535532 </td>
536533 </tr>
537534 <tr>
538535 <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,
540537 09 and 12
541538 </td>
542539 </tr>
543540 <tr>
544541 <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
546543 </td>
547544 </tr>
548545 <tr>
549546 <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
551548 </td>
552549 </tr>
553550 <tr>
554551 <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
556553 TURN draft 04
557554 </td>
558555 </tr>
559556 <tr>
560557 <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
562559 TURN draft 09
563560 </td>
564561 </tr>
565562 <tr>
566563 <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
568565 defined by TURN draft 12
569566 </td>
570567 </tr>
571568 <tr>
572569 <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
574571 as defined by TURN-IPV6 draft 05
575572 </td>
576573 </tr>
577574 <tr>
578575 <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
580577 as defined by TURN draft 04
581578 </td>
582579 </tr>
583580 <tr>
584581 <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
586583 by TURN draft 09
587584 </td>
588585 </tr>
589586 <tr>
590587 <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
592589 </td>
593590 </tr>
594591 <tr>
595592 <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
597594 defined by TURN draft 12
598595 </td>
599596 </tr>
600597 <tr>
601598 <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
603600 by TURN draft 12
604601 </td>
605602 </tr>
606603 <tr>
607604 <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
609606 defined by RFC5389
610607 </td>
611608 </tr>
612609 <tr>
613610 <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
615612 </td>
616613 </tr>
617614 <tr>
618615 <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
620617 TURN draft 04
621618 </td>
622619 </tr>
623620 <tr>
624621 <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
626623 by TURN draft 09 and 12
627624 </td>
628625 </tr>
629626 <tr>
630627 <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
632629 draft 04
633630 </td>
634631 </tr>
635632 <tr>
636633 <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
638635 </td>
639636 </tr>
640637 <tr>
641638 <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
643640 ICE draft 19
644641 </td>
645642 </tr>
646643 <tr>
647644 <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
649646 libjingle
650647 </td>
651648 </tr>
652649 <tr>
653650 <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
655652 </td>
656653 </tr>
657654 <tr>
658655 <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
660657 defined by RFC5389
661658 </td>
662659 </tr>
663660 <tr>
664661 <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
666663 by RFC5389
667664 </td>
668665 </tr>
669666 <tr>
670667 <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
672669 defined by ICE draft 19
673670 </td>
674671 </tr>
675672 <tr>
676673 <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
678675 defined by ICE draft 19
679676 </td>
680677 </tr>
687684 <pre class="programlisting">typedef uint8_t StunTransactionId[STUN_MESSAGE_TRANS_ID_LEN];
688685 </pre>
689686 <p>
690 A type that holds a STUN transaction id.</p>
687 A type that holds a STUN transaction id.
688 </p>
691689 </div>
692690 <hr>
693691 <div class="refsect2" title="enum StunError">
717715 } StunError;
718716 </pre>
719717 <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>
721720 <div class="variablelist"><table border="0">
722721 <col align="left" valign="top">
723722 <tbody>
724723 <tr>
725724 <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
727726 "Try Alternate" error as defined in RFC5389
728727 </td>
729728 </tr>
730729 <tr>
731730 <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
733732 "Bad Request" error as defined in RFC5389
734733 </td>
735734 </tr>
736735 <tr>
737736 <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
739738 "Unauthorized" error as defined in RFC5389
740739 </td>
741740 </tr>
742741 <tr>
743742 <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
745744 "Unknown Attribute" error as defined in RFC5389
746745 </td>
747746 </tr>
754753 </tr>
755754 <tr>
756755 <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
758757 "Stale Nonce" error as defined in RFC5389
759758 </td>
760759 </tr>
761760 <tr>
762761 <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
764763 "Active Destination Already Set" error as defined in TURN draft 04.
765764 </td>
766765 </tr>
767766 <tr>
768767 <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
770769 "Address Family not Supported" error as defined in TURN IPV6 Draft 05.
771770 </td>
772771 </tr>
773772 <tr>
774773 <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
776775 "Wrong Credentials" error as defined in TURN Draft 12.
777776 </td>
778777 </tr>
784783 </tr>
785784 <tr>
786785 <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
788787 "Invalid IP Address" error as defined in TURN draft 04.
789788 </td>
790789 </tr>
791790 <tr>
792791 <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
794793 "Invalid Port" error as defined in TURN draft 04.
795794 </td>
796795 </tr>
797796 <tr>
798797 <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
800799 "Operation for TCP Only" error as defined in TURN draft 04.
801800 </td>
802801 </tr>
803802 <tr>
804803 <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
806805 "Connection Already Exists" error as defined in TURN draft 04.
807806 </td>
808807 </tr>
809808 <tr>
810809 <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
812811 "Allocation Quota Reached" error as defined in TURN draft 12.
813812 </td>
814813 </tr>
820819 </tr>
821820 <tr>
822821 <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
824823 "Server Error" error as defined in RFC5389
825824 </td>
826825 </tr>
827826 <tr>
828827 <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
830829 "Insufficient Capacity" error as defined in TURN draft 04.
831830 </td>
832831 </tr>
833832 <tr>
834833 <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
836835 "Insufficient Capacity" error as defined in TURN draft 12.
837836 </td>
838837 </tr>
839838 <tr>
840839 <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.
842841 </td>
843842 </tr>
844843 </tbody>
859858 <p>
860859 The return value of most stun_message_* functions.
861860 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>
863863 <div class="variablelist"><table border="0">
864864 <col align="left" valign="top">
865865 <tbody>
866866 <tr>
867867 <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
869869 </td>
870870 </tr>
871871 <tr>
872872 <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
874874 </td>
875875 </tr>
876876 <tr>
877877 <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
879879 </td>
880880 </tr>
881881 <tr>
882882 <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
884884 message to append data to it, or not enough in an argument to fill it with
885885 the data requested.
886886 </td>
887887 </tr>
888888 <tr>
889889 <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
891891 the STUN message is not supported.
892892 </td>
893893 </tr>
901901 </pre>
902902 <p>
903903 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>
905906 </div>
906907 <hr>
907908 <div class="refsect2" title="STUN_MESSAGE_BUFFER_INVALID">
910911 </pre>
911912 <p>
912913 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>
914916 </div>
915917 <hr>
916918 <div class="refsect2" title="stun_message_init ()">
917919 <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
930933 </td>
931934 </tr>
932935 <tr>
933936 <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)
935938 </td>
936939 </tr>
937940 <tr>
938941 <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)
940943 </td>
941944 </tr>
942945 <tr>
943946 <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
950953 </td>
951954 </tr>
952955 </tbody>
955958 <hr>
956959 <div class="refsect2" title="stun_message_length ()">
957960 <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>
967971 </td>
968972 </tr>
969973 <tr>
977981 <hr>
978982 <div class="refsect2" title="stun_message_find ()">
979983 <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>
991996 </td>
992997 </tr>
993998 <tr>
994999 <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
9961001 </td>
9971002 </tr>
9981003 <tr>
9991004 <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
10011006 </td>
10021007 </tr>
10031008 <tr>
10121017 <hr>
10131018 <div class="refsect2" title="stun_message_find_flag ()">
10141019 <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>
10251031 </td>
10261032 </tr>
10271033 <tr>
10281034 <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
10301036 </td>
10311037 </tr>
10321038 <tr>
10411047 <hr>
10421048 <div class="refsect2" title="stun_message_find32 ()">
10431049 <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>
10551062 </td>
10561063 </tr>
10571064 <tr>
10581065 <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
10601067 </td>
10611068 </tr>
10621069 <tr>
10631070 <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)
10651072 </td>
10661073 </tr>
10671074 <tr>
10771084 <hr>
10781085 <div class="refsect2" title="stun_message_find64 ()">
10791086 <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>
10911099 </td>
10921100 </tr>
10931101 <tr>
10941102 <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
10961104 </td>
10971105 </tr>
10981106 <tr>
10991107 <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)
11011109 </td>
11021110 </tr>
11031111 <tr>
11131121 <hr>
11141122 <div class="refsect2" title="stun_message_find_string ()">
11151123 <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>
11281137 </td>
11291138 </tr>
11301139 <tr>
11311140 <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
11331142 </td>
11341143 </tr>
11351144 <tr>
11361145 <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
11381147 </td>
11391148 </tr>
11401149 <tr>
11411150 <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
11431152 </td>
11441153 </tr>
11451154 <tr>
11651174 <hr>
11661175 <div class="refsect2" title="stun_message_find_addr ()">
11671176 <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>
11801190 </td>
11811191 </tr>
11821192 <tr>
11831193 <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
11851195 </td>
11861196 </tr>
11871197 <tr>
11881198 <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
11901200 </td>
11911201 </tr>
11921202 <tr>
11931203 <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
11951205 <em class="parameter"><code>addr</code></em> socket address and will be set to the size of the extracted socket
11961206 address.
11971207 </td>
12101220 <hr>
12111221 <div class="refsect2" title="stun_message_find_xor_addr ()">
12121222 <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>
12251236 </td>
12261237 </tr>
12271238 <tr>
12281239 <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
12301241 </td>
12311242 </tr>
12321243 <tr>
12331244 <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
12351246 </td>
12361247 </tr>
12371248 <tr>
12381249 <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
12401251 <em class="parameter"><code>addr</code></em> socket address and will be set to the size of the
12411252 extracted socket address.
12421253 </td>
12551266 <hr>
12561267 <div class="refsect2" title="stun_message_find_xor_addr_full ()">
12571268 <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>
12711283 </td>
12721284 </tr>
12731285 <tr>
12741286 <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
12761288 </td>
12771289 </tr>
12781290 <tr>
12791291 <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
12811293 </td>
12821294 </tr>
12831295 <tr>
12841296 <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
12861298 <em class="parameter"><code>addr</code></em> socket address and will be set to the size of the
12871299 extracted socket address.
12881300 </td>
12891301 </tr>
12901302 <tr>
12911303 <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.
12931305 </td>
12941306 </tr>
12951307 <tr>
13061318 <hr>
13071319 <div class="refsect2" title="stun_message_find_error ()">
13081320 <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>
13191332 </td>
13201333 </tr>
13211334 <tr>
13221335 <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
13241337 </td>
13251338 </tr>
13261339 <tr>
13351348 <hr>
13361349 <div class="refsect2" title="stun_message_append ()">
13371350 <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>
13491363 </td>
13501364 </tr>
13511365 <tr>
13521366 <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
13541368 </td>
13551369 </tr>
13561370 <tr>
13571371 <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
13591373 </td>
13601374 </tr>
13611375 <tr>
13711385 <hr>
13721386 <div class="refsect2" title="stun_message_append_bytes ()">
13731387 <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>
13861401 </td>
13871402 </tr>
13881403 <tr>
13891404 <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
13911406 </td>
13921407 </tr>
13931408 <tr>
13941409 <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
13961411 </td>
13971412 </tr>
13981413 <tr>
13991414 <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
14011416 </td>
14021417 </tr>
14031418 <tr>
14111426 <hr>
14121427 <div class="refsect2" title="stun_message_append_flag ()">
14131428 <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>
14241440 </td>
14251441 </tr>
14261442 <tr>
14271443 <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
14291445 </td>
14301446 </tr>
14311447 <tr>
14391455 <hr>
14401456 <div class="refsect2" title="stun_message_append32 ()">
14411457 <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>
14531470 </td>
14541471 </tr>
14551472 <tr>
14561473 <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
14581475 </td>
14591476 </tr>
14601477 <tr>
14611478 <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)
14631480 </td>
14641481 </tr>
14651482 <tr>
14731490 <hr>
14741491 <div class="refsect2" title="stun_message_append64 ()">
14751492 <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>
14871505 </td>
14881506 </tr>
14891507 <tr>
14901508 <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
14921510 </td>
14931511 </tr>
14941512 <tr>
14951513 <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)
14971515 </td>
14981516 </tr>
14991517 <tr>
15071525 <hr>
15081526 <div class="refsect2" title="stun_message_append_string ()">
15091527 <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>
15211540 </td>
15221541 </tr>
15231542 <tr>
15241543 <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
15261545 </td>
15271546 </tr>
15281547 <tr>
15291548 <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
15311550 </td>
15321551 </tr>
15331552 <tr>
15411560 <hr>
15421561 <div class="refsect2" title="stun_message_append_addr ()">
15431562 <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>
15561576 </td>
15571577 </tr>
15581578 <tr>
15591579 <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
15611581 </td>
15621582 </tr>
15631583 <tr>
15641584 <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
15661586 </td>
15671587 </tr>
15681588 <tr>
15691589 <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.
15711591 </td>
15721592 </tr>
15731593 <tr>
15831603 <hr>
15841604 <div class="refsect2" title="stun_message_append_xor_addr ()">
15851605 <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>
15981619 </td>
15991620 </tr>
16001621 <tr>
16011622 <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
16031624 </td>
16041625 </tr>
16051626 <tr>
16061627 <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
16081629 </td>
16091630 </tr>
16101631 <tr>
16111632 <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.
16131634 </td>
16141635 </tr>
16151636 <tr>
16251646 <hr>
16261647 <div class="refsect2" title="stun_message_append_xor_addr_full ()">
16271648 <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>
16411663 </td>
16421664 </tr>
16431665 <tr>
16441666 <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
16461668 </td>
16471669 </tr>
16481670 <tr>
16491671 <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
16511673 </td>
16521674 </tr>
16531675 <tr>
16541676 <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.
16561678 </td>
16571679 </tr>
16581680 <tr>
16591681 <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.
16611683 </td>
16621684 </tr>
16631685 <tr>
16731695 <hr>
16741696 <div class="refsect2" title="stun_message_append_error ()">
16751697 <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>
16781700 <p>
16791701 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>
16871710 </td>
16881711 </tr>
16891712 <tr>
16901713 <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
16921715 </td>
16931716 </tr>
16941717 <tr>
17021725 <hr>
17031726 <div class="refsect2" title="stun_message_validate_buffer_length ()">
17041727 <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>
17071730 <p>
17081731 This function will take a data buffer and will try to validate whether it is
17091732 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
17171741 </td>
17181742 </tr>
17191743 <tr>
17201744 <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
17221746 </td>
17231747 </tr>
17241748 <tr>
17341758 <hr>
17351759 <div class="refsect2" title="stun_message_id ()">
17361760 <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>
17471772 </td>
17481773 </tr>
17491774 <tr>
17501775 <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
17521777 </td>
17531778 </tr>
17541779 </tbody>
17571782 <hr>
17581783 <div class="refsect2" title="stun_message_get_class ()">
17591784 <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>
17691795 </td>
17701796 </tr>
17711797 <tr>
17791805 <hr>
17801806 <div class="refsect2" title="stun_message_get_method ()">
17811807 <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>
17911818 </td>
17921819 </tr>
17931820 <tr>
18011828 <hr>
18021829 <div class="refsect2" title="stun_message_has_attribute ()">
18031830 <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>
18141842 </td>
18151843 </tr>
18161844 <tr>
18171845 <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
18241852 </td>
18251853 </tr>
18261854 </tbody>
18291857 <hr>
18301858 <div class="refsect2" title="stun_message_has_cookie ()">
18311859 <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
18461875 </td>
18471876 </tr>
18481877 </tbody>
18511880 <hr>
18521881 <div class="refsect2" title="stun_optional ()">
18531882 <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>
18551884 <p>
18561885 Helper function that checks whether a STUN attribute is a mandatory
1857 or an optional attribute</p>
1886 or an optional attribute
1887 </p>
18581888 <div class="variablelist"><table border="0">
18591889 <col align="left" valign="top">
18601890 <tbody>
18611891 <tr>
18621892 <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
18691899 </td>
18701900 </tr>
18711901 </tbody>
18741904 <hr>
18751905 <div class="refsect2" title="stun_strerror ()">
18761906 <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>
18801911 <div class="variablelist"><table border="0">
18811912 <col align="left" valign="top">
18821913 <tbody>
18831914 <tr>
18841915 <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
18861917 </td>
18871918 </tr>
18881919 <tr>
19011932 </div>
19021933 <div class="footer">
19031934 <hr>
1904 Generated by GTK-Doc V1.13</div>
1935 Generated by GTK-Doc V1.15</div>
19051936 </body>
19061937 </html>
77 <link rel="up" href="ch04.html" title="STUN usages">
88 <link rel="prev" href="libnice-ICE.html" title="ICE">
99 <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)">
1111 <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="">
2012 </head>
2113 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
2214 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
5446 enum <a class="link" href="libnice-TURN.html#StunUsageTurnCompatibility" title="enum StunUsageTurnCompatibility">StunUsageTurnCompatibility</a>;
5547 enum <a class="link" href="libnice-TURN.html#StunUsageTurnRequestPorts" title="enum StunUsageTurnRequestPorts">StunUsageTurnRequestPorts</a>;
5648 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>);
9486 </pre>
9587 </div>
9688 <div class="refsect1" title="Description">
9991 The STUN TURN usage allows for easily creating and parsing STUN Allocate
10092 requests and responses used for TURN. The API allows you to create a new
10193 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>
10396 </div>
10497 <div class="refsect1" title="Details">
10598 <a name="libnice-TURN.details"></a><h2>Details</h2>
112105 } StunUsageTurnCompatibility;
113106 </pre>
114107 <p>
115 Specifies which TURN specification compatibility to use</p>
108 Specifies which TURN specification compatibility to use
109 </p>
116110 <div class="variablelist"><table border="0">
117111 <col align="left" valign="top">
118112 <tbody>
119113 <tr>
120114 <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
122116 TURN Draft 09
123117 </td>
124118 </tr>
125119 <tr>
126120 <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
128122 Google Talk's relay server
129123 </td>
130124 </tr>
131125 <tr>
132126 <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
134128 MSN TURN servers
135129 </td>
136130 </tr>
148142 </pre>
149143 <p>
150144 This enum is used to specify which port configuration you want when creating
151 a new Allocation</p>
145 a new Allocation
146 </p>
152147 <div class="variablelist"><table border="0">
153148 <col align="left" valign="top">
154149 <tbody>
155150 <tr>
156151 <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
158153 </td>
159154 </tr>
160155 <tr>
161156 <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
163158 </td>
164159 </tr>
165160 <tr>
166161 <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
168163 reserve the next higher port
169164 </td>
170165 </tr>
185180 <p>
186181 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
187182 <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>
189185 <div class="variablelist"><table border="0">
190186 <col align="left" valign="top">
191187 <tbody>
192188 <tr>
193189 <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
195191 address is provided
196192 </td>
197193 </tr>
198194 <tr>
199195 <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
201197 relay address as well as a mapped address are provided
202198 </td>
203199 </tr>
204200 <tr>
205201 <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
207203 </td>
208204 </tr>
209205 <tr>
210206 <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
212208 </td>
213209 </tr>
214210 <tr>
215211 <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
217213 to be sent to an alternate server
218214 </td>
219215 </tr>
223219 <hr>
224220 <div class="refsect2" title="stun_usage_turn_create ()">
225221 <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>
241238 <div class="variablelist"><table border="0">
242239 <col align="left" valign="top">
243240 <tbody>
244241 <tr>
245242 <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
247244 </td>
248245 </tr>
249246 <tr>
250247 <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
252249 </td>
253250 </tr>
254251 <tr>
255252 <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>
257254 </td>
258255 </tr>
259256 <tr>
260257 <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>
262259 </td>
263260 </tr>
264261 <tr>
265262 <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
267264 argument to NULL, if it's a subsequent request you are building, then set this
268265 argument to the response you have received. This argument is used for building
269266 long term credentials (using the REALM and NONCE attributes) as well as for
273270 </tr>
274271 <tr>
275272 <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).
277274 This is only used if the compatibility is set to
278275 <a class="link" href="libnice-TURN.html#STUN-USAGE-TURN-COMPATIBILITY-DRAFT9:CAPS"><span class="type">STUN_USAGE_TURN_COMPATIBILITY_DRAFT9</span></a>
279276 <p>See <a class="link" href="libnice-TURN.html#StunUsageTurnRequestPorts" title="enum StunUsageTurnRequestPorts"><span class="type">StunUsageTurnRequestPorts</span></a> </p>
281278 </tr>
282279 <tr>
283280 <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
285282 this value is negative, then no BANDWIDTH attribute is added to the request.
286283 This is only used if the compatibility is set to
287284 <a class="link" href="libnice-TURN.html#STUN-USAGE-TURN-COMPATIBILITY-DRAFT9:CAPS"><span class="type">STUN_USAGE_TURN_COMPATIBILITY_DRAFT9</span></a>
289286 </tr>
290287 <tr>
291288 <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
293290 this value is negative, then no LIFETIME attribute is added to the request.
294291 This is only used if the compatibility is set to
295292 <a class="link" href="libnice-TURN.html#STUN-USAGE-TURN-COMPATIBILITY-DRAFT9:CAPS"><span class="type">STUN_USAGE_TURN_COMPATIBILITY_DRAFT9</span></a>
297294 </tr>
298295 <tr>
299296 <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
301298 </td>
302299 </tr>
303300 <tr>
304301 <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>
306303 </td>
307304 </tr>
308305 <tr>
309306 <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
311308 </td>
312309 </tr>
313310 <tr>
314311 <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>
316313 </td>
317314 </tr>
318315 <tr>
319316 <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
321318 request
322319 </td>
323320 </tr>
332329 <hr>
333330 <div class="refsect2" title="stun_usage_turn_create_refresh ()">
334331 <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>
348346 <div class="variablelist"><table border="0">
349347 <col align="left" valign="top">
350348 <tbody>
351349 <tr>
352350 <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
354352 </td>
355353 </tr>
356354 <tr>
357355 <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
359357 </td>
360358 </tr>
361359 <tr>
362360 <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>
364362 </td>
365363 </tr>
366364 <tr>
367365 <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>
369367 </td>
370368 </tr>
371369 <tr>
372370 <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
374372 argument to NULL, if it's a subsequent request you are building, then set this
375373 argument to the response you have received. This argument is used for building
376374 long term credentials (using the REALM and NONCE attributes)
378376 </tr>
379377 <tr>
380378 <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
382380 this value is negative, then no LIFETIME attribute is added to the request.
383381 This is only used if the compatibility is set to
384382 <a class="link" href="libnice-TURN.html#STUN-USAGE-TURN-COMPATIBILITY-DRAFT9:CAPS"><span class="type">STUN_USAGE_TURN_COMPATIBILITY_DRAFT9</span></a>
386384 </tr>
387385 <tr>
388386 <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
390388 </td>
391389 </tr>
392390 <tr>
393391 <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>
395393 </td>
396394 </tr>
397395 <tr>
398396 <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
400398 </td>
401399 </tr>
402400 <tr>
403401 <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>
405403 </td>
406404 </tr>
407405 <tr>
408406 <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
410408 request
411409 </td>
412410 </tr>
421419 <hr>
422420 <div class="refsect2" title="stun_usage_turn_process ()">
423421 <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>
434432 <p>
435433 Process a TURN Allocate response and extract the necessary information from
436 the message</p>
434 the message
435 </p>
437436 <div class="variablelist"><table border="0">
438437 <col align="left" valign="top">
439438 <tbody>
440439 <tr>
441440 <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
443442 </td>
444443 </tr>
445444 <tr>
446445 <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
448447 that the TURN server allocated for us
449448 </td>
450449 </tr>
451450 <tr>
452451 <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>
454453 </td>
455454 </tr>
456455 <tr>
457456 <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
459458 that the STUN response contains.
460459 This argument will only be filled if the return value
461460 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>
463462 </tr>
464463 <tr>
465464 <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>
467466 </td>
468467 </tr>
469468 <tr>
470469 <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
472471 address of an alternate server to which we should send our new STUN
473472 Allocate request, in case the currently used TURN server is requesting the use
474473 of an alternate server. This argument will only be filled if the return value
477476 </tr>
478477 <tr>
479478 <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>
481480 </td>
482481 </tr>
483482 <tr>
484483 <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
486485 </td>
487486 </tr>
488487 <tr>
489488 <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
491490 </td>
492491 </tr>
493492 <tr>
494493 <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
496495 response
497496 </td>
498497 </tr>
507506 <hr>
508507 <div class="refsect2" title="stun_usage_turn_refresh_process ()">
509508 <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>
513512 <p>
514513 Process a TURN Refresh response and extract the necessary information from
515 the message</p>
514 the message
515 </p>
516516 <div class="variablelist"><table border="0">
517517 <col align="left" valign="top">
518518 <tbody>
519519 <tr>
520520 <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
522522 </td>
523523 </tr>
524524 <tr>
525525 <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
527527 </td>
528528 </tr>
529529 <tr>
530530 <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
532532 response
533533 </td>
534534 </tr>
546546 </div>
547547 <div class="footer">
548548 <hr>
549 Generated by GTK-Doc V1.13</div>
549 Generated by GTK-Doc V1.15</div>
550550 </body>
551551 </html>
77 <link rel="up" href="ch04.html" title="STUN usages">
88 <link rel="prev" href="libnice-TURN.html" title="TURN">
99 <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)">
1111 <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="">
2012 </head>
2113 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
2214 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
5345
5446 typedef <a class="link" href="libnice-Timer.html#StunTimer" title="StunTimer">StunTimer</a>;
5547 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>);
6052 </pre>
6153 </div>
6254 <div class="refsect1" title="Description">
6961 <p>
7062 </p>
7163 <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>
7365 <div class="example-contents">
7466 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
7567 <tbody>
166158 </div>
167159
168160 </div>
169 <p><br class="example-break"></p>
161 <p><br class="example-break">
162 </p>
170163 </div>
171164 <div class="refsect1" title="Details">
172165 <a name="libnice-Timer.details"></a><h2>Details</h2>
175168 <pre class="programlisting">typedef struct stun_timer_s StunTimer;
176169 </pre>
177170 <p>
178 An opaque structure representing a STUN transaction retransmission timer</p>
171 An opaque structure representing a STUN transaction retransmission timer
172 </p>
179173 </div>
180174 <hr>
181175 <div class="refsect2" title="enum StunUsageTimerReturn">
188182 </pre>
189183 <p>
190184 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>
192187 <div class="variablelist"><table border="0">
193188 <col align="left" valign="top">
194189 <tbody>
195190 <tr>
196191 <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
198193 and there is nothing to be done
199194 </td>
200195 </tr>
201196 <tr>
202197 <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
204199 should be retransmitted now.
205200 </td>
206201 </tr>
207202 <tr>
208203 <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
210205 retransmissions, the transaction timed out
211206 </td>
212207 </tr>
216211 <hr>
217212 <div class="refsect2" title="stun_timer_start ()">
218213 <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>
220215 <p>
221216 Starts a STUN transaction retransmission timer.
222217 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>
224220 <div class="variablelist"><table border="0">
225221 <col align="left" valign="top">
226222 <tbody><tr>
227223 <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
229225 </td>
230226 </tr></tbody>
231227 </table></div>
233229 <hr>
234230 <div class="refsect2" title="stun_timer_start_reliable ()">
235231 <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>
237233 <p>
238234 Starts a STUN transaction retransmission timer for a reliable transport.
239235 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>
241238 <div class="variablelist"><table border="0">
242239 <col align="left" valign="top">
243240 <tbody><tr>
244241 <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
246243 </td>
247244 </tr></tbody>
248245 </table></div>
250247 <hr>
251248 <div class="refsect2" title="stun_timer_refresh ()">
252249 <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>
256254 <div class="variablelist"><table border="0">
257255 <col align="left" valign="top">
258256 <tbody>
259257 <tr>
260258 <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
262260 </td>
263261 </tr>
264262 <tr>
272270 <hr>
273271 <div class="refsect2" title="stun_timer_remainder ()">
274272 <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>
278277 <div class="variablelist"><table border="0">
279278 <col align="left" valign="top">
280279 <tbody>
281280 <tr>
282281 <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
284283 </td>
285284 </tr>
286285 <tr>
295294 </div>
296295 <div class="footer">
297296 <hr>
298 Generated by GTK-Doc V1.13</div>
297 Generated by GTK-Doc V1.15</div>
299298 </body>
300299 </html>
225225 <keyword type="constant" name="NICE_PROXY_TYPE_SOCKS5" link="NiceAgent.html#NICE-PROXY-TYPE-SOCKS5:CAPS"/>
226226 <keyword type="constant" name="NICE_PROXY_TYPE_HTTP" link="NiceAgent.html#NICE-PROXY-TYPE-HTTP:CAPS"/>
227227 <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"/>
229229 <keyword type="constant" name="NICE_COMPATIBILITY_GOOGLE" link="NiceAgent.html#NICE-COMPATIBILITY-GOOGLE:CAPS"/>
230230 <keyword type="constant" name="NICE_COMPATIBILITY_MSN" link="NiceAgent.html#NICE-COMPATIBILITY-MSN:CAPS"/>
231231 <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"/>
232233 <keyword type="constant" name="NICE_COMPATIBILITY_LAST" link="NiceAgent.html#NICE-COMPATIBILITY-LAST:CAPS"/>
233234 <keyword type="constant" name="NICE_CANDIDATE_TYPE_HOST" link="libnice-NiceCandidate.html#NICE-CANDIDATE-TYPE-HOST:CAPS"/>
234235 <keyword type="constant" name="NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE" link="libnice-NiceCandidate.html#NICE-CANDIDATE-TYPE-SERVER-REFLEXIVE:CAPS"/>
349350 <keyword type="constant" name="STUN_USAGE_BIND_RETURN_INVALID" link="libnice-Bind.html#STUN-USAGE-BIND-RETURN-INVALID:CAPS"/>
350351 <keyword type="constant" name="STUN_USAGE_BIND_RETURN_ALTERNATE_SERVER" link="libnice-Bind.html#STUN-USAGE-BIND-RETURN-ALTERNATE-SERVER:CAPS"/>
351352 <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"/>
353354 <keyword type="constant" name="STUN_USAGE_ICE_COMPATIBILITY_GOOGLE" link="libnice-ICE.html#STUN-USAGE-ICE-COMPATIBILITY-GOOGLE:CAPS"/>
354355 <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"/>
355357 <keyword type="constant" name="STUN_USAGE_ICE_RETURN_SUCCESS" link="libnice-ICE.html#STUN-USAGE-ICE-RETURN-SUCCESS:CAPS"/>
356358 <keyword type="constant" name="STUN_USAGE_ICE_RETURN_ERROR" link="libnice-ICE.html#STUN-USAGE-ICE-RETURN-ERROR:CAPS"/>
357359 <keyword type="constant" name="STUN_USAGE_ICE_RETURN_INVALID" link="libnice-ICE.html#STUN-USAGE-ICE-RETURN-INVALID:CAPS"/>
77 <link rel="up" href="index.html" title="libnice Reference Manual">
88 <link rel="prev" href="index.html" title="libnice Reference Manual">
99 <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)">
1111 <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="">
2012 </head>
2113 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
2214 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
2820 </tr></table>
2921 <div class="part" title="Part I. ICE Library">
3022 <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>
3224 <div class="toc">
3325 <p><b>Table of Contents</b></p>
3426 <dl>
5850 </div>
5951 <div class="footer">
6052 <hr>
61 Generated by GTK-Doc V1.13</div>
53 Generated by GTK-Doc V1.15</div>
6254 </body>
6355 </html>
77 <link rel="up" href="index.html" title="libnice Reference Manual">
88 <link rel="prev" href="libnice-Network-interfaces-discovery.html" title="Network interfaces discovery">
99 <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)">
1111 <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="">
2012 </head>
2113 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
2214 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
2820 </tr></table>
2921 <div class="part" title="Part II. STUN Library">
3022 <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>
3224 <div class="toc">
3325 <p><b>Table of Contents</b></p>
3426 <dl>
6153 </div>
6254 <div class="footer">
6355 <hr>
64 Generated by GTK-Doc V1.13</div>
56 Generated by GTK-Doc V1.15</div>
6557 </body>
6658 </html>
77 <link rel="up" href="index.html" title="libnice Reference Manual">
88 <link rel="prev" href="libnice-Timer.html" title="Timer">
99 <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)">
1111 <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="">
2012 </head>
2113 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
2214 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
2820 </tr></table>
2921 <div class="part" title="Part III. Pseudo TCP Socket implementation">
3022 <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>
3224 <div class="toc">
3325 <p><b>Table of Contents</b></p>
3426 <dl>
4133 </div>
4234 <div class="footer">
4335 <hr>
44 Generated by GTK-Doc V1.13</div>
36 Generated by GTK-Doc V1.15</div>
4537 </body>
4638 </html>
208208 font-weight: normal;
209209 }
210210
211 .annotation
212 {
213 /* tango:aluminium 5 */
214 color: #555753;
215 font-size: 80%;
216 font-weight: normal;
217 }
218
211219 /* code listings */
212220
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 */
226234
227235 .listing_frame {
228236 /* tango:sky blue 1 */
0 nice_agent_get_type
10 nice_agent_get_type
21 pseudo_tcp_socket_get_type
3 pseudo_tcp_socket_get_type
1414 </para>
1515
1616 <!-- ##### SECTION Stability_Level ##### -->
17
18
19 <!-- ##### SECTION Image ##### -->
1720
1821
1922 <!-- ##### STRUCT NiceAddress ##### -->
4245
4346 </para>
4447
48 @void:
4549 @Returns:
4650
4751
1414 </para>
1515
1616 <!-- ##### SECTION Stability_Level ##### -->
17
18
19 <!-- ##### SECTION Image ##### -->
1720
1821
1922 <!-- ##### STRUCT NiceAgent ##### -->
204207
205208 </para>
206209
207 @NICE_COMPATIBILITY_DRAFT19:
210 @NICE_COMPATIBILITY_RFC5245:
208211 @NICE_COMPATIBILITY_GOOGLE:
209212 @NICE_COMPATIBILITY_MSN:
210213 @NICE_COMPATIBILITY_WLM2009:
214 @NICE_COMPATIBILITY_DRAFT19:
211215 @NICE_COMPATIBILITY_LAST:
212216
213217 <!-- ##### USER_FUNCTION NiceAgentRecvFunc ##### -->
302306
303307 @agent:
304308 @stream_id:
309 @Returns:
305310
306311
307312 <!-- ##### FUNCTION nice_agent_set_remote_credentials ##### -->
1414 </para>
1515
1616 <!-- ##### SECTION Stability_Level ##### -->
17
18
19 <!-- ##### SECTION Image ##### -->
1720
1821
1922 <!-- ##### ENUM StunUsageBindReturn ##### -->
1414 </para>
1515
1616 <!-- ##### SECTION Stability_Level ##### -->
17
18
19 <!-- ##### SECTION Image ##### -->
1720
1821
1922 <!-- ##### STRUCT NiceCandidate ##### -->
1616 <!-- ##### SECTION Stability_Level ##### -->
1717
1818
19 <!-- ##### SECTION Image ##### -->
20
21
1922 <!-- ##### FUNCTION nice_debug_enable ##### -->
2023 <para>
2124
1616 <!-- ##### SECTION Stability_Level ##### -->
1717
1818
19 <!-- ##### SECTION Image ##### -->
20
21
1922 <!-- ##### ENUM StunUsageIceCompatibility ##### -->
2023 <para>
2124
2225 </para>
2326
24 @STUN_USAGE_ICE_COMPATIBILITY_DRAFT19:
27 @STUN_USAGE_ICE_COMPATIBILITY_RFC5245:
2528 @STUN_USAGE_ICE_COMPATIBILITY_GOOGLE:
2629 @STUN_USAGE_ICE_COMPATIBILITY_MSN:
30 @STUN_USAGE_ICE_COMPATIBILITY_DRAFT19:
2731
2832 <!-- ##### ENUM StunUsageIceReturn ##### -->
2933 <para>
1616 <!-- ##### SECTION Stability_Level ##### -->
1717
1818
19 <!-- ##### SECTION Image ##### -->
20
21
1922 <!-- ##### FUNCTION nice_interfaces_get_ip_for_interface ##### -->
2023 <para>
2124
3033
3134 </para>
3235
36 @void:
3337 @Returns:
3438
3539
1414 </para>
1515
1616 <!-- ##### SECTION Stability_Level ##### -->
17
18
19 <!-- ##### SECTION Image ##### -->
1720
1821
1922 <!-- ##### STRUCT PseudoTcpSocket ##### -->
1414 </para>
1515
1616 <!-- ##### SECTION Stability_Level ##### -->
17
18
19 <!-- ##### SECTION Image ##### -->
1720
1821
1922 <!-- ##### TYPEDEF StunAgent ##### -->
227230
228231 </para>
229232
233 @void:
230234
231235
232236 <!-- ##### FUNCTION stun_debug_disable ##### -->
234238
235239 </para>
236240
237
238
241 @void:
242
243
1414 </para>
1515
1616 <!-- ##### SECTION Stability_Level ##### -->
17
18
19 <!-- ##### SECTION Image ##### -->
1720
1821
1922 <!-- ##### STRUCT StunMessage ##### -->
1414 </para>
1515
1616 <!-- ##### SECTION Stability_Level ##### -->
17
18
19 <!-- ##### SECTION Image ##### -->
1720
1821
1922 <!-- ##### TYPEDEF StunTimer ##### -->
1414 </para>
1515
1616 <!-- ##### SECTION Stability_Level ##### -->
17
18
19 <!-- ##### SECTION Image ##### -->
1720
1821
1922 <!-- ##### ENUM StunUsageTurnCompatibility ##### -->
170170 PACKAGE_VERSION = @PACKAGE_VERSION@
171171 PATH_SEPARATOR = @PATH_SEPARATOR@
172172 PKG_CONFIG = @PKG_CONFIG@
173 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
174 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
173175 RANLIB = @RANLIB@
174176 SED = @SED@
175177 SET_MAKE = @SET_MAKE@
7474 scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
7575 @echo 'gtk-doc: Scanning header files'
7676 @-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)
7982 @if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \
8083 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) ; \
8184 else \
108111 sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
109112 @echo 'gtk-doc: Building XML'
110113 @-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)
113119 @touch sgml-build.stamp
114120
115121 sgml.stamp: sgml-build.stamp
173173 PACKAGE_VERSION = @PACKAGE_VERSION@
174174 PATH_SEPARATOR = @PATH_SEPARATOR@
175175 PKG_CONFIG = @PKG_CONFIG@
176 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
177 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
176178 RANLIB = @RANLIB@
177179 SED = @SED@
178180 SET_MAKE = @SET_MAKE@
150150 PACKAGE_VERSION = @PACKAGE_VERSION@
151151 PATH_SEPARATOR = @PATH_SEPARATOR@
152152 PKG_CONFIG = @PKG_CONFIG@
153 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
154 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
153155 RANLIB = @RANLIB@
154156 SED = @SED@
155157 SET_MAKE = @SET_MAKE@
144144 PACKAGE_VERSION = @PACKAGE_VERSION@
145145 PATH_SEPARATOR = @PATH_SEPARATOR@
146146 PKG_CONFIG = @PKG_CONFIG@
147 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
148 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
147149 RANLIB = @RANLIB@
148150 SED = @SED@
149151 SET_MAKE = @SET_MAKE@
192192
193193 if (priv->username)
194194 ulen = strlen (priv->username);
195 if (ulen > 255) {
196 nice_debug ("Socks5 username length > 255");
197 goto error;
198 }
195199
196200 if (priv->password)
197201 plen = strlen (priv->password);
202 if (plen > 255) {
203 nice_debug ("Socks5 password length > 255");
204 goto error;
205 }
198206
199207 msg[len++] = 0x01; /* auth version */
200208 msg[len++] = ulen; /* username length */
9090 int ret;
9191 struct sockaddr_storage name;
9292 guint name_len = sizeof (name);
93 NiceSocket *sock = g_slice_new0 (NiceSocket);
93 NiceSocket *sock;
9494 TcpPriv *priv;
9595
9696 if (addr == NULL) {
9898 return NULL;
9999 }
100100
101 sock = g_slice_new0 (NiceSocket);
102
101103 nice_address_copy_to_sockaddr(addr, (struct sockaddr *)&name);
102104
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;
108109 #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 }
111119 }
112120
113121 if (sockfd == -1) {
7272 socklen_t name_len = sizeof (name);
7373 NiceSocket *sock = g_slice_new0 (NiceSocket);
7474
75 if (!sock) {
76 return NULL;
77 }
78
7975 if (addr != NULL) {
8076 nice_address_copy_to_sockaddr(addr, (struct sockaddr *)&name);
8177 } else {
8985 #ifdef HAVE_SA_LEN
9086 name.ss_len = sizeof (struct sockaddr_in);
9187 #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
9294 }
9395
9496 if (sockfd == -1) {
211211 PACKAGE_VERSION = @PACKAGE_VERSION@
212212 PATH_SEPARATOR = @PATH_SEPARATOR@
213213 PKG_CONFIG = @PKG_CONFIG@
214 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
215 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
214216 RANLIB = @RANLIB@
215217 SED = @SED@
216218 SET_MAKE = @SET_MAKE@
8282 /* first 4 bytes done, last 8 bytes not summed */
8383 data[2].len = len - 12u;
8484
85 return htonl (crc32 (data, 3, wlm2009_stupid_crc32_typo) ^ 0x5354554e);
85 return htonl (stun_crc32 (data, 3, wlm2009_stupid_crc32_typo) ^ 0x5354554e);
8686 }
8787
8888 bool stun_message_has_cookie (const StunMessage *msg)
139139 };
140140
141141
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)
143143 {
144144 size_t i;
145145 uint32_t crc = 0xffffffff;
5353 } crc_data;
5454
5555
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);
5757
5858 #endif /* _CRC32_H */
163163 PACKAGE_VERSION = @PACKAGE_VERSION@
164164 PATH_SEPARATOR = @PATH_SEPARATOR@
165165 PKG_CONFIG = @PKG_CONFIG@
166 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
167 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
166168 RANLIB = @RANLIB@
167169 SED = @SED@
168170 SET_MAKE = @SET_MAKE@
110110 len = sizeof (resp_buf);
111111 val2 = stun_usage_ice_conncheck_create_reply (&agent, &req,
112112 &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);
114114 assert (val2 == STUN_USAGE_ICE_RETURN_INVALID_REQUEST);
115115 assert (len == 0);
116116
124124 len = sizeof (resp_buf);
125125 val2 = stun_usage_ice_conncheck_create_reply (&agent, &req,
126126 &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);
128128 assert (val2 == STUN_USAGE_ICE_RETURN_INVALID_METHOD);
129129 assert (len > 0);
130130
178178 len = sizeof (resp_buf);
179179 val2 = stun_usage_ice_conncheck_create_reply (&agent, &req,
180180 &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);
182182 assert (val == STUN_USAGE_ICE_RETURN_SUCCESS);
183183 assert (len > 0);
184184 assert (stun_agent_validate (&agent, &resp, resp_buf, len,
198198 len = sizeof (resp_buf);
199199 val2 = stun_usage_ice_conncheck_create_reply (&agent, &req,
200200 &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);
202202 assert (val2 == STUN_USAGE_ICE_RETURN_INVALID_ADDRESS);
203203 assert (len == 0);
204204
218218 control = true;
219219 val2 = stun_usage_ice_conncheck_create_reply (&agent, &req,
220220 &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);
222222 assert (val2 == STUN_USAGE_ICE_RETURN_ROLE_CONFLICT);
223223 assert (len > 0);
224224 assert (control == false);
239239 control = false;
240240 val2 = stun_usage_ice_conncheck_create_reply (&agent, &req,
241241 &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);
243243 assert (val2 == STUN_USAGE_ICE_RETURN_SUCCESS);
244244 assert (len > 0);
245245 assert (control == false);
150150 PACKAGE_VERSION = @PACKAGE_VERSION@
151151 PATH_SEPARATOR = @PATH_SEPARATOR@
152152 PKG_CONFIG = @PKG_CONFIG@
153 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
154 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
153155 RANLIB = @RANLIB@
154156 SED = @SED@
155157 SET_MAKE = @SET_MAKE@
6969
7070 stun_agent_init_request (agent, msg, buffer, buffer_len, STUN_BINDING);
7171
72 if (compatibility == STUN_USAGE_ICE_COMPATIBILITY_DRAFT19) {
72 if (compatibility == STUN_USAGE_ICE_COMPATIBILITY_RFC5245) {
7373 if (cand_use)
7474 {
7575 val = stun_message_append_flag (msg, STUN_ATTRIBUTE_USE_CANDIDATE);
5959
6060 /**
6161 * 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
6363 * @STUN_USAGE_ICE_COMPATIBILITY_GOOGLE: The ICE compatibility with Google's
6464 * implementation of ICE
6565 * @STUN_USAGE_ICE_COMPATIBILITY_MSN: The ICE compatibility with MSN's
6666 * implementation of ICE
67 * @STUN_USAGE_ICE_COMPATIBILITY_DRAFT19: The ICE compatibility with draft 19
6768 *
6869 * 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>
6975 */
7076 typedef enum {
71 STUN_USAGE_ICE_COMPATIBILITY_DRAFT19,
77 STUN_USAGE_ICE_COMPATIBILITY_RFC5245,
7278 STUN_USAGE_ICE_COMPATIBILITY_GOOGLE,
7379 STUN_USAGE_ICE_COMPATIBILITY_MSN,
80 STUN_USAGE_ICE_COMPATIBILITY_DRAFT19 = STUN_USAGE_ICE_COMPATIBILITY_RFC5245,
7481 } StunUsageIceCompatibility;
7582
7683
126133 * request
127134 *
128135 * 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
130137 * @cand_use, @controlling, @priority and @tie arguments are not used.
131138 * Returns: The length of the message built.
132139 */
191191 PACKAGE_VERSION = @PACKAGE_VERSION@
192192 PATH_SEPARATOR = @PATH_SEPARATOR@
193193 PKG_CONFIG = @PKG_CONFIG@
194 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
195 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
194196 RANLIB = @RANLIB@
195197 SED = @SED@
196198 SET_MAKE = @SET_MAKE@
5656 if (!nice_address_set_from_string (&addr, "127.0.0.1"))
5757 g_assert_not_reached ();
5858
59 agent = nice_agent_new (NULL, NICE_COMPATIBILITY_DRAFT19);
59 agent = nice_agent_new (NULL, NICE_COMPATIBILITY_RFC5245);
6060 nice_agent_add_local_address (agent, &addr);
6161
6262 g_assert (nice_agent_add_stream (agent, 1) == 1);
492492 */
493493
494494 /* 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);
497497
498498
499499
7272 #endif
7373
7474 #else
75 #define NICE_COMPATIBILITY NICE_COMPATIBILITY_DRAFT19
75 #define NICE_COMPATIBILITY NICE_COMPATIBILITY_RFC5245
7676 #if USE_LOOPBACK
7777 #define USE_TURN_SERVER_ORG 1
7878 #else
7575 g_thread_init (NULL);
7676 loop = g_main_loop_new (NULL, FALSE);
7777
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);
7979 nice_address_set_ipv4 (&addr, 0x7f000001);
8080 nice_agent_add_local_address (agent, &addr);
8181 stream = nice_agent_add_stream (agent, 1);
403403
404404
405405 /* 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);
408408
409409
410410 /* step: add a timer to catch state changes triggered by signals */
6161 g_assert (nice_address_set_from_string (&addr_remote, "127.0.0.1"));
6262 nice_address_set_port (&addr_remote, 2345);
6363
64 agent = nice_agent_new ( NULL, NICE_COMPATIBILITY_DRAFT19);
64 agent = nice_agent_new ( NULL, NICE_COMPATIBILITY_RFC5245);
6565
6666 g_assert (agent->local_addresses == NULL);
6767