-/**
- * Callback function to check for QDISC existence.
- * If the QDISC is found to exist, increment "exists" in the custom arg.
- *
- * @param[in] nh
- * The netlink message to parse, received from the kernel.
- * @param[in, out] arg
- * Custom arguments for the callback.
- *
- * @return
- * 0.
- */
-static int
-qdisc_exist_cb(struct nlmsghdr *nh, void *arg)
-{
- struct list_args *args = (struct list_args *)arg;
- struct qdisc_custom_arg *custom = args->custom_arg;
- struct tcmsg *t = NLMSG_DATA(nh);
-
- /* filter by request iface */
- if (args->ifindex != (unsigned int)t->tcm_ifindex)
- return 0;
- if (t->tcm_handle != custom->handle || t->tcm_parent != custom->parent)
- return 0;
- custom->exists++;
- return 0;
-}
-