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

int rtnl_neigh_change ( struct nl_handle *  handle,
struct rtnl_neigh *  neigh,
int  flags 

Change neighbour attributes

  • handle netlink handle
  • neigh neighbour to be changed
  • flags additional netlink message flags
Builds a netlink message by calling rtnl_neigh_build_change_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.

0 on sucess or a negative error if an error occured.
Not all attributes can be changed, see Changeable Attributes for a list.

Definition at line 694 of file neigh.c.

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

      int err;
      struct nl_msg *msg;
      msg = rtnl_neigh_build_change_request(neigh, flags);
      if (!msg)
            return nl_errno(ENOMEM);

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

      return nl_wait_for_ack(handle);

Generated by  Doxygen 1.6.0   Back to index