How to use the nfstream.ndpi_bindings.CacheEntry 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
CacheEntry._fields_ = [
    ("item", c_void_p),
    ("item_size", c_uint32),
    ("prev", POINTER(CacheEntry)),
    ("next", POINTER(CacheEntry))
]


class CacheEntryMap(Structure):
    pass


CacheEntryMap._fields_ = [
    ("entry", POINTER(CacheEntry)),
    ("next", POINTER(CacheEntryMap)),
]


class Cache(Structure):
    _fields_ = [
        ("size", c_uint32),
        ("max_size", c_uint32),
        ("head", POINTER(CacheEntry)),
        ("tail", POINTER(CacheEntry)),
        ("map", POINTER(POINTER(CacheEntryMap)))
    ]


class CustomCategories(Structure):
    _fields_ = [
github aouinizied / nfstream / nfstream / ndpi_bindings.py View on Github external
("pad", c_uint32, 15)
    ]


class NDPILruCache(Structure):
    _fields_ = [
        ("num_entries", c_uint32),
        ("entries", POINTER(NDPILruCacheEntry)),
    ]


class CacheEntry(Structure):
    pass


CacheEntry._fields_ = [
    ("item", c_void_p),
    ("item_size", c_uint32),
    ("prev", POINTER(CacheEntry)),
    ("next", POINTER(CacheEntry))
]


class CacheEntryMap(Structure):
    pass


CacheEntryMap._fields_ = [
    ("entry", POINTER(CacheEntry)),
    ("next", POINTER(CacheEntryMap)),
]