Patch provided by Gabriel Arrobo.

Mainly comestics and integer type management

Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
This commit is contained in:
Raphael Defosseux
2020-01-09 14:10:04 +01:00
parent 78017412f0
commit c409da3bb8
30 changed files with 199 additions and 200 deletions
+29 -31
View File
@@ -188,17 +188,16 @@ int main(int argc, const char *argv[])
/****************************************************************************
** **
** Name: _nas_user_mngr() **
** Name: _nas_user_mngr() **
** **
** Description: Manages the connection endpoint use to communicate with **
** the user application layer **
** the user application layer **
** **
** Inputs: fd: The descriptor of the user connection end- **
** point **
** Others: None **
** Inputs: fd: The descriptor of the user connection end-point **
** Others: None **
** **
** Outputs: Return: None **
** Others: None **
** Outputs: Return: None **
** Others: None **
** **
***************************************************************************/
static void *_nas_user_mngr(void *args)
@@ -227,17 +226,16 @@ static void *_nas_user_mngr(void *args)
/****************************************************************************
** **
** Name: _nas_network_mngr() **
** Name: _nas_network_mngr() **
** **
** Description: Manages the connection endpoint use to communicate with **
** the network sublayer **
** the network sublayer **
** **
** Inputs: fd: The descriptor of the network connection **
** endpoint **
** Others: None **
** Inputs: fd: The descriptor of the network connection endpoint **
** Others: None **
** **
** Outputs: Return: None **
** Others: None **
** Outputs: Return: None **
** Others: None **
** **
***************************************************************************/
static void *_nas_network_mngr(void *args)
@@ -302,16 +300,16 @@ static void *_nas_network_mngr(void *args)
/****************************************************************************
** **
** Name: _nas_set_signal_handler() **
** Name: _nas_set_signal_handler() **
** **
** Description: Set up a signal handler **
** **
** Inputs: signal: Signal number **
** handler: Signal handler **
** Others: None **
** Inputs: signal: Signal number **
** handler: Signal handler **
** Others: None **
** **
** Outputs: Return: RETURNerror, RETURNok **
** Others: None **
** Outputs: Return: RETURNerror, RETURNok **
** Others: None **
** **
***************************************************************************/
static int _nas_set_signal_handler(int signal, void (handler)(int))
@@ -351,15 +349,15 @@ static int _nas_set_signal_handler(int signal, void (handler)(int))
/****************************************************************************
** **
** Name: _nas_signal_handler() **
** Name: _nas_signal_handler() **
** **
** Description: Signal handler **
** **
** Inputs: signal: Signal number **
** Others: None **
** Inputs: signal: Signal number **
** Others: None **
** **
** Outputs: Return: None **
** Others: None **
** Outputs: Return: None **
** Others: None **
** **
***************************************************************************/
static void _nas_signal_handler(int signal)
@@ -377,16 +375,16 @@ static void _nas_signal_handler(int signal)
/****************************************************************************
** **
** Name: _nas_clean() **
** Name: _nas_clean() **
** **
** Description: Performs termination cleanup **
** **
** Inputs: usr_fd: User's connection file descriptor **
** net_fd: Network's connection file descriptor **
** Others: None **
** Inputs: usr_fd: User's connection file descriptor **
** net_fd: Network's connection file descriptor **
** Others: None **
** **
** Outputs: Return: None **
** Others: None **
** Outputs: Return: None **
** Others: None **
** **
***************************************************************************/
static void _nas_clean(user_api_id_t *user_api_id, int net_fd)
+23 -23
View File
@@ -59,16 +59,16 @@ Description NAS procedure functions triggered by the network
/****************************************************************************
** **
** Name: nas_network_initialize() **
** Name: nas_network_initialize() **
** **
** Description: Initializes network internal data **
** **
** Inputs: None **
** Others: None **
** Inputs: None **
** Others: None **
** **
** Outputs: None **
** Return: None **
** Others: None **
** Outputs: None **
** Return: None **
** Others: None **
** **
***************************************************************************/
void nas_network_initialize(void)
@@ -80,16 +80,16 @@ void nas_network_initialize(void)
/****************************************************************************
** **
** Name: nas_network_cleanup() **
** Name: nas_network_cleanup() **
** **
** Description: Performs clean up procedure before the system is shutdown **
** **
** Inputs: None **
** Others: None **
** Inputs: None **
** Others: None **
** **
** Outputs: None **
** Return: None **
** Others: None **
** Outputs: None **
** Return: None **
** Others: None **
** **
***************************************************************************/
void nas_network_cleanup(nas_user_t *user)
@@ -103,20 +103,20 @@ void nas_network_cleanup(nas_user_t *user)
/****************************************************************************
** **
** Name: nas_network_process_data() **
** Name: nas_network_process_data() **
** **
** Description: Process Access Stratum messages received from the network **
** and call applicable NAS procedure function. **
** and call applicable NAS procedure function. **
** **
** Inputs: msg_id: AS message identifier **
** data: Generic pointer to data structure that has **
** to be processed **
** Others: None **
** Inputs: msg_id: AS message identifier **
** data: Generic pointer to data structure that has **
** to be processed **
** Others: None **
** **
** Outputs: None **
** Return: RETURNok if the message has been success- **
** fully processed; RETURNerror otherwise **
** Others: None **
** Outputs: None **
** Return: RETURNok if the message has been success- **
** fully processed; RETURNerror otherwise **
** Others: None **
** **
***************************************************************************/
int nas_network_process_data(nas_user_t *user, int msg_id, const void *data)
@@ -173,7 +173,7 @@ int nas_network_process_data(nas_user_t *user, int msg_id, const void *data)
}
case AS_NAS_RELEASE_IND:
/* Received NAS signalling connection releaase indication */
/* Received NAS signalling connection release indication */
rc = nas_proc_release_ind(user, msg->msg.nas_release_ind.cause);
break;
+60 -61
View File
@@ -54,7 +54,7 @@ Description NAS command line parser
* Identifiers of the NAS command line options
*/
enum {
NAS_PARSER_UE_ID, /* User Equipement Identifier */
NAS_PARSER_UE_ID, /* User Equipment Identifier */
NAS_PARSER_TRACE_LEVEL, /* Logging trace level */
NAS_PARSER_USER_HOST, /* User app layer's hostname */
NAS_PARSER_NETWORK_HOST, /* Network layer's hostname */
@@ -118,17 +118,16 @@ static int atohex(const char *a_char);
/****************************************************************************
** **
** Name: nas_parser_print_usage() **
** Name: nas_parser_print_usage() **
** **
** Description: Displays the command line options used to run the NAS **
** process and the firmware version defined at compilation **
** time **
** process and the firmware version defined at compilation time **
** **
** Inputs: version: Firmware version **
** Others: None **
** Inputs: version: Firmware version **
** Others: None **
** **
** Outputs: Return: None **
** Others: None **
** Outputs: Return: None **
** Others: None **
** **
***************************************************************************/
void nas_parser_print_usage(const char *version)
@@ -139,16 +138,16 @@ void nas_parser_print_usage(const char *version)
/****************************************************************************
** **
** Name: nas_parser_get_options() **
** Name: nas_parser_get_options() **
** **
** Description: Gets the command line options used to run the NAS process **
** **
** Inputs: argc: Number of options **
** argv: Pointer to the list of options **
** Others: None **
** Inputs: argc: Number of options **
** argv: Pointer to the list of options **
** Others: None **
** **
** Outputs: Return: RETURNerror, RETURNok **
** Others: None **
** Outputs: Return: RETURNerror, RETURNok **
** Others: None **
** **
***************************************************************************/
int nas_parser_get_options(int argc, const char **argv)
@@ -158,16 +157,16 @@ int nas_parser_get_options(int argc, const char **argv)
/****************************************************************************
** **
** Name: nas_parser_get_nb_options() **
** Name: nas_parser_get_nb_options() **
** **
** Description: Returns the number of the command line options used to **
** run the NAS process **
** run the NAS process **
** **
** Inputs: None **
** Others: None **
** Inputs: None **
** Others: None **
** **
** Outputs: Return: Number of command line options **
** Others: None **
** Outputs: Return: Number of command line options **
** Others: None **
** **
***************************************************************************/
int nas_parser_get_nb_options(void)
@@ -177,15 +176,15 @@ int nas_parser_get_nb_options(void)
/****************************************************************************
** **
** Name: nas_parser_get_trace_level() **
** Name: nas_parser_get_trace_level() **
** **
** Description: Returns the value of the logging trace level **
** **
** Inputs: None **
** Others: None **
** Inputs: None **
** Others: None **
** **
** Outputs: Return: Value of the logging trace level **
** Others: None **
** Outputs: Return: Value of the logging trace level **
** Others: None **
** **
***************************************************************************/
int nas_parser_get_trace_level(void)
@@ -195,15 +194,15 @@ int nas_parser_get_trace_level(void)
/****************************************************************************
** **
** Name: nas_parser_get_network_host() **
** Name: nas_parser_get_network_host() **
** **
** Description: Returns the value of the network layer hostname **
** **
** Inputs: None **
** Others: None **
** Inputs: None **
** Others: None **
** **
** Outputs: Return: Value of the network layer hostname **
** Others: None **
** Outputs: Return: Value of the network layer hostname **
** Others: None **
** **
***************************************************************************/
const char *nas_parser_get_network_host(void)
@@ -213,15 +212,15 @@ const char *nas_parser_get_network_host(void)
/****************************************************************************
** **
** Name: nas_parser_get_network_port() **
** Name: nas_parser_get_network_port() **
** **
** Description: Returns the value of the network layer port number **
** **
** Inputs: None **
** Others: None **
** Inputs: None **
** Others: None **
** **
** Outputs: Return: Value of the network layer port number **
** Others: None **
** Outputs: Return: Value of the network layer port number **
** Others: None **
** **
***************************************************************************/
const char *nas_parser_get_network_port(void)
@@ -231,15 +230,15 @@ const char *nas_parser_get_network_port(void)
/****************************************************************************
** **
** Name: nas_parser_get_ueid() **
** Name: nas_parser_get_ueid() **
** **
** Description: Returns the value of the UE identifier option **
** **
** Inputs: None **
** Others: None **
** Inputs: None **
** Others: None **
** **
** Outputs: Return: Value of the UE identifier option **
** Others: None **
** Outputs: Return: Value of the UE identifier option **
** Others: None **
** **
***************************************************************************/
int nas_parser_get_ueid(void)
@@ -249,15 +248,15 @@ int nas_parser_get_ueid(void)
/****************************************************************************
** **
** Name: nas_parser_get_user_host() **
** Name: nas_parser_get_user_host() **
** **
** Description: Returns the value of the user application layer hostname **
** **
** Inputs: None **
** Others: None **
** Inputs: None **
** Others: None **
** **
** Outputs: Return: Value of the user app layer hostname **
** Others: None **
** Outputs: Return: Value of the user app layer hostname **
** Others: None **
** **
***************************************************************************/
const char *nas_parser_get_user_host(void)
@@ -267,16 +266,16 @@ const char *nas_parser_get_user_host(void)
/****************************************************************************
** **
** Name: nas_parser_get_user_port() **
** Name: nas_parser_get_user_port() **
** **
** Description: Returns the value of the user application layer port **
** number **
** number **
** **
** Inputs: None **
** Others: None **
** Inputs: None **
** Others: None **
** **
** Outputs: Return: Value of the user app layer port number **
** Others: None **
** Outputs: Return: Value of the user app layer port number **
** Others: None **
** **
***************************************************************************/
const char *nas_parser_get_user_port(void)
@@ -286,15 +285,15 @@ const char *nas_parser_get_user_port(void)
/****************************************************************************
** **
** Name: nas_parser_get_device_path() **
** Name: nas_parser_get_device_path() **
** **
** Description: Returns the value of the device pathname **
** **
** Inputs: None **
** Others: None **
** Inputs: None **
** Others: None **
** **
** Outputs: Return: Value of the device pathname **
** Others: None **
** Outputs: Return: Value of the device pathname **
** Others: None **
** **
***************************************************************************/
const char *nas_parser_get_device_path(void)
@@ -304,15 +303,15 @@ const char *nas_parser_get_device_path(void)
/****************************************************************************
** **
** Name: nas_parser_get_device_params() **
** Name: nas_parser_get_device_params() **
** **
** Description: Returns the value of the device attribute parameters **
** **
** Inputs: None **
** Others: None **
** Inputs: None **
** Others: None **
** **
** Outputs: Return: Value of the device attribute parameters **
** Others: None **
** Outputs: Return: Value of the device attribute parameters **
** Others: None **
** **
***************************************************************************/
const char *nas_parser_get_device_params(void)
+1 -1
View File
@@ -41,7 +41,7 @@
#include "sctp_common.h"
/* Pre-bind socket options configuration.
* See http://linux.die.net/man/7/sctp for more informations on these options.
* See http://linux.die.net/man/7/sctp for more information on these options.
*/
int sctp_set_init_opt(int sd, uint16_t instreams, uint16_t outstreams,
uint16_t max_attempts, uint16_t init_timeout)