pub struct CallingContext {
pub maps: Vec<MapSchema>,
pub helpers: HashMap<u32, FunctionSignature>,
pub args: Vec<Type>,
pub packet_type: Option<Type>,
}Fields§
§maps: Vec<MapSchema>List of map schemas of the associated map. The maps can be accessed using LDDW instruction
with src_reg=BPF_PSEUDO_MAP_IDX.
helpers: HashMap<u32, FunctionSignature>The registered external functions.
args: Vec<Type>The args of the program.
packet_type: Option<Type>Packet type. Normally it should be either None or args[0].
Implementations§
Source§impl CallingContext
impl CallingContext
pub fn register_map(&mut self, schema: MapSchema) -> usize
pub fn set_helpers(&mut self, helpers: HashMap<u32, FunctionSignature>)
pub fn set_args(&mut self, args: &[Type])
pub fn set_packet_type(&mut self, packet_type: Type)
Trait Implementations§
Source§impl Debug for CallingContext
impl Debug for CallingContext
Source§impl Default for CallingContext
impl Default for CallingContext
Source§fn default() -> CallingContext
fn default() -> CallingContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CallingContext
impl RefUnwindSafe for CallingContext
impl Send for CallingContext
impl Sync for CallingContext
impl Unpin for CallingContext
impl UnwindSafe for CallingContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more