pub trait Filter {
type Data: ForeignOwnable + Sync = ();
fn filter(
_data: <Self::Data as ForeignOwnable>::Borrowed<'_>,
_skb: &SkBuff
) -> Disposition;
}
Expand description
A network filter.
Provided Associated Types
sourcetype Data: ForeignOwnable + Sync = ()
type Data: ForeignOwnable + Sync = ()
The type of the context data stored on registration and made available to the
Filter::filter
function.
Required Methods
sourcefn filter(
_data: <Self::Data as ForeignOwnable>::Borrowed<'_>,
_skb: &SkBuff
) -> Disposition
fn filter(
_data: <Self::Data as ForeignOwnable>::Borrowed<'_>,
_skb: &SkBuff
) -> Disposition
Filters the packet stored in the given buffer.
It dictates to the netfilter core what the fate of the packet should be.