| endpoint.h | | endpoint.h | |
|
| /* $Id: endpoint.h 3553 2011-05-05 06:14:19Z nanang $ */ | | /* $Id: endpoint.h 3988 2012-03-28 07:32:42Z nanang $ */ | |
| /* | | /* | |
| * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | | * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | |
| * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | | * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 60 | | skipping to change at line 60 | |
| { | | { | |
| /** | | /** | |
| * This flag controls whether telephony-event should be offered in SDP. | | * This flag controls whether telephony-event should be offered in SDP. | |
| * Value is boolean. | | * Value is boolean. | |
| */ | | */ | |
| PJMEDIA_ENDPT_HAS_TELEPHONE_EVENT_FLAG | | PJMEDIA_ENDPT_HAS_TELEPHONE_EVENT_FLAG | |
| | | | |
| } pjmedia_endpt_flag; | | } pjmedia_endpt_flag; | |
| | | | |
| /** | | /** | |
|
| | | * Type of callback to register to pjmedia_endpt_atexit(). | |
| | | */ | |
| | | typedef void (*pjmedia_endpt_exit_callback)(pjmedia_endpt *endpt); | |
| | | | |
| | | /** | |
| * Create an instance of media endpoint. | | * Create an instance of media endpoint. | |
| * | | * | |
| * @param pf Pool factory, which will be used by the media endpoi
nt | | * @param pf Pool factory, which will be used by the media endpoi
nt | |
| * throughout its lifetime. | | * throughout its lifetime. | |
| * @param ioqueue Optional ioqueue instance to be registered to the | | * @param ioqueue Optional ioqueue instance to be registered to the | |
| * endpoint. The ioqueue instance is used to poll all R
TP | | * endpoint. The ioqueue instance is used to poll all R
TP | |
| * and RTCP sockets. If this argument is NULL, the | | * and RTCP sockets. If this argument is NULL, the | |
| * endpoint will create an internal ioqueue instance. | | * endpoint will create an internal ioqueue instance. | |
| * @param worker_cnt Specify the number of worker threads to be created | | * @param worker_cnt Specify the number of worker threads to be created | |
| * to poll the ioqueue. | | * to poll the ioqueue. | |
| | | | |
| skipping to change at line 199 | | skipping to change at line 204 | |
| | | | |
| /** | | /** | |
| * Dump media endpoint capabilities. | | * Dump media endpoint capabilities. | |
| * | | * | |
| * @param endpt The media endpoint. | | * @param endpt The media endpoint. | |
| * | | * | |
| * @return PJ_SUCCESS on success. | | * @return PJ_SUCCESS on success. | |
| */ | | */ | |
| PJ_DECL(pj_status_t) pjmedia_endpt_dump(pjmedia_endpt *endpt); | | PJ_DECL(pj_status_t) pjmedia_endpt_dump(pjmedia_endpt *endpt); | |
| | | | |
|
| | | /** | |
| | | * Register cleanup function to be called by media endpoint when | |
| | | * #pjmedia_endpt_destroy() is called. Note that application should not | |
| | | * use or access any endpoint resource (such as pool, ioqueue) from within | |
| | | * the callback as such resource may have been released when the callback | |
| | | * function is invoked. | |
| | | * | |
| | | * @param endpt The media endpoint. | |
| | | * @param func The function to be registered. | |
| | | * | |
| | | * @return PJ_SUCCESS on success. | |
| | | */ | |
| | | PJ_DECL(pj_status_t) pjmedia_endpt_atexit(pjmedia_endpt *endpt, | |
| | | pjmedia_endpt_exit_callback func); | |
| | | | |
| PJ_END_DECL | | PJ_END_DECL | |
| | | | |
| /** | | /** | |
| * @} | | * @} | |
| */ | | */ | |
| | | | |
| #endif /* __PJMEDIA_MEDIAMGR_H__ */ | | #endif /* __PJMEDIA_MEDIAMGR_H__ */ | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 21 lines changed or added | |
|
| rtcp.h | | rtcp.h | |
|
| /* $Id: rtcp.h 3553 2011-05-05 06:14:19Z nanang $ */ | | /* $Id: rtcp.h 3960 2012-02-27 14:41:21Z nanang $ */ | |
| /* | | /* | |
| * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | | * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | |
| * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | | * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 61 | | skipping to change at line 61 | |
| * When application uses the stream interface (see @ref PJMED_STRM), | | * When application uses the stream interface (see @ref PJMED_STRM), | |
| * application may retrieve the RTCP statistic by calling | | * application may retrieve the RTCP statistic by calling | |
| * #pjmedia_stream_get_stat() function. | | * #pjmedia_stream_get_stat() function. | |
| */ | | */ | |
| | | | |
| #pragma pack(1) | | #pragma pack(1) | |
| | | | |
| /** | | /** | |
| * RTCP sender report. | | * RTCP sender report. | |
| */ | | */ | |
|
| struct pjmedia_rtcp_sr | | typedef struct pjmedia_rtcp_sr | |
| { | | { | |
| pj_uint32_t ntp_sec; /**< NTP time, seconds part.
*/ | | pj_uint32_t ntp_sec; /**< NTP time, seconds part.
*/ | |
| pj_uint32_t ntp_frac; /**< NTP time, fractions part.
*/ | | pj_uint32_t ntp_frac; /**< NTP time, fractions part.
*/ | |
| pj_uint32_t rtp_ts; /**< RTP timestamp.
*/ | | pj_uint32_t rtp_ts; /**< RTP timestamp.
*/ | |
| pj_uint32_t sender_pcount; /**< Sender packet cound.
*/ | | pj_uint32_t sender_pcount; /**< Sender packet cound.
*/ | |
| pj_uint32_t sender_bcount; /**< Sender octet/bytes count.
*/ | | pj_uint32_t sender_bcount; /**< Sender octet/bytes count.
*/ | |
|
| }; | | } pjmedia_rtcp_sr; | |
| | | | |
| /** | | | |
| * @see pjmedia_rtcp_sr | | | |
| */ | | | |
| typedef struct pjmedia_rtcp_sr pjmedia_rtcp_sr; | | | |
| | | | |
| /** | | /** | |
| * RTCP receiver report. | | * RTCP receiver report. | |
| */ | | */ | |
|
| struct pjmedia_rtcp_rr | | typedef struct pjmedia_rtcp_rr | |
| { | | { | |
| pj_uint32_t ssrc; /**< SSRC identification.
*/ | | pj_uint32_t ssrc; /**< SSRC identification.
*/ | |
| #if defined(PJ_IS_BIG_ENDIAN) && PJ_IS_BIG_ENDIAN!=0 | | #if defined(PJ_IS_BIG_ENDIAN) && PJ_IS_BIG_ENDIAN!=0 | |
| pj_uint32_t fract_lost:8; /**< Fraction lost.
*/ | | pj_uint32_t fract_lost:8; /**< Fraction lost.
*/ | |
| pj_uint32_t total_lost_2:8; /**< Total lost, bit 16-23.
*/ | | pj_uint32_t total_lost_2:8; /**< Total lost, bit 16-23.
*/ | |
| pj_uint32_t total_lost_1:8; /**< Total lost, bit 8-15.
*/ | | pj_uint32_t total_lost_1:8; /**< Total lost, bit 8-15.
*/ | |
| pj_uint32_t total_lost_0:8; /**< Total lost, bit 0-7.
*/ | | pj_uint32_t total_lost_0:8; /**< Total lost, bit 0-7.
*/ | |
| #else | | #else | |
| pj_uint32_t fract_lost:8; /**< Fraction lost.
*/ | | pj_uint32_t fract_lost:8; /**< Fraction lost.
*/ | |
| pj_uint32_t total_lost_2:8; /**< Total lost, bit 0-7.
*/ | | pj_uint32_t total_lost_2:8; /**< Total lost, bit 0-7.
*/ | |
| pj_uint32_t total_lost_1:8; /**< Total lost, bit 8-15.
*/ | | pj_uint32_t total_lost_1:8; /**< Total lost, bit 8-15.
*/ | |
| pj_uint32_t total_lost_0:8; /**< Total lost, bit 16-23.
*/ | | pj_uint32_t total_lost_0:8; /**< Total lost, bit 16-23.
*/ | |
| #endif | | #endif | |
| pj_uint32_t last_seq; /**< Last sequence number.
*/ | | pj_uint32_t last_seq; /**< Last sequence number.
*/ | |
| pj_uint32_t jitter; /**< Jitter.
*/ | | pj_uint32_t jitter; /**< Jitter.
*/ | |
| pj_uint32_t lsr; /**< Last SR.
*/ | | pj_uint32_t lsr; /**< Last SR.
*/ | |
| pj_uint32_t dlsr; /**< Delay since last SR.
*/ | | pj_uint32_t dlsr; /**< Delay since last SR.
*/ | |
|
| }; | | } pjmedia_rtcp_rr; | |
| | | | |
| /** | | | |
| * @see pjmedia_rtcp_rr | | | |
| */ | | | |
| typedef struct pjmedia_rtcp_rr pjmedia_rtcp_rr; | | | |
| | | | |
| /** | | /** | |
| * RTCP common header. | | * RTCP common header. | |
| */ | | */ | |
|
| struct pjmedia_rtcp_common | | typedef struct pjmedia_rtcp_common | |
| { | | { | |
| #if defined(PJ_IS_BIG_ENDIAN) && PJ_IS_BIG_ENDIAN!=0 | | #if defined(PJ_IS_BIG_ENDIAN) && PJ_IS_BIG_ENDIAN!=0 | |
| unsigned version:2; /**< packet type */ | | unsigned version:2; /**< packet type */ | |
| unsigned p:1; /**< padding flag */ | | unsigned p:1; /**< padding flag */ | |
| unsigned count:5; /**< varies by payload type */ | | unsigned count:5; /**< varies by payload type */ | |
| unsigned pt:8; /**< payload type */ | | unsigned pt:8; /**< payload type */ | |
| #else | | #else | |
| unsigned count:5; /**< varies by payload type */ | | unsigned count:5; /**< varies by payload type */ | |
| unsigned p:1; /**< padding flag */ | | unsigned p:1; /**< padding flag */ | |
| unsigned version:2; /**< packet type */ | | unsigned version:2; /**< packet type */ | |
| unsigned pt:8; /**< payload type */ | | unsigned pt:8; /**< payload type */ | |
| #endif | | #endif | |
| unsigned length:16; /**< packet length */ | | unsigned length:16; /**< packet length */ | |
| pj_uint32_t ssrc; /**< SSRC identification */ | | pj_uint32_t ssrc; /**< SSRC identification */ | |
|
| }; | | } pjmedia_rtcp_common; | |
| | | | |
| /** | | | |
| * @see pjmedia_rtcp_common | | | |
| */ | | | |
| typedef struct pjmedia_rtcp_common pjmedia_rtcp_common; | | | |
| | | | |
| /** | | /** | |
| * This structure declares default RTCP packet (SR) that is sent by pjmedia
. | | * This structure declares default RTCP packet (SR) that is sent by pjmedia
. | |
| * Incoming RTCP packet may have different format, and must be parsed | | * Incoming RTCP packet may have different format, and must be parsed | |
| * manually by application. | | * manually by application. | |
| */ | | */ | |
| typedef struct pjmedia_rtcp_sr_pkt | | typedef struct pjmedia_rtcp_sr_pkt | |
| { | | { | |
| pjmedia_rtcp_common common; /**< Common header. */ | | pjmedia_rtcp_common common; /**< Common header. */ | |
| pjmedia_rtcp_sr sr; /**< Sender report. */ | | pjmedia_rtcp_sr sr; /**< Sender report. */ | |
| | | | |
| skipping to change at line 152 | | skipping to change at line 137 | |
| */ | | */ | |
| typedef struct pjmedia_rtcp_rr_pkt | | typedef struct pjmedia_rtcp_rr_pkt | |
| { | | { | |
| pjmedia_rtcp_common common; /**< Common header. */ | | pjmedia_rtcp_common common; /**< Common header. */ | |
| pjmedia_rtcp_rr rr; /**< variable-length list */ | | pjmedia_rtcp_rr rr; /**< variable-length list */ | |
| } pjmedia_rtcp_rr_pkt; | | } pjmedia_rtcp_rr_pkt; | |
| | | | |
| #pragma pack() | | #pragma pack() | |
| | | | |
| /** | | /** | |
|
| * NTP time representation. | | * RTCP SDES structure. | |
| */ | | */ | |
|
| struct pjmedia_rtcp_ntp_rec | | typedef struct pjmedia_rtcp_sdes | |
| { | | { | |
|
| pj_uint32_t hi; /**< High order 32-bit part. */ | | pj_str_t cname; /**< RTCP SDES type CNAME. */ | |
| pj_uint32_t lo; /**< Lo order 32-bit part. */ | | pj_str_t name; /**< RTCP SDES type NAME. */ | |
| }; | | pj_str_t email; /**< RTCP SDES type EMAIL. */ | |
| | | pj_str_t phone; /**< RTCP SDES type PHONE. */ | |
| | | pj_str_t loc; /**< RTCP SDES type LOC. */ | |
| | | pj_str_t tool; /**< RTCP SDES type TOOL. */ | |
| | | pj_str_t note; /**< RTCP SDES type NOTE. */ | |
| | | } pjmedia_rtcp_sdes; | |
| | | | |
| /** | | /** | |
|
| * @see pjmedia_rtcp_ntp_rec | | * NTP time representation. | |
| */ | | */ | |
|
| typedef struct pjmedia_rtcp_ntp_rec pjmedia_rtcp_ntp_rec; | | typedef struct pjmedia_rtcp_ntp_rec | |
| | | { | |
| | | pj_uint32_t hi; /**< High order 32-bit part. */ | |
| | | pj_uint32_t lo; /**< Lo order 32-bit part. */ | |
| | | } pjmedia_rtcp_ntp_rec; | |
| | | | |
| /** | | /** | |
| * Unidirectional RTP stream statistics. | | * Unidirectional RTP stream statistics. | |
| */ | | */ | |
|
| struct pjmedia_rtcp_stream_stat | | typedef struct pjmedia_rtcp_stream_stat | |
| { | | { | |
| pj_time_val update; /**< Time of last update.
*/ | | pj_time_val update; /**< Time of last update.
*/ | |
| unsigned update_cnt; /**< Number of updates (to calculate avg)
*/ | | unsigned update_cnt; /**< Number of updates (to calculate avg)
*/ | |
| pj_uint32_t pkt; /**< Total number of packets
*/ | | pj_uint32_t pkt; /**< Total number of packets
*/ | |
| pj_uint32_t bytes; /**< Total number of payload/bytes
*/ | | pj_uint32_t bytes; /**< Total number of payload/bytes
*/ | |
| unsigned discard; /**< Total number of discarded packets.
*/ | | unsigned discard; /**< Total number of discarded packets.
*/ | |
| unsigned loss; /**< Total number of packets lost
*/ | | unsigned loss; /**< Total number of packets lost
*/ | |
| unsigned reorder; /**< Total number of out of order packets
*/ | | unsigned reorder; /**< Total number of out of order packets
*/ | |
| unsigned dup; /**< Total number of duplicates packets
*/ | | unsigned dup; /**< Total number of duplicates packets
*/ | |
| | | | |
| pj_math_stat loss_period;/**< Loss period statistics (in usec)
*/ | | pj_math_stat loss_period;/**< Loss period statistics (in usec)
*/ | |
| | | | |
| struct { | | struct { | |
| unsigned burst:1; /**< Burst/sequential packet lost detected
*/ | | unsigned burst:1; /**< Burst/sequential packet lost detected
*/ | |
| unsigned random:1; /**< Random packet lost detected.
*/ | | unsigned random:1; /**< Random packet lost detected.
*/ | |
| } loss_type; /**< Types of loss detected.
*/ | | } loss_type; /**< Types of loss detected.
*/ | |
| | | | |
| pj_math_stat jitter; /**< Jitter statistics (in usec)
*/ | | pj_math_stat jitter; /**< Jitter statistics (in usec)
*/ | |
|
| }; | | | |
| | | | |
|
| /** | | } pjmedia_rtcp_stream_stat; | |
| * @see pjmedia_rtcp_stream_stat | | | |
| */ | | | |
| typedef struct pjmedia_rtcp_stream_stat pjmedia_rtcp_stream_stat; | | | |
| | | | |
| /** | | /** | |
| * Bidirectional RTP stream statistics. | | * Bidirectional RTP stream statistics. | |
| */ | | */ | |
|
| struct pjmedia_rtcp_stat | | typedef struct pjmedia_rtcp_stat | |
| { | | { | |
| pj_time_val start; /**< Time when session was creat
ed */ | | pj_time_val start; /**< Time when session was creat
ed */ | |
| | | | |
| pjmedia_rtcp_stream_stat tx; /**< Encoder stream statistics.
*/ | | pjmedia_rtcp_stream_stat tx; /**< Encoder stream statistics.
*/ | |
| pjmedia_rtcp_stream_stat rx; /**< Decoder stream statistics.
*/ | | pjmedia_rtcp_stream_stat rx; /**< Decoder stream statistics.
*/ | |
| | | | |
| pj_math_stat rtt; /**< Round trip delay statistic(in usec)
*/ | | pj_math_stat rtt; /**< Round trip delay statistic(in usec)
*/ | |
| | | | |
| pj_uint32_t rtp_tx_last_ts; /**< Last TX RTP timest
amp. */ | | pj_uint32_t rtp_tx_last_ts; /**< Last TX RTP timest
amp. */ | |
| pj_uint16_t rtp_tx_last_seq;/**< Last TX RTP sequen
ce. */ | | pj_uint16_t rtp_tx_last_seq;/**< Last TX RTP sequen
ce. */ | |
| | | | |
| skipping to change at line 220 | | skipping to change at line 210 | |
| pj_math_stat rx_ipdv;/**< Statistics of IP packet delay | | pj_math_stat rx_ipdv;/**< Statistics of IP packet delay | |
| variation in receiving direction | | variation in receiving direction | |
| (in usec).
*/ | | (in usec).
*/ | |
| #endif | | #endif | |
| | | | |
| #if defined(PJMEDIA_RTCP_STAT_HAS_RAW_JITTER) && PJMEDIA_RTCP_STAT_HAS_RAW_
JITTER!=0 | | #if defined(PJMEDIA_RTCP_STAT_HAS_RAW_JITTER) && PJMEDIA_RTCP_STAT_HAS_RAW_
JITTER!=0 | |
| pj_math_stat rx_raw_jitter;/**< Statistic of raw jitter in | | pj_math_stat rx_raw_jitter;/**< Statistic of raw jitter in | |
| receiving direction | | receiving direction | |
| (in usec).
*/ | | (in usec).
*/ | |
| #endif | | #endif | |
|
| }; | | | |
| | | | |
|
| /** | | pjmedia_rtcp_sdes peer_sdes; /**< Peer SDES. | |
| * @see pjmedia_rtcp_stat | | */ | |
| */ | | char peer_sdes_buf_[PJMEDIA_RTCP_RX_SDES_BUF_LEN]; | |
| typedef struct pjmedia_rtcp_stat pjmedia_rtcp_stat; | | /**< Peer SDES buffer. | |
| | | */ | |
| | | | |
| | | } pjmedia_rtcp_stat; | |
| | | | |
| /** | | /** | |
| * RTCP session is used to monitor the RTP session of one endpoint. There | | * RTCP session is used to monitor the RTP session of one endpoint. There | |
| * should only be one RTCP session for a bidirectional RTP streams. | | * should only be one RTCP session for a bidirectional RTP streams. | |
| */ | | */ | |
|
| struct pjmedia_rtcp_session | | typedef struct pjmedia_rtcp_session | |
| { | | { | |
| char *name; /**< Name identification.
*/ | | char *name; /**< Name identification.
*/ | |
| pjmedia_rtcp_sr_pkt rtcp_sr_pkt;/**< Cached RTCP SR packet.
*/ | | pjmedia_rtcp_sr_pkt rtcp_sr_pkt;/**< Cached RTCP SR packet.
*/ | |
| pjmedia_rtcp_rr_pkt rtcp_rr_pkt;/**< Cached RTCP RR packet.
*/ | | pjmedia_rtcp_rr_pkt rtcp_rr_pkt;/**< Cached RTCP RR packet.
*/ | |
| | | | |
| pjmedia_rtp_seq_session seq_ctrl; /**< RTCP sequence number control.
*/ | | pjmedia_rtp_seq_session seq_ctrl; /**< RTCP sequence number control.
*/ | |
| unsigned rtp_last_ts;/**< Last timestamp in RX RTP pkt.
*/ | | unsigned rtp_last_ts;/**< Last timestamp in RX RTP pkt.
*/ | |
| | | | |
| unsigned clock_rate; /**< Clock rate of the stream
*/ | | unsigned clock_rate; /**< Clock rate of the stream
*/ | |
| unsigned pkt_size; /**< Avg pkt size, in samples.
*/ | | unsigned pkt_size; /**< Avg pkt size, in samples.
*/ | |
| | | | |
| skipping to change at line 270 | | skipping to change at line 260 | |
| * Specify whether RTCP XR processing is enabled on this session. | | * Specify whether RTCP XR processing is enabled on this session. | |
| */ | | */ | |
| pj_bool_t xr_enabled; | | pj_bool_t xr_enabled; | |
| | | | |
| /** | | /** | |
| * RTCP XR session, only valid if RTCP XR processing is enabled | | * RTCP XR session, only valid if RTCP XR processing is enabled | |
| * on this session. | | * on this session. | |
| */ | | */ | |
| pjmedia_rtcp_xr_session xr_session; | | pjmedia_rtcp_xr_session xr_session; | |
| #endif | | #endif | |
|
| }; | | } pjmedia_rtcp_session; | |
| | | | |
| /** | | | |
| * @see pjmedia_rtcp_session | | | |
| */ | | | |
| typedef struct pjmedia_rtcp_session pjmedia_rtcp_session; | | | |
| | | | |
| /** | | /** | |
| * RTCP session settings. | | * RTCP session settings. | |
| */ | | */ | |
| typedef struct pjmedia_rtcp_session_setting | | typedef struct pjmedia_rtcp_session_setting | |
| { | | { | |
| char *name; /**< RTCP session name. */ | | char *name; /**< RTCP session name. */ | |
| unsigned clock_rate; /**< Sequence. */ | | unsigned clock_rate; /**< Sequence. */ | |
| unsigned samples_per_frame; /**< Timestamp. */ | | unsigned samples_per_frame; /**< Timestamp. */ | |
| pj_uint32_t ssrc; /**< Sender SSRC.
*/ | | pj_uint32_t ssrc; /**< Sender SSRC.
*/ | |
| | | | |
| skipping to change at line 418 | | skipping to change at line 403 | |
| * @param session The RTCP session. | | * @param session The RTCP session. | |
| * @param rtcp_pkt Upon return, it will contain pointer to the | | * @param rtcp_pkt Upon return, it will contain pointer to the | |
| * RTCP packet, which can be RTCP SR or RR. | | * RTCP packet, which can be RTCP SR or RR. | |
| * @param len Upon return, it will indicate the size of | | * @param len Upon return, it will indicate the size of | |
| * the RTCP packet. | | * the RTCP packet. | |
| */ | | */ | |
| PJ_DECL(void) pjmedia_rtcp_build_rtcp( pjmedia_rtcp_session *session, | | PJ_DECL(void) pjmedia_rtcp_build_rtcp( pjmedia_rtcp_session *session, | |
| void **rtcp_pkt, int *len); | | void **rtcp_pkt, int *len); | |
| | | | |
| /** | | /** | |
|
| | | * Build an RTCP SDES (source description) packet. This packet can be | |
| | | * appended to other RTCP packets, e.g: RTCP RR/SR, to compose a compound | |
| | | * RTCP packet. | |
| | | * | |
| | | * @param session The RTCP session. | |
| | | * @param buf The buffer to receive RTCP SDES packet. | |
| | | * @param length On input, it will contain the buffer length. | |
| | | * On output, it will contain the generated RTCP SDES | |
| | | * packet length. | |
| | | * @param sdes The source description, see #pjmedia_rtcp_sdes. | |
| | | * | |
| | | * @return PJ_SUCCESS on success. | |
| | | */ | |
| | | PJ_DECL(pj_status_t) pjmedia_rtcp_build_rtcp_sdes( | |
| | | pjmedia_rtcp_session *session, | |
| | | void *buf, | |
| | | pj_size_t *length, | |
| | | const pjmedia_rtcp_sdes *sdes); | |
| | | | |
| | | /** | |
| | | * Build an RTCP BYE packet. This packet can be appended to other RTCP | |
| | | * packets, e.g: RTCP RR/SR, to compose a compound RTCP packet. | |
| | | * | |
| | | * @param session The RTCP session. | |
| | | * @param buf The buffer to receive RTCP BYE packet. | |
| | | * @param length On input, it will contain the buffer length. | |
| | | * On output, it will contain the generated RTCP BYE | |
| | | * packet length. | |
| | | * @param reason Optional, the BYE reason. | |
| | | * | |
| | | * @return PJ_SUCCESS on success. | |
| | | */ | |
| | | PJ_DECL(pj_status_t) pjmedia_rtcp_build_rtcp_bye( | |
| | | pjmedia_rtcp_session *session, | |
| | | void *buf, | |
| | | pj_size_t *length, | |
| | | const pj_str_t *reason); | |
| | | | |
| | | /** | |
| * Call this function if RTCP XR needs to be enabled/disabled in the | | * Call this function if RTCP XR needs to be enabled/disabled in the | |
| * RTCP session. | | * RTCP session. | |
| * | | * | |
| * @param session The RTCP session. | | * @param session The RTCP session. | |
| * @param enable Enable/disable RTCP XR. | | * @param enable Enable/disable RTCP XR. | |
| * | | * | |
| * @return PJ_SUCCESS on success. | | * @return PJ_SUCCESS on success. | |
| */ | | */ | |
| PJ_DECL(pj_status_t) pjmedia_rtcp_enable_xr( pjmedia_rtcp_session *session, | | PJ_DECL(pj_status_t) pjmedia_rtcp_enable_xr( pjmedia_rtcp_session *session, | |
| pj_bool_t enable); | | pj_bool_t enable); | |
| | | | |
End of changes. 21 change blocks. |
| 48 lines changed or deleted | | 74 lines changed or added | |
|
| rtcp_xr.h | | rtcp_xr.h | |
|
| /* $Id: rtcp_xr.h 3553 2011-05-05 06:14:19Z nanang $ */ | | /* $Id: rtcp_xr.h 3969 2012-03-08 08:34:30Z nanang $ */ | |
| /* | | /* | |
| * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | | * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | |
| * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | | * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 200 | | skipping to change at line 200 | |
| pj_uint8_t reserved2; /**< Not used */ | | pj_uint8_t reserved2; /**< Not used */ | |
| pj_uint16_t jb_nom; /**< Current delay by jitter | | pj_uint16_t jb_nom; /**< Current delay by jitter | |
| buffer */ | | buffer */ | |
| pj_uint16_t jb_max; /**< Maximum delay by jitter | | pj_uint16_t jb_max; /**< Maximum delay by jitter | |
| buffer */ | | buffer */ | |
| pj_uint16_t jb_abs_max; /**< Maximum possible delay
by | | pj_uint16_t jb_abs_max; /**< Maximum possible delay
by | |
| jitter buffer */ | | jitter buffer */ | |
| } pjmedia_rtcp_xr_rb_voip_mtc; | | } pjmedia_rtcp_xr_rb_voip_mtc; | |
| | | | |
| /** | | /** | |
|
| | | * Constant of RTCP-XR content size. | |
| | | */ | |
| | | #define PJMEDIA_RTCP_XR_BUF_SIZE \ | |
| | | sizeof(pjmedia_rtcp_xr_rb_rr_time) + \ | |
| | | sizeof(pjmedia_rtcp_xr_rb_dlrr) + \ | |
| | | sizeof(pjmedia_rtcp_xr_rb_stats) + \ | |
| | | sizeof(pjmedia_rtcp_xr_rb_voip_mtc) | |
| | | | |
| | | /** | |
| * This structure declares RTCP XR (Extended Report) packet. | | * This structure declares RTCP XR (Extended Report) packet. | |
| */ | | */ | |
| typedef struct pjmedia_rtcp_xr_pkt | | typedef struct pjmedia_rtcp_xr_pkt | |
| { | | { | |
| struct { | | struct { | |
| #if defined(PJ_IS_BIG_ENDIAN) && PJ_IS_BIG_ENDIAN!=0 | | #if defined(PJ_IS_BIG_ENDIAN) && PJ_IS_BIG_ENDIAN!=0 | |
| unsigned version:2; /**< packet type */ | | unsigned version:2; /**< packet type */ | |
| unsigned p:1; /**< padding flag */ | | unsigned p:1; /**< padding flag */ | |
| unsigned count:5; /**< varies by payload type */ | | unsigned count:5; /**< varies by payload type */ | |
| unsigned pt:8; /**< payload type */ | | unsigned pt:8; /**< payload type */ | |
| #else | | #else | |
| unsigned count:5; /**< varies by payload type */ | | unsigned count:5; /**< varies by payload type */ | |
| unsigned p:1; /**< padding flag */ | | unsigned p:1; /**< padding flag */ | |
| unsigned version:2; /**< packet type */ | | unsigned version:2; /**< packet type */ | |
| unsigned pt:8; /**< payload type */ | | unsigned pt:8; /**< payload type */ | |
| #endif | | #endif | |
| unsigned length:16; /**< packet length */ | | unsigned length:16; /**< packet length */ | |
| pj_uint32_t ssrc; /**< SSRC identification */ | | pj_uint32_t ssrc; /**< SSRC identification */ | |
| } common; | | } common; | |
| | | | |
|
| pj_int8_t buf[PJMEDIA_MAX_MTU];/**< Content buffer */ | | pj_int8_t buf[PJMEDIA_RTCP_XR_BUF_SIZE]; | |
| | | /**< Content buffer */ | |
| } pjmedia_rtcp_xr_pkt; | | } pjmedia_rtcp_xr_pkt; | |
| | | | |
| #pragma pack() | | #pragma pack() | |
| | | | |
| /** | | /** | |
| * This structure describes RTCP XR statitic. | | * This structure describes RTCP XR statitic. | |
| */ | | */ | |
| typedef struct pjmedia_rtcp_xr_stream_stat | | typedef struct pjmedia_rtcp_xr_stream_stat | |
| { | | { | |
| struct { | | struct { | |
| | | | |
End of changes. 3 change blocks. |
| 2 lines changed or deleted | | 12 lines changed or added | |
|
| sip_config.h | | sip_config.h | |
|
| /* $Id: sip_config.h 3586 2011-06-16 13:15:04Z nanang $ */ | | /* $Id: sip_config.h 4091 2012-04-26 09:20:07Z bennylp $ */ | |
| /* | | /* | |
| * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | | * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | |
| * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | | * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 84 | | skipping to change at line 84 | |
| * Specify port number should be allowed to appear in To and From | | * Specify port number should be allowed to appear in To and From | |
| * header. Note that RFC 3261 disallow this, see Table 1 in section | | * header. Note that RFC 3261 disallow this, see Table 1 in section | |
| * 19.1.1 of the RFC. Default is PJSIP_ALLOW_PORT_IN_FROMTO_HDR. | | * 19.1.1 of the RFC. Default is PJSIP_ALLOW_PORT_IN_FROMTO_HDR. | |
| */ | | */ | |
| pj_bool_t allow_port_in_fromto_hdr; | | pj_bool_t allow_port_in_fromto_hdr; | |
| | | | |
| /** | | /** | |
| * Disable rport in request. | | * Disable rport in request. | |
| */ | | */ | |
| pj_bool_t disable_rport; | | pj_bool_t disable_rport; | |
|
| | | | |
| | | /** | |
| | | * Disable automatic switching from UDP to TCP if outgoing request | |
| | | * is greater than 1300 bytes. See PJSIP_DONT_SWITCH_TO_TCP. | |
| | | */ | |
| | | pj_bool_t disable_tcp_switch; | |
| | | | |
| } endpt; | | } endpt; | |
| | | | |
| /** Transaction layer settings. */ | | /** Transaction layer settings. */ | |
| struct { | | struct { | |
| | | | |
| /** Maximum number of transactions. The value is initialized with | | /** Maximum number of transactions. The value is initialized with | |
| * PJSIP_MAX_TSX_COUNT | | * PJSIP_MAX_TSX_COUNT | |
| */ | | */ | |
| unsigned max_count; | | unsigned max_count; | |
| | | | |
| | | | |
| skipping to change at line 246 | | skipping to change at line 253 | |
| /** | | /** | |
| * RFC 3261 section 18.1.1: | | * RFC 3261 section 18.1.1: | |
| * If a request is within 200 bytes of the path MTU, or if it is larger | | * If a request is within 200 bytes of the path MTU, or if it is larger | |
| * than 1300 bytes and the path MTU is unknown, the request MUST be sent | | * than 1300 bytes and the path MTU is unknown, the request MUST be sent | |
| * using an RFC 2914 [43] congestion controlled transport protocol, such | | * using an RFC 2914 [43] congestion controlled transport protocol, such | |
| * as TCP. | | * as TCP. | |
| * | | * | |
| * Disable the behavior of automatic switching to TCP whenever UDP packet | | * Disable the behavior of automatic switching to TCP whenever UDP packet | |
| * size exceeds the threshold defined in PJSIP_UDP_SIZE_THRESHOLD. | | * size exceeds the threshold defined in PJSIP_UDP_SIZE_THRESHOLD. | |
| * | | * | |
|
| | | * This option can also be controlled at run-time by the \a disable_tcp_swi | |
| | | tch | |
| | | * setting in pjsip_cfg_t. | |
| | | * | |
| * Default is 0 (no). | | * Default is 0 (no). | |
| */ | | */ | |
| #ifndef PJSIP_DONT_SWITCH_TO_TCP | | #ifndef PJSIP_DONT_SWITCH_TO_TCP | |
| # define PJSIP_DONT_SWITCH_TO_TCP 0 | | # define PJSIP_DONT_SWITCH_TO_TCP 0 | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
| * This setting controls the threshold of the UDP packet, which if it's | | * This setting controls the threshold of the UDP packet, which if it's | |
| * larger than this value the request will be sent with TCP. This setting | | * larger than this value the request will be sent with TCP. This setting | |
| * is useful only when PJSIP_DONT_SWITCH_TO_TCP is set to 0. | | * is useful only when PJSIP_DONT_SWITCH_TO_TCP is set to 0. | |
| | | | |
| skipping to change at line 403 | | skipping to change at line 413 | |
| /** | | /** | |
| * Max entries to process in timer heap per poll. | | * Max entries to process in timer heap per poll. | |
| * | | * | |
| * Default: 10 | | * Default: 10 | |
| */ | | */ | |
| #ifndef PJSIP_MAX_TIMED_OUT_ENTRIES | | #ifndef PJSIP_MAX_TIMED_OUT_ENTRIES | |
| # define PJSIP_MAX_TIMED_OUT_ENTRIES 10 | | # define PJSIP_MAX_TIMED_OUT_ENTRIES 10 | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
|
| * Idle timeout interval to be applied to transports with no usage | | * Idle timeout interval to be applied to outgoing transports (i.e. client | |
| * before the transport is destroyed. Value is in seconds. | | * side) with no usage before the transport is destroyed. Value is in | |
| | | * seconds. | |
| | | * | |
| | | * Note that if the value is put lower than 33 seconds, it may cause some | |
| | | * pjsip test units to fail. See the comment on the following link: | |
| | | * https://trac.pjsip.org/repos/ticket/1465#comment:4 | |
| * | | * | |
|
| * Default: 600 | | * Default: 33 | |
| */ | | */ | |
| #ifndef PJSIP_TRANSPORT_IDLE_TIME | | #ifndef PJSIP_TRANSPORT_IDLE_TIME | |
|
| # define PJSIP_TRANSPORT_IDLE_TIME 600 | | # define PJSIP_TRANSPORT_IDLE_TIME 33 | |
| | | #endif | |
| | | | |
| | | /** | |
| | | * Idle timeout interval to be applied to incoming transports (i.e. server | |
| | | * side) with no usage before the transport is destroyed. Server typically | |
| | | * should let client close the connection, hence set this interval to a lar | |
| | | ge | |
| | | * value. Value is in seconds. | |
| | | * | |
| | | * Default: 600 | |
| | | */ | |
| | | #ifndef PJSIP_TRANSPORT_SERVER_IDLE_TIME | |
| | | # define PJSIP_TRANSPORT_SERVER_IDLE_TIME 600 | |
| #endif | | #endif | |
| | | | |
| /** | | /** | |
| * Maximum number of usages for a transport before a new transport is | | * Maximum number of usages for a transport before a new transport is | |
| * created. This only applies for ephemeral transports such as TCP. | | * created. This only applies for ephemeral transports such as TCP. | |
| * | | * | |
| * Currently this is not used. | | * Currently this is not used. | |
| * | | * | |
| * Default: -1 | | * Default: -1 | |
| */ | | */ | |
| | | | |
End of changes. 6 change blocks. |
| 5 lines changed or deleted | | 34 lines changed or added | |
|
| sip_endpoint.h | | sip_endpoint.h | |
|
| /* $Id: sip_endpoint.h 3828 2011-10-19 10:13:13Z bennylp $ */ | | /* $Id: sip_endpoint.h 3988 2012-03-28 07:32:42Z nanang $ */ | |
| /* | | /* | |
| * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | | * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | |
| * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | | * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 66 | | skipping to change at line 66 | |
| * existing modules (such as when incoming request has unsupported metho
d). | | * existing modules (such as when incoming request has unsupported metho
d). | |
| * - and so on.. | | * - and so on.. | |
| * | | * | |
| * Application should only instantiate one SIP endpoint instance for every | | * Application should only instantiate one SIP endpoint instance for every | |
| * process. | | * process. | |
| * | | * | |
| * @{ | | * @{ | |
| */ | | */ | |
| | | | |
| /** | | /** | |
|
| | | * Type of callback to register to pjsip_endpt_atexit(). | |
| | | */ | |
| | | typedef void (*pjsip_endpt_exit_callback)(pjsip_endpoint *endpt); | |
| | | | |
| | | /** | |
| * Create an instance of SIP endpoint from the specified pool factory. | | * Create an instance of SIP endpoint from the specified pool factory. | |
| * The pool factory reference then will be kept by the endpoint, so that | | * The pool factory reference then will be kept by the endpoint, so that | |
| * future memory allocations by SIP components will be taken from the same | | * future memory allocations by SIP components will be taken from the same | |
| * pool factory. | | * pool factory. | |
| * | | * | |
| * @param pf Pool factory that will be used for the lifetime of | | * @param pf Pool factory that will be used for the lifetime of | |
| * endpoint. | | * endpoint. | |
| * @param name Optional name to be specified for the endpoint. | | * @param name Optional name to be specified for the endpoint. | |
| * If this parameter is NULL, then the name will use | | * If this parameter is NULL, then the name will use | |
| * local host name. | | * local host name. | |
| | | | |
| skipping to change at line 506 | | skipping to change at line 511 | |
| * with log level 3. | | * with log level 3. | |
| * | | * | |
| * @param endpt The endpoint. | | * @param endpt The endpoint. | |
| * @param detail If non zero, then it will dump a detailed output. | | * @param detail If non zero, then it will dump a detailed output. | |
| * BEWARE that this option may crash the system because | | * BEWARE that this option may crash the system because | |
| * it tries to access all memory pools. | | * it tries to access all memory pools. | |
| */ | | */ | |
| PJ_DECL(void) pjsip_endpt_dump( pjsip_endpoint *endpt, pj_bool_t detail ); | | PJ_DECL(void) pjsip_endpt_dump( pjsip_endpoint *endpt, pj_bool_t detail ); | |
| | | | |
| /** | | /** | |
|
| | | * Register cleanup function to be called by SIP endpoint when | |
| | | * #pjsip_endpt_destroy() is called. Note that application should not | |
| | | * use or access any endpoint resource (such as pool, ioqueue, timer heap) | |
| | | * from within the callback as such resource may have been released when | |
| | | * the callback function is invoked. | |
| | | * | |
| | | * @param endpt The SIP endpoint. | |
| | | * @param func The function to be registered. | |
| | | * | |
| | | * @return PJ_SUCCESS on success. | |
| | | */ | |
| | | PJ_DECL(pj_status_t) pjsip_endpt_atexit(pjsip_endpoint *endpt, | |
| | | pjsip_endpt_exit_callback func); | |
| | | | |
| | | /** | |
| * @} | | * @} | |
| */ | | */ | |
| | | | |
| /** | | /** | |
| * Log an error. | | * Log an error. | |
| */ | | */ | |
| PJ_DECL(void) pjsip_endpt_log_error( pjsip_endpoint *endpt, | | PJ_DECL(void) pjsip_endpt_log_error( pjsip_endpoint *endpt, | |
| const char *sender, | | const char *sender, | |
| pj_status_t error_code, | | pj_status_t error_code, | |
| const char *format, | | const char *format, | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 21 lines changed or added | |
|
| sip_transport_tls.h | | sip_transport_tls.h | |
|
| /* $Id: sip_transport_tls.h 3553 2011-05-05 06:14:19Z nanang $ */ | | /* $Id: sip_transport_tls.h 3943 2012-01-17 07:02:14Z nanang $ */ | |
| /* | | /* | |
| * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | | * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com) | |
| * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | | * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> | |
| * | | * | |
| * This program is free software; you can redistribute it and/or modify | | * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | | * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | | * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | | * (at your option) any later version. | |
| * | | * | |
| * This program is distributed in the hope that it will be useful, | | * This program is distributed in the hope that it will be useful, | |
| | | | |
| skipping to change at line 29 | | skipping to change at line 29 | |
| */ | | */ | |
| #ifndef __PJSIP_TRANSPORT_TLS_H__ | | #ifndef __PJSIP_TRANSPORT_TLS_H__ | |
| #define __PJSIP_TRANSPORT_TLS_H__ | | #define __PJSIP_TRANSPORT_TLS_H__ | |
| | | | |
| /** | | /** | |
| * @file sip_transport_tls.h | | * @file sip_transport_tls.h | |
| * @brief SIP TLS Transport. | | * @brief SIP TLS Transport. | |
| */ | | */ | |
| | | | |
| #include <pjsip/sip_transport.h> | | #include <pjsip/sip_transport.h> | |
|
| | | #include <pj/pool.h> | |
| #include <pj/ssl_sock.h> | | #include <pj/ssl_sock.h> | |
| #include <pj/string.h> | | #include <pj/string.h> | |
| #include <pj/sock_qos.h> | | #include <pj/sock_qos.h> | |
| | | | |
| PJ_BEGIN_DECL | | PJ_BEGIN_DECL | |
| | | | |
| /** | | /** | |
| * @defgroup PJSIP_TRANSPORT_TLS TLS Transport | | * @defgroup PJSIP_TRANSPORT_TLS TLS Transport | |
| * @ingroup PJSIP_TRANSPORT | | * @ingroup PJSIP_TRANSPORT | |
| * @brief API to create and register TLS transport. | | * @brief API to create and register TLS transport. | |
| | | | |
| skipping to change at line 105 | | skipping to change at line 106 | |
| * - PJSIP_SSLV3_METHOD(3): SSL3 | | * - PJSIP_SSLV3_METHOD(3): SSL3 | |
| * - PJSIP_SSLV23_METHOD(23): SSL23 | | * - PJSIP_SSLV23_METHOD(23): SSL23 | |
| * | | * | |
| * Default is PJSIP_SSL_UNSPECIFIED_METHOD (0), which in turn will | | * Default is PJSIP_SSL_UNSPECIFIED_METHOD (0), which in turn will | |
| * use PJSIP_SSL_DEFAULT_METHOD, which default value is | | * use PJSIP_SSL_DEFAULT_METHOD, which default value is | |
| * PJSIP_TLSV1_METHOD. | | * PJSIP_TLSV1_METHOD. | |
| */ | | */ | |
| int method; | | int method; | |
| | | | |
| /** | | /** | |
|
| * TLS cipher list string in OpenSSL format. If empty, then default | | * Number of ciphers contained in the specified cipher preference. | |
| * cipher list of the backend will be used. | | * If this is set to zero, then default cipher list of the backend | |
| | | * will be used. | |
| | | * | |
| | | * Default: 0 (zero). | |
| */ | | */ | |
|
| pj_str_t ciphers; | | unsigned ciphers_num; | |
| | | | |
| /** | | /** | |
|
| * Optionally specify the server name instance to be contacted when | | * Ciphers and order preference. The #pj_ssl_cipher_get_availables() | |
| * making outgoing TLS connection. This setting is useful when the | | * can be used to check the available ciphers supported by backend. | |
| * server is hosting multiple domains for the same TLS listening | | | |
| * socket. | | | |
| * | | | |
| * Default: empty. | | | |
| */ | | */ | |
|
| pj_str_t server_name; | | pj_ssl_cipher *ciphers; | |
| | | | |
| /** | | /** | |
| * Specifies TLS transport behavior on the server TLS certificate | | * Specifies TLS transport behavior on the server TLS certificate | |
| * verification result: | | * verification result: | |
| * - If \a verify_server is disabled (set to PJ_FALSE), TLS transport | | * - If \a verify_server is disabled (set to PJ_FALSE), TLS transport | |
| * will just notify the application via #pjsip_tp_state_callback with | | * will just notify the application via #pjsip_tp_state_callback with | |
| * state PJSIP_TP_STATE_CONNECTED regardless TLS verification result. | | * state PJSIP_TP_STATE_CONNECTED regardless TLS verification result. | |
| * - If \a verify_server is enabled (set to PJ_TRUE), TLS transport | | * - If \a verify_server is enabled (set to PJ_TRUE), TLS transport | |
| * will be shutdown and application will be notified with state | | * will be shutdown and application will be notified with state | |
| * PJSIP_TP_STATE_DISCONNECTED whenever there is any TLS verification | | * PJSIP_TP_STATE_DISCONNECTED whenever there is any TLS verification | |
| | | | |
| skipping to change at line 242 | | skipping to change at line 242 | |
| */ | | */ | |
| PJ_INLINE(void) pjsip_tls_setting_copy(pj_pool_t *pool, | | PJ_INLINE(void) pjsip_tls_setting_copy(pj_pool_t *pool, | |
| pjsip_tls_setting *dst, | | pjsip_tls_setting *dst, | |
| const pjsip_tls_setting *src) | | const pjsip_tls_setting *src) | |
| { | | { | |
| pj_memcpy(dst, src, sizeof(*dst)); | | pj_memcpy(dst, src, sizeof(*dst)); | |
| pj_strdup_with_null(pool, &dst->ca_list_file, &src->ca_list_file); | | pj_strdup_with_null(pool, &dst->ca_list_file, &src->ca_list_file); | |
| pj_strdup_with_null(pool, &dst->cert_file, &src->cert_file); | | pj_strdup_with_null(pool, &dst->cert_file, &src->cert_file); | |
| pj_strdup_with_null(pool, &dst->privkey_file, &src->privkey_file); | | pj_strdup_with_null(pool, &dst->privkey_file, &src->privkey_file); | |
| pj_strdup_with_null(pool, &dst->password, &src->password); | | pj_strdup_with_null(pool, &dst->password, &src->password); | |
|
| pj_strdup_with_null(pool, &dst->ciphers, &src->ciphers); | | if (src->ciphers_num) { | |
| | | unsigned i; | |
| | | dst->ciphers = (pj_ssl_cipher*) pj_pool_calloc(pool, src->ciphers_nu | |
| | | m, | |
| | | sizeof(pj_ssl_cipher) | |
| | | ); | |
| | | for (i=0; i<src->ciphers_num; ++i) | |
| | | dst->ciphers[i] = src->ciphers[i]; | |
| | | } | |
| } | | } | |
| | | | |
| /** | | /** | |
| * Register support for SIP TLS transport by creating TLS listener on | | * Register support for SIP TLS transport by creating TLS listener on | |
| * the specified address and port. This function will create an | | * the specified address and port. This function will create an | |
| * instance of SIP TLS transport factory and register it to the | | * instance of SIP TLS transport factory and register it to the | |
| * transport manager. | | * transport manager. | |
| * | | * | |
| * @param endpt The SIP endpoint. | | * @param endpt The SIP endpoint. | |
| * @param opt Optional TLS settings. | | * @param opt Optional TLS settings. | |
| | | | |
End of changes. 7 change blocks. |
| 12 lines changed or deleted | | 20 lines changed or added | |
|