mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 23:28:20 +00:00
Interface tweaks for PktSrc, plus docs for PktSrc and PktDumper.
This commit is contained in:
parent
5f817513d0
commit
3e669daa05
15 changed files with 464 additions and 101 deletions
|
@ -11,22 +11,21 @@ namespace pcap {
|
|||
class PcapSource : public iosource::PktSrc {
|
||||
public:
|
||||
// XXX
|
||||
PcapSource(const std::string& path, const std::string& filter, bool is_live);
|
||||
PcapSource(const std::string& path, bool is_live);
|
||||
|
||||
virtual ~PcapSource();
|
||||
|
||||
static PktSrc* Instantiate(const std::string& path, const std::string& filter, bool is_live);
|
||||
static PktSrc* Instantiate(const std::string& path, bool is_live);
|
||||
|
||||
protected:
|
||||
// PktSrc interface.
|
||||
virtual void Open();
|
||||
virtual void Close();
|
||||
virtual int ExtractNextPacket(Packet* pkt);
|
||||
virtual void DoneWithPacket(Packet* pkt);
|
||||
virtual int PrecompileFilter(int index, const std::string& filter);
|
||||
virtual int SetFilter(int index);
|
||||
virtual bool ExtractNextPacket(Packet* pkt);
|
||||
virtual void DoneWithPacket();
|
||||
virtual bool PrecompileFilter(int index, const std::string& filter);
|
||||
virtual bool SetFilter(int index);
|
||||
virtual void Statistics(Stats* stats);
|
||||
virtual bool GetCurrentPacket(const pcap_pkthdr** hdr, const u_char** pkt);
|
||||
|
||||
private:
|
||||
void OpenLive();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue