Libtins Sender does not send all packets from Sniffer

35 views
Skip to first unread message

Anna

unread,
Sep 14, 2022, 5:07:39 AM9/14/22
to libtins

I'm using libtins and i want to create a sniffer, that sends every packet received on eth1 to eth2:

bool callback(PDU &pdu) 
 {
  PacketSender sender("eth2"); 
 sender.send(pdu); return true; 
 } 

 int main() {
    SnifferConfiguration config; 
    config.set_immediate_mode(true); 
    config.set_promisc_mode(true); 
     config.set_direction(PCAP_D_IN); 

    Sniffer s1("eth1", config); 
    s1.sniff_loop(callback); 
    }

The Sniffer works, but it does not send all packets to eth2. I#m sending ipv6 UDP Packets and SOME/IP Packets. Some of them are sent to eth2, some are not. But no no pattern recognizable. Can you help me to fix this?

Reply all
Reply to author
Forward
0 new messages