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

Variables

struct nl_object_ops class_obj_ops
 

Allocation/Freeing

struct rtnl_classrtnl_class_alloc (void)
 
void rtnl_class_put (struct rtnl_class *class)
 

Leaf Qdisc

struct rtnl_qdiscrtnl_class_leaf_qdisc (struct rtnl_class *class, struct nl_cache *cache)
 Lookup the leaf qdisc of a class. More...
 

Iterators

void rtnl_class_foreach_child (struct rtnl_class *class, struct nl_cache *cache, void(*cb)(struct nl_object *, void *), void *arg)
 Call a callback for each child of a class. More...
 
void rtnl_class_foreach_cls (struct rtnl_class *class, struct nl_cache *cache, void(*cb)(struct nl_object *, void *), void *arg)
 Call a callback for each classifier attached to the class. More...
 

Attributes

void rtnl_class_set_ifindex (struct rtnl_class *class, int ifindex)
 
int rtnl_class_get_ifindex (struct rtnl_class *class)
 
void rtnl_class_set_handle (struct rtnl_class *class, uint32_t handle)
 
uint32_t rtnl_class_get_handle (struct rtnl_class *class)
 
void rtnl_class_set_parent (struct rtnl_class *class, uint32_t parent)
 
uint32_t rtnl_class_get_parent (struct rtnl_class *class)
 
void rtnl_class_set_kind (struct rtnl_class *class, const char *name)
 
char * rtnl_class_get_kind (struct rtnl_class *class)
 
uint64_t rtnl_class_get_stat (struct rtnl_class *class, enum rtnl_tc_stats_id id)
 

Detailed Description

Function Documentation

struct rtnl_class* rtnl_class_alloc ( void  )

References class_obj_ops, and nl_object_alloc().

Referenced by rtnl_class_foreach_child(), and rtnl_qdisc_foreach_child().

Here is the call graph for this function:

Here is the caller graph for this function:

void rtnl_class_foreach_child ( struct rtnl_class class,
struct nl_cache cache,
void(*)(struct nl_object *, void *)  cb,
void *  arg 
)

Call a callback for each child of a class.

  • class the parent class
  • cache a class cache including all classes of the interface the specified class 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_class_foreach_cls ( struct rtnl_class class,
struct nl_cache cache,
void(*)(struct nl_object *, void *)  cb,
void *  arg 
)

Call a callback for each classifier attached to the class.

  • class the parent class
  • cache a filter cache including at least all the filters attached to the specified class
  • 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_class_get_handle ( struct rtnl_class class)

References tca_get_handle().

Here is the call graph for this function:

int rtnl_class_get_ifindex ( struct rtnl_class class)

References tca_get_ifindex().

Here is the call graph for this function:

char* rtnl_class_get_kind ( struct rtnl_class class)

References tca_get_kind().

Here is the call graph for this function:

uint32_t rtnl_class_get_parent ( struct rtnl_class class)

References tca_get_parent().

Here is the call graph for this function:

uint64_t rtnl_class_get_stat ( struct rtnl_class class,
enum rtnl_tc_stats_id  id 
)

References tca_get_stat().

Here is the call graph for this function:

struct rtnl_qdisc* rtnl_class_leaf_qdisc ( struct rtnl_class class,
struct nl_cache cache 
)

Lookup the leaf qdisc of a class.

  • class the parent class
  • cache a qdisc cache including at laest all qdiscs of the interface the specified class is attached to
    Returns
    The qdisc from the cache or NULL if the class has no leaf qdisc

References NULL, and rtnl_qdisc_get_by_parent().

Here is the call graph for this function:

void rtnl_class_put ( struct rtnl_class class)

References nl_object_put().

Referenced by rtnl_class_foreach_child(), and rtnl_qdisc_foreach_child().

Here is the call graph for this function:

Here is the caller graph for this function:

void rtnl_class_set_handle ( struct rtnl_class class,
uint32_t  handle 
)

References tca_set_handle().

Here is the call graph for this function:

void rtnl_class_set_ifindex ( struct rtnl_class class,
int  ifindex 
)

References tca_set_ifindex().

Referenced by rtnl_class_foreach_child(), and rtnl_qdisc_foreach_child().

Here is the call graph for this function:

Here is the caller graph for this function:

void rtnl_class_set_kind ( struct rtnl_class class,
const char *  name 
)

References __rtnl_class_lookup_ops(), and tca_set_kind().

Referenced by rtnl_class_foreach_child(), and rtnl_qdisc_foreach_child().

Here is the call graph for this function:

Here is the caller graph for this function:

void rtnl_class_set_parent ( struct rtnl_class class,
uint32_t  parent 
)

References tca_set_parent().

Referenced by rtnl_class_foreach_child(), and rtnl_qdisc_foreach_child().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

struct nl_object_ops class_obj_ops
Initial value:
= {
.oo_name = "route/class",
.oo_size = sizeof(struct rtnl_class),
.oo_free_data = class_free_data,
.oo_clone = class_clone,
.oo_dump = {
[NL_DUMP_LINE] = class_dump_line,
[NL_DUMP_DETAILS] = class_dump_details,
[NL_DUMP_STATS] = class_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:471
Dump all attributes but no statistics.
Definition: types.h:23
Dump all attributes including statistics.
Definition: types.h:24

Referenced by rtnl_class_alloc().