libnl 3.5.0

Modules | Macros | Enumerations
Traffic Control
Routing Library (libnl-route)

## Modules
| Action
| ClassID Management
| Classifiers
| Packet Location Aliasing
| Packet Location Aliasing.
| Queueing Disciplines
| Traffic Classes

## Macros
#define | TC_HANDLE(maj, min) (TC_H_MAJ((maj) << 16) | TC_H_MIN(min))
| Compute tc handle based on major and minor parts.
#define | TC_CAST(ptr) ((struct rtnl_tc *) (ptr))
| Macro to cast qdisc/class/classifier to tc object. More...

## Enumerations
enum | rtnl_tc_stat { RTNL_TC_PACKETS, RTNL_TC_BYTES, RTNL_TC_RATE_BPS, RTNL_TC_RATE_PPS, RTNL_TC_QLEN, RTNL_TC_BACKLOG, RTNL_TC_DROPS, RTNL_TC_REQUEUES, RTNL_TC_OVERLIMITS, __RTNL_TC_STATS_MAX }
| Traffic control statistical identifier. More...

## Attributes
void | rtnl_tc_set_ifindex (struct rtnl_tc *tc, int ifindex)
| Set interface index of traffic control object. More...
int | rtnl_tc_get_ifindex (struct rtnl_tc *tc)
| Return interface index of traffic control object. More...
void | rtnl_tc_set_link (struct rtnl_tc *tc, struct rtnl_link *link)
| Set link of traffic control object. More...
struct rtnl_link * | rtnl_tc_get_link (struct rtnl_tc *tc)
| Get link of traffic control object. More...
void | rtnl_tc_set_mtu (struct rtnl_tc *tc, uint32_t mtu)
| Set the Maximum Transmission Unit (MTU) of traffic control object. More...
uint32_t | rtnl_tc_get_mtu (struct rtnl_tc *tc)
| Return the MTU of traffic control object. More...
void | rtnl_tc_set_mpu (struct rtnl_tc *tc, uint32_t mpu)
| Set the Minimum Packet Unit (MPU) of a traffic control object. More...
uint32_t | rtnl_tc_get_mpu (struct rtnl_tc *tc)
| Return the Minimum Packet Unit (MPU) of a traffic control object. More...
void | rtnl_tc_set_overhead (struct rtnl_tc *tc, uint32_t overhead)
| Set per packet overhead of a traffic control object. More...
uint32_t | rtnl_tc_get_overhead (struct rtnl_tc *tc)
| Return per packet overhead of a traffic control object. More...
void | rtnl_tc_set_linktype (struct rtnl_tc *tc, uint32_t type)
| Set the linktype of a traffic control object. More...
uint32_t | rtnl_tc_get_linktype (struct rtnl_tc *tc)
| Return the linktype of a traffic control object. More...
void | rtnl_tc_set_handle (struct rtnl_tc *tc, uint32_t id)
| Set identifier of traffic control object. More...
uint32_t | rtnl_tc_get_handle (struct rtnl_tc *tc)
| Return identifier of a traffic control object. More...
void | rtnl_tc_set_parent (struct rtnl_tc *tc, uint32_t parent)
| Set the parent identifier of a traffic control object. More...
uint32_t | rtnl_tc_get_parent (struct rtnl_tc *tc)
| Return parent identifier of a traffic control object. More...
int | rtnl_tc_set_kind (struct rtnl_tc *tc, const char *kind)
| Define the type of traffic control object. More...
char * | rtnl_tc_get_kind (struct rtnl_tc *tc)
| Return kind of traffic control object. More...
uint64_t | rtnl_tc_get_stat (struct rtnl_tc *tc, enum rtnl_tc_stat id)
| Return value of a statistical counter of a traffic control object. More...
void | rtnl_tc_set_chain (struct rtnl_tc *tc, uint32_t chain)
| Set the chain index of a traffic control object. More...
int | rtnl_tc_get_chain (struct rtnl_tc *tc, uint32_t *out_value)
| Return chain index of traffic control object. More...

## Utilities
char * | rtnl_tc_stat2str (enum rtnl_tc_stat st, char *buf, size_t len)
int | rtnl_tc_str2stat (const char *name)
int | rtnl_tc_calc_txtime (int bufsize, int rate)
| Calculate time required to transmit buffer at a specific rate. More...
int | rtnl_tc_calc_bufsize (int txtime, int rate)
| Calculate buffer size able to transmit in a specific time and rate. More...
int | rtnl_tc_calc_cell_log (int cell_size)
| Calculate the binary logarithm for a specific cell size. More...

