Home --> Documentations --> PJNATH Reference

stun_session.h File Reference

STUN session management for client/server. More...

Go to the source code of this file.

Data Structures

struct  pj_stun_session_cb
 
struct  pj_stun_rx_data
 
struct  pj_stun_tx_data
 

Typedefs

typedef struct pj_stun_session pj_stun_session
 

Enumerations

enum  pj_stun_sess_msg_log_flag {
  PJ_STUN_SESS_LOG_TX_REQ =1,
  PJ_STUN_SESS_LOG_TX_RES =2,
  PJ_STUN_SESS_LOG_TX_IND =4,
  PJ_STUN_SESS_LOG_RX_REQ =8,
  PJ_STUN_SESS_LOG_RX_RES =16,
  PJ_STUN_SESS_LOG_RX_IND =32
}
 

Functions

pj_status_t pj_stun_session_create (pj_stun_config *cfg, const char *name, const pj_stun_session_cb *cb, pj_bool_t fingerprint, pj_grp_lock_t *grp_lock, pj_stun_session **p_sess)
 
pj_status_t pj_stun_session_destroy (pj_stun_session *sess)
 
pj_status_t pj_stun_session_set_user_data (pj_stun_session *sess, void *user_data)
 
void * pj_stun_session_get_user_data (pj_stun_session *sess)
 
pj_grp_lock_tpj_stun_session_get_grp_lock (pj_stun_session *sess)
 
pj_status_t pj_stun_session_set_software_name (pj_stun_session *sess, const pj_str_t *sw)
 
pj_status_t pj_stun_session_set_credential (pj_stun_session *sess, pj_stun_auth_type auth_type, const pj_stun_auth_cred *cred)
 
void pj_stun_session_set_log (pj_stun_session *sess, unsigned flags)
 
pj_bool_t pj_stun_session_use_fingerprint (pj_stun_session *sess, pj_bool_t use)
 
pj_status_t pj_stun_session_create_req (pj_stun_session *sess, int msg_type, pj_uint32_t magic, const pj_uint8_t tsx_id[12], pj_stun_tx_data **p_tdata)
 
pj_status_t pj_stun_session_create_ind (pj_stun_session *sess, int msg_type, pj_stun_tx_data **p_tdata)
 
pj_status_t pj_stun_session_create_res (pj_stun_session *sess, const pj_stun_rx_data *rdata, unsigned err_code, const pj_str_t *err_msg, pj_stun_tx_data **p_tdata)
 
pj_status_t pj_stun_session_send_msg (pj_stun_session *sess, void *token, pj_bool_t cache_res, pj_bool_t retransmit, const pj_sockaddr_t *dst_addr, unsigned addr_len, pj_stun_tx_data *tdata)
 
pj_status_t pj_stun_session_respond (pj_stun_session *sess, const pj_stun_rx_data *rdata, unsigned code, const char *err_msg, void *token, pj_bool_t cache, const pj_sockaddr_t *dst_addr, unsigned addr_len)
 
pj_status_t pj_stun_session_cancel_req (pj_stun_session *sess, pj_stun_tx_data *tdata, pj_bool_t notify, pj_status_t status)
 
pj_status_t pj_stun_session_retransmit_req (pj_stun_session *sess, pj_stun_tx_data *tdata, pj_bool_t mod_count)
 
pj_status_t pj_stun_session_on_rx_pkt (pj_stun_session *sess, const void *packet, pj_size_t pkt_size, unsigned options, void *token, pj_size_t *parsed_len, const pj_sockaddr_t *src_addr, unsigned src_addr_len)
 
void pj_stun_msg_destroy_tdata (pj_stun_session *sess, pj_stun_tx_data *tdata)
 

 


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