(Fast) Prio
[Queueing Discipline Modules]


Detailed Description

1) Typical PRIO configuration
 // Specify the maximal number of bands to be used for this PRIO qdisc.
 rtnl_qdisc_prio_set_bands(qdisc, QDISC_PRIO_DEFAULT_BANDS);

 // Provide a map assigning each priority to a band number.
 uint8_t map[] = QDISC_PRIO_DEFAULT_PRIOMAP;
 rtnl_qdisc_prio_set_priomap(qdisc, map, sizeof(map));

Function Documentation

int rtnl_qdisc_prio_set_bands ( struct rtnl_qdisc *  qdisc,
int  bands 
)

Parameters:
qdisc PRIO qdisc to be modified.
bands New number of bands.
Returns:
0 on success or a negative error code.

Definition at line 170 of file prio.c.

int rtnl_qdisc_prio_get_bands ( struct rtnl_qdisc *  qdisc  ) 

Parameters:
qdisc PRIO qdisc.
Returns:
Number of bands or a negative error code.

Definition at line 189 of file prio.c.

int rtnl_qdisc_prio_set_priomap ( struct rtnl_qdisc *  qdisc,
uint8_t  priomap[],
int  len 
)

Parameters:
qdisc PRIO qdisc to be modified.
priomap New priority mapping.
len Length of priomap (# of elements).
Returns:
0 on success or a negative error code.

Definition at line 207 of file prio.c.

uint8_t* rtnl_qdisc_prio_get_priomap ( struct rtnl_qdisc *  qdisc  ) 

Parameters:
qdisc PRIO qdisc.
Returns:
Priority mapping as array of size TC_PRIO_MAX+1 or NULL if an error occured.

Definition at line 241 of file prio.c.

char* rtnl_prio2str ( int  prio,
char *  buf,
size_t  size 
)

Parameters:
prio Priority.
buf Destination buffer
size Size of destination buffer.
Converts a priority to a character string and stores the result in the specified destination buffer.

Returns:
Name of priority as character string.

Definition at line 281 of file prio.c.

int rtnl_str2prio ( const char *  name  ) 

Parameters:
name Name of priority.
Converts the provided character string specifying a priority to the corresponding numeric value.

Returns:
Numeric priority or a negative value if no match was found.

Definition at line 295 of file prio.c.


Generated on Thu May 28 01:01:28 2009 for libnl by  doxygen 1.5.7.1