## Rate Tables
int | rtnl_tc_build_rate_table (struct rtnl_tc *tc, struct rtnl_ratespec *spec, uint32_t *dst)
| Compute a transmission time lookup table. More...

## TC implementation of cache functions
void | rtnl_tc_free_data (struct nl_object *obj)
int | rtnl_tc_clone (struct nl_object *dstobj, struct nl_object *srcobj)
void | rtnl_tc_dump_line (struct nl_object *obj, struct nl_dump_params *p)
void | rtnl_tc_dump_details (struct nl_object *obj, struct nl_dump_params *p)
void | rtnl_tc_dump_stats (struct nl_object *obj, struct nl_dump_params *p)
uint64_t | rtnl_tc_compare (struct nl_object *aobj, struct nl_object *bobj, uint64_t attrs, int flags)

## Modules API
struct nl_af_group | tc_groups []
struct rtnl_tc_ops * | rtnl_tc_lookup_ops (enum rtnl_tc_type type, const char *kind)
struct rtnl_tc_ops * | rtnl_tc_get_ops (struct rtnl_tc *tc)
int | rtnl_tc_register (struct rtnl_tc_ops *ops)
| Register a traffic control module. More...
void | rtnl_tc_unregister (struct rtnl_tc_ops *ops)
| Unregister a traffic control module. More...
void * | rtnl_tc_data_peek (struct rtnl_tc *tc)
| Returns the private data of the traffic control object. More...
void * | rtnl_tc_data (struct rtnl_tc *tc)
| Return pointer to private data of traffic control object. More...
void * | rtnl_tc_data_check (struct rtnl_tc *tc, struct rtnl_tc_ops *ops, int *err)
| Check traffic control object type and return private data section. More...
void | rtnl_tc_type_register (struct rtnl_tc_type_ops *ops)
void | rtnl_tc_type_unregister (struct rtnl_tc_type_ops *ops)

## Detailed Description

## Macro Definition Documentation

## ◆ TC_CAST

#define TC_CAST | ( |  | ptr | ) | ((struct rtnl_tc *) (ptr))

Macro to cast qdisc/class/classifier to tc object.

rtnl_tc_set_mpu(TC_CAST(qdisc), 40);

Definition at line 56 of file tc.h.

## Enumeration Type Documentation

## ◆ rtnl_tc_stat

enum rtnl_tc_stat

Traffic control statistical identifier.

uint64_t n = rtnl_tc_get_stat(TC_CAST(class), RTNL_TC_PACKETS);

Enumerator
RTNL_TC_PACKETS | Number of packets seen.
RTNL_TC_BYTES | Total bytes seen.
RTNL_TC_RATE_BPS | Current bits/s (rate estimator)
RTNL_TC_RATE_PPS | Current packet/s (rate estimator)
RTNL_TC_QLEN | Current queue length.
RTNL_TC_BACKLOG | Current backlog length.
RTNL_TC_DROPS | Total number of packets dropped.
RTNL_TC_REQUEUES | Total number of requeues.
RTNL_TC_OVERLIMITS | Total number of overlimits.

Definition at line 66 of file tc.h.

## Function Documentation

## ◆ rtnl_tc_set_ifindex()

void rtnl_tc_set_ifindex | ( | struct rtnl_tc * | tc,
|  | int | ifindex
| ) |  |

Set interface index of traffic control object.

Parameters

  tc | traffic control object
  ifindex | interface index.

Sets the interface index of a traffic control object. The interface index defines the network device which this tc object is attached to. This function will overwrite any network device assigned with previous calls to rtnl_tc_set_ifindex() or rtnl_tc_set_link().

Definition at line 279 of file tc.c.

References rtnl_link_put().

Referenced by rtnl_qdisc_build_update_request().

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ rtnl_tc_get_ifindex()

int rtnl_tc_get_ifindex | ( | struct rtnl_tc * | tc | ) |

Return interface index of traffic control object.

Parameters

  tc | traffic control object

Definition at line 294 of file tc.c.

## ◆ rtnl_tc_set_link()

void rtnl_tc_set_link | ( | struct rtnl_tc * | tc,
|  | struct rtnl_link * | link
| ) |  |

Set link of traffic control object.

Parameters

  tc | traffic control object
  link | link object

