/
opt
/
imh-python
/
lib
/
python3.9
/
site-packages
/
pyroute2
/
netlink
/
rtnl
/
tcmsg
/
/opt/imh-python/lib/python3.9/site-packages/pyroute2/netlink/rtnl/tcmsg
mkdir
upload
Name
Size
Mode
Actions
__pycache__/
-
0755
rm
act_bpf.py
979
0644
edit
dl
rm
act_connmark.py
1234
0644
edit
dl
rm
act_gact.py
709
0644
edit
dl
rm
act_mirred.py
1725
0644
edit
dl
rm
act_police.py
1866
0644
edit
dl
rm
act_skbedit.py
3337
0644
edit
dl
rm
act_vlan.py
1465
0644
edit
dl
rm
cls_basic.py
8478
0644
edit
dl
rm
cls_flow.py
4613
0644
edit
dl
rm
cls_fw.py
1427
0644
edit
dl
rm
cls_matchall.py
986
0644
edit
dl
rm
cls_u32.py
8034
0644
edit
dl
rm
common.py
10728
0644
edit
dl
rm
common_act.py
2063
0644
edit
dl
rm
common_ematch.py
3148
0644
edit
dl
rm
em_cmp.py
2776
0644
edit
dl
rm
em_ipset.py
1741
0644
edit
dl
rm
em_meta.py
5933
0644
edit
dl
rm
sched_bpf.py
2571
0644
edit
dl
rm
sched_cake.py
12833
0644
edit
dl
rm
sched_choke.py
3432
0644
edit
dl
rm
sched_clsact.py
1011
0644
edit
dl
rm
sched_codel.py
1607
0644
edit
dl
rm
sched_drr.py
755
0644
edit
dl
rm
sched_fq_codel.py
2658
0644
edit
dl
rm
sched_hfsc.py
2353
0644
edit
dl
rm
sched_htb.py
5739
0644
edit
dl
rm
sched_ingress.py
214
0644
edit
dl
rm
sched_netem.py
5142
0644
edit
dl
rm
sched_pfifo.py
196
0644
edit
dl
rm
sched_pfifo_fast.py
215
0644
edit
dl
rm
sched_plug.py
446
0644
edit
dl
rm
sched_sfq.py
2717
0644
edit
dl
rm
sched_tbf.py
1087
0644
edit
dl
rm
sched_template.py
1250
0644
edit
dl
rm
__init__.py
2743
0644
edit
dl
rm
Edit:
/opt/imh-python/lib/python3.9/site-packages/pyroute2/netlink/rtnl/tcmsg/sched_clsact.py
(1011B)
''' 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
Save
cmd:
run