How to use the nfstream.ndpi_bindings.NDPIDetectionModuleStruct 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
("tail", POINTER(CacheEntry)),
        ("map", POINTER(POINTER(CacheEntryMap)))
    ]


class CustomCategories(Structure):
    _fields_ = [
        ("hostnames", NDPIAutoma),
        ("hostnames_shadow", NDPIAutoma),
        ("ipAddresses", c_void_p),
        ("ipAddresses_shadow", c_void_p),
        ("categories_loaded", c_uint8),
    ]


NDPIDetectionModuleStruct._fields_ = [
    ("detection_bitmask", NDPIProtocolBitMask),
    ("generic_http_packet_bitmask", NDPIProtocolBitMask),
    ("current_ts", c_uint32),
    ("ticks_per_second", c_uint32),
    ("custom_category_labels",
     (c_char * ndpi.ndpi_wrap_num_custom_categories()) * ndpi.ndpi_wrap_custom_category_label_len()),
    ("callback_buffer", NDPICallFunctionStruct * (ndpi.ndpi_wrap_ndpi_max_supported_protocols() + 1)),
    ("callback_buffer_size", c_uint32),
    ("callback_buffer_tcp_no_payload", NDPICallFunctionStruct * (ndpi.ndpi_wrap_ndpi_max_supported_protocols() + 1)),
    ("callback_buffer_size_tcp_no_payload", c_uint32),
    ("callback_buffer_tcp_payload", NDPICallFunctionStruct * (ndpi.ndpi_wrap_ndpi_max_supported_protocols() + 1)),
    ("callback_buffer_size_tcp_payload", c_uint32),
    ("callback_buffer_udp", NDPICallFunctionStruct * (ndpi.ndpi_wrap_ndpi_max_supported_protocols() + 1)),
    ("callback_buffer_size_udp", c_uint32),
    ("callback_buffer_non_tcp_udp", NDPICallFunctionStruct * (ndpi.ndpi_wrap_ndpi_max_supported_protocols() + 1)),
    ("callback_buffer_size_non_tcp_udp", c_uint32),
github aouinizied / nfstream / nfstream / ndpi_bindings.py View on Github external
("func", CFUNCTYPE(None, POINTER(NDPIDetectionModuleStruct), POINTER(NDPIFlowStruct))),
        ("detection_feature", c_uint8)
    ]


class NDPIProtoDefaultsT(Structure):
    _fields_ = [
        ("protoName", c_char_p),
        ("protoCategory", c_uint),
        ("can_have_a_subprotocol", c_uint8),
        ("protoId", c_uint16),
        ("protoIdx", c_uint16),
        ("master_tcp_protoId", c_uint16 * 2),
        ("master_udp_protoId", c_uint16 * 2),
        ("protoBreed", c_uint),
        ("func", CFUNCTYPE(None, POINTER(NDPIDetectionModuleStruct), POINTER(NDPIFlowStruct))),
    ]


class NDPIDefaultsPortsTreeNodeT(Structure):
    _fields_ = [
        ("proto", NDPIProtoDefaultsT),
        ("customUserProto", c_uint8),
        ("default_port", c_int16)
    ]


class SpinlockT(Structure):
    _fields_ = [("val", c_int)]


class AtomicT(Structure):