WARNING: The online documentation has moved to https://docs.pjsip.org.

Visit the new documentation at https://docs.pjsip.org:

BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJNATH Reference

pj_ice_strans_cfg Struct Reference
[ICE stream transport]

Data Fields

int af
pj_stun_config stun_cfg
pj_dns_resolverresolver
pj_ice_sess_options opt
struct {
   pj_stun_sock_cfg   cfg
   unsigned   max_host_cands
   pj_bool_t   loop_addr
   pj_str_t   server
   pj_uint16_t   port
stun
struct {
   pj_turn_sock_cfg   cfg
   pj_str_t   server
   pj_uint16_t   port
   pj_turn_tp_type   conn_type
   pj_stun_auth_cred   auth_cred
   pj_turn_alloc_param   alloc_param
turn
struct {
   pj_qos_type   qos_type
   pj_qos_params   qos_params
comp [PJ_ICE_MAX_COMP]

Detailed Description

This structure describes ICE stream transport configuration. Application should initialize the structure by calling pj_ice_strans_cfg_default() before changing the settings.


Field Documentation

Address family, IPv4 or IPv6. Currently only pj_AF_INET() (IPv4) is supported, and this is the default value.

Optional TURN Allocate parameter. The default value will be initialized by pj_turn_alloc_param_default().

Credential to be used for the TURN session. This setting is mandatory.

Default is to have no credential.

Optional configuration for STUN transport. The default value will be initialized with pj_stun_sock_cfg_default().

Optional TURN socket settings. The default values will be initialized by pj_turn_sock_cfg_default(). This contains settings such as QoS.

struct { ... } pj_ice_strans_cfg::comp[PJ_ICE_MAX_COMP]

Component specific settings, which will override the settings in the STUN and TURN settings above. For example, setting the QoS parameters here allows the application to have different QoS traffic type for RTP and RTCP component.

Type of connection to the TURN server.

Default is PJ_TURN_TP_UDP.

Include loopback addresses in the host candidates.

Default: PJ_FALSE

Maximum number of host candidates to be added. If the value is zero, no host candidates will be added.

Default: 64

This contains various STUN session options. Once the ICE stream transport is created, application may also change the options with pj_ice_strans_set_options().

The port number of the STUN server, when server field specifies a hostname rather than domain name. This field should also be set even when the server specifies a domain name, to allow DNS SRV resolution to fallback to DNS A/AAAA resolution when the DNS SRV resolution fails.

The default value is PJ_STUN_PORT.

The port number of the TURN server, when server field specifies a hostname rather than domain name. This field should also be set even when the server specifies a domain name, to allow DNS SRV resolution to fallback to DNS A/AAAA resolution when the DNS SRV resolution fails.

Default is zero.

Set the low level QoS parameters to the transport. This is a lower level operation than setting the qos_type field and may not be supported on all platforms.

By default all settings in this structure are disabled.

QoS traffic type to be set on this transport. When application wants to apply QoS tagging to the transport, it's preferable to set this field rather than qos_param fields since this is more portable.

Default value is PJ_QOS_TYPE_BEST_EFFORT.

DNS resolver to be used to resolve servers. If DNS SRV resolution is required, the resolver must be set.

The default value is NULL.

Specify the STUN server domain or hostname or IP address. If DNS SRV resolution is required, application must fill in this setting with the domain name of the STUN server and set the resolver instance in the resolver field. Otherwise if the resolver setting is not set, this field will be resolved with hostname resolution and in this case the port field must be set.

The port field should also be set even when DNS SRV resolution is used, in case the DNS SRV resolution fails.

When this field is empty, STUN mapped address resolution will not be performed. In this case only ICE host candidates will be added to the ICE transport, unless if no_host_cands field is set. In this case, both host and srflx candidates are disabled.

The default value is empty.

Specify the TURN server domain or hostname or IP address. If DNS SRV resolution is required, application must fill in this setting with the domain name of the TURN server and set the resolver instance in the resolver field. Otherwise if the resolver setting is not set, this field will be resolved with hostname resolution and in this case the port field must be set.

The port field should also be set even when DNS SRV resolution is used, in case the DNS SRV resolution fails.

When this field is empty, relay candidate will not be created.

The default value is empty.

struct { ... } pj_ice_strans_cfg::stun

STUN and local transport settings. This specifies the settings for local UDP socket, which will be resolved to get the STUN mapped address.

STUN configuration which contains the timer heap and ioqueue instance to be used, and STUN retransmission settings. This setting is mandatory.

The default value is all zero. Application must initialize this setting with pj_stun_config_init().

struct { ... } pj_ice_strans_cfg::turn

TURN specific settings.


The documentation for this struct was generated from the following file:

 


PJNATH - Open Source NAT traversal helper library supporting STUN, TURN, and ICE
Copyright (C) 2006-2009 Teluu Inc.