Struct bcc::XDP [−][src]
An object that can run BPF code as an XDP program that runs on every packet at the driver level.
Implementations
impl XDP
[src]
pub fn new() -> Self
[src]
Create a new XDP object with the defaults.
By default, the XDP program is run in generic mode [XDP_FLAGS_SKB_MODE
]
and will replace any already running program on the driver.
Further initialization is required before attaching.
pub fn handler<T: AsRef<str>>(self, name: T) -> Self
[src]
Specify the name of the XDP handler within the BPF code. This is a required configuration.
pub fn device<T: AsRef<str>>(self, name: T) -> Self
[src]
Specify the name of the network device on which to run the BPF program. This is a required configuration.
pub fn mode(self, mode: Mode) -> Self
[src]
Specify the XDP mode under which to run the BPF program.
pub fn attach(self, bpf: &mut BPF) -> Result<(), BccError>
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for XDP
impl Send for XDP
impl Sync for XDP
impl Unpin for XDP
impl UnwindSafe for XDP
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,