netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Queueing Discipline Object
Collaboration diagram for Queueing Discipline Object:

Variables

struct nl_object_ops qdisc_obj_ops
 

Allocation/Freeing

struct rtnl_qdiscrtnl_qdisc_alloc (void)
 
void rtnl_qdisc_put (struct rtnl_qdisc *qdisc)
 

Iterators

void rtnl_qdisc_foreach_child (struct rtnl_qdisc *qdisc, struct nl_cache *cache, void(*cb)(struct nl_object *, void *), void *arg)
 Call a callback for each child class of a qdisc. More...
 
void rtnl_qdisc_foreach_cls (struct rtnl_qdisc *qdisc, struct nl_cache *cache, void(*cb)(struct nl_object *, void *), void *arg)
 Call a callback for each filter attached to the qdisc. More...
 

Attributes

void rtnl_qdisc_set_ifindex (struct rtnl_qdisc *qdisc, int ifindex)
 
int rtnl_qdisc_get_ifindex (struct rtnl_qdisc *qdisc)
 
void rtnl_qdisc_set_handle (struct rtnl_qdisc *qdisc, uint32_t handle)
 
uint32_t rtnl_qdisc_get_handle (struct rtnl_qdisc *qdisc)
 
void rtnl_qdisc_set_parent (struct rtnl_qdisc *qdisc, uint32_t parent)
 
uint32_t rtnl_qdisc_get_parent (struct rtnl_qdisc *qdisc)
 
void rtnl_qdisc_set_kind (struct rtnl_qdisc *qdisc, const char *name)
 
char * rtnl_qdisc_get_kind (struct rtnl_qdisc *qdisc)
 
uint64_t rtnl_qdisc_get_stat (struct rtnl_qdisc *qdisc, enum rtnl_tc_stats_id id)
 

Qdisc Specific Options

struct nl_msgrtnl_qdisc_get_opts (struct rtnl_qdisc *qdisc)
 Return qdisc specific options for use in TCA_OPTIONS. More...
 

Detailed Description

Function Documentation

struct rtnl_qdisc* rtnl_qdisc_alloc ( void  )

References nl_object_alloc(), and qdisc_obj_ops.

Referenced by main(), and nl_cli_qdisc_alloc().

Here is the call graph for this function:

Here is the caller graph for this function:

void rtnl_qdisc_foreach_child ( struct rtnl_qdisc qdisc,
struct nl_cache cache,
void(*)(struct nl_object *, void *)  cb,
void *  arg 
)

Call a callback for each child class of a qdisc.

  • qdisc the parent qdisc
  • cache a class cache including all classes of the interface the specified qdisc is attached to
  • cb callback function
  • arg argument to be passed to callback function

References nl_cache_foreach_filter(), rtnl_class_alloc(), rtnl_class_put(), rtnl_class_set_ifindex(), rtnl_class_set_kind(), and rtnl_class_set_parent().

Here is the call graph for this function:

void rtnl_qdisc_foreach_cls ( struct rtnl_qdisc qdisc,
struct nl_cache cache,
void(*)(struct nl_object *, void *)  cb,
void *  arg 
)

Call a callback for each filter attached to the qdisc.

  • qdisc the parent qdisc
  • cache a filter cache including at least all the filters attached to the specified qdisc
  • cb callback function
  • arg argument to be passed to callback function

References nl_cache_foreach_filter(), rtnl_cls_alloc(), rtnl_cls_put(), rtnl_cls_set_ifindex(), and rtnl_cls_set_parent().

Here is the call graph for this function:

uint32_t rtnl_qdisc_get_handle ( struct rtnl_qdisc qdisc)

References tca_get_handle().

Here is the call graph for this function:

int rtnl_qdisc_get_ifindex ( struct rtnl_qdisc qdisc)

References tca_get_ifindex().

Here is the call graph for this function:

char* rtnl_qdisc_get_kind ( struct rtnl_qdisc qdisc)

References tca_get_kind().

Here is the call graph for this function:

struct nl_msg* rtnl_qdisc_get_opts ( struct rtnl_qdisc qdisc)

Return qdisc specific options for use in TCA_OPTIONS.

  • qdisc qdisc carrying the optiosn
Returns
new headerless netlink message carrying the options as payload

References NULL, rtnl_qdisc_ops::qo_get_opts, and rtnl_qdisc_lookup_ops().

Here is the call graph for this function:

uint32_t rtnl_qdisc_get_parent ( struct rtnl_qdisc qdisc)

References tca_get_parent().

Here is the call graph for this function:

uint64_t rtnl_qdisc_get_stat ( struct rtnl_qdisc qdisc,
enum rtnl_tc_stats_id  id 
)

References tca_get_stat().

Here is the call graph for this function:

void rtnl_qdisc_put ( struct rtnl_qdisc qdisc)

References nl_object_put().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void rtnl_qdisc_set_handle ( struct rtnl_qdisc qdisc,
uint32_t  handle 
)

References tca_set_handle().

Referenced by main(), and nl_cli_qdisc_parse_handle().

Here is the call graph for this function:

Here is the caller graph for this function:

void rtnl_qdisc_set_ifindex ( struct rtnl_qdisc qdisc,
int  ifindex 
)

References tca_set_ifindex().

Referenced by main(), and nl_cli_qdisc_parse_dev().

Here is the call graph for this function:

Here is the caller graph for this function:

void rtnl_qdisc_set_kind ( struct rtnl_qdisc qdisc,
const char *  name 
)

References __rtnl_qdisc_lookup_ops(), rtnl_qdisc::q_ops, and tca_set_kind().

Referenced by main(), and nl_cli_qdisc_parse_kind().

Here is the call graph for this function:

Here is the caller graph for this function:

void rtnl_qdisc_set_parent ( struct rtnl_qdisc qdisc,
uint32_t  parent 
)

References tca_set_parent().

Referenced by main(), and nl_cli_qdisc_parse_parent().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

struct nl_object_ops qdisc_obj_ops
Initial value:
= {
.oo_name = "route/qdisc",
.oo_size = sizeof(struct rtnl_qdisc),
.oo_free_data = qdisc_free_data,
.oo_clone = qdisc_clone,
.oo_dump = {
[NL_DUMP_LINE] = qdisc_dump_line,
[NL_DUMP_DETAILS] = qdisc_dump_details,
[NL_DUMP_STATS] = qdisc_dump_stats,
},
.oo_compare = tca_compare,
.oo_id_attrs = (TCA_ATTR_IFINDEX | TCA_ATTR_HANDLE),
}
Dump object briefly on one line.
Definition: types.h:22
Definition: netlink-types.h:465
Dump all attributes but no statistics.
Definition: types.h:23
Dump all attributes including statistics.
Definition: types.h:24

Referenced by rtnl_qdisc_alloc().