class io.PcapFilter

class PcapFilter {
    // properties

    bool const property m_isEmpty;

    // methods

    bool errorcode compile(
        io.Pcap* pcap,
        string_t filter,
        bool isOptimized = true,
        uint32_t netMask = -1
    );

    bool errorcode compile(
        io.PcapLinkType linkType,
        size_t snapshotSize,
        string_t filter,
        bool isOptimized = true,
        uint32_t netMask = -1
    );

    bool errorcode compile(
        string_t filter,
        bool isOptimized = true,
        uint32_t netMask = -1
    );

    bool match(
        void const* p,
        size_t size
    );
};