@staticmethod<EOL><INDENT>def check_filter(filter, layer=Layer.NETWORK):<DEDENT>
res, pos, msg = False, c_uint(), c_char_p()<EOL>try:<EOL><INDENT>res = windivert_dll.WinDivertHelperCheckFilter(filter.encode(), layer, byref(msg), byref(pos))<EOL><DEDENT>except OSError:<EOL><INDENT>pass<EOL><DEDENT>return res, pos.value, msg.value.decode()<EOL>
Checks if the given packet filter string is valid with respect to the filter language.

The remapped function is WinDivertHelperCheckFilter::

    BOOL WinDivertHelperCheckFilter(
        __in const char *filter,
        __in WINDIVERT_LAYER layer,
        __out_opt const char **errorStr,
        __out_opt UINT *errorPos
    );

See: https://reqrypt.org/windivert-doc.html#divert_helper_check_filter

:return: A tuple (res, pos, msg) with check result in 'res' human readable description of the error in 'msg' and the error's position in 'pos'.