Commit b10aeaed authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Add debuging info

parent c0dad870
...@@ -366,7 +366,7 @@ void amf_n1::handle_itti_message(itti_uplink_nas_data_ind& nas_data_ind) { ...@@ -366,7 +366,7 @@ void amf_n1::handle_itti_message(itti_uplink_nas_data_ind& nas_data_ind) {
} }
comUt::print_buffer( comUt::print_buffer(
"amf_n1", "Uplink Nas Message", (uint8_t*) bdata(recved_nas_msg), "amf_n1", "Received Uplink NAS Message", (uint8_t*) bdata(recved_nas_msg),
blength(recved_nas_msg)); blength(recved_nas_msg));
uint8_t ulCount = 0; uint8_t ulCount = 0;
...@@ -447,6 +447,10 @@ void amf_n1::handle_itti_message(itti_uplink_nas_data_ind& nas_data_ind) { ...@@ -447,6 +447,10 @@ void amf_n1::handle_itti_message(itti_uplink_nas_data_ind& nas_data_ind) {
} }
} }
comUt::print_buffer(
"amf_n1", "Decoded Plain Message", (uint8_t*) bdata(decoded_plain_msg),
blength(decoded_plain_msg));
if (nas_data_ind.is_nas_signalling_estab_req) { if (nas_data_ind.is_nas_signalling_estab_req) {
Logger::amf_n1().debug("Received NAS signalling establishment request..."); Logger::amf_n1().debug("Received NAS signalling establishment request...");
comUt::print_buffer( comUt::print_buffer(
...@@ -2223,7 +2227,7 @@ void amf_n1::security_mode_complete_handle( ...@@ -2223,7 +2227,7 @@ void amf_n1::security_mode_complete_handle(
// TODO: remove hardcoded values // TODO: remove hardcoded values
registration_accept->set_5GS_Network_Feature_Support(0x01, 0x00); registration_accept->set_5GS_Network_Feature_Support(0x01, 0x00);
registration_accept->setT3512_Value(0x5, T3512_TIMER_VALUE_MIN); // registration_accept->setT3512_Value(0x5, T3512_TIMER_VALUE_MIN);
uint8_t buffer[BUFFER_SIZE_1024] = {0}; uint8_t buffer[BUFFER_SIZE_1024] = {0};
int encoded_size = int encoded_size =
registration_accept->encode2buffer(buffer, BUFFER_SIZE_1024); registration_accept->encode2buffer(buffer, BUFFER_SIZE_1024);
......
...@@ -861,6 +861,7 @@ void amf_n2::handle_itti_message(itti_initial_context_setup_request& itti_msg) { ...@@ -861,6 +861,7 @@ void amf_n2::handle_itti_message(itti_initial_context_setup_request& itti_msg) {
0xe000); // TODO: remove hardcoded value 0xe000); // TODO: remove hardcoded value
msg->setSecurityKey((uint8_t*) bdata(itti_msg.kgnb)); msg->setSecurityKey((uint8_t*) bdata(itti_msg.kgnb));
msg->setNasPdu((uint8_t*) bdata(itti_msg.nas), blength(itti_msg.nas)); msg->setNasPdu((uint8_t*) bdata(itti_msg.nas), blength(itti_msg.nas));
// Allowed NSSAI // Allowed NSSAI
std::vector<S_Nssai> list; std::vector<S_Nssai> list;
for (auto p : amf_cfg.plmn_list) { for (auto p : amf_cfg.plmn_list) {
......
...@@ -94,13 +94,14 @@ int NAS_Message_Container::decodefrombuffer( ...@@ -94,13 +94,14 @@ int NAS_Message_Container::decodefrombuffer(
Logger::nas_mm().debug("Decoding NAS_Message_Container iei (0x%x)", *buf); Logger::nas_mm().debug("Decoding NAS_Message_Container iei (0x%x)", *buf);
int decoded_size = 0; int decoded_size = 0;
if (is_option) { if (is_option) {
decoded_size++; decoded_size++; // for IE
} }
length = 0; length = 0;
length |= (*(buf + decoded_size)) << 8; length |= (*(buf + decoded_size)) << 8;
decoded_size++; decoded_size++;
length |= *(buf + decoded_size); length |= *(buf + decoded_size);
decoded_size++; decoded_size++;
decode_bstring(&_value, length, (buf + decoded_size), len - decoded_size); decode_bstring(&_value, length, (buf + decoded_size), len - decoded_size);
decoded_size += length; decoded_size += length;
for (int i = 0; i < length; i++) { for (int i = 0; i < length; i++) {
......
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