19#ifndef __PJNATH_ICE_SESSION_H__
20#define __PJNATH_ICE_SESSION_H__
523 unsigned transport_id,
526 unsigned dst_addr_len);
542 unsigned transport_id,
545 unsigned src_addr_len);
956 unsigned transport_id,
964 unsigned *p_cand_id);
1009 unsigned rem_cand_cnt,
1042 unsigned rem_cand_cnt,
1105 unsigned transport_id,
PJNATH specific error codes.
#define PJ_ICE_MAX_TURN
Definition: config.h:272
#define PJ_ICE_MAX_CHECKS
Definition: config.h:332
#define PJ_ICE_MAX_CAND
Definition: config.h:240
#define PJ_ICE_MAX_STUN
Definition: config.h:261
#define PJ_ICE_MAX_COMP
Definition: config.h:288
pj_status_t pj_ice_sess_detach_grp_lock(pj_ice_sess *ice, pj_grp_lock_handler *handler)
pj_ice_sess_trickle
Definition: ice_session.h:602
pj_status_t pj_ice_sess_set_options(pj_ice_sess *ice, const pj_ice_sess_options *opt)
pj_ice_sess_checklist_state
Definition: ice_session.h:426
pj_ice_sess_role
Definition: ice_session.h:553
const char * pj_ice_get_cand_type_name(pj_ice_cand_type type)
pj_status_t pj_ice_sess_on_rx_pkt(pj_ice_sess *ice, unsigned comp_id, unsigned transport_id, void *pkt, pj_size_t pkt_size, const pj_sockaddr_t *src_addr, int src_addr_len)
void pj_ice_sess_options_default(pj_ice_sess_options *opt)
pj_status_t pj_ice_sess_create(pj_stun_config *stun_cfg, const char *name, pj_ice_sess_role role, unsigned comp_cnt, const pj_ice_sess_cb *cb, const pj_str_t *local_ufrag, const pj_str_t *local_passwd, pj_grp_lock_t *grp_lock, pj_ice_sess **p_ice)
pj_status_t pj_ice_sess_update_check_list(pj_ice_sess *ice, const pj_str_t *rem_ufrag, const pj_str_t *rem_passwd, unsigned rem_cand_cnt, const pj_ice_sess_cand rem_cand[], pj_bool_t trickle_done)
pj_status_t pj_ice_sess_set_prefs(pj_ice_sess *ice, const pj_uint8_t prefs[4])
pj_status_t pj_ice_sess_change_role(pj_ice_sess *ice, pj_ice_sess_role new_role)
pj_ice_sess_check_state
Definition: ice_session.h:327
pj_status_t pj_ice_sess_start_check(pj_ice_sess *ice)
void pj_ice_calc_foundation(pj_pool_t *pool, pj_str_t *foundation, pj_ice_cand_type type, const pj_sockaddr *base_addr)
pj_status_t pj_ice_sess_destroy(pj_ice_sess *ice)
pj_status_t pj_ice_sess_add_cand(pj_ice_sess *ice, unsigned comp_id, unsigned transport_id, pj_ice_cand_type type, pj_uint16_t local_pref, const pj_str_t *foundation, const pj_sockaddr_t *addr, const pj_sockaddr_t *base_addr, const pj_sockaddr_t *rel_addr, int addr_len, unsigned *p_cand_id)
pj_status_t pj_ice_sess_find_default_cand(pj_ice_sess *ice, unsigned comp_id, int *p_cand_id)
pj_ice_cand_type
Definition: ice_session.h:132
pj_status_t pj_ice_sess_get_options(pj_ice_sess *ice, pj_ice_sess_options *opt)
pj_status_t pj_ice_sess_create_check_list(pj_ice_sess *ice, const pj_str_t *rem_ufrag, const pj_str_t *rem_passwd, unsigned rem_cand_cnt, const pj_ice_sess_cand rem_cand[])
const char * pj_ice_sess_role_name(pj_ice_sess_role role)
pj_status_t pj_ice_sess_send_data(pj_ice_sess *ice, unsigned comp_id, const void *data, pj_size_t data_len)
@ PJ_ICE_SESS_TRICKLE_FULL
Definition: ice_session.h:626
@ PJ_ICE_SESS_TRICKLE_DISABLED
Definition: ice_session.h:606
@ PJ_ICE_SESS_TRICKLE_HALF
Definition: ice_session.h:618
@ PJ_ICE_SESS_CHECKLIST_ST_COMPLETED
Definition: ice_session.h:442
@ PJ_ICE_SESS_CHECKLIST_ST_IDLE
Definition: ice_session.h:430
@ PJ_ICE_SESS_CHECKLIST_ST_RUNNING
Definition: ice_session.h:436
@ PJ_ICE_SESS_ROLE_UNKNOWN
Definition: ice_session.h:557
@ PJ_ICE_SESS_ROLE_CONTROLLING
Definition: ice_session.h:567
@ PJ_ICE_SESS_ROLE_CONTROLLED
Definition: ice_session.h:562
@ PJ_ICE_SESS_CHECK_STATE_IN_PROGRESS
Definition: ice_session.h:347
@ PJ_ICE_SESS_CHECK_STATE_WAITING
Definition: ice_session.h:340
@ PJ_ICE_SESS_CHECK_STATE_FAILED
Definition: ice_session.h:361
@ PJ_ICE_SESS_CHECK_STATE_FROZEN
Definition: ice_session.h:333
@ PJ_ICE_SESS_CHECK_STATE_SUCCEEDED
Definition: ice_session.h:354
@ PJ_ICE_CAND_TYPE_MAX
Definition: ice_session.h:161
@ PJ_ICE_CAND_TYPE_RELAYED
Definition: ice_session.h:156
@ PJ_ICE_CAND_TYPE_PRFLX
Definition: ice_session.h:150
@ PJ_ICE_CAND_TYPE_HOST
Definition: ice_session.h:137
@ PJ_ICE_CAND_TYPE_SRFLX
Definition: ice_session.h:144
struct pj_stun_session pj_stun_session
Definition: stun_session.h:174
unsigned short pj_uint16_t
struct pj_grp_lock_t pj_grp_lock_t
void(* pj_grp_lock_handler)(void *member)
Definition: ice_session.h:221
pj_ice_sess_checklist * clist
Definition: ice_session.h:223
pj_ice_sess_cand * rcand
Definition: ice_session.h:226
pj_ice_sess * ice
Definition: ice_session.h:222
unsigned ckid
Definition: ice_session.h:224
pj_ice_sess_cand * lcand
Definition: ice_session.h:225
Definition: ice_session.h:211
unsigned transport_id
Definition: ice_session.h:213
union pj_ice_msg_data::data data
pj_bool_t has_req_data
Definition: ice_session.h:216
Definition: ice_session.h:582
unsigned transport_id
Definition: ice_session.h:586
unsigned src_addr_len
Definition: ice_session.h:589
pj_bool_t use_candidate
Definition: ice_session.h:591
pj_stun_uint64_attr * role_attr
Definition: ice_session.h:593
unsigned comp_id
Definition: ice_session.h:585
PJ_DECL_LIST_MEMBER(struct pj_ice_rx_check)
pj_sockaddr src_addr
Definition: ice_session.h:588
pj_uint32_t priority
Definition: ice_session.h:592
Definition: ice_session.h:242
pj_sockaddr addr
Definition: ice_session.h:302
pj_sockaddr base_addr
Definition: ice_session.h:312
pj_status_t status
Definition: ice_session.h:259
pj_str_t foundation
Definition: ice_session.h:284
unsigned id
Definition: ice_session.h:246
pj_uint16_t local_pref
Definition: ice_session.h:276
pj_sockaddr rel_addr
Definition: ice_session.h:318
pj_ice_cand_type type
Definition: ice_session.h:251
pj_uint32_t prio
Definition: ice_session.h:291
pj_uint8_t transport_id
Definition: ice_session.h:271
pj_uint8_t comp_id
Definition: ice_session.h:266
Definition: ice_session.h:491
pj_status_t(* on_tx_pkt)(pj_ice_sess *ice, unsigned comp_id, unsigned transport_id, const void *pkt, pj_size_t size, const pj_sockaddr_t *dst_addr, unsigned dst_addr_len)
Definition: ice_session.h:522
void(* on_rx_data)(pj_ice_sess *ice, unsigned comp_id, unsigned transport_id, void *pkt, pj_size_t size, const pj_sockaddr_t *src_addr, unsigned src_addr_len)
Definition: ice_session.h:541
void(* on_ice_complete)(pj_ice_sess *ice, pj_status_t status)
Definition: ice_session.h:508
void(* on_valid_pair)(pj_ice_sess *ice)
Definition: ice_session.h:498
Definition: ice_session.h:374
pj_status_t err_code
Definition: ice_session.h:418
pj_timestamp prio
Definition: ice_session.h:393
pj_ice_sess_check_state state
Definition: ice_session.h:398
int foundation_idx
Definition: ice_session.h:388
pj_bool_t nominated
Definition: ice_session.h:412
pj_ice_sess_cand * lcand
Definition: ice_session.h:378
pj_stun_tx_data * tdata
Definition: ice_session.h:406
pj_ice_sess_cand * rcand
Definition: ice_session.h:383
Definition: ice_session.h:452
pj_ice_sess_check checks[PJ_ICE_MAX_CHECKS]
Definition: ice_session.h:466
pj_timer_entry timer
Definition: ice_session.h:481
unsigned count
Definition: ice_session.h:461
unsigned foundation_cnt
Definition: ice_session.h:471
pj_str_t foundation[PJ_ICE_MAX_CHECKS *2]
Definition: ice_session.h:476
pj_ice_sess_checklist_state state
Definition: ice_session.h:456
Definition: ice_session.h:183
pj_ice_sess_check * valid_check
Definition: ice_session.h:189
pj_stun_session * stun_sess
Definition: ice_session.h:202
pj_ice_sess_check * nominated_check
Definition: ice_session.h:196
Definition: ice_session.h:637
int controlled_agent_want_nom_timeout
Definition: ice_session.h:665
unsigned nominated_check_delay
Definition: ice_session.h:651
pj_ice_sess_trickle trickle
Definition: ice_session.h:673
pj_bool_t aggressive
Definition: ice_session.h:642
Definition: ice_session.h:688
pj_str_t rx_ufrag
Definition: ice_session.h:715
pj_timestamp tie_breaker
Definition: ice_session.h:696
pj_grp_lock_t * grp_lock
Definition: ice_session.h:693
pj_str_t rx_pass
Definition: ice_session.h:717
unsigned comp_cnt
Definition: ice_session.h:720
unsigned lcand_paired
Definition: ice_session.h:727
pj_bool_t is_complete
Definition: ice_session.h:699
pj_uint8_t * prefs
Definition: ice_session.h:697
pj_bool_t valid_pair_found
Definition: ice_session.h:701
void * user_data
Definition: ice_session.h:692
pj_ice_sess_checklist valid_list
Definition: ice_session.h:746
pj_bool_t is_destroying
Definition: ice_session.h:700
pj_ice_rx_check early_check
Definition: ice_session.h:740
pj_ice_sess_checklist clist
Definition: ice_session.h:743
unsigned comp_ka
Definition: ice_session.h:722
pj_ice_sess_cb cb
Definition: ice_session.h:707
pj_str_t tx_pass
Definition: ice_session.h:714
pj_timer_entry timer_end_of_cand
Definition: ice_session.h:706
pj_ice_msg_data tp_data[PJ_ICE_MAX_STUN+PJ_ICE_MAX_TURN]
Definition: ice_session.h:737
pj_ice_sess_role role
Definition: ice_session.h:694
pj_bool_t is_nominating
Definition: ice_session.h:698
union pj_ice_sess::@0 tmp
pj_bool_t is_trickling
Definition: ice_session.h:702
pj_pool_t * pool
Definition: ice_session.h:691
pj_ice_sess_cand rcand[PJ_ICE_MAX_CAND]
Definition: ice_session.h:732
pj_ice_sess_cand lcand[PJ_ICE_MAX_CAND]
Definition: ice_session.h:726
pj_status_t ice_status
Definition: ice_session.h:704
pj_str_t tx_ufrag
Definition: ice_session.h:712
pj_timer_entry timer
Definition: ice_session.h:705
unsigned lcand_cnt
Definition: ice_session.h:725
pj_ice_sess_options opt
Definition: ice_session.h:695
unsigned rcand_cnt
Definition: ice_session.h:731
pj_str_t rx_uname
Definition: ice_session.h:716
pj_ice_sess_comp comp[PJ_ICE_MAX_COMP]
Definition: ice_session.h:721
pj_str_t tx_uname
Definition: ice_session.h:713
pj_stun_config stun_cfg
Definition: ice_session.h:709
char obj_name[PJ_MAX_OBJ_NAME]
Definition: ice_session.h:689
unsigned rcand_paired
Definition: ice_session.h:733
Definition: stun_config.h:48
Definition: stun_session.h:336
Definition: stun_msg.h:614
STUN session management for client/server.
Definition: ice_session.h:219
struct pj_ice_msg_data::data::request_data req