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

int rtnl_qdisc_change ( struct nl_sock *  sk,
struct rtnl_qdisc *  qdisc,
struct rtnl_qdisc *  new 

Change attributes of a qdisc

  • sk Netlink socket.
  • qdisc qdisc to change
  • new new qdisc attributes
Builds a netlink message by calling rtnl_qdisc_build_change_request(), sends the request to the kernel and waits for the ACK to be received and thus blocks until the request has been processed.

0 on success or a negative error code

Definition at line 278 of file qdisc.c.

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

      struct nl_msg *msg;
      int err;

      if ((err = rtnl_qdisc_build_change_request(qdisc, new, &msg)) < 0)
            return err;

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

      return wait_for_ack(sk);

Generated by  Doxygen 1.6.0   Back to index