Struct netstack3_core::filter::NatRoutines
source · pub struct NatRoutines<I, DeviceClass, RuleInfo>where
I: IpExt,{
pub ingress: Hook<I, DeviceClass, RuleInfo>,
pub local_ingress: Hook<I, DeviceClass, RuleInfo>,
pub local_egress: Hook<I, DeviceClass, RuleInfo>,
pub egress: Hook<I, DeviceClass, RuleInfo>,
}
Expand description
Routines that can perform NAT.
Note that NAT routines are only executed once for a given connection, for the first packet in the flow.
Fields§
§ingress: Hook<I, DeviceClass, RuleInfo>
Occurs for incoming traffic before a routing decision has been made.
local_ingress: Hook<I, DeviceClass, RuleInfo>
Occurs for incoming traffic that is destined for the local host.
local_egress: Hook<I, DeviceClass, RuleInfo>
Occurs for locally-generated traffic before a final routing decision has been made.
egress: Hook<I, DeviceClass, RuleInfo>
Occurs for all outgoing traffic after a routing decision has been made.
Trait Implementations§
source§impl<I, DeviceClass, RuleInfo> Debug for NatRoutines<I, DeviceClass, RuleInfo>
impl<I, DeviceClass, RuleInfo> Debug for NatRoutines<I, DeviceClass, RuleInfo>
source§impl<I, DeviceClass, RuleInfo> Default for NatRoutines<I, DeviceClass, RuleInfo>where
I: IpExt,
impl<I, DeviceClass, RuleInfo> Default for NatRoutines<I, DeviceClass, RuleInfo>where
I: IpExt,
source§fn default() -> NatRoutines<I, DeviceClass, RuleInfo>
fn default() -> NatRoutines<I, DeviceClass, RuleInfo>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<I, DeviceClass, RuleInfo> Freeze for NatRoutines<I, DeviceClass, RuleInfo>where
I: IcmpIpExt + IpProtoExt + Ip + Sealed + Sync + Send + PartialOrd + PartialEq + Ord + Hash + Eq + Default + Debug + Copy + Clone + EthernetIpExt + 'static,
impl<I, DeviceClass, RuleInfo> RefUnwindSafe for NatRoutines<I, DeviceClass, RuleInfo>where
I: IcmpIpExt + IpProtoExt + Ip + Sealed + Sync + Send + PartialOrd + PartialEq + Ord + Hash + Eq + Default + Debug + Copy + Clone + EthernetIpExt + 'static,
RuleInfo: RefUnwindSafe,
<I as Ip>::Addr: RefUnwindSafe,
DeviceClass: RefUnwindSafe,
<I as IpProtoExt>::Proto: RefUnwindSafe,
impl<I, DeviceClass, RuleInfo> Send for NatRoutines<I, DeviceClass, RuleInfo>
impl<I, DeviceClass, RuleInfo> Sync for NatRoutines<I, DeviceClass, RuleInfo>
impl<I, DeviceClass, RuleInfo> Unpin for NatRoutines<I, DeviceClass, RuleInfo>
impl<I, DeviceClass, RuleInfo> UnwindSafe for NatRoutines<I, DeviceClass, RuleInfo>where
I: IcmpIpExt + IpProtoExt + Ip + Sealed + Sync + Send + PartialOrd + PartialEq + Ord + Hash + Eq + Default + Debug + Copy + Clone + EthernetIpExt + 'static,
RuleInfo: UnwindSafe + RefUnwindSafe,
<I as Ip>::Addr: UnwindSafe + RefUnwindSafe,
DeviceClass: UnwindSafe + RefUnwindSafe,
<I as IpProtoExt>::Proto: UnwindSafe + RefUnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
Id: HandleableTimer<CC, BC>,
impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
Id: HandleableTimer<CC, BC>,
source§fn handle_timer(&mut self, bindings_ctx: &mut BC, id: Id)
fn handle_timer(&mut self, bindings_ctx: &mut BC, id: Id)
Handle a timer firing.