BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJNATH Reference

pj_ice_sess_cand Struct Reference

Data Fields

pj_ice_cand_type type
 
pj_status_t status
 
pj_uint8_t comp_id
 
pj_uint8_t transport_id
 
pj_uint16_t local_pref
 
pj_str_t foundation
 
pj_uint32_t prio
 
pj_sockaddr addr
 
pj_sockaddr base_addr
 
pj_sockaddr rel_addr
 

Detailed Description

This structure describes an ICE candidate. ICE candidate is a transport address that is to be tested by ICE procedures in order to determine its suitability for usage for receipt of media. Candidates also have properties - their type (server reflexive, relayed or host), priority, foundation, and base.

Field Documentation

pj_sockaddr pj_ice_sess_cand::addr

IP address of this candidate. For host candidates, this represents the local address of the socket. For reflexive candidates, the value will be the public address allocated in NAT router for the host candidate and as reported in MAPPED-ADDRESS or XOR-MAPPED-ADDRESS attribute of STUN Binding request. For relayed candidate, the value will be the address allocated in the TURN server by STUN Allocate request.

pj_sockaddr pj_ice_sess_cand::base_addr

Base address of this candidate. "Base" refers to the address an agent sends from for a particular candidate. For host candidates, the base is the same as the host candidate itself. For reflexive candidates, the base is the local IP address of the socket. For relayed candidates, the base address is the transport address allocated in the TURN server for this candidate.

pj_uint8_t pj_ice_sess_cand::comp_id

The component ID of this candidate. Note that component IDs starts with one for RTP and two for RTCP. In other words, it's not zero based.

pj_str_t pj_ice_sess_cand::foundation

The foundation string, which is an identifier which value will be equivalent for two candidates that are of the same type, share the same base, and come from the same STUN server. The foundation is used to optimize ICE performance in the Frozen algorithm.

pj_uint16_t pj_ice_sess_cand::local_pref

Local preference value, which typically is 65535.

pj_uint32_t pj_ice_sess_cand::prio

The candidate's priority, a 32-bit unsigned value which value will be calculated by the ICE session when a candidate is registered to the ICE session.

pj_sockaddr pj_ice_sess_cand::rel_addr

Related address, which is used for informational only and is not used in any way by the ICE session.

pj_status_t pj_ice_sess_cand::status

Status of this candidate. The value will be PJ_SUCCESS if candidate address has been resolved successfully, PJ_EPENDING when the address resolution process is in progress, or other value when the address resolution has completed with failure.

pj_uint8_t pj_ice_sess_cand::transport_id

Transport ID to be used to send packets for this candidate.

pj_ice_cand_type pj_ice_sess_cand::type

The candidate type, as described in pj_ice_cand_type enumeration.


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.