mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +00:00
Merge branch 'master' into topic/jsiwek/mobile-ipv6
Conflicts: src/IP.cc
This commit is contained in:
commit
29724415c3
78 changed files with 4199 additions and 1169 deletions
|
@ -31,6 +31,13 @@ int ones_complement_checksum(const void* p, int b, uint32 sum)
|
|||
return sum;
|
||||
}
|
||||
|
||||
int ones_complement_checksum(const IPAddr& a, uint32 sum)
|
||||
{
|
||||
const uint32* bytes;
|
||||
int len = a.GetBytes(&bytes);
|
||||
return ones_complement_checksum(bytes, len*4, sum);
|
||||
}
|
||||
|
||||
int icmp_checksum(const struct icmp* icmpp, int len)
|
||||
{
|
||||
uint32 sum;
|
||||
|
@ -83,12 +90,11 @@ const char* fmt_conn_id(const IPAddr& src_addr, uint32 src_port,
|
|||
const char* fmt_conn_id(const uint32* src_addr, uint32 src_port,
|
||||
const uint32* dst_addr, uint32 dst_port)
|
||||
{
|
||||
IPAddr src(IPAddr::IPv6, src_addr, IPAddr::Network);
|
||||
IPAddr dst(IPAddr::IPv6, dst_addr, IPAddr::Network);
|
||||
IPAddr src(IPv6, src_addr, IPAddr::Network);
|
||||
IPAddr dst(IPv6, dst_addr, IPAddr::Network);
|
||||
return fmt_conn_id(src, src_port, dst, dst_port);
|
||||
}
|
||||
|
||||
|
||||
uint32 extract_uint32(const u_char* data)
|
||||
{
|
||||
uint32 val;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue