BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJSIP Reference

sip_transport.h File Reference

SIP Transport. More...

#include <pjsip/sip_msg.h>
#include <pjsip/sip_parser.h>
#include <pjsip/sip_resolve.h>
#include <pj/sock.h>
#include <pj/list.h>
#include <pj/ioqueue.h>
#include <pj/timer.h>

Data Structures

struct  pjsip_tpselector
 
struct  pjsip_rx_data_op_key
 
struct  pjsip_rx_data
 
struct  pjsip_tx_data_op_key
 
struct  pjsip_tx_data
 
struct  pjsip_transport_key
 
struct  pjsip_transport
 
struct  pjsip_tpfactory
 
struct  pjsip_tpmgr_fla2_param
 
struct  pjsip_transport_state_info
 
struct  pjsip_tp_dropped_data
 

Macros

#define PJSIP_TRANSPORT_IS_RELIABLE(tp)    ((tp)->flag & PJSIP_TRANSPORT_RELIABLE)
 
#define PJSIP_TRANSPORT_IS_SECURE(tp)    ((tp)->flag & PJSIP_TRANSPORT_SECURE)
 

Typedefs

typedef void(* pjsip_transport_callback) (pjsip_transport *tp, void *token, pj_ssize_t sent_bytes)
 
typedef void(* pjsip_rx_callback) (pjsip_endpoint *ep, pj_status_t status, pjsip_rx_data *rd)
 
typedef pj_status_t(* pjsip_tx_callback) (pjsip_endpoint *ep, pjsip_tx_data *td)
 
typedef void(* pjsip_tp_send_callback) (void *token, pjsip_tx_data *tdata, pj_ssize_t bytes_sent)
 
typedef void pjsip_tp_state_listener_key
 
typedef void(* pjsip_tp_state_callback) (pjsip_transport *tp, pjsip_transport_state state, const pjsip_transport_state_info *info)
 
typedef void(* pjsip_tp_on_rx_dropped_cb) (pjsip_tp_dropped_data *data)
 

Enumerations

enum  pjsip_transport_flags_e { PJSIP_TRANSPORT_RELIABLE = 1 , PJSIP_TRANSPORT_SECURE = 2 , PJSIP_TRANSPORT_DATAGRAM = 4 }
 
enum  pjsip_tpselector_type { PJSIP_TPSELECTOR_NONE , PJSIP_TPSELECTOR_TRANSPORT , PJSIP_TPSELECTOR_LISTENER }
 
enum  pjsip_transport_dir { PJSIP_TP_DIR_NONE , PJSIP_TP_DIR_OUTGOING , PJSIP_TP_DIR_INCOMING }
 
enum  pjsip_transport_state { PJSIP_TP_STATE_CONNECTED , PJSIP_TP_STATE_DISCONNECTED , PJSIP_TP_STATE_SHUTDOWN , PJSIP_TP_STATE_DESTROY }
 

Functions

pj_status_t pjsip_transport_register_type (unsigned tp_flag, const char *tp_name, int def_port, int *p_tp_type)
 
pjsip_transport_type_e pjsip_transport_get_type_from_name (const pj_str_t *name)
 
pjsip_transport_type_e pjsip_transport_get_type_from_flag (unsigned flag)
 
int pjsip_transport_type_get_af (pjsip_transport_type_e type)
 
unsigned pjsip_transport_get_flag_from_type (pjsip_transport_type_e type)
 
int pjsip_transport_get_default_port_for_type (pjsip_transport_type_e type)
 
const char * pjsip_transport_get_type_name (pjsip_transport_type_e t)
 
const char * pjsip_transport_get_type_desc (pjsip_transport_type_e t)
 
void pjsip_tpselector_add_ref (pjsip_tpselector *sel)
 
void pjsip_tpselector_dec_ref (pjsip_tpselector *sel)
 
char * pjsip_rx_data_get_info (pjsip_rx_data *rdata)
 
pj_status_t pjsip_rx_data_clone (const pjsip_rx_data *src, unsigned flags, pjsip_rx_data **p_rdata)
 
pj_status_t pjsip_rx_data_free_cloned (pjsip_rx_data *rdata)
 
pj_status_t pjsip_tx_data_create (pjsip_tpmgr *mgr, pjsip_tx_data **tdata)
 
void pjsip_tx_data_add_ref (pjsip_tx_data *tdata)
 
pj_status_t pjsip_tx_data_dec_ref (pjsip_tx_data *tdata)
 
pj_status_t pjsip_tx_data_encode (pjsip_tx_data *tdata)
 
pj_bool_t pjsip_tx_data_is_valid (pjsip_tx_data *tdata)
 
