actions in tc(8)

NAME
actions - independently defined actions in tc

SYNOPSIS
tc [ TC_OPTIONS ] actions add | change | replace ACTSPEC tc [ TC_OPTIONS ] actions get | delete ACTISPEC tc [ TC_OPTIONS ] actions flush ACTNAMESPEC tc [ TC_OPTIONS ] actions ls | list ACTNAMESPEC
ACTSPEC := action ACTDETAIL [ INDEXSPEC ] [ COOKIESPEC ] [ CONTROL ] ACTISPEC := ACTNAMESPEC INDEXSPEC ACTNAMESPEC := action ACTNAME INDEXSPEC := index INDEX COOKIESPEC := cookie COOKIE ACTDETAIL := ACTNAME ACTPARAMS ACTNAME may be any valid action type: gact, mirred, bpf, connmark, csum, police, etc. ACTPARAMS are the action-specific parameters; see the man page for the specific action type to be used for details. CONTROL := { reclassify | pipe | drop | continue | ok } TC_OPTIONS These are the options that are specific to tc and not only the options. Refer to tc(8) for more information.

DESCRIPTION
The actions object in tc allows a user to define actions independently of a classifier (filter). These actions can then be assigned to one or more filters, with any packets matching the classifier's criteria having that action performed on them. Each action type (mirred, police, etc.) will have its own table to store all created actions.

OPERATIONS

add Create a new action in that action's table.

change
replace
    Make modifications to an existing action.

get Display the action with the specified index value. When combined with the -s option for tc, display the statistics for that action.

delete
    Delete the action with the specified index value. If the action is already associated with a classifier, it does not delete the classifier.

ls
list
    List all the actions in the specified table. When combined with the -s option for tc, display the statistics for all actions in the specified table.

flush
    Delete all actions stored in the specified table.

ACTION OPTIONS
Note that these options are available to all action types.

index INDEX
    Specify the table index value of an action. INDEX is a 32-bit value that is unique to the specific type of action referenced.
    For add, change, and replace operations, the index is optional. When adding a new action, specifying an index value will assign the action to that index unless that index value has already been assigned. Omitting the index value for an add operation will cause the kernel to assign a value to the new action.
    For get and delete operations, the index is required to identify the specific action to be displayed or deleted.

cookie COOKIE
    In addition to the specific action, mark the matching packet with the value specified by COOKIE. The COOKIE is a 128-bit value that will not be interpreted by the kernel whatsoever. As such, it can be used as a correlating value for maintaining user state. The value to be stored is completely arbitrary and does not require a specific format. It is stored inside the action structure itself.

CONTROL
    The CONTROL indicates how tc should proceed after executing the action. Any of the following are valid:

    reclassify
        Restart the classifiction by jumping back to the first filter attached to the action's parent.

    pipe
        Continue with the next action. This is the default control.

    drop
        Drop the packed without running any further actions.

    continue
        Continue the classification with the next filter.

    pass
        Return to the calling qdisc for packet processing, and end classification of this packet.

SEE ALSO
tc(8), tc-bpf(8), tc-connmark(8), tc-csum(8), tc-ife(8), tc-mirred(8), tc-nat(8), tc-pedit(8), tc-police(8), tc-simple(8), tc-skbedit(8), tc-skbmod(8), tc-tunnel_key(8), tc-vlan(8), tc-xt(8)