Store packet's ip header as unique_ptr

This commit is contained in:
Tim Wojtulewicz 2020-10-12 21:09:41 -07:00
parent 2000f89b12
commit ecd970ffde
13 changed files with 86 additions and 92 deletions

View file

@ -2,6 +2,7 @@
#pragma once
#include <memory>
#include "IPAddr.h"
#include "PrefixTable.h"
@ -31,7 +32,7 @@ public:
bool RemoveDst(Val* dst);
// Returns true if packet matches a drop filter
bool Match(const IP_Hdr* ip, int len, int caplen);
bool Match(const std::unique_ptr<IP_Hdr>& ip, int len, int caplen);
private:
struct Filter {