struct nl_object *,
uint32_t, int);
+void * rtnl_tc_data_peek(struct rtnl_tc *tc);
extern void * rtnl_tc_data(struct rtnl_tc *);
extern void * rtnl_tc_data_check(struct rtnl_tc *,
struct rtnl_tc_ops *, int *);
nl_list_del(&ops->to_list);
}
+/**
+ * Returns the private data of the traffic control object.
+ * Contrary to rtnl_tc_data(), this returns NULL if the data is
+ * not yet allocated
+ * @arg tc traffic control object
+ *
+ * @return pointer to the private data or NULL if not allocated.
+ */
+void *rtnl_tc_data_peek(struct rtnl_tc *tc)
+{
+ return tc->tc_subdata ? nl_data_get(tc->tc_subdata) : NULL;
+}
+
/**
* Return pointer to private data of traffic control object
* @arg tc traffic control object