mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
Move IP Addr/Prefix/Header classes into namespaces
This commit is contained in:
parent
35c61697d9
commit
25c0fc7ab2
100 changed files with 495 additions and 460 deletions
|
@ -66,9 +66,9 @@ void Packet::Init(int arg_link_type, pkt_timeval *arg_ts, uint32_t arg_caplen,
|
|||
ProcessLayer2();
|
||||
}
|
||||
|
||||
const IP_Hdr Packet::IP() const
|
||||
const zeek::IP_Hdr Packet::IP() const
|
||||
{
|
||||
return IP_Hdr((struct ip *) (data + hdr_size), false);
|
||||
return zeek::IP_Hdr((struct ip *) (data + hdr_size), false);
|
||||
}
|
||||
|
||||
void Packet::Weird(const char* name)
|
||||
|
@ -654,13 +654,13 @@ zeek::RecordValPtr Packet::ToRawPktHdrVal() const
|
|||
|
||||
if ( l3_proto == L3_IPV4 )
|
||||
{
|
||||
IP_Hdr ip_hdr((const struct ip*)(data + hdr_size), false);
|
||||
zeek::IP_Hdr ip_hdr((const struct ip*)(data + hdr_size), false);
|
||||
return ip_hdr.ToPktHdrVal(std::move(pkt_hdr), 1);
|
||||
}
|
||||
|
||||
else if ( l3_proto == L3_IPV6 )
|
||||
{
|
||||
IP_Hdr ip6_hdr((const struct ip6_hdr*)(data + hdr_size), false, cap_len);
|
||||
zeek::IP_Hdr ip6_hdr((const struct ip6_hdr*)(data + hdr_size), false, cap_len);
|
||||
return ip6_hdr.ToPktHdrVal(std::move(pkt_hdr), 1);
|
||||
}
|
||||
|
||||
|
@ -683,7 +683,7 @@ zeek::ValPtr Packet::FmtEUI48(const u_char* mac) const
|
|||
|
||||
void Packet::Describe(ODesc* d) const
|
||||
{
|
||||
const IP_Hdr ip = IP();
|
||||
const zeek::IP_Hdr ip = IP();
|
||||
d->Add(ip.SrcAddr());
|
||||
d->Add("->");
|
||||
d->Add(ip.DstAddr());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue