Ë ZY*š-µBãó~—dZddlZddlZddlZddlZddlZddlZddlZ ddlZddl m Z ddl m Z ddlmZddlmZmZddlmZmZmZddlmZdd lmZmZdd lmZdd lmZdd l m!Z!dd l"m#Z#ddl$m%Z%m&Z&ddl'm(Z(ejRe*«Z+Gd„de,«Z-Gd„de,«Z.Gd„de,«Z/y#e $rddl ZYŒ—wxYw)ayT IPDB guide ========== .. warning:: The IPDB module has design issues that may not be fixed. It is recommended to switch to NDB wherever it's possible. Basically, IPDB is a transactional database, containing records, that represent network stack objects. Any change in the database is not reflected immediately in OS, but waits until `commit()` is called. One failed operation during `commit()` rolls back all the changes, has been made so far. Moreover, IPDB has commit hooks API, that allows you to roll back changes depending on your own function calls, e.g. when a host or a network becomes unreachable. Limitations ----------- One of the major issues with IPDB is its memory footprint. It proved not to be suitable for environments with thousands of routes or neighbours. Being a design issue, it could not be fixed, so a new module was started, NDB, that aims to replace IPDB. IPDB is still more feature rich, but NDB is already more fast and stable. IPDB, NDB, IPRoute ------------------ These modules use different approaches. * IPRoute just forwards requests to the kernel, and doesn't wait for the system state. So it's up to developer to check, whether the requested object is really set up or not. * IPDB is an asynchronously updated database, that starts several additional threads by default. If your project's policy doesn't allow implicit threads, keep it in mind. But unlike IPRoute, the IPDB ensures the changes to be reflected in the system. * NDB is like IPDB, and will obsolete it in the future. The difference is that IPDB creates Python object for every RTNL object, while NDB stores everything in an SQL DB, and creates objects on demand. Being asynchronously updated, IPDB does sync on commit:: with IPDB() as ipdb: with ipdb.interfaces['eth0'] as i: i.up() i.add_ip('192.168.0.2/24') i.add_ip('192.168.0.3/24') # ---> <--- here you can expect `eth0` is up # and has these two addresses, so # the following code can rely on that NB: *In the example above `commit()` is implied with the `__exit__()` of the `with` statement.* IPDB and other software ----------------------- IPDB is designed to be a non-exclusive network settings database. There may be several IPDB instances on the same OS, as well as other network management software, such as NetworkManager etc. The IPDB transactions should not interfere with other software settings, unless they touch the same objects. E.g., if IPDB brings an interface up, while NM shuts it down, there will be a race condition. An example:: # IPDB code # NetworkManager at the same time: ipdb.interfaces['eth0'].up() # ipdb.interfaces['eth0'].commit() # $ sudo nmcli con down eth0 # ---> <--- # The eth0 state here is undefined. Some of the commands # above will fail But as long as the software doesn't touch the same objects, there will be no conflicts. Another example:: # IPDB code # At the same time, NetworkManager with ipdb.interfaces['eth0'] as i: # adds addresses: i.add_ip('172.16.254.2/24') # * 10.0.0.2/24 i.add_ip('172.16.254.3/24') # * 10.0.0.3/24 # ---> <--- # At this point the eth0 interface will have all four addresses. # If the IPDB transaction fails by some reason, only IPDB addresses # will be rolled back. There may be a need to prevent other software from changing the network settings. There is no locking at the kernel level, but IPDB can revert all the changes as soon as they appear on the interface:: # IPDB code ipdb.interfaces['eth0'].freeze() # Here some other software tries to # add an address, or to remove the old # one # ---> <--- # At this point the eth0 interface will have all the same settings as # at the `freeze()` call moment. Newly added addresses will be removed, # all the deleted addresses will be restored. # # Please notice, that an address removal may cause also a routes removal, # and that is the thing that IPDB can not neither prevent, nor revert. ipdb.interfaces['eth0'].unfreeze() Quickstart ---------- Simple tutorial:: from pyroute2 import IPDB # several IPDB instances are supported within on process ipdb = IPDB() # commit is called automatically upon the exit from `with` # statement with ipdb.interfaces.eth0 as i: i.address = '00:11:22:33:44:55' i.ifname = 'bala' i.txqlen = 2000 # basic routing support ipdb.routes.add({'dst': 'default', 'gateway': '10.0.0.1'}).commit() # do not forget to shutdown IPDB ipdb.release() Please, notice `ip.release()` call in the end. Though it is not forced in an interactive python session for the better user experience, it is required in the scripts to sync the IPDB state before exit. IPDB supports functional-like syntax also:: from pyroute2 import IPDB with IPDB() as ipdb: intf = (ipdb.interfaces['eth0'] .add_ip('10.0.0.2/24') .add_ip('10.0.0.3/24') .set_address('00:11:22:33:44:55') .set_mtu(1460) .set_name('external') .commit()) # ---> <--- here you have the interface reference with # all the changes applied: renamed, added ipaddr, # changed macaddr and mtu. ... # some code # pls notice, that the interface reference will not work # outside of `with IPDB() ...` Transaction modes ----------------- IPDB has several operating modes: - 'implicit' (default) -- the first change starts an implicit transaction, that have to be committed - 'explicit' -- you have to begin() a transaction prior to make any change The default is to use implicit transaction. This behaviour can be changed in the future, so use 'mode' argument when creating IPDB instances. The sample session with explicit transactions:: In [1]: from pyroute2 import IPDB In [2]: ip = IPDB(mode='explicit') In [3]: ifdb = ip.interfaces In [4]: ifdb.tap0.begin() Out[3]: UUID('7a637a44-8935-4395-b5e7-0ce40d31d937') In [5]: ifdb.tap0.up() In [6]: ifdb.tap0.address = '00:11:22:33:44:55' In [7]: ifdb.tap0.add_ip('10.0.0.1', 24) In [8]: ifdb.tap0.add_ip('10.0.0.2', 24) In [9]: ifdb.tap0.review() Out[8]: {'+ipaddr': set([('10.0.0.2', 24), ('10.0.0.1', 24)]), '-ipaddr': set([]), 'address': '00:11:22:33:44:55', 'flags': 4099} In [10]: ifdb.tap0.commit() Note, that you can `review()` the `current_tx` transaction, and `commit()` or `drop()` it. Also, multiple transactions are supported, use uuid returned by `begin()` to identify them. Actually, the form like 'ip.tap0.address' is an eye-candy. The IPDB objects are dictionaries, so you can write the code above as that:: ipdb.interfaces['tap0'].down() ipdb.interfaces['tap0']['address'] = '00:11:22:33:44:55' ... Context managers ---------------- Transactional objects (interfaces, routes) can act as context managers in the same way as IPDB does itself:: with ipdb.interfaces.tap0 as i: i.address = '00:11:22:33:44:55' i.ifname = 'vpn' i.add_ip('10.0.0.1', 24) i.add_ip('10.0.0.1', 24) On exit, the context manager will automatically `commit()` the transaction. Read-only interface views ------------------------- Using an interface as a context manager **will** start a transaction. Sometimes it is not what one needs. To avoid unnecessary transactions, and to avoid the risk to occasionally change interface attributes, one can use read-only views:: with ipdb.interfaces[1].ro as iface: print(iface.ifname) print(iface.address) The `.ro` view neither starts transactions, nor allows to change anything, raising the `RuntimeError` exception. The same read-only views are available for routes and rules. Create interfaces ----------------- IPDB can also create virtual interfaces:: with ipdb.create(kind='bridge', ifname='control') as i: i.add_port(ip.interfaces.eth1) i.add_port(ip.interfaces.eth2) i.add_ip('10.0.0.1/24') The `IPDB.create()` call has the same syntax as `IPRoute.link('add', ...)`, except you shouldn't specify the `'add'` command. Refer to `IPRoute` docs for details. Please notice, that the interface object stays in the database even if there was an error during the interface creation. It is done so to make it possible to fix the interface object and try to run `commit()` again. Or you can drop the interface object with the `.remove().commit()` call. IP address management --------------------- IP addresses on interfaces may be managed using `add_ip()` and `del_ip()`:: with ipdb.interfaces['eth0'] as eth: eth.add_ip('10.0.0.1/24') eth.add_ip('10.0.0.2/24') eth.add_ip('2001:4c8:1023:108::39/64') eth.del_ip('172.16.12.5/24') The address format may be either a string with `'address/mask'` notation, or a pair of `'address', mask`:: with ipdb.interfaces['eth0'] as eth: eth.add_ip('10.0.0.1', 24) eth.del_ip('172.16.12.5', 24) The `ipaddr` attribute contains all the IP addresses of the interface, which are accessible in different ways. Getting an iterator from `ipaddr` gives you a sequence of tuples `('address', mask)`: .. doctest:: :skipif: True >>> for addr in ipdb.interfaces['eth0'].ipaddr: ... print(ipaddr) ... ('10.0.0.2', 24) ('10.0.0.1', 24) Getting one IP from `ipaddr` returns a dict object with full spec: .. doctest:: :skipif: True >>> ipdb.interfaces['eth0'].ipaddr[0] {'family': 2, 'broadcast': None, 'flags': 128, 'address': '10.0.0.2', 'prefixlen': 24, 'local': '10.0.0.2'} >>> ipdb.intefaces['eth0'].ipaddr['10.0.0.2/24'] {'family': 2, 'broadcast': None, 'flags': 128, 'address': '10.0.0.2', 'prefixlen': 24, 'local': '10.0.0.2'} The API is a bit weird, but it's because of historical reasons. In the future it may be changed. Another feature of the `ipaddr` attribute is views: .. doctest:: :skipif: True >>> ipdb.interfaces['eth0'].ipaddr.ipv4: (('10.0.0.2', 24), ('10.0.0.1', 24)) >>> ipdb.interfaces['eth0'].ipaddr.ipv6: (('2001:4c8:1023:108::39', 64),) The views, as well as the `ipaddr` attribute itself are not supposed to be changed by user, but only by the internal API. Bridge interfaces ----------------- Modern kernels provide possibility to manage bridge interface properties such as STP, forward delay, ageing time etc. Names of these properties start with `br_`, like `br_ageing_time`, `br_forward_delay` e.g.:: [x for x in dir(ipdb.interfaces.virbr0) if x.startswith('br_')] Bridge ports ------------ IPDB supports specific bridge port parameters, such as proxyarp, unicast/multicast flood, cost etc.:: with ipdb.interfaces['br-port0'] as p: p.brport_cost = 200 p.brport_unicast_flood = 0 p.brport_proxyarp = 0 Ports management ---------------- IPDB provides a uniform API to manage bridge, bond and vrf ports:: with ipdb.interfaces['br-int'] as br: br.add_port('veth0') br.add_port(ipdb.interfaces.veth1) br.add_port(700) br.del_port('veth2') Both `add_port()` and `del_port()` accept three types of arguments: * `'veth0'` -- interface name as a string * `ipdb.interfaces.veth1` -- IPDB interface object * `700` -- interface index, an integer Routes management ----------------- IPDB has a simple yet useful routing management interface. Create a route ~~~~~~~~~~~~~~ To add a route, there is an easy to use syntax:: # spec as a dictionary spec = {'dst': '172.16.1.0/24', 'oif': 4, 'gateway': '192.168.122.60', 'metrics': {'mtu': 1400, 'advmss': 500}} # pass spec as is ipdb.routes.add(spec).commit() # pass spec as kwargs ipdb.routes.add(**spec).commit() # use keyword arguments explicitly ipdb.routes.add(dst='172.16.1.0/24', oif=4, ...).commit() Please notice, that the device can be specified with `oif` (output interface) or `iif` (input interface), the `device` keyword is not supported anymore. More examples:: # specify table and priority (ipdb.routes .add(dst='172.16.1.0/24', gateway='192.168.0.1', table=100, priority=10) .commit()) The `priority` field is what the `iproute2` utility calls `metric` -- see also below. Get a route ~~~~~~~~~~~ To access and change the routes, one can use notations as follows:: # default table (254) # # change the route gateway and mtu # with ipdb.routes['172.16.1.0/24'] as route: route.gateway = '192.168.122.60' route.metrics.mtu = 1500 # access the default route print(ipdb.routes['default']) # change the default gateway with ipdb.routes['default'] as route: route.gateway = '10.0.0.1' By default, the path `ipdb.routes` reflects only the main routing table (254). But Linux supports much more routing tables, so does IPDB:: In [1]: ipdb.routes.tables.keys() Out[1]: [0, 254, 255] In [2]: len(ipdb.routes.tables[255]) Out[2]: 11 # => 11 automatic routes in the table local It is important to understand, that routing tables keys in IPDB are not only the destination prefix. The key consists of 'prefix/mask' string and the route priority (if any):: In [1]: ipdb.routes.tables[254].idx.keys() Out[1]: [RouteKey(dst='default', table=254, family=2, ...), RouteKey(dst='172.17.0.0/16', table=254, ...), RouteKey(dst='172.16.254.0/24', table=254, ...), RouteKey(dst='192.168.122.0/24', table=254, ...), RouteKey(dst='fe80::/64', table=254, family=10, ...)] But a routing table in IPDB allows several variants of the route spec. The simplest case is to retrieve a route by prefix, if there is only one match:: # get route by prefix ipdb.routes['172.16.1.0/24'] # get route by a special name ipdb.routes['default'] If there are more than one route that matches the spec, only the first one will be retrieved. One should iterate all the records and filter by a key to retrieve all matches:: # only one route will be retrieved ipdb.routes['fe80::/64'] # get all routes by this prefix [ x for x in ipdb.routes if x['dst'] == 'fe80::/64' ] It is also possible to use dicts as specs:: # get IPv4 default route ipdb.routes[{'dst': 'default', 'family': AF_INET}] # get IPv6 default route ipdb.routes[{'dst': 'default', 'family': AF_INET6}] # get route by priority ipdb.routes.table[100][{'dst': '10.0.0.0/24', 'priority': 10}] While this notation returns one route, there is a method to get all the routes matching the spec:: # get all the routes from all the tables via some interface ipdb.routes.filter({'oif': idx}) # get all IPv6 routes from some table ipdb.routes.table[tnum].filter({'family': AF_INET6}) Route metrics ~~~~~~~~~~~~~ A special object is dedicated to route metrics, one can access it via `route.metrics` or `route['metrics']`:: # these two statements are equal: with ipdb.routes['172.16.1.0/24'] as route: route['metrics']['mtu'] = 1400 with ipdb.routes['172.16.1.0/24'] as route: route.metrics.mtu = 1400 Possible metrics are defined in `rtmsg.py:rtmsg.metrics`, e.g. `RTAX_HOPLIMIT` means `hoplimit` metric etc. Multipath routing ~~~~~~~~~~~~~~~~~ Multipath nexthops are managed via `route.add_nh()` and `route.del_nh()` methods. They are available to review via `route.multipath`, but one should not directly add/remove/modify nexthops in `route.multipath`, as the changes will not be committed correctly. To create a multipath route:: ipdb.routes.add({'dst': '172.16.232.0/24', 'multipath': [{'gateway': '172.16.231.2', 'hops': 2}, {'gateway': '172.16.231.3', 'hops': 1}, {'gateway': '172.16.231.4'}]}).commit() To change a multipath route:: with ipdb.routes['172.16.232.0/24'] as r: r.add_nh({'gateway': '172.16.231.5'}) r.del_nh({'gateway': '172.16.231.4'}) Another possible way is to create a normal route and turn it into multipath by `add_nh()`:: # create a non-MP route with one gateway: (ipdb .routes .add({'dst': '172.16.232.0/24', 'gateway': '172.16.231.2'}) .commit()) # turn it to become a MP route: (ipdb .routes['172.16.232.0/24'] .add_nh({'gateway': '172.16.231.3'}) .commit()) # here the route will contain two NH records, with # gateways 172.16.231.2 and 172.16.231.3 # remove one NH and turn the route to be a normal one (ipdb .routes['172.16.232.0/24'] .del_nh({'gateway': '172.16.231.2'}) .commit()) # thereafter the traffic to 172.16.232.0/24 will go only # via 172.16.231.3 Differences from the iproute2 syntax ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ By historical reasons, `iproute2` uses names that differs from what the kernel uses. E.g., `iproute2` uses `weight` for multipath route hops instead of `hops`, where `weight == (hops + 1)`. Thus, a route created with `hops == 2` will be listed by `iproute2` as `weight 3`. Another significant difference is `metrics`. The `pyroute2` library uses the kernel naming scheme, where `metrics` means mtu, rtt, window etc. The `iproute2` utility uses `metric` (not `metrics`) as a name for the `priority` field. In examples:: # ------------------------------------------------------- # iproute2 command: $ ip route add default \ nexthop via 172.16.0.1 weight 2 \ nexthop via 172.16.0.2 weight 9 # pyroute2 code: (ipdb .routes .add({'dst': 'default', 'multipath': [{'gateway': '172.16.0.1', 'hops': 1}, {'gateway': '172.16.0.2', 'hops': 8}]) .commit()) # ------------------------------------------------------- # iproute2 command: $ ip route add default via 172.16.0.2 metric 200 # pyroute2 code: (ipdb .routes .add({'dst': 'default', 'gateway': '172.16.0.2', 'priority': 200}) .commit()) # ------------------------------------------------------- # iproute2 command: $ ip route add default via 172.16.0.2 mtu 1460 # pyroute2 code: (ipdb .routes .add({'dst': 'default', 'gateway': '172.16.0.2', 'metrics': {'mtu': 1460}}) .commit()) Multipath default routes ~~~~~~~~~~~~~~~~~~~~~~~~ .. warning:: As of the merge of kill_rtcache into the kernel, and it's release in ~3.6, weighted default routes no longer work in Linux. Please refer to https://github.com/svinota/pyroute2/issues/171#issuecomment-149297244 for details. Rules management ---------------- IPDB provides a basic IP rules management system. Create a rule ~~~~~~~~~~~~~ Syntax is almost the same as for routes:: # rule spec spec = {'src': '172.16.1.0/24', 'table': 200, 'priority': 15000} ipdb.rules.add(spec).commit() Get a rule ~~~~~~~~~~ The way IPDB handles IP rules is almost the same as routes, but rule keys are more complicated -- the Linux kernel doesn't use keys for rules, but instead iterates all the records until the first one w/o any attribute mismatch. The fields that the kernel uses to compare rules, IPDB uses as the key fields (see `pyroute2/ipdb/rule.py:RuleKey`) There are also more ways to find a record, as with routes:: # 1. iterate all the records for record in ipdb.rules: match(record) # 2. an integer as the key matches the first # rule with that priority ipdb.rules[32565] # 3. a dict as the key returns the first match # for all the specified attrs ipdb.rules[{'dst': '10.0.0.0/24', 'table': 200}] Priorities ~~~~~~~~~~ Thus, the rule priority is **not** a key, neither in the kernel, nor in IPDB. One should **not** rely on priorities as on keys, there may be several rules with the same priority, and it often happens, e.g. on Android systems. Persistence ~~~~~~~~~~~ There is no *change* operation for the rule records in the kernel, so only *add/del* work. When IPDB changes a record, it effectively deletes the old one and creates the new with new parameters, but the object, referring the record, stays the same. Also that means, that IPDB can not recognize the situation, when someone else does the same. So if there is another program changing records by *del/add* operations, even another IPDB instance, referring objects in the IPDB will be recreated. Performance issues ------------------ In the case of bursts of Netlink broadcast messages, all the activity of the pyroute2-based code in the async mode becomes suppressed to leave more CPU resources to the packet reader thread. So please be ready to cope with delays in the case of Netlink broadcast storms. It means also, that IPDB state will be synchronized with OS also after some delay. The class API ------------- éN)Úpartial)Úpprint)Úconfig)Ú basestringÚuuid32©Ú interfacesÚroutesÚrules)ÚShutdownException)Ú IPaddrSetÚSortedIPaddrSet)Ú BaseRoute)Ú SYNC_TIMEOUT)Útest_reachable_icmp)ÚIPRoute)Ú RTM_GETLINKÚRTMGRP_DEFAULTS)Úifinfmsgcó"—eZdZd„Zefd„Zd„Zy)ÚWatchdogcóȇ‡‡—tj«‰_d‰_|‰_ˆˆˆfd„}|‰_‰jj ‰j «‰_y)NFcóä•—|‰k7ry‰D]C}|j|d«‰|k7sŒ|j|j|««‰|k7sŒCyd‰_‰jj «y)NT)ÚgetÚget_attrÚname2nlaÚis_setÚeventÚset)ÚipdbÚmsgÚ_actionÚkeyÚactionÚkwargÚselfs €€€ú7/usr/lib/python3.12/site-packages/pyroute2/ipdb/main.pyÚcbzWatchdog.__init__..cbåsgø€Ø˜&Ò Øã�Ø—G‘G˜C Ó&¨%°©*Ó4Ø—L‘L §¡¨cÓ!2Ó3°u¸S±zÓAáð ð ˆDŒKØ �J‰J�N‰NÕ ó)Ú threadingÚEventrrr r(Úregister_callbackÚuuid)r&r r$r%r(s` `` r'Ú__init__zWatchdog.__init__àsGú€Ü—_‘_Ó&ˆŒ ؈Œ ؈Œ ö ðˆŒà—I‘I×/Ñ/°·±Ó8ˆ� r)có^—|jj|¬«}|j«|S)N)Útimeout)rÚwaitÚcancel)r&r0Úrets r'r1z Watchdog.waitös$€Ø�j‰j�o‰o gˆoÓ.ˆØ � ‰ Œ ؈ r)cóN—|jj|j«y©N)r Úunregister_callbackr-©r&s r'r2zWatchdog.cancelûs€Ø � ‰ ×%Ñ% d§i¡iÕ0r)N)Ú__name__Ú __module__Ú __qualname__r.rr1r2©r)r'rrßs„ò9ð,(óó 1r)rcó4—eZdZdZd„Zd„Zd„Zd„Zd„Zd„Z y) Ú _evq_contextzJ Context manager class for the event queue used by the event loop có<—||_||_||_||_yr5)Ú_ipdbÚ_qsizeÚ_blockÚ_timeout)r&r ÚqsizeÚblockr0s r'r.z_evq_context.__init__s€ØˆŒ ؈Œ ؈Œ ؈� r)cóΗ|jjj«tj|j ¬«|j_d|j_|S)N©Úmaxsizer)r?Ú _evq_lockÚacquireÚqueueÚQueuer@Ú_evqÚ _evq_dropr7s r'Ú __enter__z_evq_context.__enter__ sA€à � ‰ ×Ñ×$Ñ$Ô&ÜŸ+™+¨d¯k©kÔ:ˆ� ‰ ŒØ ˆ� ‰ ÔØˆ r)có�—d|j_d|j_|jjj «y)Nr)r?rLrMrHÚrelease©r&Úexc_typeÚ exc_valueÚ tracebacks r'Ú__exit__z_evq_context.__exit__s/€àˆ� ‰ ŒØ ˆ� ‰ ÔØ � ‰ ×Ñ×$Ñ$Õ&r)cóH—|jjs td«‚|S)Nz,eventqueue must be used as a context manager)r?rLÚ RuntimeErrorr7s r'Ú__iter__z_evq_context.__iter__s$€à�z‰z�ŠÜØAóð ðˆ r)có"—|j«Sr5)Ú__next__r7s r'Únextz_evq_context.nexts€à�}‰}‹Ðr)cóæ—|jjj|j|j«}|jjj «t |t«r|‚|Sr5)r?rLrrArBÚ task_doneÚ isinstanceÚ Exception)r&r!s r'rZz_evq_context.__next__#sL€à�j‰j�o‰o×!Ñ! $§+¡+¨t¯}©}Ó=ˆØ � ‰ �‰×!Ñ!Ô#Ü �cœ9Ô %؈I؈ r)N) r8r9r:Ú__doc__r.rNrUrXr[rZr;r)r'r=r=ÿs%„ñò ò ò'ò òór)r=c 󨇗eZdZdZddddddedddddf d„Zd„Zd „Zd „Zd „Z d „Z ˆfd „Z dd„Z dd„Z d d„Zd d„Zd„Zd„Zd!d„Zd"d„Zd„Zd„Zd#d„Zd„Zd„Zd$d„Zd%d„Zd„Zd„ZˆxZS)&ÚIPDBz¥ The class that maintains information about network setup of the host. Monitoring netlink events allows it to react immediately. It uses no polling. NÚimplicitiFTc ó—d} tjd| z«| r/tjd«tjdt«| xsgd¢} t t tdœ}||_d|_ tj|_ | rtnt|_i|_i|_g|_t'«|_d|_|du|_|€t.j0nd|_d|_||_||_||_||_| D�cgc] }||vsŒ||‘Œc}|_tA|tB«r |g|_"n*tA|tFtHt&f«r||_"ng|_"d|_%i|_&i|_'tQjRd¬ «|_*d |_+d|_,t[j\«|_/d |_0t[jb«|_2t[j\«|_3| xsgD]/}tA|tHtFt&f«s|f}|jh|ŽŒ1|�|n|du|_5|jm«|jnjpjs«D�cgc] }|d d k7sŒ |‘Œc}|_:|jtjwtG|j"js«««d „}tyjz|t}j~|««ycc}wcc}w) Nz'https://docs.pyroute2.org/ipdb_toc.htmlzDeprecation warning zWTo remove this DeprecationWarning exception, start IPDB(deprecation_warning=False, ...)z6IPDB module is deprecated and will be removed in 0.7.1rFTé rFrÚ_cóR—|«}|�|js|j«yyyr5)Ú_stoprP)ÚrefÚipdb_objs r'ÚcleanupzIPDB.__init__..cleanup˜s)€Ù“uˆHØÐ$¨x¯~ª~Ø× Ñ Õ"ð0>Ð$r))@ÚlogÚwarningÚwarningsÚwarnÚDeprecationWarningr r r ÚmodeÚtxdropÚsysÚstdoutÚ_stdoutrr Ú _ipaddr_setÚ _event_mapÚ _deferredÚ_ensurerÚ_loadedÚ_mthreadÚ_nl_ownrÚ ipdb_nl_asyncÚ _nl_asyncÚmnlÚnlÚ_sndbufÚ_rcvbufÚnl_bind_groupsÚ_pluginsr^ÚintÚ_ignore_rtablesÚlistÚtuplerhÚ_post_callbacksÚ_pre_callbacksrJrKÚ_cbqÚ _cbq_droprLr*ÚLockrHrMÚRLockÚ exclusiveÚ_shutdown_lockr,Úrestart_on_errorÚinitdbÚ __class__Ú__dict__ÚkeysÚ __dir_cache__ÚextendÚatexitÚregisterÚweakrefri)r&r€rqr‘Únl_asyncÚsndbufÚrcvbufrƒÚignore_rtablesÚ callbacksÚsort_addressesÚpluginsÚdeprecation_warningr!ÚpmapÚxÚcbaÚirks r'r.z IPDB.__init__3s—€ð8ˆÜ � ‰ Ð*¨SÑ0Ô1Ù Ü �K‰Kð=ô ô �M‰MØHÜ"ô ðÒ>Ò>ˆÜ(´FÄUÑKˆØˆŒ ؈Œ Ü—z‘zˆŒ Ù.<�?Ä)ˆÔ؈ŒØˆŒØˆŒ Ü“uˆŒ ؈Œ ؘT�zˆŒ Ø19Ð1Aœ×-Ò-ÀtˆŒØˆŒØˆŒØˆŒ ؈Œ Ø,ˆÔÙ*1Ó?©' Q°Q¸$²Y˜˜a›¨'Ñ?ˆŒ Ü �n¤cÔ *Ø$2Ð#3ˆDÕ Ü ˜¬¬u´cÐ(:Ô ;Ø#1ˆDÕ à#%ˆDÔ ØˆŒ à!ˆÔØ ˆÔô—K‘K¨Ô-ˆŒ ؈ŒàˆŒ Ü"Ÿ™Ó)ˆŒØˆŒô#Ÿ™Ó*ˆŒÜ'Ÿn™nÓ.ˆÔð’? ’?ˆCܘc¤E¬4´Ð#5Ô6Ø�f�Ø "ˆD× "Ñ " CÒ (ð#ð!1Ð <Ñ À"ÈÀ*ð Ôð � ‰ Œ ð—~‘~×.Ñ.×3Ñ3Ô5ó Ù5�!¸¸1¹À»ŠAÐ5ñ ˆÔð ×Ñ×!Ñ!¤$ t§~¡~×':Ñ':Ó'<Ó"=Ô>ò #ô �‰˜¤§¡¨TÓ!2Õ3ùò}@ùòh sÄ K:ÄK:É7 K?ÊK?có—|jSr5)r–r7s r'Ú__dir__z IPDB.__dir__Ÿs€Ø×!Ñ!Ð!r)có—|Sr5r;r7s r'rNzIPDB.__enter__¢s€Øˆ r)có$—|j«yr5)rPrQs r'rUz IPDB.__exit__¥s €Ø � ‰ �r)có–—d„}g}d|jvrƒ|jj«D]0\}} |jj ||d|j «Œ2|j|j«|j|j«d|jvrX|j|jjj«D�cgc]}|jj|‘Œc}«d|jvr|j|j«|D] }||«Œ y#t $rY�ŒwxYwcc}w)Ncóf—t|j««D]} ||=Œy#t$rYŒwxYwr5)rˆr•ÚKeyError)Úidxr#s r'ÚflushzIPDB._flush_db..flush©s7€Ü˜SŸX™X›ZÖ(�ðؘC™ñ)øô òÙðús ž$¤ 0¯0r Úindexr r )rzÚby_nameÚitemsr Ú_detachÚnlmsgr­ÚappendÚipaddrÚ neighboursr—r Útablesr•r )r&r¯Úidx_listr#Údevr¤r®s r'Ú _flush_dbzIPDB._flush_db¨s€ò ðˆØ ˜4Ÿ<™<Ñ 'Ø ŸL™L×.Ñ.Ö0‘��Sðà—O‘O×+Ñ+¨C°°W±¸s¿y¹yÕIð1ð �O‰O˜DŸK™KÔ (Ø �O‰O˜DŸO™OÔ ,Ø �t—|‘|Ñ #Ø �O‰OØ04· ± ×0BÑ0B×0GÑ0GÔ0IÓJÑ0I¨1�—‘×#Ñ# AÓ&Ð0IÑJô ð �d—l‘lÑ "Ø �O‰O˜DŸJ™JÔ 'ÛˆCÙ �#�Jñøô òÚðüò Ksµ*D6à EÄ6 EÅEc óŠ—|j5t|j«D]}|j|=Œ|j«|jrM|j �|j j «t|j|jd¬«|_|j�*|j«|jj «|j j«|_ |jj|j|j¬«t|j «D]}|j |=Œ|j"D]•}|j$|jz|j$k7rŒ*|j&D]]}|j&|j |d<|d|j(vsŒ1t+||d«|j(j-|d«Œ_Œ—dD]t}t/||dd«}t/|dd„««rŒ't1j2|dt/||d «¬ «}t5||d|«d |_|j9«Œv ddd«y#|jj «|j€|j j «‚xYw#1swYyxYw) Nr)rœr�Ú async_qsize)ÚgroupsÚ async_cacheÚname))r{Ú _serve_mainzIPDB main event loop)Ú_cthreadÚ _serve_cbzIPDB cb event loopÚis_alivecó—y)NFr;r;r)r'ÚzIPDB.initdb..õs€°ur)éé)rÀÚtargetT)r�rˆrwr»r|r€Úcloserr�r‚rÚ _flush_mnlÚcloneÚbindrƒr~rxr„r¾ÚspecrzÚdelattrÚremoveÚgetattrr*ÚThreadÚsetattrÚdaemonÚstart)r&rr#ÚmoduleÚpluginÚtspecÚtgÚtxs r'r’z IPDB.initdbÃs*€à �^‹^ä˜tŸ™Ö/�Ø—O‘O EÑ*ð0ð �N‰NÔ ð�|Š|Ø—7‘7Ð&Ø—G‘G—M‘M”OÜ!ØŸ<™<°· ± È!ô�”ð�x‰xÐ#Ø—‘Ô!Ø—‘—‘Ô Ø—w‘w—}‘}“ˆDŒHð Ø—‘— ‘ Ø×.Ñ.¸D¿N¹Nðôô˜TŸ^™^Ö,�Ø—N‘N 3Ñ'ð-ðŸ-œ-�Ø—M‘M D×$7Ñ$7Ñ7¸F¿M¹MÒIØØ$Ÿkœk�FØ5;·[±[�D—N‘N 6¨&¡>Ñ2ؘf‘~¨¯©Ò5Ü  f¨V¡nÔ5ØŸ ™ ×+Ñ+¨F°6©NÕ;ñ *ð(ó�ô˜T 5¨¡8¨TÓ2�Ø=”w˜r :©}Ó=Õ?Ü"×)Ñ)Ø" 1™X¬g°d¸EÀ!¹HÓ.Eô�Bô˜D %¨¡(¨BÔ/Ø $�B”IØ—H‘H•Jñ÷Wˆ^øð. Ø—‘—‘Ô Ø—<‘<Ð'Ø—G‘G—M‘M”OØú÷7ˆ^ús4�C&J9Ã41I3Ä%BJ9Æ?AJ9ÈAJ9É3AJ6Ê6J9Ê9Kcó.•—tt|� d«}||vrëg}||}|D]V}|d|fi|d¤Ž}t||d|«|j |«|j j |d«||d=ŒX|D]„}t|d«r|j«t|d«sŒ,|jD]J}||jvrg|j|<|j|j |j|«ŒLŒ†tt|� |«S)NrxÚclassr%rÀÚ _registerrw) ÚsuperrbÚ__getattribute__rÓrµrzÚaddÚhasattrrÝrw) r&rÀÚdeferredr™rÎr×Úobjrr“s €r'rßzIPDB.__getattribute__ýsø€Üœ˜tÑ5°kÓBˆØ �8Ñ ØˆHؘD‘>ˆDÛ�Ø%�f˜W‘o dÑ>¨f°W©oÑ>�ܘ˜f V™n¨cÔ2Ø—‘ Ô$Ø— ‘ × Ñ  ¨¡Ô0ؘV F™^Ñ,ð ó  �ܘ3  Ô,Ø—M‘M”Oܘ3  Õ-Ø!$§¤˜Ø ¨¯©Ñ7Ø57˜DŸO™O¨EÑ2ØŸ™¨Ñ.×5Ñ5°c·n±nÀUÑ6KÕLñ"0ð  ô”T˜4Ñ1°$Ó7Ð7r)có2‡‡—tj«Šˆˆfd„}‰|_‰|_t «|_|dk(r%||j |j <|j S|dk(r%||j|j <|j Std«‚)a@ IPDB callbacks are routines executed on a RT netlink message arrival. There are two types of callbacks: "post" and "pre" callbacks. ... "Post" callbacks are executed after the message is processed by IPDB and all corresponding objects are created or deleted. Using ipdb reference in "post" callbacks you will access the most up-to-date state of the IP database. "Post" callbacks are executed asynchronously in separate threads. These threads can work as long as you want them to. Callback threads are joined occasionally, so for a short time there can exist stopped threads. ... "Pre" callbacks are synchronous routines, executed before the message gets processed by IPDB. It gives you the way to patch arriving messages, but also places a restriction: until the callback exits, the main event IPDB loop is blocked. Normally, only "post" callbacks are required. But in some specific cases "pre" also can be useful. ... The routine, `register_callback()`, takes two arguments: - callback function - mode (optional, default="post") The callback should be a routine, that accepts three arguments:: cb(ipdb, msg, action) Arguments are: - **ipdb** is a reference to IPDB instance, that invokes the callback. - **msg** is a message arrived - **action** is just a msg['event'] field E.g., to work on a new interface, you should catch action == 'RTM_NEWLINK' and with the interface index (arrived in msg['index']) get it from IPDB:: index = msg['index'] interface = ipdb.interfaces[index] cóD•—‰5‰|i|¤Žddd«y#1swYyxYwr5r;)Úargvr%ÚcallbackÚlocks €€r'Úsafez$IPDB.register_callback..safeLsø€ÚÙ˜$Ð( %Ò(÷—‘ús„ –ÚpostÚpreúUnknown callback mode) r*r�Úhookrèrr-r‰rŠr­)r&rçrqrérès ` @r'r,zIPDB.register_callbacksŽù€ôp�~‰~Óˆõ )ðˆŒ ØˆŒ Ü“HˆŒ à �6Š>Ø.2ˆD× Ñ  §¡Ñ +ð �y‰yÐð �UŠ]Ø-1ˆD× Ñ  § ¡ Ñ *ð�y‰yÐôÐ2Ó3Ð 3r)cóÔ—|dk(r |j}n|dk(r |j}n td«‚||}|j5|j |«}ddd«|S#1swYSxYw)Nrêrërì)r‰rŠr­rèÚpop)r&ÚcuidrqÚcbchainrér3s r'r6zIPDB.unregister_callback\se€Ø �6Š>Ø×*Ñ*‰GØ �UŠ]Ø×)Ñ)‰GäÐ2Ó3Ð 3Ø�t‰}ˆØ �Y‹YØ—+‘+˜dÓ#ˆC÷àˆ ÷àˆ ús ÁAÁA'có—t||||«S)a# Initializes event queue and returns event queue context manager. Once the context manager is initialized, events start to be collected, so it is possible to read initial state from the system without losing last moment changes, and once that is done, start processing events. Example:: ipdb = IPDB() with ipdb.eventqueue() as evq: my_state = ipdb.... for msg in evq: update_state_by_msg(my_state, msg) )r=)r&rCrDr0s r'Ú eventqueuezIPDB.eventqueuehs€ô˜D %¨°Ó8Ð8r)c#óvK—|j|||¬«5}|D]}|–—Œ ddd«y#1swYyxYw­w)z¡ Event generator for simple cases when there is no need for initial state setup. Initialize event queue and yield events as they happen. )rCrDr0N)ró)r&rCrDr0Úevqr!s r'Ú eventloopzIPDB.eventloopys7èø€ð �_‰_ 5°¸wˆ_Ô GÈ3Û�Ø“ ñ÷H× GÑ Güs‚9— -¤ 9­6²9có2—|j5|jrtjd« ddd«yd|_|jj t d««|j�*|j«|jj«|j�!|jj«d|_ |jr!|jj«d|_ |j«ddd«y#1swYyxYw)aÙ Shutdown IPDB instance and sync the state. Since IPDB is asyncronous, some operations continue in the background, e.g. callbacks. So, prior to exit the script, it is required to properly shutdown IPDB. The shutdown sequence is not forced in an interactive python session, since it is easier for users and there is enough time to sync the state. But for the scripts the `release()` call is required. zshutdown in progressNTÚshutdown)r�rhrlrmr‹Úputr r{rËÚjoinrrÊr|r€r»r7s r'rPz IPDB.release‚s¿€ð× Ó Ø�zŠzÜ— ‘ Ð2Ô3Ø÷!Ð ðˆDŒJØ �I‰I�M‰MÔ+¨JÓ7Ô 8à�}‰}Ð(Ø—‘Ô!Ø— ‘ ×"Ñ"Ô$à�x‰xÐ#Ø—‘—‘Ô Ø�”à�|Š|Ø—‘— ‘ ”Ø�”à �N‰NÔ ÷'!× Ñ ús�#D ¹C D Ä Dcó—|j�Qtd«D]B} t«}d|d<|j«|jj |t «ŒDyy#t $r }tjd|«Yd}~Œkd}~wwxYw)NérÈr°zshutdown error: %s) rÚrangerÚresetrùrr_rlÚerror)r&Útr!Úes r'rËzIPDB._flush_mnl£ss€Ø �8‰8Ð ä˜1–X�ð7Ü"›*�CØ#$�C˜‘LØ—I‘I”KØ—H‘H—L‘L ¤kÕ2ñ ð øô!ò7Ü—I‘IÐ2°A×6Ñ6ûð7úsœ?AÁ BÁ(BÂBc ó@—|jj|||fi|¤ŽSr5)r rà)r&ÚkindÚifnameÚreuser%s r'Úcreatez IPDB.create±s"€Ø"ˆt�‰×"Ñ" 4¨°Ñ@¸%Ñ@Ð@r)có:—|dk(rg|_y|dk(r|jD] }|«Œ y|dk(rªt|t«rY|jd«}t |«dk(rt t |d«}n t«‚|jj|«ytjj«r"t|j|j¬«yy|dk(r"t|j|j¬«y|d k(r |jSt«‚) NrþÚrunràÚ:rÈr)ÚstreamÚprintr)ryr^rÚsplitÚlenrrÚNotImplementedErrorrµrsÚstdinÚisattyrru)r&ÚcmdÚ reachableÚ conditionÚfs r'Úensurez IPDB.ensure´sÛ€Ø �'Š>؈D�LØ �EŠ\Ø—\”\�Ù•ñ"à �EŠ\ܘ)¤ZÔ0Ø%ŸO™O¨CÓ0� Ü�y“> QÒ&ÜÔ 3°Y¸q±\ÓB‘Aä-Ó/Ð/Ø— ‘ ×#Ñ# AÕ&ä—9‘9×#Ñ#Ô%ܘ4Ÿ<™<°· ± Ö=ð&à �GŠ^Ü �4—<‘<¨¯ © Ö 5Ø �EŠ\Ø—<‘<Ð ä%Ó'Ð 'r)c#óK—t|di«D]}d|f|j|f–—Œtt|dd«di«D]:}|jj|j «D]\}}d||f|f–—ŒŒ<y­w)Nr±r r r¸)rÑr r r¸r²)r&rÚtabler#Úroutes r'r²z IPDB.itemsÌsŒèø€ô˜d I¨rÖ2ˆFØ  &Ð)¨4¯?©?¸6Ñ+BÐCÓ Cð3ôœW T¨8°TÓ:¸HÀbÖIˆEØ"Ÿk™k×0Ñ0°Ñ7×=Ñ=Ö?‘ ��UØ  %¨Ð-¨uÐ5Ó5ñ@ñJùs‚A>Bcó~—i}|j«D]'\}}|}|ddD]}||vri||<||}Œ|||d<Œ)|S)Néÿÿÿÿ)r²)r&r3r#rãÚptrÚsteps r'Údumpz IPDB.dumpØs_€ØˆØŸ ™ ž ‰HˆC�؈CؘC˜R›�ؘs‘?Ø "�C˜‘Iؘ$‘i‘ð!ðˆC��B‘ŠLð %ðˆ r)cóî—|€|}|D]k}t||d«}|�8t|d«r|j||«Œ3|j|||¬«ŒJt|d«sŒW|jdi||¤ŽŒm|S)NÚload)rràr;)rÑrárrà)r&rrr#rãs r'rz IPDB.loadãs}€Ø ˆ;؈CãˆCܘ#˜s DÓ)ˆC؈ܘ3 Ô'Ø—H‘H˜V C™[Õ)à—I‘I˜f S™k¨s�IÕ3ܘ˜eÕ$Ø�—‘Ñ&˜& ™+Ó&ððˆ r)cóØ—i}|j«D]8\}}|} |j«}|ddD]}||vri||<||}Œ|||d<Œ:|s td«‚|S#t$rYŒUwxYw)Nrúno transaction started)r²ÚreviewÚ TypeError)r&r3r#rãrÚrevrs r'r"z IPDB.reviewós”€ØˆØŸ ™ ž ‰HˆC�؈Cð Ø—j‘j“l�ð˜C˜R›�ؘs‘?Ø "�C˜‘Iؘ$‘i‘ð!ðˆC��B‘ŠLð%ñÜÐ4Ó5Ð 5؈ øôò Ùð úsœAÁ A)Á(A)có–—d}|j«D]\}} |j«d}Œ|s td«‚y#t$rYŒ4wxYw)NFTr!)r²Údropr#)r&Úokr#rãs r'r&z IPDB.dropsZ€Ø ˆØŸ ™ ž ‰HˆC�ð Ø—‘” ð‰Bð %ñ ÜÐ4Ó5Ð 5ðøôò Ùð úsš<¼ AÁAcó²—|€×t|di«j«D�cgc]*}|jj«r||jf‘Œ,}}tt|dd«di«j «D]^}|j |j j|D�cgc]*}|jj«r||jf‘Œ,c}«Œ`|}g}g}g}g} g} g} g} |D]—\} }|dr|j| |f«Œt| t«r| j| |f«ŒC| jdd«}|dvr| j| |f«Œm|dvr| j| |f«Œ…| j| |f«Œ™t|d„d ¬ «}|| z| z| z| z} |D]l\} }| d d k(rŒ|d d k(rd|d <|j| |f«|dk(r%| | jd ¬«f}|j|«| j|||¬«Œn |dk(r |D]\} }d | d <| j«Œ |dk(r%|D] \} }| j'|j(«Œ"|Scc}wcc}w#t $r.|dk(r'||_t%d„|«}|j|d¬«‚wxYw#|dk(r&|D] \} }| j'|j(«Œ"wwxYw)Nr±r r¸Ú ipdb_priorityr)ÚvlanÚvxlanÚgreÚtuntapÚvtiÚvti6ÚvrfÚxfrm)ÚbridgeÚbondcó—|ddS)NrÈr)r;©r¤s r'rÆzIPDB.commit..Qs €¨¨!©¨_Ò(=r)T)r#ÚreverseÚ ipdb_scopeÚdetachedrÐÚshadowrÈ)r8)Ú transactionÚ commit_phaseÚ commit_maskcó>—d|ddcxk(xr |ddk( Sc S)Nrrr7rÈr;r5s r'rÆzIPDB.commit..vs.€Ø  A a¡D¨Ñ$6ÖL¸!¸A¹$¸|Ñ:LÑLñÙLñr)rÇ)Ú transactionsÚphase)rÑÚvaluesÚlocal_txÚ current_txr•r—r r¸rµr^rrÚsortedÚpickÚcommitÚdetachr_ÚfallenÚfilterr&Úuid)r&r>r?r¤ÚtxlistrÚ snapshotsÚremovedÚ tx_ipdb_prioÚtx_mainÚtx_prio1Útx_prio2Útx_prio3rÉrÚrÚsÚtxss r'rEz IPDB.commits>€ð Ð ô!  y°"Ó5×<Ñ<Ô>óá>�AØ—:‘:×$Ñ$Ô&ð�A—L‘LÒ!Ø>ð ðô !ܘ˜h¨Ó-¨x¸óç‰d‹fò�ð— ‘ ð"&§¡×!3Ñ!3°EÒ!:óá!:˜AØŸ:™:×,Ñ,Ô.ð˜AŸL™LÒ)Ø!:ñõðð"ˆLàˆ Øˆàˆ ØˆØˆØˆØˆÛ&‰JˆF�Bð�/Ò"Ø×#Ñ# V¨R LÔ1Øô˜&¤)Ô,Ø—‘ ¨  Ô-Øð—:‘:˜f dÓ+ˆDØð ñ ð—‘ ¨  Õ-ØÐ+Ñ+Ø—‘ ¨  Õ-à—‘ ¨˜|Õ,ð9'ô@Ø Ñ=Àtô ˆ ð$ gÑ-°Ñ8¸8ÑCÀhÑNˆ ð% (Û*‘ �˜Ø˜,Ñ'¨:Ò5ØØ�lÑ# xÒ/Ø'/�B�|Ñ$Ø—N‘N F¨B <Ô0ؘA’:Ø §¡°d Ó!;Ð<�AØ×$Ñ$ QÔ'à— ‘ Ø "°ÀEðõñ+ð:˜ŠzÛ")‘J�F˜BØ+5�F˜<Ñ(Ø—M‘M•Oñ#*ð˜ŠzÛ".‘J�F˜BØ—K‘K §¡Õ'ð#/ðˆ ùòcùòøô`ò ؘŠzð+�” Üñðó �ð — ‘ ¨°A� Ô6Ø ð ûð&˜ŠzÛ".‘J�F˜BØ—K‘K §¡Õ'ñ#/ðús* /I% /I* Æ"A1I/È%J)É/7J&Ê&J)Ê)-Kc ó—t|||«Sr5)r)r&Úwdopsr%s r'Úwatchdogz IPDB.watchdog‰s€Ü˜˜e UÓ+Ð+r)có`—|js›|jj«}|jj«t |t «ryt |t «r|‚t|jj««D]} ||||d«Œ|jsŒšyy#YŒ&xYw)Nr) rhr‹rr]r^r r_rˆr‰r@)r&r!r(s r'rÃzIPDB._serve_cbŒs�€ð —*’*Ø—)‘)—-‘-“/ˆCØ �I‰I× Ñ Ô !ܘ#Ô0Ô1ØÜ˜C¤Ô+Ø� ܘD×0Ñ0×7Ñ7Ó9Ö:�ðÙ�t˜S # g¡,Õ/ð;ð—*•*øðÙús  B)Â)B-cóž—|j�su |jj«}|jry |D�]7}t|jj!««D]\}} ||||d«Œ|j5|jdd«}||j"vr|j"|D] }||«Œ  |j$j'|«|j(r'tj+d|j(«d|_|j rO |j j'|«|j0r'tj+d|j0«d|_ddd«�Œ:|js�Œtyy#t$rü}|j5|j r)|j j |« ddd«Yd}~y ddd«n #1swYnxYw|jrstjdtj«« |j«n3#tjdtj««YYd}~yxYwYd}~�Œctjd«td«‚d}~wwxYw#Y�Œ1xYw#t,j.$r|xj(dz c_Y�Œ±t$r!tjd«td«‚wxYw#t,j.$r|xj0dz c_Y�Œ­t$r!tjd«td«‚wxYw#1swY�ŒxYw) Nz(Restarting IPDB instance after error: %szError restarting DB: %sz$Emergency shutdown, cleanup manuallyzEmergency shutdownrzdropped %d eventsrrÈ)rhrrr_r�rLrùr‘rlrÿrTÚ format_excr’rWrˆrŠr²rwr‹Ú put_nowaitrŒrmrJÚFullrM)r&Úmessagesrr!rðr(rÚfuncs r'rÁzIPDB._serve_mainžs£€ð—*“*ð =ØŸ8™8Ÿ<™<›>�ð—:’:Øðô0 �ô!& d×&9Ñ&9×&?Ñ&?Ó&AÖ B‘H�D˜"ðÙ˜4  c¨'¡lÕ3ð!Cð —^“^ØŸG™G G¨TÓ2�EØ §¡Ñ/Ø$(§O¡O°EÔ$:˜DÙ  �Ið%;ð AØŸ ™ ×,Ñ,¨SÔ1ØŸ>š>ÜŸK™KÐ(;¸T¿^¹^ÔLØ-.˜DœNð—y’yð EØ ŸI™I×0Ñ0°Ô5Ø#Ÿ~š~Ü #§ ¡ Ø$7¸¿¹ô!"ð23 ¤÷A$‘^ð ðE—*–*øôò =Ø—^“^Ø—y’yØŸ ™ Ÿ ™  aÔ(Ø÷$”^Ø ÷$—^‘^úð×(Ò(Ü—I‘IØFÜ!×,Ñ,Ó.ôðØŸ ™ � øðÜŸ ™ Ø6¼ ×8LÑ8LÓ8NôõúÝä—I‘IÐDÔEÜ&Ð';Ó<Ð<ûð) =ûð8Úûô!Ÿ:™:ò,ØŸš¨!Ñ+Ÿ˜Ü$òAÜŸ ™ Ð"HÔIÜ*Ð+?Ó@Ð@ðAûô& %Ÿz™zò0Ø ŸNšN¨aÑ/ŸN˜NÜ(òEÜŸI™IÐ&LÔMÜ".Ð/CÓ"DÐDðEú÷G$‘^úsµ�&FÁ' J Â=MÃAJÄ MÄAK+Æ J Æ JÆ)GÇJÇ JÇG" Ç;JÈH+È*JÈ+*IÉJÉJÉ$ JÊJ Ê JÊ(K(Ê<MÊ?)K(Ë(MË+(L?ÌMÌ)L?Ì?MÍM )rê)reTN)F)ràNNr5)NrÈ)Ú RTM_NEWLINK)r8r9r:r`rr.r¨rNrUr»r’rßr,r6rórörPrËrrr²rrr"r&rErVrÃrÁÚ __classcell__)r“s@r'rbrb,s±ø„ñð Ø ØØØØØ&ØØØØØ ój4òX"òòòò68ôt8ó*HóT ó9ó"òòB 7óAó(ò0 6ò óò ò& 6óvóp,òö$WEr)rb)0r`r˜Úloggingrsr*rTrnršrJÚ ImportErrorrKÚ functoolsrrÚpyroute2rÚpyroute2.commonrrÚ pyroute2.ipdbr r r Úpyroute2.ipdb.exceptionsr Úpyroute2.ipdb.linkedsetr rÚpyroute2.ipdb.routesrÚpyroute2.ipdb.transactionalrÚpyroute2.ipdb.utilsrÚpyroute2.iprouterÚpyroute2.netlink.rtnlrrÚpyroute2.netlink.rtnl.ifinfmsgrÚ getLoggerr8rlÚobjectrr=rbr;r)r'Úrps¨ðñ| ózÛÛ ÛÛÛÛðÛõ Ýåß.ß3Ñ3Ý6ß>Ý*Ý4Ý3Ý$ß>Ý3à€g×јÓ!€ô1ˆvô1ô@*�6ô*ôZI Eˆ6õI EøðGòÝðús B0Â0 B<Â;B<