Skip to main content

OpenMap

Type Alias OpenMap 

Source
pub type OpenMap<'obj> = OpenMapImpl<'obj>;
Expand description

An immutable parsed but not yet loaded BPF map.

Aliased Type§

pub struct OpenMap<'obj> { /* private fields */ }

Implementations§

Source§

impl<'obj> OpenMap<'obj>

Source

pub fn new(object: &'obj bpf_map) -> Self

Create a new OpenMap from a ptr to a libbpf_sys::bpf_map.

Source

pub fn name(&self) -> &'obj OsStr

Retrieve the OpenMap’s name.

Source

pub fn map_type(&self) -> MapType

Retrieve type of the map.

Source

pub fn initial_value(&self) -> Option<&[u8]>

Retrieve the initial value of the map.

Source

pub fn max_entries(&self) -> u32

Retrieve the maximum number of entries of the map.

Source

pub fn autocreate(&self) -> bool

Return true if the map is set to be auto-created during load, false otherwise.