libnl  3.2.24-rc1

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_linkrtnl_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...
 

Utilities

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)
 
int rtnl_tc_compare (struct nl_object *aobj, struct nl_object *bobj, uint32_t attrs, int flags)
 

Modules API

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 (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)
 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

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

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

Definition at line 56 of file tc.h.

Referenced by rtnl_class_dsmark_get_bitmask(), rtnl_class_dsmark_get_value(), rtnl_class_dsmark_set_bitmask(), rtnl_class_dsmark_set_value(), rtnl_class_foreach_child(), 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(), 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_build_update_request(), 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_foreach_child(), rtnl_qdisc_foreach_cls(), 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_u32_add_key(), and rtnl_u32_get_key().

Enumeration Type Documentation

Traffic control statistical identifier.

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

void rtnl_tc_set_ifindex ( struct rtnl_tc *  tc,
int  ifindex 
)

Set interface index of traffic control object.

Parameters
tctraffic control object
ifindexinterface 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 265 of file tc.c.

References rtnl_link_put().

Referenced by rtnl_class_foreach_child(), rtnl_class_foreach_cls(), rtnl_qdisc_build_update_request(), rtnl_qdisc_foreach_child(), and rtnl_qdisc_foreach_cls().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int rtnl_tc_get_ifindex ( struct rtnl_tc *  tc)

Return interface index of traffic control object.

Parameters
tctraffic control object

Definition at line 280 of file tc.c.

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

Set link of traffic control object.

Parameters
tctraffic control object
linklink 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 297 of file tc.c.

References nl_object_get(), and rtnl_link_put().

+ Here is the call graph for this function:

struct rtnl_link* rtnl_tc_get_link ( struct rtnl_tc *  tc)
read

Get link of traffic control object.

Parameters
tctraffic 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 328 of file tc.c.

References nl_object_get().

+ Here is the call graph for this function:

void rtnl_tc_set_mtu ( struct rtnl_tc *  tc,
uint32_t  mtu 
)

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

Parameters
tctraffic control object
mtulargest 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 351 of file tc.c.

uint32_t rtnl_tc_get_mtu ( struct rtnl_tc *  tc)

Return the MTU of traffic control object.

Parameters
tctraffic 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 366 of file tc.c.

Referenced by rtnl_tc_build_rate_table().

+ Here is the caller graph for this function:

void rtnl_tc_set_mpu ( struct rtnl_tc *  tc,
uint32_t  mpu 
)

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

Parameters
tctraffic control object
mpuminimum 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 386 of file tc.c.

uint32_t rtnl_tc_get_mpu ( struct rtnl_tc *  tc)

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

Parameters
tctraffic control object
Returns
The MPU previously set via rtnl_tc_set_mpu() or 0.

Definition at line 398 of file tc.c.

Referenced by rtnl_tc_build_rate_table().

+ Here is the caller graph for this function:

void rtnl_tc_set_overhead ( struct rtnl_tc *  tc,
uint32_t  overhead 
)

Set per packet overhead of a traffic control object.

Parameters
tctraffic control object
overheadoverhead 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 415 of file tc.c.

uint32_t rtnl_tc_get_overhead ( struct rtnl_tc *  tc)

Return per packet overhead of a traffic control object.

Parameters
tctraffic control object
Returns
The overhead previously set by rtnl_tc_set_overhead() or 0.

Definition at line 427 of file tc.c.

Referenced by rtnl_tc_build_rate_table().

+ Here is the caller graph for this function:

void rtnl_tc_set_linktype ( struct rtnl_tc *  tc,
uint32_t  type 
)

Set the linktype of a traffic control object.

Parameters
tctraffic control object
typetype 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 443 of file tc.c.

uint32_t rtnl_tc_get_linktype ( struct rtnl_tc *  tc)

Return the linktype of a traffic control object.

Parameters
tctraffic 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 458 of file tc.c.

Referenced by rtnl_tc_build_rate_table().

+ Here is the caller graph for this function:

void rtnl_tc_set_handle ( struct rtnl_tc *  tc,
uint32_t  id 
)

Set identifier of traffic control object.

