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

struct nl_msg* rtnl_qdisc_build_delete_request ( struct rtnl_qdisc *  qdisc  )  [read]

Build a netlink request message to delete a qdisc

  • qdisc qdisc to delete
Builds a new netlink message requesting a deletion of a qdisc. The netlink message header isn't fully equipped with all relevant fields and must thus be sent out via nl_send_auto_complete() or supplemented as needed.

New netlink message

Definition at line 450 of file qdisc.c.

References nlmsg_append().

Referenced by rtnl_qdisc_delete().

      struct nl_msg *msg;
      struct tcmsg tchdr;
      int required = TCA_ATTR_IFINDEX | TCA_ATTR_PARENT;

      if ((qdisc->q_mask & required) != required)

      msg = nlmsg_build_simple(RTM_DELQDISC, 0);
      if (!msg)
            return NULL;

      tchdr.tcm_family = AF_UNSPEC,
      tchdr.tcm_handle = qdisc->q_handle,
      tchdr.tcm_parent = qdisc->q_parent,
      tchdr.tcm_ifindex = qdisc->q_ifindex,
      nlmsg_append(msg, &tchdr, sizeof(tchdr), 1);

      return msg;

Generated by  Doxygen 1.6.0   Back to index