Logo Search packages:      
Sourcecode: libnl version File versions  Download package

int rtnl_addr_delete ( struct nl_handle *  handle,
struct rtnl_addr *  addr,
int  flags 
)

Request deletion of an address

  • handle Netlink handle.
  • addr Address object to be deleted.
  • flags Additional netlink message flags.
Builds a netlink message by calling rtnl_addr_build_delete_request(), sends the request to the kernel and waits for the next ACK to be received and thus blocks until the request has been fullfilled.

See also:
rtnl_addr_build_delete_request();
Returns:
0 on sucess or a negative error if an error occured.

Definition at line 732 of file addr.c.

References nl_send_auto_complete(), nl_wait_for_ack(), nlmsg_free(), and rtnl_addr_build_delete_request().

{
      struct nl_msg *msg;
      int err;

      msg = rtnl_addr_build_delete_request(addr, flags);
      if (!msg)
            return nl_get_errno();

      err = nl_send_auto_complete(handle, msg);
      nlmsg_free(msg);
      if (err < 0)
            return err;

      return nl_wait_for_ack(handle);
}


Generated by  Doxygen 1.6.0   Back to index