1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-29 13:04:28 +01:00

Modified PacketWriter interface to take references instead of pointers.

This commit is contained in:
Matias Fontanini
2012-09-12 23:02:53 -03:00
parent e8151724c4
commit fc0ccffe18
5 changed files with 74 additions and 10 deletions

View File

@@ -44,8 +44,8 @@ PacketWriter::~PacketWriter() {
pcap_close(handle);
}
void PacketWriter::write(PDU *pdu) {
PDU::serialization_type buffer = pdu->serialize();
void PacketWriter::write(PDU &pdu) {
PDU::serialization_type buffer = pdu.serialize();
struct timeval tm;
gettimeofday(&tm, 0);
struct pcap_pkthdr header = {