Skip to content

Commit

Permalink
ims_icscf: clang-format for coherent indentation and coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxmaniac committed May 18, 2023
1 parent 57b6367 commit 7d29322
Show file tree
Hide file tree
Showing 21 changed files with 2,145 additions and 2,032 deletions.
862 changes: 395 additions & 467 deletions src/modules/ims_icscf/cxdx_avp.c

Large diffs are not rendered by default.

48 changes: 26 additions & 22 deletions src/modules/ims_icscf/cxdx_avp.h
Expand Up @@ -46,7 +46,7 @@
#ifndef IS_CSCF_CXDX_AVP_H
#define IS_CSCF_CXDX_AVP_H

extern struct cdp_binds cdpb; /**< Structure with pointers to cdp funcs */
extern struct cdp_binds cdpb; /**< Structure with pointers to cdp funcs */
extern struct tm_binds tmb;

struct AAAMessage;
Expand All @@ -69,39 +69,40 @@ int cxdx_add_destination_realm(AAAMessage *msg, str data);
* @param acct_id - the accounting application id
* @returns 1 on success or 0 on error
*/
int cxdx_add_vendor_specific_appid(AAAMessage *msg,unsigned int vendor_id,unsigned int auth_id,unsigned int acct_id);
int cxdx_add_vendor_specific_appid(AAAMessage *msg, unsigned int vendor_id,
unsigned int auth_id, unsigned int acct_id);

/**
* Creates and adds an Auth-Session-State AVP.
* @param msg - the Diameter message to add to.
* @param data - the value for the AVP payload
* @returns 1 on success or 0 on error
*/
int cxdx_add_auth_session_state(AAAMessage *msg,unsigned int data);
int cxdx_add_auth_session_state(AAAMessage *msg, unsigned int data);

/**
* Creates and adds a User-Name AVP.
* @param msg - the Diameter message to add to.
* @param data - the value for the AVP payload
* @returns 1 on success or 0 on error
*/
int cxdx_add_user_name(AAAMessage *msg,str data);
int cxdx_add_user_name(AAAMessage *msg, str data);

/**
* Creates and adds a Public Identity AVP.
* @param msg - the Diameter message to add to.
* @param data - the value for the AVP payload
* @returns 1 on success or 0 on error
*/
int cxdx_add_public_identity(AAAMessage *msg,str data);
int cxdx_add_public_identity(AAAMessage *msg, str data);

/**
* Creates and adds a Visited-Network-ID AVP.
* @param msg - the Diameter message to add to.
* @param data - the value for the AVP payload
* @returns 1 on success or 0 on error
*/
int cxdx_add_visited_network_id(AAAMessage *msg,str data);
int cxdx_add_visited_network_id(AAAMessage *msg, str data);

/**
* Creates and adds a UAR-Flags AVP.
Expand All @@ -117,7 +118,7 @@ int cxdx_add_UAR_flags(AAAMessage *msg, unsigned int sos_reg);
* @param data - the value for the AVP payload
* @returns 1 on success or 0 on error
*/
int cxdx_add_authorization_type(AAAMessage *msg,unsigned int data);
int cxdx_add_authorization_type(AAAMessage *msg, unsigned int data);

/**
* Returns the Result-Code AVP from a Diameter message.
Expand Down Expand Up @@ -149,15 +150,16 @@ str cxdx_get_server_name(AAAMessage *msg);
* @param o_cnt - size of the array above to be filled
* @returns 1 on success 0 on fail
*/
int cxdx_get_capabilities(AAAMessage *msg,int **m,int *m_cnt,int **o,int *o_cnt, str **p,int *p_cnt);
int cxdx_get_capabilities(AAAMessage *msg, int **m, int *m_cnt, int **o,
int *o_cnt, str **p, int *p_cnt);

