diff options
Diffstat (limited to 'channels/sip/include')
-rw-r--r-- | channels/sip/include/sdp_crypto.h | 85 | ||||
-rw-r--r-- | channels/sip/include/sip.h | 6 | ||||
-rw-r--r-- | channels/sip/include/srtp.h | 59 |
3 files changed, 3 insertions, 147 deletions
diff --git a/channels/sip/include/sdp_crypto.h b/channels/sip/include/sdp_crypto.h deleted file mode 100644 index da1035e87..000000000 --- a/channels/sip/include/sdp_crypto.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Asterisk -- An open source telephony toolkit. - * - * Copyright (C) 2006 - 2007, Mikael Magnusson - * - * Mikael Magnusson <mikma@users.sourceforge.net> - * - * See http://www.asterisk.org for more information about - * the Asterisk project. Please do not directly contact - * any of the maintainers of this project for assistance; - * the project provides a web site, mailing lists and IRC - * channels for your use. - * - * This program is free software, distributed under the terms of - * the GNU General Public License Version 2. See the LICENSE file - * at the top of the source tree. - */ - -/*! \file sdp_crypto.h - * - * \brief SDP Security descriptions - * - * Specified in RFC 4568 - * - * \author Mikael Magnusson <mikma@users.sourceforge.net> - */ - -#ifndef _SDP_CRYPTO_H -#define _SDP_CRYPTO_H - -#include <asterisk/rtp_engine.h> - -struct sdp_crypto; -struct sip_srtp; - -/*! \brief Initialize an return an sdp_crypto struct - * - * \details - * This function allocates a new sdp_crypto struct and initializes its values - * - * \retval NULL on failure - * \retval a pointer to a new sdp_crypto structure - */ -struct sdp_crypto *sdp_crypto_setup(void); - -/*! \brief Destroy a previously allocated sdp_crypto struct */ -void sdp_crypto_destroy(struct sdp_crypto *crypto); - -/*! \brief Parse the a=crypto line from SDP and set appropriate values on the - * sdp_crypto struct. - * - * \param p A valid sdp_crypto struct - * \param attr the a:crypto line from SDP - * \param rtp The rtp instance associated with the SDP being parsed - * \param srtp SRTP structure - * - * \retval 0 success - * \retval nonzero failure - */ -int sdp_crypto_process(struct sdp_crypto *p, const char *attr, struct ast_rtp_instance *rtp, struct sip_srtp *srtp); - - -/*! \brief Generate an SRTP a=crypto offer - * - * \details - * The offer is stored on the sdp_crypto struct in a_crypto - * - * \param p A valid sdp_crypto struct - * \param taglen Length - * - * \retval 0 success - * \retval nonzero failure - */ -int sdp_crypto_offer(struct sdp_crypto *p, int taglen); - - -/*! \brief Return the a_crypto value of the sdp_crypto struct - * - * \param p An sdp_crypto struct that has had sdp_crypto_offer called - * - * \retval The value of the a_crypto for p - */ -const char *sdp_crypto_attrib(struct sdp_crypto *p); - -#endif /* _SDP_CRYPTO_H */ diff --git a/channels/sip/include/sip.h b/channels/sip/include/sip.h index 0adde37f2..8b4672b25 100644 --- a/channels/sip/include/sip.h +++ b/channels/sip/include/sip.h @@ -1165,9 +1165,9 @@ struct sip_pvt { AST_LIST_HEAD_NOLOCK(request_queue, sip_request) request_queue; /*!< Requests that arrived but could not be processed immediately */ struct sip_invite_param *options; /*!< Options for INVITE */ struct sip_st_dlg *stimer; /*!< SIP Session-Timers */ - struct sip_srtp *srtp; /*!< Structure to hold Secure RTP session data for audio */ - struct sip_srtp *vsrtp; /*!< Structure to hold Secure RTP session data for video */ - struct sip_srtp *tsrtp; /*!< Structure to hold Secure RTP session data for text */ + struct ast_sdp_srtp *srtp; /*!< Structure to hold Secure RTP session data for audio */ + struct ast_sdp_srtp *vsrtp; /*!< Structure to hold Secure RTP session data for video */ + struct ast_sdp_srtp *tsrtp; /*!< Structure to hold Secure RTP session data for text */ int red; /*!< T.140 RTP Redundancy */ int hangupcause; /*!< Storage of hangupcause copied from our owner before we disconnect from the AST channel (only used at hangup) */ diff --git a/channels/sip/include/srtp.h b/channels/sip/include/srtp.h deleted file mode 100644 index a4ded62ca..000000000 --- a/channels/sip/include/srtp.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Asterisk -- An open source telephony toolkit. - * - * Copyright (C) 2006 - 2007, Mikael Magnusson - * - * Mikael Magnusson <mikma@users.sourceforge.net> - * - * See http://www.asterisk.org for more information about - * the Asterisk project. Please do not directly contact - * any of the maintainers of this project for assistance; - * the project provides a web site, mailing lists and IRC - * channels for your use. - * - * This program is free software, distributed under the terms of - * the GNU General Public License Version 2. See the LICENSE file - * at the top of the source tree. - */ - -/*! \file srtp.h - * - * \brief SIP Secure RTP (SRTP) - * - * Specified in RFC 3711 - * - * \author Mikael Magnusson <mikma@users.sourceforge.net> - */ - -#ifndef _SIP_SRTP_H -#define _SIP_SRTP_H - -#include "sdp_crypto.h" - -/* SRTP flags */ -#define SRTP_ENCR_OPTIONAL (1 << 1) /* SRTP encryption optional */ -#define SRTP_CRYPTO_ENABLE (1 << 2) -#define SRTP_CRYPTO_OFFER_OK (1 << 3) -#define SRTP_CRYPTO_TAG_32 (1 << 4) -#define SRTP_CRYPTO_TAG_80 (1 << 5) - -/*! \brief structure for secure RTP audio */ -struct sip_srtp { - unsigned int flags; - struct sdp_crypto *crypto; -}; - -/*! - * \brief allocate a sip_srtp structure - * \retval a new malloc'd sip_srtp structure on success - * \retval NULL on failure -*/ -struct sip_srtp *sip_srtp_alloc(void); - -/*! - * \brief free a sip_srtp structure - * \param srtp a sip_srtp structure -*/ -void sip_srtp_destroy(struct sip_srtp *srtp); - -#endif /* _SIP_SRTP_H */ |