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

int rtnl_neightbl_change ( struct nl_sock *  sk,
struct rtnl_neightbl old,
struct rtnl_neightbl tmpl 
)

Change neighbour table attributes

  • sk Netlink socket.
  • old neighbour table to be changed
  • tmpl template with requested changes
Builds a new netlink message by calling rtnl_neightbl_build_change_request(), sends the request to the kernel and waits for the next ACK to be received, i.e. blocks until the request has been processed.

Returns:
0 on success or a negative error code

Definition at line 565 of file neightbl.c.

References nl_send_auto_complete(), nlmsg_free(), and rtnl_neightbl_build_change_request().

{
      struct nl_msg *msg;
      int err;
      
      if ((err = rtnl_neightbl_build_change_request(old, tmpl, &msg)) < 0)
            return err;

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

      return wait_for_ack(sk);
}


Generated by  Doxygen 1.6.0   Back to index