Loading ccsrc/Ports/ImsMonitorNgapPort/ImsMonitorNgapPort.cc +16 −9 Original line number Diff line number Diff line #include "ImsMonitorNgapPort.hh" #include "NGAP_PDU_Descriptions.hh" #include "ngap_layer_factory.hh" #include "layer.hh" #include "params.hh" #include "loggers.hh" namespace AtsIms5gIot__TestSystem { Loading Loading @@ -44,22 +50,23 @@ namespace AtsIms5gIot__TestSystem { void ImsMonitorNgapPort::user_map(const char * system_port) { loggers::get_instance().log(">>> ImsMonitorNgapPort::user_map: %s", system_port); // Build layer stack /*params::iterator it = _cfg_params.find(std::string("params")); params::iterator it = _cfg_params.find(std::string("params")); if (it != _cfg_params.end()) { loggers::get_instance().log("ImsMonitorNgapPort::user_map: %s", it->second.c_str()); loggers::get_instance().log("NGAPPort::user_map: %s", it->second.c_str()); // Setup parameters params::convert(_layer_params, it->second); // TODO This _layer_params seems to be useless // Create layer _layer = layer_stack_builder::get_instance()->create_layer_stack(it->second.c_str()); if (static_cast<diameter_layer *>(_layer) == nullptr) { loggers::get_instance().error("ImsMonitorNgapPort::user_map: Invalid stack configuration: %s", it->second.c_str()); } static_cast<diameter_layer *>(_layer)->add_upper_port(this); } else {*/ loggers::get_instance().error("ImsMonitorNgapPort::user_map: No layers defined in configuration file"); /*}*/ if (static_cast<ngap_layer*>(_layer) == nullptr) { loggers::get_instance().error("NGAPPort::user_map: Invalid stack configurationi - NOT SCTP: %s", it->second.c_str()); } static_cast<ngap_layer*>(_layer)->add_upper_port(this); } else { loggers::get_instance().error("NGAPPort::user_map: No layers defined in configuration file"); } } // End of user_map method void ImsMonitorNgapPort::user_unmap(const char * system_port) Loading ccsrc/Ports/LibIot/AdapterConfigPort.cc +20 −71 Original line number Diff line number Diff line Loading @@ -39,90 +39,39 @@ namespace LibIot__TestInterface { void AdapterConfigPort::outgoing_send(const LibIot__TypesAndValues::GeneralConfigurationReq& send_par) { loggers::get_instance().log_msg(">>> AdapterConfigPort::outgoing_send: ", send_par); //{ captureProcessIpAddress := "127.0.0.1", captureProcessPort := 5501, captureMode := { offlineCapture := { offset := { seconds := 0, microseconds := 0 }, captureSource := { sessionsPath := "C:/cygwin/tmp/IMS-UE_tool_pcaps", mergeFileList := { mergeFileList := { }, mergeFilePath := "", mergeToolPath := "" } } } }, eutInfoList := omit } // Register this object for AdapterConfigPort /* geonetworking_layer *p = registration<geonetworking_layer>::get_instance().get_item(std::string("GN")); if (p != NULL) { loggers::get_instance().log("AdapterConfigPort::outgoing_send: Got GN layer %p", p); LibIot__TypesAndValues::AcGnResponse response; response.failure() = LibIot__TypesAndValues::AcGnResponseFailure(BOOLEAN(false)); if (send_par.ischosen(LibIot__TypesAndValues::AcGnPrimitive::ALT_startBeaconing)) { loggers::get_instance().log("AdapterConfigPort::outgoing_send: Start beaconing"); p->start_beaconing(send_par.startBeaconing().beaconPacket()); // No response return; } else if (send_par.ischosen(LibIot__TypesAndValues::AcGnPrimitive::ALT_stopBeaconing)) { loggers::get_instance().log("AdapterConfigPort::outgoing_send: Stop beaconing"); p->stop_beaconing(); // No response return; } else if (send_par.ischosen(LibIot__TypesAndValues::AcGnPrimitive::ALT_getLongPosVector)) { loggers::get_instance().log("AdapterConfigPort::outgoing_send: Get LongPosVector"); const LibIot__TypesAndValues::LongPosVector *lpv = p->get_lpv(send_par.getLongPosVector().gnAddress()); loggers::get_instance().log("AdapterConfigPort::outgoing_send: Return value: %p", lpv); if (lpv == nullptr) { response.failure() = LibIot__TypesAndValues::AcGnResponseFailure(BOOLEAN(true)); } else { response.getLongPosVector() = *lpv; } } else if (send_par.ischosen(LibIot__TypesAndValues::AcGnPrimitive::ALT_startPassBeaconing)) { loggers::get_instance().log("AdapterConfigPort::outgoing_send: Start pass beaconing"); p->start_pass_beaconing(send_par.startPassBeaconing().beaconHeader()); // No response return; } else if (send_par.ischosen(LibIot__TypesAndValues::AcGnPrimitive::ALT_stopPassBeaconing)) { loggers::get_instance().log("AdapterConfigPort::outgoing_send: Stop pass beaconing"); p->stop_pass_beaconing(); // No response return; } else { response.failure() = LibIot__TypesAndValues::AcGnResponseFailure(BOOLEAN(true)); } // Send response LibIot__TypesAndValues::GeneralConfigurationRsp response; response.status() = LibIot__TypesAndValues::Status(LibCommon__VerdictControl::FncRetCode::e__success, OPTIONAL<CHARSTRING>("Configuration successful")); loggers::get_instance().log_msg("AdapterConfigPort::outgoing_send: Send response: ", response); incoming_message(response); } else {*/ loggers::get_instance().error("AdapterConfigPort::outgoing_send: %s not registered", "geoNetworkingPort"); /*}*/ } void AdapterConfigPort::outgoing_send(const LibIot__TypesAndValues::SetFilterReq& send_par) { loggers::get_instance().log_msg(">>> AdapterConfigPort::outgoing_send: ", send_par); LibIot__TypesAndValues::SetFilterRsp response; response.status() = LibIot__TypesAndValues::Status(LibCommon__VerdictControl::FncRetCode::e__success, OPTIONAL<CHARSTRING>("Configuration successful")); loggers::get_instance().log_msg("AdapterConfigPort::outgoing_send: Send response: ", response); incoming_message(response); } void AdapterConfigPort::outgoing_send(const LibIot__TypesAndValues::StartTrafficCaptureReq& send_par) { loggers::get_instance().log_msg(">>> AdapterConfigPort::outgoing_send: ", send_par); LibIot__TypesAndValues::StartTrafficCaptureRsp response; response.status() = LibIot__TypesAndValues::Status(LibCommon__VerdictControl::FncRetCode::e__success, OPTIONAL<CHARSTRING>("Configuration successful")); loggers::get_instance().log_msg("AdapterConfigPort::outgoing_send: Send response: ", response); incoming_message(response); } void AdapterConfigPort::outgoing_send(const LibIot__TypesAndValues::StopTrafficCaptureReq& send_par) { loggers::get_instance().log_msg(">>> AdapterConfigPort::outgoing_send: ", send_par); // Register this object for AdapterConfigPort /*geonetworking_layer *p = registration<geonetworking_layer>::get_instance().get_item(std::string("GN")); if (p != NULL) { loggers::get_instance().log("AdapterConfigPort::outgoing_send: Got GN layer %p", p); LibItsCommon__TypesAndValues::AdapterControlResults response; response.acSecResponse() = BOOLEAN(true); if (send_par.ischosen(LibItsCommon__TypesAndValues::AcSecPrimitive::ALT_acEnableSecurity)) { loggers::get_instance().log("AdapterConfigPort::outgoing_send: Enable secured mode"); std::string str(static_cast<const char *>(send_par.acEnableSecurity().certificateId())); if (p->enable_secured_mode(str, send_par.acEnableSecurity().enforceSecurity()) == -1) { response.acSecResponse() = BOOLEAN(false); } } else if (send_par.ischosen(LibItsCommon__TypesAndValues::AcSecPrimitive::ALT_acDisableSecurity)) { loggers::get_instance().log("AdapterConfigPort::outgoing_send: Disable secured mode"); if (p->disable_secured_mode() == -1) { response.acSecResponse() = BOOLEAN(false); } } else { response.acSecResponse() = BOOLEAN(false); } // Send response LibIot__TypesAndValues::StopTrafficCaptureRsp response; response.status() = LibIot__TypesAndValues::Status(LibCommon__VerdictControl::FncRetCode::e__success, OPTIONAL<CHARSTRING>("Configuration successful")); loggers::get_instance().log_msg("AdapterConfigPort::outgoing_send: Send response: ", response); incoming_message(response); } else {*/ loggers::get_instance().error("AdapterConfigPort::outgoing_send: %s not registered", "geoNetworkingPort"); /*}*/ } } // namespace LibIot__TestInterface ccsrc/Protocols/NGAP_layer/ngap_layer.cc +2 −2 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ #include "ngap_types.hh" #include "NGAP_TestSystem.hh" #include "AtsIms5gIot_TestSystem.hh" #include "ngap_layer_factory.hh" Loading @@ -19,7 +19,7 @@ #include "loggers.hh" ngap_layer::ngap_layer(const std::string &p_type, const std::string ¶m) : t_layer<LibNGAP__Interface::NGAPPort>(p_type), _params(), _codec() { ngap_layer::ngap_layer(const std::string &p_type, const std::string ¶m) : t_layer<AtsIms5gIot__TestSystem::ImsMonitorNgapPort>(p_type), _params(), _codec() { loggers::get_instance().log(">>> ngap_layer::ngap_layer: %s, %s", to_string().c_str(), param.c_str()); // Setup parameters params::convert(_params, param); Loading ccsrc/Protocols/NGAP_layer/ngap_layer.hh +3 −3 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ #include "ngap_codec.hh" #include "t_layer.hh" namespace LibNGAP__Interface { namespace AtsIms5gIot__TestSystem { class NGAPPort; //! Forward declaration of TITAN class } // namespace NGAP__TestSystem Loading @@ -21,7 +21,7 @@ namespace LibNGAP__Interface { * \class ngap_layer * \brief This class provides description of ITS NGAP protocol layer */ class ngap_layer : public t_layer<LibNGAP__Interface::NGAPPort> { class ngap_layer : public t_layer<AtsIms5gIot__TestSystem::ImsMonitorNgapPort> { params_ngap _params; //! Layer parameters ngap_codec _codec; //! NGAP codec public: //! \publicsection Loading @@ -29,7 +29,7 @@ public: //! \publicsection * \brief Default constructor * Create a new instance of the ngap_layer class */ explicit ngap_layer() : t_layer<LibNGAP__Interface::NGAPPort>(), _params(), _codec(){}; explicit ngap_layer() : t_layer<AtsIms5gIot__TestSystem::ImsMonitorNgapPort>(), _params(), _codec(){}; /*! * \brief Specialised constructor * Create a new instance of the ngap_layer class Loading emergency-5g-iop.code-workspace +0 −6 Original line number Diff line number Diff line Loading @@ -3,12 +3,6 @@ { "path": "." }, { "path": "../emergency-iop" }, { "path": "../ngap" }, { "path": "../nas" } Loading Loading
ccsrc/Ports/ImsMonitorNgapPort/ImsMonitorNgapPort.cc +16 −9 Original line number Diff line number Diff line #include "ImsMonitorNgapPort.hh" #include "NGAP_PDU_Descriptions.hh" #include "ngap_layer_factory.hh" #include "layer.hh" #include "params.hh" #include "loggers.hh" namespace AtsIms5gIot__TestSystem { Loading Loading @@ -44,22 +50,23 @@ namespace AtsIms5gIot__TestSystem { void ImsMonitorNgapPort::user_map(const char * system_port) { loggers::get_instance().log(">>> ImsMonitorNgapPort::user_map: %s", system_port); // Build layer stack /*params::iterator it = _cfg_params.find(std::string("params")); params::iterator it = _cfg_params.find(std::string("params")); if (it != _cfg_params.end()) { loggers::get_instance().log("ImsMonitorNgapPort::user_map: %s", it->second.c_str()); loggers::get_instance().log("NGAPPort::user_map: %s", it->second.c_str()); // Setup parameters params::convert(_layer_params, it->second); // TODO This _layer_params seems to be useless // Create layer _layer = layer_stack_builder::get_instance()->create_layer_stack(it->second.c_str()); if (static_cast<diameter_layer *>(_layer) == nullptr) { loggers::get_instance().error("ImsMonitorNgapPort::user_map: Invalid stack configuration: %s", it->second.c_str()); } static_cast<diameter_layer *>(_layer)->add_upper_port(this); } else {*/ loggers::get_instance().error("ImsMonitorNgapPort::user_map: No layers defined in configuration file"); /*}*/ if (static_cast<ngap_layer*>(_layer) == nullptr) { loggers::get_instance().error("NGAPPort::user_map: Invalid stack configurationi - NOT SCTP: %s", it->second.c_str()); } static_cast<ngap_layer*>(_layer)->add_upper_port(this); } else { loggers::get_instance().error("NGAPPort::user_map: No layers defined in configuration file"); } } // End of user_map method void ImsMonitorNgapPort::user_unmap(const char * system_port) Loading
ccsrc/Ports/LibIot/AdapterConfigPort.cc +20 −71 Original line number Diff line number Diff line Loading @@ -39,90 +39,39 @@ namespace LibIot__TestInterface { void AdapterConfigPort::outgoing_send(const LibIot__TypesAndValues::GeneralConfigurationReq& send_par) { loggers::get_instance().log_msg(">>> AdapterConfigPort::outgoing_send: ", send_par); //{ captureProcessIpAddress := "127.0.0.1", captureProcessPort := 5501, captureMode := { offlineCapture := { offset := { seconds := 0, microseconds := 0 }, captureSource := { sessionsPath := "C:/cygwin/tmp/IMS-UE_tool_pcaps", mergeFileList := { mergeFileList := { }, mergeFilePath := "", mergeToolPath := "" } } } }, eutInfoList := omit } // Register this object for AdapterConfigPort /* geonetworking_layer *p = registration<geonetworking_layer>::get_instance().get_item(std::string("GN")); if (p != NULL) { loggers::get_instance().log("AdapterConfigPort::outgoing_send: Got GN layer %p", p); LibIot__TypesAndValues::AcGnResponse response; response.failure() = LibIot__TypesAndValues::AcGnResponseFailure(BOOLEAN(false)); if (send_par.ischosen(LibIot__TypesAndValues::AcGnPrimitive::ALT_startBeaconing)) { loggers::get_instance().log("AdapterConfigPort::outgoing_send: Start beaconing"); p->start_beaconing(send_par.startBeaconing().beaconPacket()); // No response return; } else if (send_par.ischosen(LibIot__TypesAndValues::AcGnPrimitive::ALT_stopBeaconing)) { loggers::get_instance().log("AdapterConfigPort::outgoing_send: Stop beaconing"); p->stop_beaconing(); // No response return; } else if (send_par.ischosen(LibIot__TypesAndValues::AcGnPrimitive::ALT_getLongPosVector)) { loggers::get_instance().log("AdapterConfigPort::outgoing_send: Get LongPosVector"); const LibIot__TypesAndValues::LongPosVector *lpv = p->get_lpv(send_par.getLongPosVector().gnAddress()); loggers::get_instance().log("AdapterConfigPort::outgoing_send: Return value: %p", lpv); if (lpv == nullptr) { response.failure() = LibIot__TypesAndValues::AcGnResponseFailure(BOOLEAN(true)); } else { response.getLongPosVector() = *lpv; } } else if (send_par.ischosen(LibIot__TypesAndValues::AcGnPrimitive::ALT_startPassBeaconing)) { loggers::get_instance().log("AdapterConfigPort::outgoing_send: Start pass beaconing"); p->start_pass_beaconing(send_par.startPassBeaconing().beaconHeader()); // No response return; } else if (send_par.ischosen(LibIot__TypesAndValues::AcGnPrimitive::ALT_stopPassBeaconing)) { loggers::get_instance().log("AdapterConfigPort::outgoing_send: Stop pass beaconing"); p->stop_pass_beaconing(); // No response return; } else { response.failure() = LibIot__TypesAndValues::AcGnResponseFailure(BOOLEAN(true)); } // Send response LibIot__TypesAndValues::GeneralConfigurationRsp response; response.status() = LibIot__TypesAndValues::Status(LibCommon__VerdictControl::FncRetCode::e__success, OPTIONAL<CHARSTRING>("Configuration successful")); loggers::get_instance().log_msg("AdapterConfigPort::outgoing_send: Send response: ", response); incoming_message(response); } else {*/ loggers::get_instance().error("AdapterConfigPort::outgoing_send: %s not registered", "geoNetworkingPort"); /*}*/ } void AdapterConfigPort::outgoing_send(const LibIot__TypesAndValues::SetFilterReq& send_par) { loggers::get_instance().log_msg(">>> AdapterConfigPort::outgoing_send: ", send_par); LibIot__TypesAndValues::SetFilterRsp response; response.status() = LibIot__TypesAndValues::Status(LibCommon__VerdictControl::FncRetCode::e__success, OPTIONAL<CHARSTRING>("Configuration successful")); loggers::get_instance().log_msg("AdapterConfigPort::outgoing_send: Send response: ", response); incoming_message(response); } void AdapterConfigPort::outgoing_send(const LibIot__TypesAndValues::StartTrafficCaptureReq& send_par) { loggers::get_instance().log_msg(">>> AdapterConfigPort::outgoing_send: ", send_par); LibIot__TypesAndValues::StartTrafficCaptureRsp response; response.status() = LibIot__TypesAndValues::Status(LibCommon__VerdictControl::FncRetCode::e__success, OPTIONAL<CHARSTRING>("Configuration successful")); loggers::get_instance().log_msg("AdapterConfigPort::outgoing_send: Send response: ", response); incoming_message(response); } void AdapterConfigPort::outgoing_send(const LibIot__TypesAndValues::StopTrafficCaptureReq& send_par) { loggers::get_instance().log_msg(">>> AdapterConfigPort::outgoing_send: ", send_par); // Register this object for AdapterConfigPort /*geonetworking_layer *p = registration<geonetworking_layer>::get_instance().get_item(std::string("GN")); if (p != NULL) { loggers::get_instance().log("AdapterConfigPort::outgoing_send: Got GN layer %p", p); LibItsCommon__TypesAndValues::AdapterControlResults response; response.acSecResponse() = BOOLEAN(true); if (send_par.ischosen(LibItsCommon__TypesAndValues::AcSecPrimitive::ALT_acEnableSecurity)) { loggers::get_instance().log("AdapterConfigPort::outgoing_send: Enable secured mode"); std::string str(static_cast<const char *>(send_par.acEnableSecurity().certificateId())); if (p->enable_secured_mode(str, send_par.acEnableSecurity().enforceSecurity()) == -1) { response.acSecResponse() = BOOLEAN(false); } } else if (send_par.ischosen(LibItsCommon__TypesAndValues::AcSecPrimitive::ALT_acDisableSecurity)) { loggers::get_instance().log("AdapterConfigPort::outgoing_send: Disable secured mode"); if (p->disable_secured_mode() == -1) { response.acSecResponse() = BOOLEAN(false); } } else { response.acSecResponse() = BOOLEAN(false); } // Send response LibIot__TypesAndValues::StopTrafficCaptureRsp response; response.status() = LibIot__TypesAndValues::Status(LibCommon__VerdictControl::FncRetCode::e__success, OPTIONAL<CHARSTRING>("Configuration successful")); loggers::get_instance().log_msg("AdapterConfigPort::outgoing_send: Send response: ", response); incoming_message(response); } else {*/ loggers::get_instance().error("AdapterConfigPort::outgoing_send: %s not registered", "geoNetworkingPort"); /*}*/ } } // namespace LibIot__TestInterface
ccsrc/Protocols/NGAP_layer/ngap_layer.cc +2 −2 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ #include "ngap_types.hh" #include "NGAP_TestSystem.hh" #include "AtsIms5gIot_TestSystem.hh" #include "ngap_layer_factory.hh" Loading @@ -19,7 +19,7 @@ #include "loggers.hh" ngap_layer::ngap_layer(const std::string &p_type, const std::string ¶m) : t_layer<LibNGAP__Interface::NGAPPort>(p_type), _params(), _codec() { ngap_layer::ngap_layer(const std::string &p_type, const std::string ¶m) : t_layer<AtsIms5gIot__TestSystem::ImsMonitorNgapPort>(p_type), _params(), _codec() { loggers::get_instance().log(">>> ngap_layer::ngap_layer: %s, %s", to_string().c_str(), param.c_str()); // Setup parameters params::convert(_params, param); Loading
ccsrc/Protocols/NGAP_layer/ngap_layer.hh +3 −3 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ #include "ngap_codec.hh" #include "t_layer.hh" namespace LibNGAP__Interface { namespace AtsIms5gIot__TestSystem { class NGAPPort; //! Forward declaration of TITAN class } // namespace NGAP__TestSystem Loading @@ -21,7 +21,7 @@ namespace LibNGAP__Interface { * \class ngap_layer * \brief This class provides description of ITS NGAP protocol layer */ class ngap_layer : public t_layer<LibNGAP__Interface::NGAPPort> { class ngap_layer : public t_layer<AtsIms5gIot__TestSystem::ImsMonitorNgapPort> { params_ngap _params; //! Layer parameters ngap_codec _codec; //! NGAP codec public: //! \publicsection Loading @@ -29,7 +29,7 @@ public: //! \publicsection * \brief Default constructor * Create a new instance of the ngap_layer class */ explicit ngap_layer() : t_layer<LibNGAP__Interface::NGAPPort>(), _params(), _codec(){}; explicit ngap_layer() : t_layer<AtsIms5gIot__TestSystem::ImsMonitorNgapPort>(), _params(), _codec(){}; /*! * \brief Specialised constructor * Create a new instance of the ngap_layer class Loading
emergency-5g-iop.code-workspace +0 −6 Original line number Diff line number Diff line Loading @@ -3,12 +3,6 @@ { "path": "." }, { "path": "../emergency-iop" }, { "path": "../ngap" }, { "path": "../nas" } Loading