fix
This commit is contained in:
parent
5e50281459
commit
a841b93b33
2 changed files with 3 additions and 2 deletions
|
@ -53,6 +53,7 @@ int main(int argc, char **argv) {
|
|||
if (cin.eof()) break;
|
||||
|
||||
packet* pkg = packet::factory(r_packet);
|
||||
|
||||
|
||||
cout << "[" << std::dec << pkg->getEpoch() << " " << setfill('0') << std::setw(6) << pkg->getMillis() << "] Size: " << pkg->getPacketLength() << " byte" << endl;
|
||||
cout << " From " << pkg->getSenderMac().to_string() << " to "<< pkg->getTargetMac().to_string() << endl;
|
||||
|
|
|
@ -135,12 +135,12 @@ int main(int argc, char **argv) {
|
|||
|
||||
if (pcap_compile(pcap_handle, &fp, filter.c_str(), 0, net) == -1)
|
||||
{
|
||||
cerr<< ">> Couldn't parse filter '"<<filter<<"': "<<pcap_geterr(pcap_handle)<<endl;
|
||||
cerr<< "ERROR >> Couldn't parse filter '"<<filter<<"': "<<pcap_geterr(pcap_handle)<<endl;
|
||||
return(2);
|
||||
}
|
||||
|
||||
if (pcap_setfilter(pcap_handle, &fp) == -1) {
|
||||
cerr<< ">> Couldn't install filter '"<<filter<<"': "<<pcap_geterr(pcap_handle)<<endl;
|
||||
cerr<< "ERROR >> Couldn't install filter '"<<filter<<"': "<<pcap_geterr(pcap_handle)<<endl;
|
||||
return(2);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue