Use type aliases for IntrusivePtr definitions

This commit is contained in:
Tim Wojtulewicz 2020-06-24 16:46:34 -04:00
parent f6a251cdac
commit ec9eff0bd5
180 changed files with 2026 additions and 1893 deletions

View file

@ -13,14 +13,17 @@ typedef struct bpf_timeval pkt_timeval;
typedef struct timeval pkt_timeval;
#endif
namespace zeek {
template <class T> class IntrusivePtr;
}
class Val;
class ODesc;
class IP_Hdr;
class RecordVal;
namespace zeek {
template <class T> class IntrusivePtr;
}
using ValPtr = zeek::IntrusivePtr<Val>;
using RecordValPtr = zeek::IntrusivePtr<RecordVal>;
/**
* The Layer 3 type of a packet, as determined by the parsing code in Packet.
@ -132,7 +135,7 @@ public:
* Returns a \c raw_pkt_hdr RecordVal, which includes layer 2 and
* also everything in IP_Hdr (i.e., IP4/6 + TCP/UDP/ICMP).
*/
zeek::IntrusivePtr<RecordVal> ToRawPktHdrVal() const;
RecordValPtr ToRawPktHdrVal() const;
[[deprecated("Remove in v4.1. Use ToRawPktHdrval() instead.")]]
RecordVal* BuildPktHdrVal() const;
@ -229,7 +232,7 @@ private:
void Weird(const char* name);
// Renders an MAC address into its ASCII representation.
zeek::IntrusivePtr<Val> FmtEUI48(const u_char* mac) const;
ValPtr FmtEUI48(const u_char* mac) const;
// True if we need to delete associated packet memory upon
// destruction.