Closed hamedgk closed 1 year ago
the app throws invalid_interface but I set the default_interface in the PacketSender constructor here is my code:
Tins::NetworkInterface iface = Tins::NetworkInterface::default_interface(); Tins::NetworkInterface::Info info = iface.addresses(); Tins::EthernetII eth2 = Tins::EthernetII() / Tins::IP("172.217.18.132", info.ip_addr) / Tins::TCP(443, 443) / Tins::RawPDU("I'm payload!"); Tins::PacketSender sender(iface); const std::unique_ptr<Tins::PDU> received_pdu(sender.send_recv(eth2)); const Tins::EthernetII& Eth_content = received_pdu->rfind_pdu<Tins::EthernetII>(); print(Eth_content.header_size()) //for example
also the send_recv() example of the documentation throws invalid_interface send() method works well ! I'm using GCC on debian based linux (VMWare)
the app throws invalid_interface but I set the default_interface in the PacketSender constructor here is my code:
also the send_recv() example of the documentation throws invalid_interface send() method works well ! I'm using GCC on debian based linux (VMWare)