#include "conntrackproducer.ih"

void ConntrackProducer::process(string const &line)
{
    imsg << "LINE: " << line << endl;

    if ((this->*d_tcpUdp)(line) or (this->*d_icmp)(line))
        return;

    imsg << "   (not matched)" << endl;

//    if (s_tcpudp << line)               // if this is a UDP or TCP conn.
//    {                                   // process them.
//        if (not (this->*d_tcp)())       // At TCP and unhandled tcp: 
//            (this->*d_udp)();           // true is returned
//        return;
//    }
//
//    if ((this->*d_icmp)(line))
//        return;
//
//    if (s_icmp << line)                 // or try an ICMP connection
//    {
//        (this->*d_icmp)();
//        return;
//    }

}
 
        
//    if (s_tcpudp << line)               // try to match UDP or TCP
//    {
//        if ( d_options.hasProtocol( 
//                        s_tcpudp[ static_cast<size_t>(CTtcpudp::PROTOCOL) ] ) 
//        )
//            d_storage.push( new ConntrackRecord{    // (also for UDP) 
//                                                Record::TCP, s_tcpudp } );
//        return;
//    }
//
//                                        // or try to match ICMP
//    if (s_icmp << line and d_options.hasProtocol(Record::ICMP))
//    {
//        d_storage.push( new ConntrackRecord{ Record::ICMP, s_icmp } );
//        return;
//    }


