Commit e0685592 authored by Yann Garcia's avatar Yann Garcia
Browse files

Merging Titan/TTwb branches

parent f138c298
Loading
Loading
Loading
Loading
+156 −0

File changed.

Preview size limit exceeded, changes collapsed.

+3 −3
Original line number Diff line number Diff line
@@ -219,11 +219,11 @@ void* pcap_layer::thread() {
      std::time_t t = pkt_header->ts.tv_sec;
      std::tm * pt = std::localtime( &t );
      t = std::strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", pt);
      std::sprintf(buf+t, "%ld", pkt_header->ts.tv_sec * 1000000 + pkt_header->ts.tv_usec);
      _o_params["timestamp"] = std::string(buf);
      std::sprintf(buf+t, "%ld", pkt_header->ts.tv_sec * 1000 + static_cast<int>(pkt_header->ts.tv_usec / 1000)); // Use milliseconds
      _o_params[params::timestamp] = std::string(buf);
    }
#else
    _o_params["timestamp"] = std::to_string(pkt_header->ts.tv_sec * 1000000 + pkt_header->ts.tv_usec);
    _o_params[params::timestamp] = std::to_string(pkt_header->ts.tv_sec * 1000 + static_cast<int>(pkt_header->ts.tv_usec / 1000)); // Use milliseconds
#endif
    _o_data = OCTETSTRING(pkt_header->len, pkt_data);
    write(_fd[1], &pkt_count, 1);pkt_count++;
+1 −1
Original line number Diff line number Diff line
@@ -247,7 +247,7 @@ void pcap_layer::Handle_Fd_Event_Readable(int fd) {
      //loggers::get_instance().log("pcap_layer::Handle_Fd_Event_Readable: %ld - % ld - %d", pkt_header->ts.tv_sec, pkt_header->ts.tv_usec, pkt_header->len);
      // Fill parameters from PCAP layer
      params params;
      params.insert(std::pair<std::string, std::string>(std::string("timestamp"), std::to_string(static_cast<unsigned long long>(pkt_header->ts.tv_sec * 1000000 + pkt_header->ts.tv_usec))));
      params.insert(std::pair<std::string, std::string>(params::timestamp, std::to_string(pkt_header->ts.tv_sec * 1000 + static_cast<int>(pkt_header->ts.tv_usec / 1000)))); // Use milliseconds
      // Process the packet at this layer
      OCTETSTRING os(pkt_header->caplen, pkt_data);
      //loggers::get_instance().log_to_hexa("pcap_layer::Handle_Fd_Event_Readable: ", os);
+1 −1
Original line number Diff line number Diff line
@@ -181,7 +181,7 @@ void pcap_layer::Handle_Fd_Event_Readable(int fd) {
      loggers::get_instance().log("pcap_layer::Handle_Fd_Event_Readable: %ld - %ld - %d", pkt_header->ts.tv_sec, pkt_header->ts.tv_usec, pkt_header->len);
      // Fill parameters from PCAP layer
      params params;
      params.insert(std::pair<std::string, std::string>(std::string("timestamp"), std::to_string(pkt_header->ts.tv_sec * 1000000 + pkt_header->ts.tv_usec)));
      params.insert(std::pair<std::string, std::string>(params::timestamp, std::to_string(pkt_header->ts.tv_sec * 1000 + static_cast<int>(pkt_header->ts.tv_usec / 1000)))); // Use milliseconds
      // Process the packet at this layer
      OCTETSTRING os(pkt_header->caplen, pkt_data);
      //loggers::get_instance().log_to_hexa("pcap_layer::Handle_Fd_Event_Readable: ", os);
+2 −2
Original line number Diff line number Diff line
@@ -4457,7 +4457,7 @@ module ItsIvim_TpFunctions {
                              {
                                m_gicPart_basic(
                                    2,//trafficRelatedInformationMessages 		(2)
                                    {v_rsCode[PX_RSCODE_VA]}
                                    { valueof(v_rsCode[PX_RSCODE_VA]) }
                                )
                              }
                            )
@@ -4542,7 +4542,7 @@ module ItsIvim_TpFunctions {
                              {
                                m_gicPart_basic(
                                    2,//trafficRelatedInformationMessages 		(2)
                                    {v_rsCode[PX_RSCODE_VA]}
                                    {valueof(v_rsCode[PX_RSCODE_VA])}
                                )
                              }
                            )
Loading