PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /proc/self/root/opt/saltstack/salt/extras-3.10/pyroute2/netlink/rtnl/tcmsg/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : //proc/self/root/opt/saltstack/salt/extras-3.10/pyroute2/netlink/rtnl/tcmsg/sched_clsact.py

'''
clsact
++++++

The clsact qdisc provides a mechanism to attach integrated
filter-action classifiers to an interface, either at ingress or egress,
or both. The use case shown here is using a bpf program (implemented
elsewhere) to direct the packet processing. The example also uses the
direct-action feature to specify what to do with each packet (pass,
drop, redirect, etc.).

BPF ingress/egress example using clsact qdisc::

    # open_bpf_fd is outside the scope of pyroute2
    #fd = open_bpf_fd()
    eth0 = ip.get_links(ifname="eth0")[0]
    ip.tc("add", "clsact", eth0)
    # add ingress clsact
    ip.tc("add-filter", "bpf", idx, ":1", fd=fd, name="myprog",
          parent="ffff:fff2", classid=1, direct_action=True)
    # add egress clsact
    ip.tc("add-filter", "bpf", idx, ":1", fd=fd, name="myprog",
          parent="ffff:fff3", classid=1, direct_action=True)

'''

from pyroute2.netlink.rtnl import TC_H_CLSACT

parent = TC_H_CLSACT


def fix_msg(msg, kwarg):
    msg['handle'] = 0xFFFF0000