Parameters
tctraffic control object
idunique identifier

Definition at line 473 of file tc.c.

Referenced by rtnl_qdisc_build_update_request().

+ Here is the caller graph for this function:

uint32_t rtnl_tc_get_handle ( struct rtnl_tc *  tc)

Return identifier of a traffic control object.

Parameters
tctraffic control object

Definition at line 483 of file tc.c.

void rtnl_tc_set_parent ( struct rtnl_tc *  tc,
uint32_t  parent 
)

Set the parent identifier of a traffic control object.

Parameters
tctraffic control object
parentidentifier of parent traffif control object

Definition at line 494 of file tc.c.

Referenced by rtnl_class_foreach_child(), rtnl_class_foreach_cls(), rtnl_qdisc_build_update_request(), rtnl_qdisc_foreach_child(), and rtnl_qdisc_foreach_cls().

+ Here is the caller graph for this function:

uint32_t rtnl_tc_get_parent ( struct rtnl_tc *  tc)

Return parent identifier of a traffic control object.

Parameters
tctraffic control object

Definition at line 504 of file tc.c.

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

Define the type of traffic control object.

Parameters
tctraffic control object
kindname of the tc object type
Returns
0 on success or a negative error code

Definition at line 516 of file tc.c.

References rtnl_tc_data().

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:

char* rtnl_tc_get_kind ( struct rtnl_tc *  tc)

Return kind of traffic control object.

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

Definition at line 536 of file tc.c.

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
tctraffic control object
ididentifier of statistical counter
Returns
Value of requested statistic counter or 0.

Definition at line 551 of file tc.c.

int rtnl_tc_calc_txtime ( int  bufsize,
int  rate 
)

Calculate time required to transmit buffer at a specific rate.

Parameters
bufsizeSize of buffer to be transmited in bytes.
rateTransmit rate in bytes per second.

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

\[ txtime=\frac{bufsize}{rate}10^6 \]

Returns
Required transmit time in micro seconds.

Definition at line 580 of file tc.c.

Referenced by rtnl_qdisc_tbf_set_peakrate(), rtnl_qdisc_tbf_set_rate(), and rtnl_tc_build_rate_table().

+ Here is the caller graph for this function:

int rtnl_tc_calc_bufsize ( int  txtime,
int  rate 
)

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

Parameters
txtimeAvailable transmit time in micro seconds.
rateTransmit 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.

\[ bufsize=\frac{{txtime} \times {rate}}{10^6} \]

Returns
Size of buffer in bytes.

Definition at line 603 of file tc.c.

int rtnl_tc_calc_cell_log ( int  cell_size)

Calculate the binary logarithm for a specific cell size.

Parameters
cell_sizeSize of cell, must be a power of two.
Returns
Binary logirhtm of cell size or a negative error code.

Definition at line 617 of file tc.c.

Referenced by rtnl_qdisc_tbf_set_rate().

+ Here is the caller graph for this function:

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

Compute a transmission time lookup table.

Parameters
tctraffic control object
specRate specification
dstDestination 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 691 of file tc.c.

References nl_us2ticks(), rtnl_tc_calc_txtime(), 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:

int rtnl_tc_register ( struct rtnl_tc_ops *  ops)

Register a traffic control module.

Parameters
opstraffic control module operations

Definition at line 958 of file tc.c.

void rtnl_tc_unregister ( struct rtnl_tc_ops *  ops)

Unregister a traffic control module.

Parameters
opstraffic control module operations

Definition at line 992 of file tc.c.

void* rtnl_tc_data ( struct rtnl_tc *  tc)

Return pointer to private data of traffic control object.

Parameters
tctraffic 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 1006 of file tc.c.

References nl_data_alloc(), and nl_data_get().

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(), 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(), and rtnl_u32_get_key().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void* rtnl_tc_data_check ( struct rtnl_tc *  tc,
struct rtnl_tc_ops *  ops 
)

Check traffic control object type and return private data section.

Parameters
tctraffic control object
opsexpected traffic control object operations

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 1043 of file tc.c.

References rtnl_tc_data().

+ Here is the call graph for this function: