Skip to main content

pamoja_mesh_seen_new

Function pamoja_mesh_seen_new 

Source
#[unsafe(no_mangle)]
pub extern "C" fn pamoja_mesh_seen_new( capacity: usize, ) -> *mut PamojaSeenCache
Expand description

Creates an empty duplicate cache.

§Arguments

  • capacity - how many recently seen packets to remember; pass PAMOJA_MESH_SEEN_DEFAULT_CAPACITY when there is no reason to choose. A capacity of zero remembers nothing, so every copy of a packet is relayed.

§Returns

A handle the caller must release with pamoja_mesh_seen_free.