mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 11:08:20 +00:00
iosource/pcap/Source: remove unused fields last_hdr
, last_data
This commit is contained in:
parent
4b8b6ec559
commit
d1dc70c90f
2 changed files with 0 additions and 8 deletions
|
@ -27,8 +27,6 @@ PcapSource::PcapSource(const std::string& path, bool is_live)
|
|||
props.is_live = is_live;
|
||||
pd = nullptr;
|
||||
memset(¤t_hdr, 0, sizeof(current_hdr));
|
||||
memset(&last_hdr, 0, sizeof(last_hdr));
|
||||
last_data = nullptr;
|
||||
}
|
||||
|
||||
void PcapSource::Open()
|
||||
|
@ -46,7 +44,6 @@ void PcapSource::Close()
|
|||
|
||||
pcap_close(pd);
|
||||
pd = nullptr;
|
||||
last_data = nullptr;
|
||||
|
||||
Closed();
|
||||
|
||||
|
@ -213,7 +210,6 @@ bool PcapSource::ExtractNextPacket(Packet* pkt)
|
|||
return false;
|
||||
}
|
||||
|
||||
last_data = data;
|
||||
pkt->Init(props.link_type, ¤t_hdr.ts, current_hdr.caplen, current_hdr.len, data);
|
||||
|
||||
if ( current_hdr.len == 0 || current_hdr.caplen == 0 )
|
||||
|
@ -222,8 +218,6 @@ bool PcapSource::ExtractNextPacket(Packet* pkt)
|
|||
return false;
|
||||
}
|
||||
|
||||
last_hdr = current_hdr;
|
||||
last_data = data;
|
||||
++stats.received;
|
||||
stats.bytes_received += current_hdr.len;
|
||||
|
||||
|
|
|
@ -41,8 +41,6 @@ private:
|
|||
pcap_t *pd;
|
||||
|
||||
struct pcap_pkthdr current_hdr;
|
||||
struct pcap_pkthdr last_hdr;
|
||||
const u_char* last_data;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue