[asterisk-commits] branch oej/securertp - r7893
/team/oej/securertp/rtp.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Jan 9 10:31:43 CST 2006
Author: oej
Date: Mon Jan 9 10:31:41 2006
New Revision: 7893
URL: http://svn.digium.com/view/asterisk?rev=7893&view=rev
Log:
Formatting changes
Modified:
team/oej/securertp/rtp.c
Modified: team/oej/securertp/rtp.c
URL: http://svn.digium.com/view/asterisk/team/oej/securertp/rtp.c?rev=7893&r1=7892&r2=7893&view=diff
==============================================================================
--- team/oej/securertp/rtp.c (original)
+++ team/oej/securertp/rtp.c Mon Jan 9 10:31:41 2006
@@ -127,7 +127,7 @@
int rtp_lookup_code_cache_code;
int rtp_lookup_code_cache_result;
struct ast_rtcp *rtcp;
- struct ast_srtp *srtp;
+ struct ast_srtp *srtp; /*!< Secure RTP */
};
/*!
@@ -354,6 +354,7 @@
return f;
}
+/*! \brief Register SRTP module in res_srtp to rtp core */
int ast_rtp_register_srtp(struct ast_srtp_res *srtp_res,
struct ast_srtp_policy_res *policy_res)
{
@@ -376,6 +377,7 @@
return 0;
}
+/*! \brief Check if there's a SRTP module registred and available */
int ast_srtp_is_registered(void)
{
return g_srtp_res && g_policy_res;
@@ -395,9 +397,7 @@
g_srtp_res->set_cb(rtp->srtp, cb, data);
}
-void
-ast_srtp_policy_set_ssrc(struct ast_srtp_policy *policy,
- unsigned long ssrc, int inbound)
+void ast_srtp_policy_set_ssrc(struct ast_srtp_policy *policy, unsigned long ssrc, int inbound)
{
if (!g_policy_res)
return;
@@ -429,8 +429,7 @@
return g_policy_res->alloc();
}
-void
-ast_srtp_policy_destroy(struct ast_srtp_policy *policy)
+void ast_srtp_policy_destroy(struct ast_srtp_policy *policy)
{
if (!g_policy_res)
return;
@@ -438,9 +437,8 @@
g_policy_res->destroy(policy);
}
-int
-ast_srtp_policy_set_suite(struct ast_srtp_policy *policy,
- enum ast_srtp_suite suite)
+int ast_srtp_policy_set_suite(struct ast_srtp_policy *policy,
+ enum ast_srtp_suite suite)
{
if (!g_policy_res)
return -1;
@@ -448,21 +446,18 @@
return g_policy_res->set_suite(policy, suite);
}
-int
-ast_srtp_policy_set_master_key(struct ast_srtp_policy *policy,
- const unsigned char *key, size_t key_len,
- const unsigned char *salt, size_t salt_len)
+int ast_srtp_policy_set_master_key(struct ast_srtp_policy *policy,
+ const unsigned char *key, size_t key_len,
+ const unsigned char *salt, size_t salt_len)
{
if (!g_policy_res)
return -1;
- return g_policy_res->set_master_key(policy, key, key_len,
- salt, salt_len);
-}
-
-int
-ast_srtp_policy_set_encr_alg(struct ast_srtp_policy *policy,
- enum ast_srtp_ealg ealg)
+ return g_policy_res->set_master_key(policy, key, key_len, salt, salt_len);
+}
+
+int ast_srtp_policy_set_encr_alg(struct ast_srtp_policy *policy,
+ enum ast_srtp_ealg ealg)
{
if (!g_policy_res)
return -1;
@@ -470,8 +465,7 @@
return g_policy_res->set_encr_alg(policy, ealg);
}
-int
-ast_srtp_policy_set_auth_alg(struct ast_srtp_policy *policy,
+int ast_srtp_policy_set_auth_alg(struct ast_srtp_policy *policy,
enum ast_srtp_aalg aalg)
{
if (!g_policy_res)
@@ -488,8 +482,7 @@
return g_policy_res->set_encr_keylen(policy, ekeyl);
}
-void
-ast_srtp_policy_set_auth_keylen(struct ast_srtp_policy *policy,
+void ast_srtp_policy_set_auth_keylen(struct ast_srtp_policy *policy,
int akeyl)
{
if (!g_policy_res)
@@ -498,8 +491,7 @@
return g_policy_res->set_auth_keylen(policy, akeyl);
}
-void
-ast_srtp_policy_set_srtp_auth_taglen(struct ast_srtp_policy *policy,
+void ast_srtp_policy_set_srtp_auth_taglen(struct ast_srtp_policy *policy,
int autht)
{
if (!g_policy_res)
@@ -508,8 +500,7 @@
return g_policy_res->set_srtp_auth_taglen(policy, autht);
}
-void
-ast_srtp_policy_set_srtp_encr_enable(struct ast_srtp_policy *policy,
+void ast_srtp_policy_set_srtp_encr_enable(struct ast_srtp_policy *policy,
int enable)
{
if (!g_policy_res)
@@ -518,8 +509,7 @@
return g_policy_res->set_srtp_encr_enable(policy, enable);
}
-void
-ast_srtp_policy_set_srtcp_encr_enable(struct ast_srtp_policy *policy,
+void ast_srtp_policy_set_srtcp_encr_enable(struct ast_srtp_policy *policy,
int enable)
{
if (!g_policy_res)
@@ -528,8 +518,7 @@
return g_policy_res->set_srtcp_encr_enable(policy, enable);
}
-void
-ast_srtp_policy_set_srtp_auth_enable(struct ast_srtp_policy *policy,
+void ast_srtp_policy_set_srtp_auth_enable(struct ast_srtp_policy *policy,
int enable)
{
if (!g_policy_res)
More information about the asterisk-commits
mailing list