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

#include <ice_strans.h>

Data Fields

int af
 
pj_stun_config stun_cfg
 
pj_dns_resolverresolver
 
pj_ice_sess_options opt
 
pj_ice_strans_stun_cfg stun
 
unsigned stun_tp_cnt
 
pj_ice_strans_stun_cfg stun_tp [PJ_ICE_MAX_STUN]
 
pj_ice_strans_turn_cfg turn
 
unsigned turn_tp_cnt
 
pj_ice_strans_turn_cfg turn_tp [PJ_ICE_MAX_TURN]
 
unsigned num_send_buf
 
unsigned send_buf_size
 
struct {
   pj_qos_type   qos_type
 
   pj_qos_params   qos_params
 
   unsigned   so_rcvbuf_size
 
   unsigned   so_sndbuf_size
 
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

◆ af

int pj_ice_strans_cfg::af

The address family which will be used as the default address in the SDP offer. Setting this to pj_AF_UNSPEC() means that the address family will not be considered during the process of default candidate selection.

The default value is pj_AF_INET() (IPv4).

◆ 

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.

◆ num_send_buf

unsigned pj_ice_strans_cfg::num_send_buf

Number of send buffers used for pj_ice_strans_sendto2(). If the send buffers are full, pj_ice_strans_sendto()/sendto2() will return PJ_EBUSY.

Set this to 0 to disable buffering (then application will have to maintain the buffer passed to pj_ice_strans_sendto()/sendto2() until it has been sent).

Default: 4

◆ opt

pj_ice_sess_options pj_ice_strans_cfg::opt

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().

◆ qos_params

pj_qos_params pj_ice_strans_cfg::qos_params

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_type

pj_qos_type pj_ice_strans_cfg::qos_type

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.

◆ resolver

pj_dns_resolver* pj_ice_strans_cfg::resolver

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

The default value is NULL.

◆ send_buf_size

unsigned pj_ice_strans_cfg::send_buf_size

Buffer size used for pj_ice_strans_sendto2().

Default: 0 (size determined by the size of the first packet sent).

◆ so_rcvbuf_size

unsigned pj_ice_strans_cfg::so_rcvbuf_size

Specify target value for socket receive buffer size. It will be applied using setsockopt(). When it fails to set the specified size, it will try with lower value until the highest possible is successfully set.

When this is set to zero, this component will apply socket receive buffer size settings specified in STUN and TURN socket config above, i.e: stun::cfg::so_rcvbuf_size and turn::cfg::so_rcvbuf_size. Otherwise, this setting will be applied to STUN and TURN sockets for this component, overriding the setting specified in STUN/TURN socket config.

Default: 0

◆ so_sndbuf_size

unsigned pj_ice_strans_cfg::so_sndbuf_size

Specify target value for socket send buffer size. It will be applied using setsockopt(). When it fails to set the specified size, it will try with lower value until the highest possible is successfully set.

When this is set to zero, this component will apply socket send buffer size settings specified in STUN and TURN socket config above, i.e: stun::cfg::so_sndbuf_size and turn::cfg::so_sndbuf_size. Otherwise, this setting will be applied to STUN and TURN sockets for this component, overriding the setting specified in STUN/TURN socket config.

Default: 0

◆ stun

pj_ice_strans_stun_cfg pj_ice_strans_cfg::stun

Warning: this field is deprecated, please use stun_tp field instead. To maintain backward compatibility, if stun_tp_cnt is zero, the value of this field will be copied to stun_tp.

STUN and local transport settings. This specifies the settings for local UDP socket address and STUN resolved address.

◆ stun_cfg

pj_stun_config pj_ice_strans_cfg::stun_cfg

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().

◆ stun_tp

pj_ice_strans_stun_cfg pj_ice_strans_cfg::stun_tp[PJ_ICE_MAX_STUN]

STUN and local transport settings. This specifies the settings for local UDP socket address and STUN resolved address.

◆ stun_tp_cnt

unsigned pj_ice_strans_cfg::stun_tp_cnt

Number of STUN transports.

Default: 0

◆ turn

pj_ice_strans_turn_cfg pj_ice_strans_cfg::turn

Warning: this field is deprecated, please use turn_tp field instead. To maintain backward compatibility, if turn_tp_cnt is zero, the value of this field will be copied to turn_tp.

TURN transport settings.

◆ turn_tp

pj_ice_strans_turn_cfg pj_ice_strans_cfg::turn_tp[PJ_ICE_MAX_TURN]

TURN transport settings.

◆ turn_tp_cnt

unsigned pj_ice_strans_cfg::turn_tp_cnt

Number of TURN transports.

Default: 0


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.