pub struct NetlinkGenericRead {
    allocation: LayoutAllocation,
    len: usize,
}

Fields§

§allocation: LayoutAllocation§len: usize

Implementations§

Parse NetlinkGeneric response in order to get multicast group id

On success, returns group_id for a given group_name

Arguments
  • group_name - String with group_name for which we are looking group_id

Response from family_name_query (CTRL_CMD_GETFAMILY) is a netlink message with multiple attributes encapsulated (some of them are nested). An example response layout is illustrated below:

{ CTRL_ATTR_FAMILY_NAME CTRL_ATTR_FAMILY_ID CTRL_ATTR_VERSION … CTRL_ATTR_MCAST_GROUPS { GR1 (nl_attr._type = 1) { CTRL_ATTR_MCAST_GRP_ID *we need parse this attr to obtain group id used for the group mask CTRL_ATTR_MCAST_GRP_NAME *group_name that we need to match with } GR2 (nl_attr._type = 2) { CTRL_ATTR_MCAST_GRP_ID CTRL_ATTR_MCAST_GRP_NAME } … } }

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.