Sets the link of a traffic control object. This function serves the same purpose as rtnl_tc_set_ifindex() but due to the continued allowed access to the link object it gives it the possibility to retrieve sane default values for the the MTU and the linktype. Always prefer this function over rtnl_tc_set_ifindex() if you can spare to have an additional link object around.

Definition at line 311 of file tc.c.

References nl_object_get(), and rtnl_link_put().

Here is the call graph for this function:

## ◆ rtnl_tc_get_link()

struct rtnl_link* rtnl_tc_get_link | ( | struct rtnl_tc * | tc | ) |

Get link of traffic control object.

Parameters

  tc | traffic control object

Returns the link of a traffic control object. The link is only returned if it has been set before via rtnl_tc_set_link() or if a link cache was available while parsing the tc object. This function may still return NULL even if an ifindex is assigned to the tc object. It will not look up the link by itself.

Note
  The returned link will have its reference counter incremented. It is in the responsibility of the caller to return the reference.

Returns
  link object or NULL if not set.

Definition at line 342 of file tc.c.

References nl_object_get().

Here is the call graph for this function:

## ◆ rtnl_tc_set_mtu()

void rtnl_tc_set_mtu | ( | struct rtnl_tc * | tc,
|  | uint32_t | mtu
| ) |  |

Set the Maximum Transmission Unit (MTU) of traffic control object.

Parameters

  tc | traffic control object
  mtu | largest packet size expected

Sets the MTU of a traffic control object. Not all traffic control objects will make use of this but it helps while calculating rate tables. This value is typically derived directly from the link the tc object is attached to if the link has been assigned via rtnl_tc_set_link(). It is usually not necessary to set the MTU manually, this function is provided to allow overwriting the derived value.

Definition at line 365 of file tc.c.

## ◆ rtnl_tc_get_mtu()

uint32_t rtnl_tc_get_mtu | ( | struct rtnl_tc * | tc | ) |

Return the MTU of traffic control object.

Parameters

  tc | traffic control object

Returns the MTU of a traffic control object which has been set via:

1. User specified value set via rtnl_tc_set_mtu()
2. Dervied from link set via rtnl_tc_set_link()
3. Fall back to default: ethernet = 1500

Definition at line 380 of file tc.c.

Referenced by rtnl_tc_build_rate_table().

Here is the caller graph for this function:

## ◆ rtnl_tc_set_mpu()

void rtnl_tc_set_mpu | ( | struct rtnl_tc * | tc,
|  | uint32_t | mpu
| ) |  |

Set the Minimum Packet Unit (MPU) of a traffic control object.

Parameters

  tc | traffic control object
  mpu | minimum packet size expected

Sets the MPU of a traffic contorl object. It specifies the minimum packet size to ever hit this traffic control object. Not all traffic control objects will make use of this but it helps while calculating rate tables.

Definition at line 400 of file tc.c.

## ◆ rtnl_tc_get_mpu()

uint32_t rtnl_tc_get_mpu | ( | struct rtnl_tc * | tc | ) |

Return the Minimum Packet Unit (MPU) of a traffic control object.

Parameters

  tc | traffic control object

Returns
  The MPU previously set via rtnl_tc_set_mpu() or 0.

Definition at line 412 of file tc.c.

Referenced by rtnl_tc_build_rate_table().

Here is the caller graph for this function:

## ◆ rtnl_tc_set_overhead()

void rtnl_tc_set_overhead | ( | struct rtnl_tc * | tc,
|  | uint32_t | overhead
| ) |  |

Set per packet overhead of a traffic control object.

Parameters

  tc | traffic control object
  overhead | overhead per packet in bytes

Sets the per packet overhead in bytes occuring on the link not seen by the kernel. This value can be used to correct size calculations if the packet size on the wire does not match the packet sizes seen in the network stack. Not all traffic control objects will make use this but it helps while calculating accurate packet sizes in the kernel.

Definition at line 429 of file tc.c.

## ◆ rtnl_tc_get_overhead()

uint32_t rtnl_tc_get_overhead | ( | struct rtnl_tc * | tc | ) |

Return per packet overhead of a traffic control object.

Parameters

  tc | traffic control object

Returns
  The overhead previously set by rtnl_tc_set_overhead() or 0.

Definition at line 441 of file tc.c.

Referenced by rtnl_tc_build_rate_table().

Here is the caller graph for this function:

## ◆ rtnl_tc_set_linktype()

void rtnl_tc_set_linktype | ( | struct rtnl_tc * | tc,
|  | uint32_t | type
| ) |  |

