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

Add TCP and Utils::resolve_hwaddress active tests

[ci skip]
This commit is contained in:
Matias Fontanini
2016-03-22 19:49:26 -07:00
parent 068e304baa
commit 7bc1ab41f7
12 changed files with 366 additions and 24 deletions

View File

@@ -95,10 +95,11 @@ bool PacketCapturer::callback(const PDU& pdu) {
string PacketCapturer::make_filter(const Configuration& configuration) const {
ostringstream oss;
oss << "((tcp or udp) and src port " << configuration.source_port()
<< " and dst port " << configuration.destination_port() << ") or icmp"
oss << "((tcp or udp) and (port " << configuration.source_port()
<< " or port " << configuration.destination_port() << ")) or icmp"
// Fragmentted IP packets
<< " or (ip[6:2] & 0x1fff) > 0";
<< " or (ip[6:2] & 0x1fff) > 0"
<< " or arp";
return oss.str();
}