Filter.matches

bool matches(const(pcap_pkthdr) * header, const(ubyte) * data) const

Checks if a packet matches this filter.

Calling this on an uncompiled filter is a programming error. Use isCompiled() to check before calling.

Parameters

headerThe packet header.
dataThe packet data.

Returns

true if the packet matches the filter.

Throws

AssertError if the filter has not been compiled.