Set the linktype of a traffic control object.

Parameters

  tc | traffic control object
  type | type of link (e.g. ARPHRD_ATM, ARPHRD_ETHER)

Overwrites the type of link this traffic control object is attached to. This value is typically derived from the link this tc object is attached if the link has been assigned via rtnl_tc_set_link(). It is usually not necessary to set the linktype manually. This function is provided to allow overwriting the linktype.

Definition at line 457 of file tc.c.

## ◆ rtnl_tc_get_linktype()

uint32_t rtnl_tc_get_linktype | ( | struct rtnl_tc * | tc | ) |

Return the linktype of a traffic control object.

Parameters

  tc | traffic control object

Returns the linktype of the link the traffic control object is attached to:

1. User specified value via rtnl_tc_set_linktype()
2. Value derived from link set via rtnl_tc_set_link()
3. Default fall-back: ARPHRD_ETHER

Definition at line 472 of file tc.c.

Referenced by rtnl_tc_build_rate_table().

Here is the caller graph for this function:

## ◆ rtnl_tc_set_handle()

void rtnl_tc_set_handle | ( | struct rtnl_tc * | tc,
|  | uint32_t | id
| ) |  |

Set identifier of traffic control object.

Parameters

  tc | traffic control object
  id | unique identifier

Definition at line 487 of file tc.c.

Referenced by rtnl_qdisc_build_update_request().

Here is the caller graph for this function:

## ◆ rtnl_tc_get_handle()

uint32_t rtnl_tc_get_handle | ( | struct rtnl_tc * | tc | ) |

Return identifier of a traffic control object.

Parameters

  tc | traffic control object

Definition at line 497 of file tc.c.

## ◆ rtnl_tc_set_parent()

void rtnl_tc_set_parent | ( | struct rtnl_tc * | tc,
|  | uint32_t | parent
| ) |  |

Set the parent identifier of a traffic control object.

Parameters

  tc | traffic control object
  parent | identifier of parent traffif control object

Definition at line 508 of file tc.c.

Referenced by rtnl_qdisc_build_update_request().

Here is the caller graph for this function:

## ◆ rtnl_tc_get_parent()

uint32_t rtnl_tc_get_parent | ( | struct rtnl_tc * | tc | ) |

Return parent identifier of a traffic control object.

Parameters

  tc | traffic control object

Definition at line 518 of file tc.c.

## ◆ rtnl_tc_set_kind()

int rtnl_tc_set_kind | ( | struct rtnl_tc * | tc,
|  | const char * | kind
| ) |  |

Define the type of traffic control object.

Parameters

  tc | traffic control object
  kind | name of the tc object type

Returns
  0 on success or a negative error code

Definition at line 530 of file tc.c.

References rtnl_tc_data().

Here is the call graph for this function:

## ◆ rtnl_tc_get_kind()

char* rtnl_tc_get_kind | ( | struct rtnl_tc * | tc | ) |

Return kind of traffic control object.

Parameters

  tc | traffic control object

Returns
  Kind of traffic control object or NULL if not set.

Definition at line 555 of file tc.c.

## ◆ rtnl_tc_get_stat()

uint64_t rtnl_tc_get_stat | ( | struct rtnl_tc * | tc,
|  | enum rtnl_tc_stat | id
| ) |  |

Return value of a statistical counter of a traffic control object.

Parameters

  tc | traffic control object
  id | identifier of statistical counter

Returns
  Value of requested statistic counter or 0.

Definition at line 570 of file tc.c.

## ◆ rtnl_tc_set_chain()

void rtnl_tc_set_chain | ( | struct rtnl_tc * | tc,
|  | uint32_t | chain
| ) |  |

Set the chain index of a traffic control object.

Parameters

  tc | traffic control object
  chain | chain index of traffic control object

Definition at line 584 of file tc.c.

## ◆ rtnl_tc_get_chain()

int rtnl_tc_get_chain | ( | struct rtnl_tc * | tc,
|  | uint32_t * | out_value
| ) |  |

Return chain index of traffic control object.

Parameters

  tc | traffic control object
  out_value | output argument.

Returns
  0 of the output value was successfully returned, or a negative error code on failure.

Definition at line 598 of file tc.c.

## ◆ rtnl_tc_calc_txtime()

int rtnl_tc_calc_txtime | ( | int | bufsize,
|  | int | rate
| ) |  |

Calculate time required to transmit buffer at a specific rate.