/**
* Creates and adds a SIP-Number-Auth-Items AVP.
* @param msg - the Diameter message to add to.
* @param data - the value for the AVP payload
* @returns 1 on success or 0 on error
*/
int cxdx_add_sip_number_auth_items(AAAMessage *msg,unsigned int data);
int cxdx_add_sip_number_auth_items(AAAMessage *msg, unsigned int data);

/**
* Creates and adds a SIP-Auth-Data-Item AVP.
Expand All @@ -166,15 +168,16 @@ int cxdx_add_sip_number_auth_items(AAAMessage *msg,unsigned int data);
* @param auth - the value for the authorization AVP
* @returns 1 on success or 0 on error
*/
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);

/**
* Creates and adds a Server-Name AVP.
* @param msg - the Diameter message to add to.
* @param data - the value for the AVP payload
* @returns 1 on success or 0 on error
*/
int cxdx_add_server_name(AAAMessage *msg,str data);
int cxdx_add_server_name(AAAMessage *msg, str data);

/**
* Returns the SIP-Number-Auth-Items AVP from a Diameter message.
Expand All @@ -196,11 +199,9 @@ int cxdx_get_sip_number_auth_items(AAAMessage *msg, int *data);
* @returns the AVP payload on success or an empty string on error
*/
int cxdx_get_auth_data_item_answer(AAAMessage *msg, AAA_AVP **auth_data,
int *item_number,str *auth_scheme,str *authenticate,str *authorization,
str *ck,str *ik,
str *ip,
str *ha1, str *response_auth, str *digest_realm,
str *line_identifier);
int *item_number, str *auth_scheme, str *authenticate,
str *authorization, str *ck, str *ik, str *ip, str *ha1,
str *response_auth, str *digest_realm, str *line_identifier);

/**
* Creates and adds an ETSI_sip_authorization AVP.
Expand All @@ -214,7 +215,8 @@ int cxdx_get_auth_data_item_answer(AAAMessage *msg, AAA_AVP **auth_data,
* @param hash - Enitity-Body-Hash
* @returns grouped str on success
*/
str cxdx_ETSI_sip_authorization(str username, str realm, str nonce, str URI, str response, str algorithm, str method, str hash);
str cxdx_ETSI_sip_authorization(str username, str realm, str nonce, str URI,
str response, str algorithm, str method, str hash);

/**
* Returns the User-Data from a Diameter message.
Expand All @@ -229,23 +231,24 @@ str cxdx_get_user_data(AAAMessage *msg);
* @param msg - the Diameter message
* @returns the AVP payload on success or an empty string on error
*/
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);

/**
* Creates and adds a Server-Assignment-Type AVP.
* @param msg - the Diameter message to add to.
* @param data - the value for the AVP payload
* @returns 1 on success or 0 on error
*/
int cxdx_add_server_assignment_type(AAAMessage *msg,unsigned int data);
int cxdx_add_server_assignment_type(AAAMessage *msg, unsigned int data);

/**
* Creates and adds Userdata-Available AVP.
* @param msg - the Diameter message to add to.
* @param data - the value for the AVP payload
* @returns 1 on success or 0 on error
*/
int cxdx_add_userdata_available(AAAMessage *msg,unsigned int data);
int cxdx_add_userdata_available(AAAMessage *msg, unsigned int data);

/**
* Finds out the next Public-Identity AVP from a Diameter message.
Expand All @@ -256,7 +259,8 @@ int cxdx_add_userdata_available(AAAMessage *msg,unsigned int data);
* @param func - the name of the calling function for debugging purposes
* @returns the AVP payload on success or an empty string on error
*/
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);

/**
* Returns the User-Name AVP from a Diameter message.
Expand All @@ -271,6 +275,6 @@ str cxdx_get_user_name(AAAMessage *msg);
* @param data - the value for the AVP payload
* @returns 1 on success or 0 on error
*/
int cxdx_add_result_code(AAAMessage *msg,unsigned int data);
int cxdx_add_result_code(AAAMessage *msg, unsigned int data);

#endif /* IS_CSCF_CXDX_AVP_H */

0 comments on commit 7d29322

Please sign in to comment.