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

turn_session.h File Reference

Transport independent TURN client session. More...

Go to the source code of this file.

Data Structures

struct  pj_turn_channel_data
 
struct  pj_turn_session_cb
 
struct  pj_turn_alloc_param
 
struct  pj_turn_session_info
 
struct  pj_turn_session_on_rx_pkt_param
 

Typedefs

typedef struct pj_turn_session pj_turn_session
 

Enumerations

enum  pj_turn_tp_type {
  PJ_TURN_TP_UDP = 17 ,
  PJ_TURN_TP_TCP = 6 ,
  PJ_TURN_TP_TLS = 56
}
 
enum  pj_turn_state_t {
  PJ_TURN_STATE_NULL ,
  PJ_TURN_STATE_RESOLVING ,
  PJ_TURN_STATE_RESOLVED ,
  PJ_TURN_STATE_ALLOCATING ,
  PJ_TURN_STATE_READY ,
  PJ_TURN_STATE_DEALLOCATING ,
  PJ_TURN_STATE_DEALLOCATED ,
  PJ_TURN_STATE_DESTROYING
}
 

Functions

void pj_turn_alloc_param_default (pj_turn_alloc_param *prm)
 
void pj_turn_alloc_param_copy (pj_pool_t *pool, pj_turn_alloc_param *dst, const pj_turn_alloc_param *src)
 
const char * pj_turn_state_name (pj_turn_state_t state)
 
pj_status_t pj_turn_session_create (const pj_stun_config *cfg, const char *name, int af, pj_turn_tp_type conn_type, pj_grp_lock_t *grp_lock, const pj_turn_session_cb *cb, unsigned options, void *user_data, pj_turn_session **p_sess)
 
pj_status_t pj_turn_session_shutdown (pj_turn_session *sess)
 
pj_status_t pj_turn_session_destroy (pj_turn_session *sess, pj_status_t last_err)
 
pj_status_t pj_turn_session_get_info (pj_turn_session *sess, pj_turn_session_info *info)
 
pj_status_t pj_turn_session_set_user_data (pj_turn_session *sess, void *user_data)
 
void * pj_turn_session_get_user_data (pj_turn_session *sess)
 
pj_grp_lock_tpj_turn_session_get_grp_lock (pj_turn_session *sess)
 
void pj_turn_session_set_log (pj_turn_session *sess, unsigned flags)
 
pj_status_t pj_turn_session_set_software_name (pj_turn_session *sess, const pj_str_t *sw)
 
pj_status_t pj_turn_session_set_server (pj_turn_session *sess, const pj_str_t *domain, int default_port, pj_dns_resolver *resolver)
 
pj_status_t pj_turn_session_set_credential (pj_turn_session *sess, const pj_stun_auth_cred *cred)
 
pj_status_t pj_turn_session_alloc (pj_turn_session *sess, const pj_turn_alloc_param *param)
 
pj_status_t pj_turn_session_set_perm (pj_turn_session *sess, unsigned addr_cnt, const pj_sockaddr addr[], unsigned options)
 
pj_status_t pj_turn_session_sendto (pj_turn_session *sess, const pj_uint8_t *pkt, unsigned pkt_len, const pj_sockaddr_t *peer_addr, unsigned addr_len)
 
pj_status_t pj_turn_session_bind_channel (pj_turn_session *sess, const pj_sockaddr_t *peer, unsigned addr_len)
 
pj_status_t pj_turn_session_on_rx_pkt (pj_turn_session *sess, void *pkt, pj_size_t pkt_len, pj_size_t *parsed_len)
 
pj_status_t pj_turn_session_on_rx_pkt2 (pj_turn_session *sess, pj_turn_session_on_rx_pkt_param *prm)
 
pj_status_t pj_turn_session_connection_bind (pj_turn_session *sess, pj_pool_t *pool, pj_uint32_t conn_id, const pj_sockaddr_t *peer_addr, unsigned addr_len)
 
pj_status_t pj_turn_session_connect (pj_turn_session *sess, const pj_sockaddr_t *peer_addr, unsigned addr_len)
 

 


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