pub fn resolve_genl_family(&mut self, family_name: &str) -> Result<u16, NlError> {
        let nlhdrs = self.get_genl_family(family_name)?;
        for nlhdr in nlhdrs.into_iter() {
            let attrs = nlhdr
                .nl_payload
                .get_payload()
                .ok_or_else(|| NlError::new("No attributes were returned in this message."))?;
            let handle = attrs.get_attr_handle();
            if let Ok(u) = handle.get_attr_payload_as::<u16>(CtrlAttr::FamilyId) {
                return Ok(u);
            }
        }
        Err(NlError::new(format!(
            "Generic netlink family {} was not found",
            family_name
        )))
    }
/// Convenience function for resolving a [`str`] containing the
/// generic netlink family name to a numeric generic netlink ID.
Convenience function for resolving a [`str`] containing the
generic netlink family name to a numeric generic netlink ID.
Convenience function for resolving a [ ` str ` ] containing the generic netlink family name to a numeric generic netlink ID .
pub fn resolve_genl_family(&mut self, family_name: &str) -> Result<u16, NlError> {
        let nlhdrs = self.get_genl_family(family_name)?;
        for nlhdr in nlhdrs.into_iter() {
            let attrs = nlhdr
                .nl_payload
                .get_payload()
                .ok_or_else(|| NlError::new("No attributes were returned in this message."))?;
            let handle = attrs.get_attr_handle();
            if let Ok(u) = handle.get_attr_payload_as::<u16>(CtrlAttr::FamilyId) {
                return Ok(u);
            }
        }
        Err(NlError::new(format!(
            "Generic netlink family {} was not found",
            family_name
        )))
    }
pub fn resolve_genl_family ( & mut self , family_name : & str ) -> Result < u16 , NlError > { let nlhdrs = self . get_genl_family ( family_name ) ? ; for nlhdr in nlhdrs . into_iter ( ) { let attrs = nlhdr . nl_payload . get_payload ( ) . ok_or_else ( | | NlError :: new ( " " ) ) ? ; let handle = attrs . get_attr_handle ( ) ; if let Ok ( u ) = handle . get_attr_payload_as :: < u16 > ( CtrlAttr :: FamilyId ) { return Ok ( u ) ; } } Err ( NlError :: new ( format ! ( " " family_name ) ) ) }
Convenience function for resolving a [`str`] containing the
generic netlink family name to a numeric generic netlink ID.
Convenience function for resolving a [ ` str ` ] containing the generic netlink family name to a numeric generic netlink ID .
&mut self
family_name
&str
&mut self
family_name
&str