mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
A set of smaller API tweaks, and polishing.
This commit is contained in:
parent
5e4f498083
commit
569853444f
4 changed files with 31 additions and 24 deletions
|
@ -108,9 +108,8 @@ void PcapSource::OpenLive()
|
|||
return;
|
||||
|
||||
props.is_live = true;
|
||||
Opened(props);
|
||||
|
||||
Info(fmt("listening on %s, capture length %d bytes\n", props.path.c_str(), SnapLen()));
|
||||
Opened(props);
|
||||
}
|
||||
|
||||
void PcapSource::OpenOffline()
|
||||
|
@ -264,14 +263,6 @@ void PcapSource::SetHdrSize()
|
|||
|
||||
props.link_type = pcap_datalink(pd);
|
||||
props.hdr_size = GetLinkHeaderSize(props.link_type);
|
||||
|
||||
if ( props.hdr_size < 0 )
|
||||
{
|
||||
safe_snprintf(errbuf, sizeof(errbuf),
|
||||
"unknown data link type 0x%x", props.link_type);
|
||||
Error(errbuf);
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
iosource::PktSrc* PcapSource::Instantiate(const std::string& path, bool is_live)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue