Home --> Documentations --> PJNATH Reference

Data Fields

int af
pj_stun_sock_cfg cfg
unsigned max_host_cands
pj_bool_t loop_addr
pj_str_t server
pj_uint16_t port
pj_bool_t ignore_stun_error

Detailed Description

STUN and local transport settings for ICE stream transport.

Field Documentation

int pj_ice_strans_stun_cfg::af

Address family, IPv4 or IPv6.

Default value is pj_AF_INET() (IPv4)

pj_stun_sock_cfg pj_ice_strans_stun_cfg::cfg

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

pj_bool_t pj_ice_strans_stun_cfg::ignore_stun_error

Ignore STUN resolution error and proceed with just local addresses.

The default is PJ_FALSE

pj_bool_t pj_ice_strans_stun_cfg::loop_addr

Include loopback addresses in the host candidates.

Default: PJ_FALSE

unsigned pj_ice_strans_stun_cfg::max_host_cands

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

Default: 64

pj_uint16_t pj_ice_strans_stun_cfg::port

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.

pj_str_t pj_ice_strans_stun_cfg::server

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.

If there are more than one STUN candidates per ICE stream transport component, the standard recommends to use the same STUN server for all STUN candidates.

The default value is empty.

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.