Parameters

  bufsize | Size of buffer to be transmited in bytes.
  rate | Transmit rate in bytes per second.

Calculates the number of micro seconds required to transmit a specific buffer at a specific transmit rate.

Returns
  Required transmit time in micro seconds.

Definition at line 649 of file tc.c.

## ◆ rtnl_tc_calc_bufsize()

int rtnl_tc_calc_bufsize | ( | int | txtime,
|  | int | rate
| ) |  |

Calculate buffer size able to transmit in a specific time and rate.

Parameters

  txtime | Available transmit time in micro seconds.
  rate | Transmit rate in bytes per second.

Calculates the size of the buffer that can be transmitted in a specific time period at a specific transmit rate.

Returns
  Size of buffer in bytes.

Definition at line 668 of file tc.c.

## ◆ rtnl_tc_calc_cell_log()

int rtnl_tc_calc_cell_log | ( | int | cell_size | ) |

Calculate the binary logarithm for a specific cell size.

Parameters

  cell_size | Size of cell, must be a power of two.

Returns
  Binary logirhtm of cell size or a negative error code.

Definition at line 678 of file tc.c.

Referenced by rtnl_qdisc_tbf_set_rate().

Here is the caller graph for this function:

## ◆ rtnl_tc_build_rate_table()

int rtnl_tc_build_rate_table | ( | struct rtnl_tc * | tc,
|  | struct rtnl_ratespec * | spec,
|  | uint32_t * | dst
| ) |  |

Compute a transmission time lookup table.

Parameters

  tc | traffic control object
  spec | Rate specification
  dst | Destination buffer of RTNL_TC_RTABLE_SIZE uint32_t[].

Computes a table of RTNL_TC_RTABLE_SIZE entries specyfing the transmission times for various packet sizes, e.g. the transmission time for a packet of size `pktsize` could be looked up:

txtime = table[pktsize >> log2(mtu)];

Definition at line 752 of file tc.c.

References rtnl_tc_get_linktype(), rtnl_tc_get_mpu(), rtnl_tc_get_mtu(), and rtnl_tc_get_overhead().

Here is the call graph for this function:

## ◆ rtnl_tc_register()

int rtnl_tc_register | ( | struct rtnl_tc_ops * | ops | ) |

Register a traffic control module.

Parameters

  ops | traffic control module operations

Definition at line 1021 of file tc.c.

## ◆ rtnl_tc_unregister()

void rtnl_tc_unregister | ( | struct rtnl_tc_ops * | ops | ) |

Unregister a traffic control module.

Parameters

  ops | traffic control module operations

Definition at line 1055 of file tc.c.

## ◆ rtnl_tc_data_peek()

void* rtnl_tc_data_peek | ( | struct rtnl_tc * | tc | ) |

Returns the private data of the traffic control object.

Contrary to rtnl_tc_data(), this returns NULL if the data is not yet allocated

Parameters

  tc | traffic control object

Returns
  pointer to the private data or NULL if not allocated.

Definition at line 1068 of file tc.c.

References nl_data_get().

Referenced by rtnl_vlan_get_action(), rtnl_vlan_get_mode(), rtnl_vlan_get_protocol(), rtnl_vlan_get_vlan_id(), and rtnl_vlan_get_vlan_prio().

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ rtnl_tc_data()

void* rtnl_tc_data | ( | struct rtnl_tc * | tc | ) |

Return pointer to private data of traffic control object.

Parameters

  tc | traffic control object

Allocates the private traffic control object data section as necessary and returns it.

Returns
  Pointer to private tc data or NULL if allocation failed.

Definition at line 1082 of file tc.c.

