Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   u32    ( 8 )

универсальный 32-битный фильтр управления трафиком (universal 32bit traffic control filter)

  Name  |  Synopsis  |  Description  |  Values  |    Options    |  Selectors  |  Examples  |  See also  |

Параметры (Options)

U32 recognizes the following options:

handle HANDLE The handle is used to reference a filter and therefore must be unique. It consists of a hash table identifier htid and optional hash (which identifies the hash table's bucket) and nodeid. All these values are parsed as unsigned, hexadecimal numbers with length 12bits ( htid and nodeid) or 8bits ( hash). Alternatively one may specify a single, 32bit long hex number which contains the three fields bits in concatenated form. Other than the fields themselves, it has to be prefixed by 0x.

offset OFFSET Set an offset which defines where matches of subsequent filters are applied to. Therefore this option is useful only when combined with link or a combination of ht and sample. The offset may be given explicitly by using the plus keyword, or extracted from the packet data with at. It is possible to mangle the latter using mask and/or shift keywords. By default, this offset is recorded but not implicitly applied. It is used only to substitute the nexthdr+ statement. Using the keyword eat though inverses this behaviour: the offset is applied always, and nexthdr+ will fall back to zero.

hashkey HASHKEY Spefify what packet data to use to calculate a hash key for bucket lookup. The kernel adjusts the value according to the hash table's size. For this to work, the option link must be given.

classid CLASSID Classify matching packets into the given CLASSID, which consists of either 16bit major and minor numbers or a single 32bit value combining both.

divisor u32_value Specify a modulo value. Used when creating hash tables to define their size or for declaring a sample to calculate hash table keys from. Must be a power of two with exponent not exceeding eight.

order u32_value A value to order filters by, ascending. Conflicts with handle which serves the same purpose.

sample SELECTOR Used together with ht to specify which bucket to add this filter to. This allows one to avoid having to know how exactly the kernel calculates hashes. The additional divisor defaults to 256, so must be given for hash tables of different size.

link HANDLE Delegate matching packets to filters in a hash table. HANDLE is used to only specify the hash table, so only htid may be given, hash and nodeid have to be omitted. By default, bucket number 0 will be used and can be overridden by the hashkey option.

indev ifname Filter on the incoming interface of the packet. Obviously works only for forwarded traffic.

skip_sw Do not process filter by software. If hardware has no offload support for this filter, or TC offload is not enabled for the interface, operation will fail.

skip_hw Do not process filter by hardware.

help Print a brief help text about possible options.