void pjsip_tx_data_invalidate_msg (pjsip_tx_data *tdata)
 
char * pjsip_tx_data_get_info (pjsip_tx_data *tdata)
 
pj_status_t pjsip_tx_data_set_transport (pjsip_tx_data *tdata, const pjsip_tpselector *sel)
 
pj_status_t pjsip_tx_data_clone (const pjsip_tx_data *src, unsigned flags, pjsip_tx_data **p_rdata)
 
pj_status_t pjsip_transport_register (pjsip_tpmgr *mgr, pjsip_transport *tp)
 
pj_status_t pjsip_transport_shutdown (pjsip_transport *tp)
 
pj_status_t pjsip_transport_shutdown2 (pjsip_transport *tp, pj_bool_t force)
 
pj_status_t pjsip_transport_destroy (pjsip_transport *tp)
 
pj_status_t pjsip_transport_add_ref (pjsip_transport *tp)
 
pj_status_t pjsip_transport_dec_ref (pjsip_transport *tp)
 
pj_ssize_t pjsip_tpmgr_receive_packet (pjsip_tpmgr *mgr, pjsip_rx_data *rdata)
 
pj_status_t pjsip_tpmgr_register_tpfactory (pjsip_tpmgr *mgr, pjsip_tpfactory *tpf)
 
pj_status_t pjsip_tpmgr_unregister_tpfactory (pjsip_tpmgr *mgr, pjsip_tpfactory *tpf)
 
pj_status_t pjsip_tpmgr_create (pj_pool_t *pool, pjsip_endpoint *endpt, pjsip_rx_callback rx_cb, pjsip_tx_callback tx_cb, pjsip_tpmgr **p_mgr)
 
pj_status_t pjsip_tpmgr_find_local_addr (pjsip_tpmgr *tpmgr, pj_pool_t *pool, pjsip_transport_type_e type, const pjsip_tpselector *sel, pj_str_t *ip_addr, int *port)
 
void pjsip_tpmgr_fla2_param_default (pjsip_tpmgr_fla2_param *prm)
 
pj_status_t pjsip_tpmgr_find_local_addr2 (pjsip_tpmgr *tpmgr, pj_pool_t *pool, pjsip_tpmgr_fla2_param *prm)
 
unsigned pjsip_tpmgr_get_transport_count (pjsip_tpmgr *mgr)
 
pj_status_t pjsip_tpmgr_destroy (pjsip_tpmgr *mgr)
 
void pjsip_tpmgr_dump_transports (pjsip_tpmgr *mgr)
 
pj_status_t pjsip_tpmgr_acquire_transport (pjsip_tpmgr *mgr, pjsip_transport_type_e type, const pj_sockaddr_t *remote, int addr_len, const pjsip_tpselector *sel, pjsip_transport **tp)
 
pj_status_t pjsip_tpmgr_acquire_transport2 (pjsip_tpmgr *mgr, pjsip_transport_type_e type, const pj_sockaddr_t *remote, int addr_len, const pjsip_tpselector *sel, pjsip_tx_data *tdata, pjsip_transport **tp)
 
pj_status_t pjsip_transport_send (pjsip_transport *tr, pjsip_tx_data *tdata, const pj_sockaddr_t *addr, int addr_len, void *token, pjsip_tp_send_callback cb)
 
pj_status_t pjsip_tpmgr_send_raw (pjsip_tpmgr *mgr, pjsip_transport_type_e tp_type, const pjsip_tpselector *sel, pjsip_tx_data *tdata, const void *raw_data, pj_size_t data_len, const pj_sockaddr_t *addr, int addr_len, void *token, pjsip_tp_send_callback cb)
 
pj_status_t pjsip_tpmgr_set_state_cb (pjsip_tpmgr *mgr, pjsip_tp_state_callback cb)
 
pjsip_tp_state_callback pjsip_tpmgr_get_state_cb (const pjsip_tpmgr *mgr)
 
pj_status_t pjsip_transport_add_state_listener (pjsip_transport *tp, pjsip_tp_state_callback cb, void *user_data, pjsip_tp_state_listener_key **key)
 
pj_status_t pjsip_transport_remove_state_listener (pjsip_transport *tp, pjsip_tp_state_listener_key *key, const void *user_data)
 
pj_status_t pjsip_tpmgr_set_drop_data_cb (pjsip_tpmgr *mgr, pjsip_tp_on_rx_dropped_cb cb)
 

 


PJSIP Open Source, high performance, small footprint, and very very portable SIP stack
Copyright (C) 2006-2008 Teluu Inc.