Referenced by rtnl_class_dsmark_get_bitmask(), rtnl_class_dsmark_get_value(), rtnl_class_dsmark_set_bitmask(), rtnl_class_dsmark_set_value(), rtnl_netem_get_corruption_correlation(), rtnl_netem_get_corruption_probability(), rtnl_netem_get_delay(), rtnl_netem_get_delay_correlation(), rtnl_netem_get_delay_distribution(), rtnl_netem_get_delay_distribution_size(), rtnl_netem_get_duplicate(), rtnl_netem_get_duplicate_correlation(), rtnl_netem_get_gap(), rtnl_netem_get_jitter(), rtnl_netem_get_limit(), rtnl_netem_get_loss(), rtnl_netem_get_loss_correlation(), rtnl_netem_get_reorder_correlation(), rtnl_netem_get_reorder_probability(), rtnl_netem_set_corruption_correlation(), rtnl_netem_set_corruption_probability(), rtnl_netem_set_delay(), rtnl_netem_set_delay_correlation(), rtnl_netem_set_delay_distribution_data(), rtnl_netem_set_duplicate(), rtnl_netem_set_duplicate_correlation(), rtnl_netem_set_gap(), rtnl_netem_set_jitter(), rtnl_netem_set_limit(), rtnl_netem_set_loss(), rtnl_netem_set_loss_correlation(), rtnl_netem_set_reorder_correlation(), rtnl_netem_set_reorder_probability(), rtnl_qdisc_dsmark_get_default_index(), rtnl_qdisc_dsmark_get_indices(), rtnl_qdisc_dsmark_get_set_tc_index(), rtnl_qdisc_dsmark_set_default_index(), rtnl_qdisc_dsmark_set_indices(), rtnl_qdisc_dsmark_set_set_tc_index(), rtnl_qdisc_fifo_get_limit(), rtnl_qdisc_fifo_set_limit(), rtnl_qdisc_fq_codel_get_ecn(), rtnl_qdisc_fq_codel_get_flows(), rtnl_qdisc_fq_codel_get_interval(), rtnl_qdisc_fq_codel_get_limit(), rtnl_qdisc_fq_codel_get_quantum(), rtnl_qdisc_fq_codel_get_target(), rtnl_qdisc_fq_codel_set_ecn(), rtnl_qdisc_fq_codel_set_flows(), rtnl_qdisc_fq_codel_set_interval(), rtnl_qdisc_fq_codel_set_limit(), rtnl_qdisc_fq_codel_set_quantum(), rtnl_qdisc_fq_codel_set_target(), rtnl_qdisc_plug_buffer(), rtnl_qdisc_plug_release_indefinite(), rtnl_qdisc_plug_release_one(), rtnl_qdisc_plug_set_limit(), rtnl_qdisc_prio_get_bands(), rtnl_qdisc_prio_get_priomap(), rtnl_qdisc_prio_set_bands(), rtnl_qdisc_prio_set_priomap(), rtnl_qdisc_tbf_get_limit(), rtnl_qdisc_tbf_get_peakrate(), rtnl_qdisc_tbf_get_peakrate_bucket(), rtnl_qdisc_tbf_get_peakrate_cell(), rtnl_qdisc_tbf_get_rate(), rtnl_qdisc_tbf_get_rate_bucket(), rtnl_qdisc_tbf_get_rate_cell(), rtnl_qdisc_tbf_set_limit(), rtnl_qdisc_tbf_set_limit_by_latency(), rtnl_qdisc_tbf_set_peakrate(), rtnl_qdisc_tbf_set_rate(), rtnl_red_get_limit(), rtnl_red_set_limit(), rtnl_sfq_get_divisor(), rtnl_sfq_get_limit(), rtnl_sfq_get_perturb(), rtnl_sfq_get_quantum(), rtnl_sfq_set_limit(), rtnl_sfq_set_perturb(), rtnl_sfq_set_quantum(), rtnl_tc_data_check(), rtnl_tc_set_kind(), rtnl_u32_add_key(), rtnl_u32_get_key(), rtnl_vlan_set_action(), rtnl_vlan_set_mode(), rtnl_vlan_set_protocol(), rtnl_vlan_set_vlan_id(), and rtnl_vlan_set_vlan_prio().

Here is the caller graph for this function:

## ◆ rtnl_tc_data_check()

void* rtnl_tc_data_check | ( | struct rtnl_tc * | tc,
|  | struct rtnl_tc_ops * | ops,
|  | int * | err
| ) |  |

Check traffic control object type and return private data section.

Parameters

  tc | traffic control object
  ops | expected traffic control object operations
  err | the place where saves the error code if fails

Checks whether the traffic control object matches the type specified with the traffic control object operations. If the type matches, the private tc object data is returned. If type mismatches, APPBUG() will print a application bug warning.

See also
  rtnl_tc_data()

Returns
  Pointer to private tc data or NULL if type mismatches.

Definition at line 1117 of file tc.c.

References rtnl_tc_data().

Here is the call graph for this function:

## Variable Documentation

## ◆ tc_groups

struct nl_af_group tc_groups[]

Initial value:
= {
{ AF_UNSPEC, RTNLGRP_TC },
{ END_OF_GROUP_LIST },
}

Definition at line 1143 of file tc.c.