pub fn bring_down(&self) -> Result<(), NlError> {
        let mut nl = open_nl_route_socket()?;

        // settings flags to 0 and change to IFF_UP will disable the IFF_UP flag
        let info = Ifinfomsg::down(
            RtAddrFamily::Unspecified,
            Arphrd::Netrom,
            self.if_index as c_int,
            neli::types::RtBuffer::new(),
        );

        // prepare message
        let msg = Nlmsghdr::new(
            None,
            Rtm::Newlink,
            neli::consts::nl::NlmFFlags::new(&[NlmF::Request, NlmF::Ack]),
            None,
            Some(0),
            neli::nl::NlPayload::Payload(info),
        );
        // send the message
        send_and_read_ack(&mut nl, msg)
    }
/// Bring down CAN interface
///
/// Use a netlink control socket to set the interface status to "down".
Bring down CAN interface
Use a netlink control socket to set the interface status to "down".
Bring down CAN interface Use a netlink control socket to set the interface status to " down " .
pub fn bring_down(&self) -> Result<(), NlError> {
        let mut nl = open_nl_route_socket()?;
        // settings flags to 0 and change to IFF_UP will disable the IFF_UP flag
        let info = Ifinfomsg::down(
            RtAddrFamily::Unspecified,
            Arphrd::Netrom,
            self.if_index as c_int,
            neli::types::RtBuffer::new(),
        );
        // prepare message
        let msg = Nlmsghdr::new(
            None,
            Rtm::Newlink,
            neli::consts::nl::NlmFFlags::new(&[NlmF::Request, NlmF::Ack]),
            None,
            Some(0),
            neli::nl::NlPayload::Payload(info),
        );
        // send the message
        send_and_read_ack(&mut nl, msg)
    }
pub fn bring_down ( & self ) -> Result < ( ) , NlError > { let mut nl = open_nl_route_socket ( ) ? ; // settings flags to 0 and change to IFF_UP will disable the IFF_UP flag let info = Ifinfomsg :: down ( RtAddrFamily :: Unspecified , Arphrd :: Netrom , self . if_index as c_int , neli :: types :: RtBuffer :: new ( ) , ) ; // prepare message let msg = Nlmsghdr :: new ( None , Rtm :: Newlink , neli :: consts :: nl :: NlmFFlags :: new ( & [ NlmF :: Request , NlmF :: Ack ] ) , None , Some ( 0 ) , neli :: nl :: NlPayload :: Payload ( info ) , ) ; // send the message send_and_read_ack ( & mut nl , msg ) }
Bring down CAN interface
Use a netlink control socket to set the interface status to "down".
Bring down CAN interface Use a netlink control socket to set the interface status to " down " .
&self
&self