Commit 40faab75 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Code cleanup/format for Itti

parent 238c743b
......@@ -3,9 +3,9 @@
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
......@@ -33,28 +33,22 @@
class itti_async_shell_cmd : public itti_msg {
public:
itti_async_shell_cmd(const task_id_t origin, const task_id_t destination,
const std::string &system_cmd, bool is_abort_on_error,
const char *src_file, const int src_line)
:
itti_msg(ASYNC_SHELL_CMD, origin, destination),
system_command(system_cmd),
is_abort_on_error(is_abort_on_error),
src_file(src_file),
src_line(src_line) {
}
itti_async_shell_cmd(const itti_async_shell_cmd &i)
:
itti_msg(i),
system_command(i.system_command),
is_abort_on_error(i.is_abort_on_error),
src_file(i.src_file),
src_line(i.src_line) {
}
const char* get_msg_name() {
return typeid(itti_msg_ping).name();
}
;
itti_async_shell_cmd(
const task_id_t origin, const task_id_t destination,
const std::string& system_cmd, bool is_abort_on_error,
const char* src_file, const int src_line)
: itti_msg(ASYNC_SHELL_CMD, origin, destination),
system_command(system_cmd),
is_abort_on_error(is_abort_on_error),
src_file(src_file),
src_line(src_line) {}
itti_async_shell_cmd(const itti_async_shell_cmd& i)
: itti_msg(i),
system_command(i.system_command),
is_abort_on_error(i.is_abort_on_error),
src_file(i.src_file),
src_line(i.src_line) {}
const char* get_msg_name() { return typeid(itti_msg_ping).name(); };
std::string system_command;
bool is_abort_on_error;
// debug
......
......@@ -4,8 +4,8 @@
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
*file except in compliance with the License. You may obtain a copy of the
*License at
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
......
This diff is collapsed.
......@@ -3,9 +3,9 @@
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
......@@ -36,26 +36,16 @@
class itti_n4_restore : public itti_msg {
public:
itti_n4_restore(const task_id_t origin, const task_id_t destination)
:
itti_msg(RESTORE_N4_SESSIONS, origin, destination),
sessions() {
}
itti_n4_restore(const itti_n4_restore &i)
:
itti_msg(i),
sessions(i.sessions) {
}
itti_n4_restore(const itti_n4_restore &i, const task_id_t orig,
const task_id_t dest)
:
itti_n4_restore(i) {
origin = orig;
: itti_msg(RESTORE_N4_SESSIONS, origin, destination), sessions() {}
itti_n4_restore(const itti_n4_restore& i)
: itti_msg(i), sessions(i.sessions) {}
itti_n4_restore(
const itti_n4_restore& i, const task_id_t orig, const task_id_t dest)
: itti_n4_restore(i) {
origin = orig;
destination = dest;
}
const char* get_msg_name() {
return "N4_RESTORE";
}
;
const char* get_msg_name() { return "N4_RESTORE"; };
std::set<pfcp::fseid_t> sessions;
};
......
......@@ -3,9 +3,9 @@
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
......@@ -35,54 +35,34 @@
class itti_nx_msg : public itti_msg {
public:
itti_nx_msg(const itti_msg_type_t msg_type, const task_id_t orig,
const task_id_t dest)
:
itti_msg(msg_type, orig, dest) {
}
itti_nx_msg(const itti_nx_msg &i)
:
itti_msg(i) {
}
itti_nx_msg(const itti_nx_msg &i, const task_id_t orig, const task_id_t dest)
:
itti_nx_msg(i) {
origin = orig;
itti_nx_msg(
const itti_msg_type_t msg_type, const task_id_t orig,
const task_id_t dest)
: itti_msg(msg_type, orig, dest) {}
itti_nx_msg(const itti_nx_msg& i) : itti_msg(i) {}
itti_nx_msg(const itti_nx_msg& i, const task_id_t orig, const task_id_t dest)
: itti_nx_msg(i) {
origin = orig;
destination = dest;
}
};
//-----------------------------------------------------------------------------
class itti_nx_trigger_pdu_session_modification : public itti_nx_msg {
public:
itti_nx_trigger_pdu_session_modification(const task_id_t orig,
const task_id_t dest)
:
itti_nx_msg(NX_TRIGGER_SESSION_MODIFICATION, orig, dest),
msg(),
http_version() {
}
itti_nx_trigger_pdu_session_modification(
const itti_nx_trigger_pdu_session_modification &i)
:
itti_nx_msg(i),
msg(i.msg),
http_version(i.http_version) {
}
const task_id_t orig, const task_id_t dest)
: itti_nx_msg(NX_TRIGGER_SESSION_MODIFICATION, orig, dest),
msg(),
http_version() {}
itti_nx_trigger_pdu_session_modification(
const itti_nx_trigger_pdu_session_modification& i)
: itti_nx_msg(i), msg(i.msg), http_version(i.http_version) {}
itti_nx_trigger_pdu_session_modification(
const itti_nx_trigger_pdu_session_modification &i, const task_id_t orig,
const itti_nx_trigger_pdu_session_modification& i, const task_id_t orig,
const task_id_t dest)
:
itti_nx_msg(i, orig, dest),
msg(),
http_version(i.http_version) {
}
const char* get_msg_name() {
return "NX_TRIGGER_PDU_SESSION_MODIFICATION";
}
;
: itti_nx_msg(i, orig, dest), msg(), http_version(i.http_version) {}
const char* get_msg_name() { return "NX_TRIGGER_PDU_SESSION_MODIFICATION"; };
smf::pdu_session_modification_network_requested msg;
uint8_t http_version;
};
......
......@@ -3,9 +3,9 @@
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
* the OAI Public License, Version 1.1 (the "License"); you may not use this
*file except in compliance with the License. You may obtain a copy of the
*License at
*
* http://www.openairinterface.org/?page_id=698
*
......@@ -33,30 +33,30 @@ typedef enum extended_protocol_discriminator_e {
} extended_protocol_discriminator_t;
// Procedure transaction identity
//8 bits
#define PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED (uint8_t)0
#define PROCEDURE_TRANSACTION_IDENTITY_FIRST (uint8_t)1
#define PROCEDURE_TRANSACTION_IDENTITY_LAST (uint8_t)254
#define PROCEDURE_TRANSACTION_IDENTITY_RESERVED (uint8_t)255
// 8 bits
#define PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED (uint8_t) 0
#define PROCEDURE_TRANSACTION_IDENTITY_FIRST (uint8_t) 1
#define PROCEDURE_TRANSACTION_IDENTITY_LAST (uint8_t) 254
#define PROCEDURE_TRANSACTION_IDENTITY_RESERVED (uint8_t) 255
// PDU Session Identity
typedef uint8_t pdu_session_id_t;
//8 bits
#define PDU_SESSION_IDENTITY_UNASSIGNED (uint8_t)0
#define PDU_SESSION_IDENTITY_FIRST (uint8_t)1
#define PDU_SESSION_IDENTITY_LAST (uint8_t)15
// 8 bits
#define PDU_SESSION_IDENTITY_UNASSIGNED (uint8_t) 0
#define PDU_SESSION_IDENTITY_FIRST (uint8_t) 1
#define PDU_SESSION_IDENTITY_LAST (uint8_t) 15
// QFI
// type: integer, minimum: 0, maximum: 63
#define NO_QOS_FLOW_IDENTIFIER_ASSIGNED (uint8_t)0
#define QOS_FLOW_IDENTIFIER_FIRST (uint8_t)1
#define QOS_FLOW_IDENTIFIER_LAST (uint8_t)63
#define NO_QOS_FLOW_IDENTIFIER_ASSIGNED (uint8_t) 0
#define QOS_FLOW_IDENTIFIER_FIRST (uint8_t) 1
#define QOS_FLOW_IDENTIFIER_LAST (uint8_t) 63
//QoS Rule
#define NO_QOS_RULE_IDENTIFIER_ASSIGNED (uint8_t)0
#define QOS_RULE_IDENTIFIER_FIRST (uint8_t)1
#define QOS_RULE_IDENTIFIER_LAST (uint8_t)255
// QoS Rule
#define NO_QOS_RULE_IDENTIFIER_ASSIGNED (uint8_t) 0
#define QOS_RULE_IDENTIFIER_FIRST (uint8_t) 1
#define QOS_RULE_IDENTIFIER_LAST (uint8_t) 255
// Integrity protection maximum data rate
typedef struct ipmdr_s {
......
......@@ -3,9 +3,9 @@
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
* the OAI Public License, Version 1.1 (the "License"); you may not use this
*file except in compliance with the License. You may obtain a copy of the
*License at
*
* http://www.openairinterface.org/?page_id=698
*
......@@ -33,30 +33,33 @@
//------------------------------------------------------------------------------
// 5.1.3.2 Algorithm Identifier Values
//------------------------------------------------------------------------------
#define EEA0_ALG_ID 0b000
#define EEA1_128_ALG_ID 0b001
#define EEA2_128_ALG_ID 0b010
#define EEA0_ALG_ID 0b000
#define EEA1_128_ALG_ID 0b001
#define EEA2_128_ALG_ID 0b010
//------------------------------------------------------------------------------
// 5.1.4.2 Algorithm Identifier Values
//------------------------------------------------------------------------------
#define EIA0_ALG_ID 0b000
#define EIA1_128_ALG_ID 0b001
#define EIA2_128_ALG_ID 0b010
#define EIA0_ALG_ID 0b000
#define EIA1_128_ALG_ID 0b001
#define EIA2_128_ALG_ID 0b010
//------------------------------------------------------------------------------
// 6.1.2 Distribution of authentication data from HSS to serving network
//------------------------------------------------------------------------------
/* NOTE 2: It is recommended that the MME fetch only one EPS authentication vector at a time as the need to perform
* AKA runs has been reduced in EPS through the use of a more elaborate key hierarchy. In particular,
* service requests can be authenticated using a stored K ASME without the need to perform AKA.
* Furthermore, the sequence number management schemes in TS 33.102, Annex C [4], designed to avoid
* re-synchronisation problems caused by interleaving use of batches of authentication vectors, are only
* optional. Re-synchronisation problems in EPS can be avoided, independently of the sequence number
* management scheme, by immediately using an authentication vector retrieved from the HSS in an
* authentication procedure between UE and MME.
/* NOTE 2: It is recommended that the MME fetch only one EPS authentication
* vector at a time as the need to perform AKA runs has been reduced in EPS
* through the use of a more elaborate key hierarchy. In particular, service
* requests can be authenticated using a stored K ASME without the need to
* perform AKA. Furthermore, the sequence number management schemes in
* TS 33.102, Annex C [4], designed to avoid re-synchronisation problems caused
* by interleaving use of batches of authentication vectors, are only optional.
* Re-synchronisation problems in EPS can be avoided, independently of the
* sequence number management scheme, by immediately using an authentication
* vector retrieved from the HSS in an authentication procedure between UE and
* MME.
*/
#define MAX_EPS_AUTH_VECTORS 1
#define MAX_EPS_AUTH_VECTORS 1
//----------------------------
typedef struct mm_ue_eps_authentication_quadruplet_s {
......
......@@ -3,9 +3,9 @@
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
* the OAI Public License, Version 1.1 (the "License"); you may not use this
*file except in compliance with the License. You may obtain a copy of the
*License at
*
* http://www.openairinterface.org/?page_id=698
*
......@@ -19,7 +19,6 @@
* contact@openairinterface.org
*/
/*! \file 3gpp_36.401.h
\brief
\author Lionel Gauthier
......@@ -34,14 +33,18 @@
// 6.2 E-UTRAN Identifiers
//------------------------------------------------------------------------------
typedef uint32_t enb_ue_s1ap_id_t; /*!< \brief An eNB UE S1AP ID shall be allocated so as to uniquely identify the UE over the S1 interface within an eNB.
When an MME receives an eNB UE S1AP ID it shall store it for the duration of the UE-associated logical S1-connection for this UE.
Once known to an MME this IE is included in all UE associated S1-AP signalling.
The eNB UE S1AP ID shall be unique within the eNB logical node. */
typedef uint32_t enb_ue_s1ap_id_t; /*!< \brief An eNB UE S1AP ID shall be
allocated so as to uniquely identify the UE over the S1 interface within an
eNB. When an MME receives an eNB UE S1AP ID it shall store it for the duration
of the UE-associated logical S1-connection for this UE. Once known to an MME
this IE is included in all UE associated S1-AP signalling. The eNB UE S1AP ID
shall be unique within the eNB logical node. */
typedef uint32_t mme_ue_s1ap_id_t; /*!< \brief A MME UE S1AP ID shall be allocated so as to uniquely identify the UE over the S1 interface within the MME.
When an eNB receives MME UE S1AP ID it shall store it for the duration of the UE-associated logical S1-connection for this UE.
Once known to an eNB this IE is included in all UE associated S1-AP signalling.
typedef uint32_t mme_ue_s1ap_id_t; /*!< \brief A MME UE S1AP ID shall be
allocated so as to uniquely identify the UE over the S1 interface within the
MME. When an eNB receives MME UE S1AP ID it shall store it for the duration of
the UE-associated logical S1-connection for this UE. Once known to an eNB this
IE is included in all UE associated S1-AP signalling.
The MME UE S1AP ID shall be unique within the MME logical node.*/
#endif /* FILE_3GPP_36_401_SEEN */
......@@ -3,9 +3,9 @@
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
* the OAI Public License, Version 1.1 (the "License"); you may not use this
*file except in compliance with the License. You may obtain a copy of the
*License at
*
* http://www.openairinterface.org/?page_id=698
*
......
......@@ -3,9 +3,9 @@
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
* the OAI Public License, Version 1.1 (the "License"); you may not use this
*file except in compliance with the License. You may obtain a copy of the
*License at
*
* http://www.openairinterface.org/?page_id=698
*
......@@ -19,7 +19,6 @@
* contact@openairinterface.org
*/
#ifndef FILE_COMMON_TYPES_SEEN
#define FILE_COMMON_TYPES_SEEN
......@@ -31,19 +30,19 @@
typedef uint16_t sctp_stream_id_t;
typedef uint32_t sctp_assoc_id_t;
//UE NGAP IDs
// UE NGAP IDs
#define INVALID_RAN_UE_NGAP_ID_KEY 0xFFFFFFFFFFFFFFFF
#define RAN_UE_NGAP_ID_MASK 0x00FFFFFF
#define RAN_UE_NGAP_ID_FMT "0x%06" PRIX32
#define GNB_UE_NGAP_ID_FMT "0x%06" PRIX32
#define AMF_UE_NGAP_ID_FMT "0x%08" PRIX32
#define INVALID_AMF_UE_NGAP_ID 0x0
#define RAN_UE_NGAP_ID_MASK 0x00FFFFFF
#define RAN_UE_NGAP_ID_FMT "0x%06" PRIX32
#define GNB_UE_NGAP_ID_FMT "0x%06" PRIX32
#define AMF_UE_NGAP_ID_FMT "0x%08" PRIX32
#define INVALID_AMF_UE_NGAP_ID 0x0
#define AMF_UE_NGAP_ID_MASK_ 0x0000FFFFFFFFFF
#define AMF_UE_NGAP_ID_MASK_ 0x0000FFFFFFFFFF
typedef uint8_t ksi_t;
#define KSI_NO_KEY_AVAILABLE 0x07
#define KSI_NO_KEY_AVAILABLE 0x07
typedef uint32_t ipv4_nbo_t;
......
......@@ -3,9 +3,9 @@
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
* the OAI Public License, Version 1.1 (the "License"); you may not use this
*file except in compliance with the License. You may obtain a copy of the
*License at
*
* http://www.openairinterface.org/?page_id=698
*
......@@ -19,7 +19,6 @@
* contact@openairinterface.org
*/
/*! \file security_types.h
\brief
\author Sebastien ROUX, Lionel Gauthier
......@@ -28,11 +27,11 @@
*/
#if HAVE_CONFIG_H
# include "config.h"
#include "config.h"
#endif
#if !defined(HAVE_UINT128_T)
# include <gmp.h>
#include <gmp.h>
#endif
#include <stdlib.h>
......@@ -42,17 +41,17 @@
#ifndef FILE_SECURITY_TYPES_SEEN
#define FILE_SECURITY_TYPES_SEEN
#define RAND_LENGTH_BITS (128)
#define RAND_LENGTH_OCTETS (RAND_LENGTH_BITS/8)
#define AUTH_KEY_LENGTH_BITS (128)
#define AUTH_KEY_LENGTH_OCTETS (AUTH_KEY_LENGTH_BITS/8)
#define KASME_LENGTH_BITS (256)
#define KASME_LENGTH_OCTETS (KASME_LENGTH_BITS/8)
#define RAND_LENGTH_BITS (128)
#define RAND_LENGTH_OCTETS (RAND_LENGTH_BITS / 8)
#define AUTH_KEY_LENGTH_BITS (128)
#define AUTH_KEY_LENGTH_OCTETS (AUTH_KEY_LENGTH_BITS / 8)
#define KASME_LENGTH_BITS (256)
#define KASME_LENGTH_OCTETS (KASME_LENGTH_BITS / 8)
/* In OCTETS */
#define XRES_LENGTH_MIN (4)
#define XRES_LENGTH_MAX (16)
#define AUTN_LENGTH_BITS (128)
#define AUTN_LENGTH_OCTETS (AUTN_LENGTH_BITS/8)
#define XRES_LENGTH_MIN (4)
#define XRES_LENGTH_MAX (16)
#define AUTN_LENGTH_BITS (128)
#define AUTN_LENGTH_OCTETS (AUTN_LENGTH_BITS / 8)
/* Some methods to convert a string to an int64_t */
/*
......@@ -63,29 +62,28 @@
*/
/* Converts a string to 128 bits gmplib integer holder */
# define STRING_TO_XBITS(sTRING, lENGTH, cONTAINER, rET) \
do { \
memcpy(cONTAINER, sTRING, lENGTH); \
rET = 0; \
} while(0)
# define STRING_TO_128BITS(sTRING, cONTAINER, rET) \
STRING_TO_XBITS(sTRING, 16, cONTAINER, rET)
# define STRING_TO_256BITS(sTRING, cONTAINER, rET) \
STRING_TO_XBITS(sTRING, 32, cONTAINER, rET)
# define STRING_TO_RAND STRING_TO_128BITS
# define STRING_TO_AUTH_KEY STRING_TO_128BITS
# define STRING_TO_AUTH_RES STRING_TO_128BITS
# define STRING_TO_AUTN STRING_TO_128BITS
# define STRING_TO_KASME STRING_TO_256BITS
# define STRING_TO_XRES(sTRING, lENGTH, cONTAINER, rET) \
do { \
STRING_TO_XBITS(sTRING, lENGTH, (cONTAINER)->data, rET); \
if (rET != -1) \
(cONTAINER)->size = lENGTH; \
} while(0)
#define STRING_TO_XBITS(sTRING, lENGTH, cONTAINER, rET) \
do { \
memcpy(cONTAINER, sTRING, lENGTH); \
rET = 0; \
} while (0)
#define STRING_TO_128BITS(sTRING, cONTAINER, rET) \
STRING_TO_XBITS(sTRING, 16, cONTAINER, rET)
#define STRING_TO_256BITS(sTRING, cONTAINER, rET) \
STRING_TO_XBITS(sTRING, 32, cONTAINER, rET)
#define STRING_TO_RAND STRING_TO_128BITS
#define STRING_TO_AUTH_KEY STRING_TO_128BITS
#define STRING_TO_AUTH_RES STRING_TO_128BITS
#define STRING_TO_AUTN STRING_TO_128BITS
#define STRING_TO_KASME STRING_TO_256BITS
#define STRING_TO_XRES(sTRING, lENGTH, cONTAINER, rET) \
do { \
STRING_TO_XBITS(sTRING, lENGTH, (cONTAINER)->data, rET); \
if (rET != -1) (cONTAINER)->size = lENGTH; \
} while (0)
/* RES amd XRES can have a variable length of 4-16 octets */
typedef struct {
......@@ -93,18 +91,22 @@ typedef struct {
uint8_t data[XRES_LENGTH_MAX];
} res_t;
#define FORMAT_128BITS "%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x"
#define XRES_FORMAT FORMAT_128BITS
#define RAND_FORMAT FORMAT_128BITS
#define AUTN_FORMAT FORMAT_128BITS
#define FORMAT_128BITS \
"%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%02x,%" \
"02x,%02x"
#define XRES_FORMAT FORMAT_128BITS
#define RAND_FORMAT FORMAT_128BITS
#define AUTN_FORMAT FORMAT_128BITS
#define KASME_FORMAT FORMAT_128BITS
#define DISPLAY_128BITS(bUFFER) \
bUFFER[0], bUFFER[1], bUFFER[2], bUFFER[3], bUFFER[4], bUFFER[5], bUFFER[6], bUFFER[7], \
bUFFER[8], bUFFER[9], bUFFER[10], bUFFER[11], bUFFER[12], bUFFER[13], bUFFER[14], bUFFER[15]
#define DISPLAY_128BITS_2(bUFFER) \
bUFFER[16], bUFFER[17], bUFFER[18], bUFFER[19], bUFFER[20], bUFFER[21], bUFFER[22], bUFFER[23], \
bUFFER[24], bUFFER[25], bUFFER[26], bUFFER[27], bUFFER[28], bUFFER[29], bUFFER[30], bUFFER[31]
#define DISPLAY_128BITS(bUFFER) \
bUFFER[0], bUFFER[1], bUFFER[2], bUFFER[3], bUFFER[4], bUFFER[5], bUFFER[6], \
bUFFER[7], bUFFER[8], bUFFER[9], bUFFER[10], bUFFER[11], bUFFER[12], \
bUFFER[13], bUFFER[14], bUFFER[15]
#define DISPLAY_128BITS_2(bUFFER) \
bUFFER[16], bUFFER[17], bUFFER[18], bUFFER[19], bUFFER[20], bUFFER[21], \
bUFFER[22], bUFFER[23], bUFFER[24], bUFFER[25], bUFFER[26], bUFFER[27], \
bUFFER[28], bUFFER[29], bUFFER[30], bUFFER[31]
#define XRES_DISPLAY(bUFFER) DISPLAY_128BITS(bUFFER)
#define RAND_DISPLAY(bUFFER) DISPLAY_128BITS(bUFFER)
......@@ -121,10 +123,10 @@ typedef struct eutran_vector_s {
uint8_t kasme[KASME_LENGTH_OCTETS];
} eutran_vector_t;
#define FC_KASME (0x10)
#define FC_KENB (0x11)
#define FC_NH (0x12)
#define FC_KENB_STAR (0x13)
#define FC_KASME (0x10)
#define FC_KENB (0x11)
#define FC_NH (0x12)
#define FC_KENB_STAR (0x13)
/* 33401 #A.7 Algorithm for key derivation function.
* This FC should be used for:
* - NAS Encryption algorithm
......@@ -133,16 +135,16 @@ typedef struct eutran_vector_s {
* - RRC Integrity algorithm
* - User Plane Encryption algorithm
*/
#define FC_ALG_KEY_DER (0x15)
#define FC_KASME_TO_CK (0x16)
#define FC_ALG_KEY_DER (0x15)
#define FC_KASME_TO_CK (0x16)
typedef enum {
NAS_ENC_ALG = 0x01,
NAS_INT_ALG = 0x02,
RRC_ENC_ALG = 0x03,
RRC_INT_ALG = 0x04,
UP_ENC_ALG = 0x05,
UP_INT_ALG = 0x06
UP_ENC_ALG = 0x05,
UP_INT_ALG = 0x06
} algorithm_type_dist_t;
#endif /* FILE_SECURITY_TYPES_SEEN */
This diff is collapsed.
This diff is collapsed.
......@@ -3,9 +3,9 @@
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
......@@ -28,24 +28,25 @@
#include "itti_msg.hpp"
#include "itti.hpp"
extern itti_mw *itti_inst;
extern itti_mw* itti_inst;
itti_msg::itti_msg() :
msg_type(ITTI_MSG_TYPE_NONE), origin(TASK_NONE), destination(TASK_NONE) {
itti_msg::itti_msg()
: msg_type(ITTI_MSG_TYPE_NONE), origin(TASK_NONE), destination(TASK_NONE) {
msg_num = itti_inst->increment_message_number();
};
itti_msg::itti_msg(const itti_msg_type_t msg_type, task_id_t origin, task_id_t destination) :
msg_type(msg_type), origin(origin), destination(destination) {
itti_msg::itti_msg(
const itti_msg_type_t msg_type, task_id_t origin, task_id_t destination)
: msg_type(msg_type), origin(origin), destination(destination) {
msg_num = itti_inst->increment_message_number();
};
itti_msg::itti_msg(const itti_msg& i) :
msg_type(i.msg_type),msg_num(i.msg_num), origin(i.origin), destination(i.destination) {
};
itti_msg::itti_msg(const itti_msg& i)
: msg_type(i.msg_type),
msg_num(i.msg_num),
origin(i.origin),
destination(i.destination){};
const char* itti_msg::get_msg_name()
{
const char* itti_msg::get_msg_name() {
return "UNINITIALIZED";
}
......@@ -4,8 +4,8 @@
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
*file except in compliance with the License. You may obtain a copy of the
*License at
* file except in compliance with the License. You may obtain a copy of the
* License at
*
* http://www.openairinterface.org/?page_id=698
*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment