Open taegyo opened 4 years ago
i attemp to add new protocol for capture goose packet. (tutorial part. 7) but not recoginize pdu. / Windows 10 , 64bit
test code. i used dummypdu template class on tutorial.
int main() { Allocators::register_allocator<EthernetII, DummyPDU>(0x88b8);
Packet packet; NetworkInterface iface = NetworkInterface::default_interface(); Sniffer sniffer(iface.name()); while (1) { packet = sniffer.next_packet(); if (packet) { if (packet.pdu()->find_pdu<DummyPDU>()) { const DummyPDU &dummy = packet.pdu()->rfind_pdu<DummyPDU>(); // non-const works as well std::string payload(dummy.get_buffer().begin(), dummy.get_buffer().end()); std::cout << "Payload: " << payload << std::endl; } } }
}
i attemp to add new protocol for capture goose packet. (tutorial part. 7) but not recoginize pdu. / Windows 10 , 64bit
test code. i used dummypdu template class on tutorial.
int main() { Allocators::register_allocator<EthernetII, DummyPDU>(0x88b8);
}