Loading ccsrc/Framework/include/params.hh +1 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ public: //! \publicsection static const std::string& nic; //! Network Interface Card parameter name static const std::string& latitude; //! Test system Latitude parameter name static const std::string& longitude; //! Test system Longitude parameter name static const std::string& device_mode; //! To indicate to the lower layer to act as a standalone device static const std::string& server; //! HTTP server address (e.g. www.etsi.org) static const std::string& port; //! HTTP server port. Default: 80 Loading ccsrc/Framework/src/params.cc +1 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ const std::string& params::eth_type = std::string("eth_type"); const std::string& params::nic = std::string("nic"); const std::string& params::latitude = std::string("latitude"); const std::string& params::longitude = std::string("longitude"); const std::string& params::device_mode = std::string("device_mode"); const std::string& params::server = std::string("server"); const std::string& params::port = std::string("port"); Loading ccsrc/Protocols/Http/http_codec.cc +3 −3 Original line number Diff line number Diff line Loading @@ -399,7 +399,7 @@ int http_codec::encode_body(const LibItsHttp__MessageBodyTypes::HttpMessageBody& it = _codecs.find("http_its"); // TODO Use params if (it != _codecs.cend()) { loggers::get_instance().log("http_codec::encode_body: Call '%s'", it->first.c_str()); _codecs["http_its"]->encode((Record_Type&)binary_body.ieee1609dot2__data(), p_encoding_buffer); // TODO Use params //_codecs["http_its"]->encode((Record_Type&)binary_body.ieee1609dot2__data(), p_encoding_buffer); // TODO Use params #if defined(GEMALTO_FIX) // Temporary fix to be removed Loading Loading @@ -567,12 +567,12 @@ int http_codec::decode_body(TTCN_Buffer& decoding_buffer, LibItsHttp__MessageBod } }*/ loggers::get_instance().log("http_codec::decode_body: Call '%s'", it->first.c_str()); http_etsi_ieee1609dot2_codec* codec = new http_etsi_ieee1609dot2_codec(); /*http_etsi_ieee1609dot2_codec* codec = new http_etsi_ieee1609dot2_codec(); if (codec->decode(body, binary_body.ieee1609dot2__data()) == 0) { message_body.binary__body() = binary_body; processed = true; } delete codec; delete codec;*/ } } // TODO Add new HTTP message codec here if (!processed) { Loading ccsrc/Protocols/Http/http_codec.hh +1 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ private: int decode_headers(TTCN_Buffer& decoding_buffer, LibItsHttp__TypesAndValues::HeaderLines& headers); int decode_header(CHARSTRING& header_line, LibItsHttp__TypesAndValues::HeaderLine& header); int decode_body(TTCN_Buffer& decoding_buffer, LibItsHttp__MessageBodyTypes::HttpMessageBody& message_body); int decode_body(TTCN_Buffer& decoding_buffer, LibItsHttp__MessageBodyTypes::HttpMessageBody& message_body, const std::string& p_content_type); int get_line(TTCN_Buffer& buffer, CHARSTRING& to, const bool concatenate_header_lines = false); }; // End of class http_codec ccsrc/Protocols/Sip/sip_codec_request.cc +12 −4 Original line number Diff line number Diff line Loading @@ -337,10 +337,18 @@ int sip_codec_request::encode_request_message_body(const LibSip__MessageBodyType sdp_message_t* sdp_body; ::sdp_message_init(&sdp_body); INTEGER sdp.protocol__version(); SDP__Origin sdp.origin(); CHARSTRING sdp.session__name(); INTEGER version = sdp.protocol__version(); ::sdp_message_v_version_set(sdp_body, (char*)std::to_string(static_cast<const int>(version)).c_str()); LibSip__SDPTypes::SDP__Origin origin = sdp.origin(); ::sdp_message_o_origin_set( sdp_body, (char*)static_cast<const char*>(origin.user__name()), (char*)static_cast<const char*>(origin.session__id()), (char*)static_cast<const char*>(origin.session__version()), (char*)static_cast<const char*>(origin.net__type()), (char*)static_cast<const char*>(origin.addr__type()), (char*)static_cast<const char*>(origin.addr()) ); char* buff = nullptr; ::sdp_message_to_str(sdp_body, &buff); Loading Loading
ccsrc/Framework/include/params.hh +1 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ public: //! \publicsection static const std::string& nic; //! Network Interface Card parameter name static const std::string& latitude; //! Test system Latitude parameter name static const std::string& longitude; //! Test system Longitude parameter name static const std::string& device_mode; //! To indicate to the lower layer to act as a standalone device static const std::string& server; //! HTTP server address (e.g. www.etsi.org) static const std::string& port; //! HTTP server port. Default: 80 Loading
ccsrc/Framework/src/params.cc +1 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ const std::string& params::eth_type = std::string("eth_type"); const std::string& params::nic = std::string("nic"); const std::string& params::latitude = std::string("latitude"); const std::string& params::longitude = std::string("longitude"); const std::string& params::device_mode = std::string("device_mode"); const std::string& params::server = std::string("server"); const std::string& params::port = std::string("port"); Loading
ccsrc/Protocols/Http/http_codec.cc +3 −3 Original line number Diff line number Diff line Loading @@ -399,7 +399,7 @@ int http_codec::encode_body(const LibItsHttp__MessageBodyTypes::HttpMessageBody& it = _codecs.find("http_its"); // TODO Use params if (it != _codecs.cend()) { loggers::get_instance().log("http_codec::encode_body: Call '%s'", it->first.c_str()); _codecs["http_its"]->encode((Record_Type&)binary_body.ieee1609dot2__data(), p_encoding_buffer); // TODO Use params //_codecs["http_its"]->encode((Record_Type&)binary_body.ieee1609dot2__data(), p_encoding_buffer); // TODO Use params #if defined(GEMALTO_FIX) // Temporary fix to be removed Loading Loading @@ -567,12 +567,12 @@ int http_codec::decode_body(TTCN_Buffer& decoding_buffer, LibItsHttp__MessageBod } }*/ loggers::get_instance().log("http_codec::decode_body: Call '%s'", it->first.c_str()); http_etsi_ieee1609dot2_codec* codec = new http_etsi_ieee1609dot2_codec(); /*http_etsi_ieee1609dot2_codec* codec = new http_etsi_ieee1609dot2_codec(); if (codec->decode(body, binary_body.ieee1609dot2__data()) == 0) { message_body.binary__body() = binary_body; processed = true; } delete codec; delete codec;*/ } } // TODO Add new HTTP message codec here if (!processed) { Loading
ccsrc/Protocols/Http/http_codec.hh +1 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ private: int decode_headers(TTCN_Buffer& decoding_buffer, LibItsHttp__TypesAndValues::HeaderLines& headers); int decode_header(CHARSTRING& header_line, LibItsHttp__TypesAndValues::HeaderLine& header); int decode_body(TTCN_Buffer& decoding_buffer, LibItsHttp__MessageBodyTypes::HttpMessageBody& message_body); int decode_body(TTCN_Buffer& decoding_buffer, LibItsHttp__MessageBodyTypes::HttpMessageBody& message_body, const std::string& p_content_type); int get_line(TTCN_Buffer& buffer, CHARSTRING& to, const bool concatenate_header_lines = false); }; // End of class http_codec
ccsrc/Protocols/Sip/sip_codec_request.cc +12 −4 Original line number Diff line number Diff line Loading @@ -337,10 +337,18 @@ int sip_codec_request::encode_request_message_body(const LibSip__MessageBodyType sdp_message_t* sdp_body; ::sdp_message_init(&sdp_body); INTEGER sdp.protocol__version(); SDP__Origin sdp.origin(); CHARSTRING sdp.session__name(); INTEGER version = sdp.protocol__version(); ::sdp_message_v_version_set(sdp_body, (char*)std::to_string(static_cast<const int>(version)).c_str()); LibSip__SDPTypes::SDP__Origin origin = sdp.origin(); ::sdp_message_o_origin_set( sdp_body, (char*)static_cast<const char*>(origin.user__name()), (char*)static_cast<const char*>(origin.session__id()), (char*)static_cast<const char*>(origin.session__version()), (char*)static_cast<const char*>(origin.net__type()), (char*)static_cast<const char*>(origin.addr__type()), (char*)static_cast<const char*>(origin.addr()) ); char* buff = nullptr; ::sdp_message_to_str(sdp_body, &buff); Loading