|
@@ -64,7 +64,7 @@ static str s_empty = {0, 0};
|
|
* @param func - the name of the calling function, for debugging purposes
|
|
* @param func - the name of the calling function, for debugging purposes
|
|
* @returns 1 on success or 0 on failure
|
|
* @returns 1 on success or 0 on failure
|
|
*/
|
|
*/
|
|
-static inline int cxdx_add_avp(AAAMessage *m,char *d,int len,int avp_code,
|
|
|
|
|
|
+static int cxdx_add_avp(AAAMessage *m,char *d,int len,int avp_code,
|
|
int flags,int vendorid,int data_do,const char *func)
|
|
int flags,int vendorid,int data_do,const char *func)
|
|
{
|
|
{
|
|
AAA_AVP *avp;
|
|
AAA_AVP *avp;
|
|
@@ -94,7 +94,7 @@ static inline int cxdx_add_avp(AAAMessage *m,char *d,int len,int avp_code,
|
|
* @param func - the name of the calling function, for debugging purposes
|
|
* @param func - the name of the calling function, for debugging purposes
|
|
* @returns 1 on success or 0 on failure
|
|
* @returns 1 on success or 0 on failure
|
|
*/
|
|
*/
|
|
-static inline int cxdx_add_avp_list(AAA_AVP_LIST *list,char *d,int len,int avp_code,
|
|
|
|
|
|
+static int cxdx_add_avp_list(AAA_AVP_LIST *list,char *d,int len,int avp_code,
|
|
int flags,int vendorid,int data_do,const char *func)
|
|
int flags,int vendorid,int data_do,const char *func)
|
|
{
|
|
{
|
|
AAA_AVP *avp;
|
|
AAA_AVP *avp;
|
|
@@ -127,7 +127,7 @@ static inline int cxdx_add_avp_list(AAA_AVP_LIST *list,char *d,int len,int avp_c
|
|
* @param func - the name of the calling function, for debugging purposes
|
|
* @param func - the name of the calling function, for debugging purposes
|
|
* @returns the str with the payload on success or an empty string on failure
|
|
* @returns the str with the payload on success or an empty string on failure
|
|
*/
|
|
*/
|
|
-static inline str cxdx_get_avp(AAAMessage *msg,int avp_code,int vendor_id,
|
|
|
|
|
|
+static str cxdx_get_avp(AAAMessage *msg,int avp_code,int vendor_id,
|
|
const char *func)
|
|
const char *func)
|
|
{
|
|
{
|
|
AAA_AVP *avp;
|
|
AAA_AVP *avp;
|
|
@@ -142,7 +142,7 @@ static inline str cxdx_get_avp(AAAMessage *msg,int avp_code,int vendor_id,
|
|
return avp->data;
|
|
return avp->data;
|
|
}
|
|
}
|
|
|
|
|
|
-inline int cxdx_add_call_id(AAAMessage *msg, str data)
|
|
|
|
|
|
+int cxdx_add_call_id(AAAMessage *msg, str data)
|
|
{
|
|
{
|
|
return
|
|
return
|
|
cxdx_add_avp(msg,data.s,data.len,
|
|
cxdx_add_avp(msg,data.s,data.len,
|
|
@@ -159,7 +159,7 @@ inline int cxdx_add_call_id(AAAMessage *msg, str data)
|
|
* @param data - the value for the AVP payload
|
|
* @param data - the value for the AVP payload
|
|
* @returns 1 on success or 0 on error
|
|
* @returns 1 on success or 0 on error
|
|
*/
|
|
*/
|
|
-inline int cxdx_add_destination_realm(AAAMessage *msg,str data)
|
|
|
|
|
|
+int cxdx_add_destination_realm(AAAMessage *msg,str data)
|
|
{
|
|
{
|
|
return
|
|
return
|
|
cxdx_add_avp(msg,data.s,data.len,
|
|
cxdx_add_avp(msg,data.s,data.len,
|
|
@@ -179,7 +179,7 @@ inline int cxdx_add_destination_realm(AAAMessage *msg,str data)
|
|
* @param acct_id - the accounting application id
|
|
* @param acct_id - the accounting application id
|
|
* @returns 1 on success or 0 on error
|
|
* @returns 1 on success or 0 on error
|
|
*/
|
|
*/
|
|
-inline int cxdx_add_vendor_specific_appid(AAAMessage *msg,unsigned int vendor_id,
|
|
|
|
|
|
+int cxdx_add_vendor_specific_appid(AAAMessage *msg,unsigned int vendor_id,
|
|
unsigned int auth_id,unsigned int acct_id)
|
|
unsigned int auth_id,unsigned int acct_id)
|
|
{
|
|
{
|
|
AAA_AVP_LIST list;
|
|
AAA_AVP_LIST list;
|
|
@@ -237,7 +237,7 @@ inline int cxdx_add_vendor_specific_appid(AAAMessage *msg,unsigned int vendor_id
|
|
* @param data - the value for the AVP payload
|
|
* @param data - the value for the AVP payload
|
|
* @returns 1 on success or 0 on error
|
|
* @returns 1 on success or 0 on error
|
|
*/
|
|
*/
|
|
-inline int cxdx_add_auth_session_state(AAAMessage *msg,unsigned int data)
|
|
|
|
|
|
+int cxdx_add_auth_session_state(AAAMessage *msg,unsigned int data)
|
|
{
|
|
{
|
|
char x[4];
|
|
char x[4];
|
|
set_4bytes(x,data);
|
|
set_4bytes(x,data);
|
|
@@ -256,7 +256,7 @@ inline int cxdx_add_auth_session_state(AAAMessage *msg,unsigned int data)
|
|
* @param data - the value for the AVP payload
|
|
* @param data - the value for the AVP payload
|
|
* @returns 1 on success or 0 on error
|
|
* @returns 1 on success or 0 on error
|
|
*/
|
|
*/
|
|
-inline int cxdx_add_user_name(AAAMessage *msg,str data)
|
|
|
|
|
|
+int cxdx_add_user_name(AAAMessage *msg,str data)
|
|
{
|
|
{
|
|
return
|
|
return
|
|
cxdx_add_avp(msg,data.s,data.len,
|
|
cxdx_add_avp(msg,data.s,data.len,
|
|
@@ -273,7 +273,7 @@ inline int cxdx_add_user_name(AAAMessage *msg,str data)
|
|
* @param data - the value for the AVP payload
|
|
* @param data - the value for the AVP payload
|
|
* @returns 1 on success or 0 on error
|
|
* @returns 1 on success or 0 on error
|
|
*/
|
|
*/
|
|
-inline int cxdx_add_public_identity(AAAMessage *msg,str data)
|
|
|
|
|
|
+int cxdx_add_public_identity(AAAMessage *msg,str data)
|
|
{
|
|
{
|
|
return
|
|
return
|
|
cxdx_add_avp(msg,data.s,data.len,
|
|
cxdx_add_avp(msg,data.s,data.len,
|
|
@@ -290,7 +290,7 @@ inline int cxdx_add_public_identity(AAAMessage *msg,str data)
|
|
* @param data - the value for the AVP payload
|
|
* @param data - the value for the AVP payload
|
|
* @returns 1 on success or 0 on error
|
|
* @returns 1 on success or 0 on error
|
|
*/
|
|
*/
|
|
-inline int cxdx_add_visited_network_id(AAAMessage *msg,str data)
|
|
|
|
|
|
+int cxdx_add_visited_network_id(AAAMessage *msg,str data)
|
|
{
|
|
{
|
|
return
|
|
return
|
|
cxdx_add_avp(msg,data.s,data.len,
|
|
cxdx_add_avp(msg,data.s,data.len,
|
|
@@ -307,7 +307,7 @@ inline int cxdx_add_visited_network_id(AAAMessage *msg,str data)
|
|
* @param data - the value for the AVP payload
|
|
* @param data - the value for the AVP payload
|
|
* @returns 1 on success or 0 on error
|
|
* @returns 1 on success or 0 on error
|
|
*/
|
|
*/
|
|
-inline int cxdx_add_UAR_flags(AAAMessage *msg, unsigned int sos_reg)
|
|
|
|
|
|
+int cxdx_add_UAR_flags(AAAMessage *msg, unsigned int sos_reg)
|
|
{
|
|
{
|
|
|
|
|
|
char x[4];
|
|
char x[4];
|
|
@@ -331,7 +331,7 @@ inline int cxdx_add_UAR_flags(AAAMessage *msg, unsigned int sos_reg)
|
|
* @param data - the value for the AVP payload
|
|
* @param data - the value for the AVP payload
|
|
* @returns 1 on success or 0 on error
|
|
* @returns 1 on success or 0 on error
|
|
*/
|
|
*/
|
|
-inline int cxdx_add_authorization_type(AAAMessage *msg,unsigned int data)
|
|
|
|
|
|
+int cxdx_add_authorization_type(AAAMessage *msg,unsigned int data)
|
|
{
|
|
{
|
|
char x[4];
|
|
char x[4];
|
|
set_4bytes(x,data);
|
|
set_4bytes(x,data);
|
|
@@ -349,7 +349,7 @@ inline int cxdx_add_authorization_type(AAAMessage *msg,unsigned int data)
|
|
* @param msg - the Diameter message
|
|
* @param msg - the Diameter message
|
|
* @returns the AVP payload on success or an empty string on error
|
|
* @returns the AVP payload on success or an empty string on error
|
|
*/
|
|
*/
|
|
-inline int cxdx_get_result_code(AAAMessage *msg, int *data)
|
|
|
|
|
|
+int cxdx_get_result_code(AAAMessage *msg, int *data)
|
|
{
|
|
{
|
|
str s;
|
|
str s;
|
|
s = cxdx_get_avp(msg,
|
|
s = cxdx_get_avp(msg,
|
|
@@ -366,7 +366,7 @@ inline int cxdx_get_result_code(AAAMessage *msg, int *data)
|
|
* @param msg - the Diameter message
|
|
* @param msg - the Diameter message
|
|
* @returns the AVP payload on success or an empty string on error
|
|
* @returns the AVP payload on success or an empty string on error
|
|
*/
|
|
*/
|
|
-inline int cxdx_get_experimental_result_code(AAAMessage *msg, int *data)
|
|
|
|
|
|
+int cxdx_get_experimental_result_code(AAAMessage *msg, int *data)
|
|
{
|
|
{
|
|
AAA_AVP_LIST list;
|
|
AAA_AVP_LIST list;
|
|
AAA_AVP *avp;
|
|
AAA_AVP *avp;
|
|
@@ -396,7 +396,7 @@ inline int cxdx_get_experimental_result_code(AAAMessage *msg, int *data)
|
|
* @param msg - the Diameter message
|
|
* @param msg - the Diameter message
|
|
* @returns the AVP payload on success or an empty string on error
|
|
* @returns the AVP payload on success or an empty string on error
|
|
*/
|
|
*/
|
|
-inline str cxdx_get_server_name(AAAMessage *msg)
|
|
|
|
|
|
+str cxdx_get_server_name(AAAMessage *msg)
|
|
{
|
|
{
|
|
return cxdx_get_avp(msg,
|
|
return cxdx_get_avp(msg,
|
|
AVP_IMS_Server_Name,
|
|
AVP_IMS_Server_Name,
|
|
@@ -413,7 +413,7 @@ inline str cxdx_get_server_name(AAAMessage *msg)
|
|
* @param o_cnt - size of the array above to be filled
|
|
* @param o_cnt - size of the array above to be filled
|
|
* @returns 1 on success 0 on fail
|
|
* @returns 1 on success 0 on fail
|
|
*/
|
|
*/
|
|
-inline int cxdx_get_capabilities(AAAMessage *msg,int **m,int *m_cnt,int **o,int *o_cnt,
|
|
|
|
|
|
+int cxdx_get_capabilities(AAAMessage *msg,int **m,int *m_cnt,int **o,int *o_cnt,
|
|
str **p,int *p_cnt)
|
|
str **p,int *p_cnt)
|
|
{
|
|
{
|
|
AAA_AVP_LIST list;
|
|
AAA_AVP_LIST list;
|
|
@@ -507,7 +507,7 @@ int cscf_reply_transactional(struct sip_msg *msg, int code, char *text)
|
|
* @param data - the value for the AVP payload
|
|
* @param data - the value for the AVP payload
|
|
* @returns 1 on success or 0 on error
|
|
* @returns 1 on success or 0 on error
|
|
*/
|
|
*/
|
|
-inline int cxdx_add_sip_number_auth_items(AAAMessage *msg,unsigned int data)
|
|
|
|
|
|
+int cxdx_add_sip_number_auth_items(AAAMessage *msg,unsigned int data)
|
|
{
|
|
{
|
|
char x[4];
|
|
char x[4];
|
|
set_4bytes(x,data);
|
|
set_4bytes(x,data);
|
|
@@ -527,7 +527,7 @@ inline int cxdx_add_sip_number_auth_items(AAAMessage *msg,unsigned int data)
|
|
* @param auth - the value for the authorization AVP
|
|
* @param auth - the value for the authorization AVP
|
|
* @returns 1 on success or 0 on error
|
|
* @returns 1 on success or 0 on error
|
|
*/
|
|
*/
|
|
-inline int cxdx_add_sip_auth_data_item_request(AAAMessage *msg, str auth_scheme, str auth, str username, str realm,str method, str server_name)
|
|
|
|
|
|
+int cxdx_add_sip_auth_data_item_request(AAAMessage *msg, str auth_scheme, str auth, str username, str realm,str method, str server_name)
|
|
{
|
|
{
|
|
AAA_AVP_LIST list;
|
|
AAA_AVP_LIST list;
|
|
str group;
|
|
str group;
|
|
@@ -588,7 +588,7 @@ inline int cxdx_add_sip_auth_data_item_request(AAAMessage *msg, str auth_scheme,
|
|
* @param data - the value for the AVP payload
|
|
* @param data - the value for the AVP payload
|
|
* @returns 1 on success or 0 on error
|
|
* @returns 1 on success or 0 on error
|
|
*/
|
|
*/
|
|
-inline int cxdx_add_server_name(AAAMessage *msg,str data)
|
|
|
|
|
|
+int cxdx_add_server_name(AAAMessage *msg,str data)
|
|
{
|
|
{
|
|
return
|
|
return
|
|
cxdx_add_avp(msg,data.s,data.len,
|
|
cxdx_add_avp(msg,data.s,data.len,
|
|
@@ -604,7 +604,7 @@ inline int cxdx_add_server_name(AAAMessage *msg,str data)
|
|
* @param msg - the Diameter message
|
|
* @param msg - the Diameter message
|
|
* @returns the number or 0 on error
|
|
* @returns the number or 0 on error
|
|
*/
|
|
*/
|
|
-inline int cxdx_get_sip_number_auth_items(AAAMessage *msg, int *data)
|
|
|
|
|
|
+int cxdx_get_sip_number_auth_items(AAAMessage *msg, int *data)
|
|
{
|
|
{
|
|
str s;
|
|
str s;
|
|
s = cxdx_get_avp(msg,
|
|
s = cxdx_get_avp(msg,
|
|
@@ -913,7 +913,7 @@ str cxdx_ETSI_sip_authorization(str username, str realm, str nonce, str URI, str
|
|
* @returns the AVP payload on success or an empty string on error
|
|
* @returns the AVP payload on success or an empty string on error
|
|
*/
|
|
*/
|
|
|
|
|
|
-inline str cxdx_get_user_data(AAAMessage *msg)
|
|
|
|
|
|
+str cxdx_get_user_data(AAAMessage *msg)
|
|
{
|
|
{
|
|
return cxdx_get_avp(msg,
|
|
return cxdx_get_avp(msg,
|
|
AVP_IMS_User_Data_Cx,
|
|
AVP_IMS_User_Data_Cx,
|
|
@@ -926,7 +926,7 @@ inline str cxdx_get_user_data(AAAMessage *msg)
|
|
* @param msg - the Diameter message
|
|
* @param msg - the Diameter message
|
|
* @returns the AVP payload on success or an empty string on error
|
|
* @returns the AVP payload on success or an empty string on error
|
|
*/
|
|
*/
|
|
-inline int cxdx_get_charging_info(AAAMessage *msg,str *ccf1,str *ccf2,str *ecf1,str *ecf2)
|
|
|
|
|
|
+int cxdx_get_charging_info(AAAMessage *msg,str *ccf1,str *ccf2,str *ecf1,str *ecf2)
|
|
{
|
|
{
|
|
AAA_AVP_LIST list;
|
|
AAA_AVP_LIST list;
|
|
AAA_AVP *avp;
|
|
AAA_AVP *avp;
|
|
@@ -971,7 +971,7 @@ inline int cxdx_get_charging_info(AAAMessage *msg,str *ccf1,str *ccf2,str *ecf1,
|
|
* @param data - the value for the AVP payload
|
|
* @param data - the value for the AVP payload
|
|
* @returns 1 on success or 0 on error
|
|
* @returns 1 on success or 0 on error
|
|
*/
|
|
*/
|
|
-inline int cxdx_add_server_assignment_type(AAAMessage *msg,unsigned int data)
|
|
|
|
|
|
+int cxdx_add_server_assignment_type(AAAMessage *msg,unsigned int data)
|
|
{
|
|
{
|
|
char x[4];
|
|
char x[4];
|
|
set_4bytes(x,data);
|
|
set_4bytes(x,data);
|
|
@@ -990,7 +990,7 @@ inline int cxdx_add_server_assignment_type(AAAMessage *msg,unsigned int data)
|
|
* @param data - the value for the AVP payload
|
|
* @param data - the value for the AVP payload
|
|
* @returns 1 on success or 0 on error
|
|
* @returns 1 on success or 0 on error
|
|
*/
|
|
*/
|
|
-inline int cxdx_add_userdata_available(AAAMessage *msg,unsigned int data)
|
|
|
|
|
|
+int cxdx_add_userdata_available(AAAMessage *msg,unsigned int data)
|
|
{
|
|
{
|
|
char x[4];
|
|
char x[4];
|
|
set_4bytes(x,data);
|
|
set_4bytes(x,data);
|
|
@@ -1012,7 +1012,7 @@ inline int cxdx_add_userdata_available(AAAMessage *msg,unsigned int data)
|
|
* @param func - the name of the calling function for debugging purposes
|
|
* @param func - the name of the calling function for debugging purposes
|
|
* @returns the AVP payload on success or an empty string on error
|
|
* @returns the AVP payload on success or an empty string on error
|
|
*/
|
|
*/
|
|
-inline AAA_AVP* cxdx_get_next_public_identity(AAAMessage *msg,AAA_AVP* pos,int avp_code,int vendor_id,const char *func)
|
|
|
|
|
|
+AAA_AVP* cxdx_get_next_public_identity(AAAMessage *msg,AAA_AVP* pos,int avp_code,int vendor_id,const char *func)
|
|
{
|
|
{
|
|
AAA_AVP *avp;
|
|
AAA_AVP *avp;
|
|
|
|
|
|
@@ -1030,7 +1030,7 @@ inline AAA_AVP* cxdx_get_next_public_identity(AAAMessage *msg,AAA_AVP* pos,int a
|
|
* @param msg - the Diameter message
|
|
* @param msg - the Diameter message
|
|
* @returns the AVP payload on success or an empty string on error
|
|
* @returns the AVP payload on success or an empty string on error
|
|
*/
|
|
*/
|
|
-inline str cxdx_get_user_name(AAAMessage *msg)
|
|
|
|
|
|
+str cxdx_get_user_name(AAAMessage *msg)
|
|
{
|
|
{
|
|
return cxdx_get_avp(msg,
|
|
return cxdx_get_avp(msg,
|
|
AVP_User_Name,
|
|
AVP_User_Name,
|
|
@@ -1044,7 +1044,7 @@ inline str cxdx_get_user_name(AAAMessage *msg)
|
|
* @param data - the value for the AVP payload
|
|
* @param data - the value for the AVP payload
|
|
* @returns 1 on success or 0 on error
|
|
* @returns 1 on success or 0 on error
|
|
*/
|
|
*/
|
|
-inline int cxdx_add_result_code(AAAMessage *msg,unsigned int data)
|
|
|
|
|
|
+int cxdx_add_result_code(AAAMessage *msg,unsigned int data)
|
|
{
|
|
{
|
|
char x[4];
|
|
char x[4];
|
|
set_4bytes(x,data);
|
|
set_4bytes(x,data);
|