How to use the nfstream.ndpi_bindings.NDPINode function in nfstream

To help you get started, we’ve selected a few nfstream examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aouinizied / nfstream / nfstream / ndpi_bindings.py View on Github external
class NDPIAutoma(Structure):
    _fields_ = [
        ("ac_automa", c_void_p),
        ("ac_automa_finalized", c_uint8)
    ]


class NDPINode(Structure):
    pass


NDPINode._fields_ = [
    ('key', POINTER(c_char)),
    ('left', POINTER(NDPINode)),
    ('right', POINTER(NDPINode)),
]


class NDPICallFunctionStruct(Structure):
    _fields_ = [
        ("detection_bitmask", NDPIProtocolBitMask),
        ("excluded_protocol_bitmask", NDPIProtocolBitMask),
        ("ndpi_selection_bitmask", c_uint32),
        ("func", CFUNCTYPE(None, POINTER(NDPIDetectionModuleStruct), POINTER(NDPIFlowStruct))),
        ("detection_feature", c_uint8)
    ]


class NDPIProtoDefaultsT(Structure):
    _fields_ = [
        ("protoName", c_char_p),
github aouinizied / nfstream / nfstream / ndpi_bindings.py View on Github external
class NDPISubprotocolConfStruct(Structure):
    _fields_ = [("func", CFUNCTYPE(c_void_p, POINTER(NDPIDetectionModuleStruct), c_char_p, c_char_p, c_int))]


class NDPIAutoma(Structure):
    _fields_ = [
        ("ac_automa", c_void_p),
        ("ac_automa_finalized", c_uint8)
    ]


class NDPINode(Structure):
    pass


NDPINode._fields_ = [
    ('key', POINTER(c_char)),
    ('left', POINTER(NDPINode)),
    ('right', POINTER(NDPINode)),
]


class NDPICallFunctionStruct(Structure):
    _fields_ = [
        ("detection_bitmask", NDPIProtocolBitMask),
        ("excluded_protocol_bitmask", NDPIProtocolBitMask),
        ("ndpi_selection_bitmask", c_uint32),
        ("func", CFUNCTYPE(None, POINTER(NDPIDetectionModuleStruct), POINTER(NDPIFlowStruct))),
        ("detection_feature", c_uint8)
    ]