19#ifndef __PJNATH_TURN_SESSION_H__
20#define __PJNATH_TURN_SESSION_H__
pj_status_t pj_turn_session_set_software_name(pj_turn_session *sess, const pj_str_t *sw)
void * pj_turn_session_get_user_data(pj_turn_session *sess)
pj_status_t pj_turn_session_set_perm(pj_turn_session *sess, unsigned addr_cnt, const pj_sockaddr addr[], unsigned options)
pj_turn_tp_type
Definition: turn_session.h:139
pj_status_t pj_turn_session_alloc(pj_turn_session *sess, const pj_turn_alloc_param *param)
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_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_on_rx_pkt2(pj_turn_session *sess, pj_turn_session_on_rx_pkt_param *prm)
pj_status_t pj_turn_session_get_info(pj_turn_session *sess, pj_turn_session_info *info)
pj_status_t pj_turn_session_set_credential(pj_turn_session *sess, const pj_stun_auth_cred *cred)
pj_status_t pj_turn_session_shutdown(pj_turn_session *sess)
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_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)
void pj_turn_session_set_log(pj_turn_session *sess, unsigned flags)
pj_status_t pj_turn_session_set_user_data(pj_turn_session *sess, void *user_data)
pj_status_t pj_turn_session_destroy(pj_turn_session *sess, pj_status_t last_err)
struct pj_turn_session pj_turn_session
Definition: turn_session.h:130
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_grp_lock_t * pj_turn_session_get_grp_lock(pj_turn_session *sess)
pj_turn_state_t
Definition: turn_session.h:162
void pj_turn_alloc_param_copy(pj_pool_t *pool, pj_turn_alloc_param *dst, const pj_turn_alloc_param *src)
pj_status_t pj_turn_session_connect(pj_turn_session *sess, const pj_sockaddr_t *peer_addr, unsigned addr_len)
void pj_turn_alloc_param_default(pj_turn_alloc_param *prm)
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)
const char * pj_turn_state_name(pj_turn_state_t state)
@ PJ_TURN_TP_TCP
Definition: turn_session.h:148
@ PJ_TURN_TP_UDP
Definition: turn_session.h:143
@ PJ_TURN_TP_TLS
Definition: turn_session.h:155
@ PJ_TURN_STATE_NULL
Definition: turn_session.h:166
@ PJ_TURN_STATE_RESOLVING
Definition: turn_session.h:172
@ PJ_TURN_STATE_DEALLOCATED
Definition: turn_session.h:202
@ PJ_TURN_STATE_ALLOCATING
Definition: turn_session.h:184
@ PJ_TURN_STATE_READY
Definition: turn_session.h:190
@ PJ_TURN_STATE_DEALLOCATING
Definition: turn_session.h:196
@ PJ_TURN_STATE_DESTROYING
Definition: turn_session.h:207
@ PJ_TURN_STATE_RESOLVED
Definition: turn_session.h:178
unsigned short pj_uint16_t
struct pj_grp_lock_t pj_grp_lock_t
struct pj_dns_resolver pj_dns_resolver
Definition: stun_auth.h:114
Definition: stun_config.h:48
Definition: turn_session.h:389
pj_turn_tp_type peer_conn_type
Definition: turn_session.h:426
int ka_interval
Definition: turn_session.h:409
int bandwidth
Definition: turn_session.h:396
int af
Definition: turn_session.h:418
int lifetime
Definition: turn_session.h:402
Definition: turn_session.h:219
pj_uint16_t length
Definition: turn_session.h:221
pj_uint16_t ch_number
Definition: turn_session.h:220
Definition: turn_session.h:232
void(* on_connection_bind_status)(pj_turn_session *sess, pj_status_t status, pj_uint32_t conn_id, const pj_sockaddr_t *peer_addr, unsigned addr_len)
Definition: turn_session.h:357
pj_status_t(* on_stun_send_pkt)(pj_turn_session *sess, const pj_uint8_t *pkt, unsigned pkt_len, const pj_sockaddr_t *dst_addr, unsigned addr_len)
Definition: turn_session.h:272
pj_status_t(* on_send_pkt)(pj_turn_session *sess, const pj_uint8_t *pkt, unsigned pkt_len, const pj_sockaddr_t *dst_addr, unsigned addr_len)
Definition: turn_session.h:250
void(* on_connect_complete)(pj_turn_session *sess, pj_status_t status, pj_uint32_t conn_id, const pj_sockaddr_t *peer_addr, unsigned addr_len)
Definition: turn_session.h:373
void(* on_channel_bound)(pj_turn_session *sess, const pj_sockaddr_t *peer_addr, unsigned addr_len, unsigned ch_num)
Definition: turn_session.h:290
void(* on_connection_attempt)(pj_turn_session *sess, pj_uint32_t conn_id, const pj_sockaddr_t *peer_addr, unsigned addr_len)
Definition: turn_session.h:342
void(* on_rx_data)(pj_turn_session *sess, void *pkt, unsigned pkt_len, const pj_sockaddr_t *peer_addr, unsigned addr_len)
Definition: turn_session.h:307
void(* on_state)(pj_turn_session *sess, pj_turn_state_t old_state, pj_turn_state_t new_state)
Definition: turn_session.h:322
Definition: turn_session.h:435
int lifetime
Definition: turn_session.h:469
pj_sockaddr server
Definition: turn_session.h:454
pj_sockaddr mapped_addr
Definition: turn_session.h:459
pj_turn_tp_type conn_type
Definition: turn_session.h:449
pj_sockaddr relay_addr
Definition: turn_session.h:464
pj_status_t last_status
Definition: turn_session.h:444
pj_turn_state_t state
Definition: turn_session.h:439
Definition: turn_session.h:478
const pj_sockaddr_t * src_addr
Definition: turn_session.h:498
void * pkt
Definition: turn_session.h:483
pj_size_t pkt_len
Definition: turn_session.h:488
unsigned src_addr_len
Definition: turn_session.h:503
pj_size_t parsed_len
Definition: turn_session.h:493
STUN session management for client/server.