Struct aya::maps::hash_map::HashMap [−][src]
Expand description
A hash map that can be shared between eBPF programs and user space.
Minimum kernel version
The minimum kernel version required to use this feature is 3.19.
Examples
use aya::maps::HashMap; use std::convert::TryFrom; let mut redirect_ports = HashMap::try_from(bpf.map_mut("REDIRECT_PORTS")?)?; // redirect port 80 to 8080 redirect_ports.insert(80, 8080, 0); // redirect port 443 to 8443 redirect_ports.insert(443, 8443, 0);
Implementations
Returns a copy of the value associated with the key.
An iterator visiting all key-value pairs in arbitrary order. The
iterator item type is Result<(K, V), MapError>
.