pub struct ClientConfig {
pub version: Version,
pub community: Bytes,
pub timeout: Duration,
pub retry: Retry,
pub max_oids_per_request: usize,
pub v3_security: Option<UsmConfig>,
pub allow_unauthenticated_v3_time_correction: bool,
pub walk_mode: WalkMode,
pub oid_ordering: OidOrdering,
pub max_walk_results: Option<usize>,
pub max_repetitions: u32,
pub local_authoritative_engine: Option<AuthoritativeEngine>,
}Expand description
Client configuration.
Most users should use ClientBuilder rather than constructing this directly.
Fields§
§version: VersionSNMP version (default: V2c)
community: BytesCommunity string for v1/v2c (default: “public”)
timeout: DurationRequest timeout (default: 5 seconds)
retry: RetryRetry configuration (default: 3 retries, 1-second delay)
max_oids_per_request: usizeMaximum OIDs per request (default: 10)
v3_security: Option<UsmConfig>SNMPv3 security configuration (default: None)
allow_unauthenticated_v3_time_correction: boolPermit one packet-local correction from an unauthenticated
usmStatsNotInTimeWindows Report on an authenticated V3 operation.
This is disabled by default because the Report’s boots/time tuple is unauthenticated and can cause one authenticated packet to be sent with attacker-selected time fields. The tuple is never stored as trusted engine state; only a subsequent authenticated, fully matched Response may advance that state.
walk_mode: WalkModeWalk operation mode (default: Auto)
oid_ordering: OidOrderingOID ordering behavior during walk operations (default: Strict)
max_walk_results: Option<usize>Maximum results from a single walk operation (default: None/unlimited)
max_repetitions: u32Max-repetitions for GETBULK operations (default: 25)
Local authoritative engine state for V3 trap sending (default: None).
Per RFC 3412 Section 6.4, the sender is authoritative for trap PDUs.
Construct this through the persistence-enforcing
AuthoritativeEngine API.
Trait Implementations§
Source§impl Clone for ClientConfig
impl Clone for ClientConfig
Source§fn clone(&self) -> ClientConfig
fn clone(&self) -> ClientConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !Freeze for ClientConfig
impl RefUnwindSafe for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl UnsafeUnpin for ClientConfig
impl UnwindSafe for ClientConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more