Skip to main content

Request

Struct Request 

Source
pub struct Request<'buf> { /* private fields */ }
Available on crate feature devlink only.

Implementations§

Source§

impl Request<'static>

Source

pub fn new() -> Self

Source

pub fn new_from_buf(buf: Vec<u8>) -> Self

Source

pub fn into_buf(self) -> Vec<u8>

Source§

impl<'buf> Request<'buf>

Source

pub fn new_with_buf(buf: &'buf mut Vec<u8>) -> Self

Source

pub fn new_extend(buf: &'buf mut Vec<u8>) -> Self

Source

pub fn buf(&self) -> &Vec<u8>

Source

pub fn buf_mut(&mut self) -> &mut Vec<u8>

Source

pub fn set_create(self) -> Self

Set NLM_F_CREATE flag

Source

pub fn set_excl(self) -> Self

Set NLM_F_EXCL flag

Source

pub fn set_replace(self) -> Self

Set NLM_F_REPLACE flag

Source

pub fn set_change(self) -> Self

Set NLM_F_CREATE and NLM_F_REPLACE flag

Source

pub fn set_append(self) -> Self

Set NLM_F_APPEND flag

Source

pub fn set_flags(self, flags: u16) -> Self

Set self.flags |= flags

Source

pub fn unset_flags(self, flags: u16) -> Self

Set self.flags ^= self.flags & flags

Source

pub fn op_get_dump(self) -> OpGetDump<'buf>

Source

pub fn op_get_do(self) -> OpGetDo<'buf>

Source

pub fn op_port_get_dump(self) -> OpPortGetDump<'buf>

Get devlink port instances.

Request attributes:

Reply attributes:

Source

pub fn op_port_get_do(self) -> OpPortGetDo<'buf>

Source

pub fn op_port_set_do(self) -> OpPortSetDo<'buf>

Set devlink port instances.

Flags: admin-perm

Request attributes:

Source

pub fn op_port_new_do(self) -> OpPortNewDo<'buf>

Source

pub fn op_port_del_do(self) -> OpPortDelDo<'buf>

Delete devlink port instances.

Flags: admin-perm

Request attributes:

Source

pub fn op_port_split_do(self) -> OpPortSplitDo<'buf>

Split devlink port instances.

Flags: admin-perm

Request attributes:

Source

pub fn op_port_unsplit_do(self) -> OpPortUnsplitDo<'buf>

Unplit devlink port instances.

Flags: admin-perm

Request attributes:

Source

pub fn op_sb_get_dump(self) -> OpSbGetDump<'buf>

Get shared buffer instances.

Request attributes:

Reply attributes:

Source

pub fn op_sb_get_do(self) -> OpSbGetDo<'buf>

Source

pub fn op_sb_pool_get_dump(self) -> OpSbPoolGetDump<'buf>

Source

pub fn op_sb_pool_get_do(self) -> OpSbPoolGetDo<'buf>

Source

pub fn op_sb_pool_set_do(self) -> OpSbPoolSetDo<'buf>

Source

pub fn op_sb_port_pool_get_dump(self) -> OpSbPortPoolGetDump<'buf>

Get shared buffer port-pool combinations and threshold.

Request attributes:

Reply attributes:

Source

pub fn op_sb_port_pool_get_do(self) -> OpSbPortPoolGetDo<'buf>

Source

pub fn op_sb_port_pool_set_do(self) -> OpSbPortPoolSetDo<'buf>

Set shared buffer port-pool combinations and threshold.

Flags: admin-perm

Request attributes:

Source

pub fn op_sb_tc_pool_bind_get_dump(self) -> OpSbTcPoolBindGetDump<'buf>

Get shared buffer port-TC to pool bindings and threshold.

Request attributes:

Reply attributes:

Source

pub fn op_sb_tc_pool_bind_get_do(self) -> OpSbTcPoolBindGetDo<'buf>

Source

pub fn op_sb_tc_pool_bind_set_do(self) -> OpSbTcPoolBindSetDo<'buf>

Source

pub fn op_sb_occ_snapshot_do(self) -> OpSbOccSnapshotDo<'buf>

Take occupancy snapshot of shared buffer.

Flags: admin-perm

Request attributes:

Source

pub fn op_sb_occ_max_clear_do(self) -> OpSbOccMaxClearDo<'buf>

Clear occupancy watermarks of shared buffer.

Flags: admin-perm

Request attributes:

Source

pub fn op_eswitch_get_do(self) -> OpEswitchGetDo<'buf>

Source

pub fn op_eswitch_set_do(self) -> OpEswitchSetDo<'buf>

Source

pub fn op_dpipe_table_get_do(self) -> OpDpipeTableGetDo<'buf>

Source

pub fn op_dpipe_entries_get_do(self) -> OpDpipeEntriesGetDo<'buf>

Source

pub fn op_dpipe_headers_get_do(self) -> OpDpipeHeadersGetDo<'buf>

Get dpipe headers attributes.

Request attributes:

Reply attributes:

Source

pub fn op_dpipe_table_counters_set_do(self) -> OpDpipeTableCountersSetDo<'buf>

Set dpipe counter attributes.

Flags: admin-perm

Request attributes:

Source

pub fn op_resource_set_do(self) -> OpResourceSetDo<'buf>

Set resource attributes.

Flags: admin-perm

Request attributes:

Source

pub fn op_resource_dump_dump(self) -> OpResourceDumpDump<'buf>

Source

pub fn op_resource_dump_do(self) -> OpResourceDumpDo<'buf>

Source

pub fn op_reload_do(self) -> OpReloadDo<'buf>

Source

pub fn op_param_get_dump(self) -> OpParamGetDump<'buf>

Source

pub fn op_param_get_do(self) -> OpParamGetDo<'buf>

Source

pub fn op_param_set_do(self) -> OpParamSetDo<'buf>

Source

pub fn op_region_get_dump(self) -> OpRegionGetDump<'buf>

Source

pub fn op_region_get_do(self) -> OpRegionGetDo<'buf>

Source

pub fn op_region_new_do(self) -> OpRegionNewDo<'buf>

Source

pub fn op_region_del_do(self) -> OpRegionDelDo<'buf>

Source

pub fn op_region_read_dump(self) -> OpRegionReadDump<'buf>

Source

pub fn op_port_param_get_dump(self) -> OpPortParamGetDump<'buf>

Get port param instances.

Reply attributes:

Source

pub fn op_port_param_get_do(self) -> OpPortParamGetDo<'buf>

Source

pub fn op_port_param_set_do(self) -> OpPortParamSetDo<'buf>

Set port param instances.

Flags: admin-perm

Request attributes:

Source

pub fn op_info_get_dump(self) -> OpInfoGetDump<'buf>

Source

pub fn op_info_get_do(self) -> OpInfoGetDo<'buf>

Source

pub fn op_health_reporter_get_dump(self) -> OpHealthReporterGetDump<'buf>

Source

pub fn op_health_reporter_get_do(self) -> OpHealthReporterGetDo<'buf>

Source

pub fn op_health_reporter_set_do(self) -> OpHealthReporterSetDo<'buf>

Source

pub fn op_health_reporter_recover_do(self) -> OpHealthReporterRecoverDo<'buf>

Recover health reporter instances.

Flags: admin-perm

Request attributes:

Source

pub fn op_health_reporter_diagnose_do(self) -> OpHealthReporterDiagnoseDo<'buf>

Diagnose health reporter instances.

Flags: admin-perm

Request attributes:

Source

pub fn op_health_reporter_dump_get_dump( self, ) -> OpHealthReporterDumpGetDump<'buf>

Dump health reporter instances.

Flags: admin-perm

Request attributes:

Reply attributes:

Source

pub fn op_health_reporter_dump_clear_do( self, ) -> OpHealthReporterDumpClearDo<'buf>

Clear dump of health reporter instances.

Flags: admin-perm

Request attributes:

Source

pub fn op_flash_update_do(self) -> OpFlashUpdateDo<'buf>

Source

pub fn op_trap_get_dump(self) -> OpTrapGetDump<'buf>

Source

pub fn op_trap_get_do(self) -> OpTrapGetDo<'buf>

Source

pub fn op_trap_set_do(self) -> OpTrapSetDo<'buf>

Set trap instances.

Flags: admin-perm

Request attributes:

Source

pub fn op_trap_group_get_dump(self) -> OpTrapGroupGetDump<'buf>

Source

pub fn op_trap_group_get_do(self) -> OpTrapGroupGetDo<'buf>

Source

pub fn op_trap_group_set_do(self) -> OpTrapGroupSetDo<'buf>

Source

pub fn op_trap_policer_get_dump(self) -> OpTrapPolicerGetDump<'buf>

Get trap policer instances.

Request attributes:

Reply attributes:

Source

pub fn op_trap_policer_get_do(self) -> OpTrapPolicerGetDo<'buf>

Source

pub fn op_trap_policer_set_do(self) -> OpTrapPolicerSetDo<'buf>

Source

pub fn op_health_reporter_test_do(self) -> OpHealthReporterTestDo<'buf>

Test health reporter instances.

Flags: admin-perm

Request attributes:

Source

pub fn op_rate_get_dump(self) -> OpRateGetDump<'buf>

Source

pub fn op_rate_get_do(self) -> OpRateGetDo<'buf>

Source

pub fn op_rate_set_do(self) -> OpRateSetDo<'buf>

Source

pub fn op_rate_new_do(self) -> OpRateNewDo<'buf>

Source

pub fn op_rate_del_do(self) -> OpRateDelDo<'buf>

Delete rate instances.

Flags: admin-perm

Request attributes:

Source

pub fn op_linecard_get_dump(self) -> OpLinecardGetDump<'buf>

Source

pub fn op_linecard_get_do(self) -> OpLinecardGetDo<'buf>

Source

pub fn op_linecard_set_do(self) -> OpLinecardSetDo<'buf>

Set line card instances.

Flags: admin-perm

Request attributes:

Source

pub fn op_selftests_get_dump(self) -> OpSelftestsGetDump<'buf>

Get device selftest instances.

Reply attributes:

Source

pub fn op_selftests_get_do(self) -> OpSelftestsGetDo<'buf>

Get device selftest instances.

Request attributes:

Reply attributes:

Source

pub fn op_selftests_run_do(self) -> OpSelftestsRunDo<'buf>

Run device selftest instances.

Flags: admin-perm

Request attributes:

Source

pub fn op_notify_filter_set_do(self) -> OpNotifyFilterSetDo<'buf>

Set notification messages socket filter.

Request attributes:

Trait Implementations§

Source§

impl<'buf> Debug for Request<'buf>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'buf> !UnwindSafe for Request<'buf>

§

impl<'buf> Freeze for Request<'buf>

§

impl<'buf> RefUnwindSafe for Request<'buf>

§

impl<'buf> Send for Request<'buf>

§

impl<'buf> Sync for Request<'buf>

§

impl<'buf> Unpin for Request<'buf>

§

impl<'buf> UnsafeUnpin for Request<'buf>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.