PK���ȼRY��������€��� �v3.phpUT �øŽg‰gñ“gux �õ��õ��½T]kÛ0}߯pEhìâÙM7X‰çv%”v0֐µ{)Aå:6S$!ÉMJèߕ?R÷!>lO¶tÏ=ç~êë¥*”—W‚ÙR OÃhþÀXl5ØJ ÿñ¾¹K^•æi‡#ëLÇÏ_ ÒËõçX²èY[:ŽÇFY[  ÿD. çI™û…Mi¬ñ;ª¡AO+$£–x™ƒ Øîü¿±ŒsZÐÔQô ]+ÊíüÓ:‚ãã½ú¶%åºb¨{¦¤Ó1@V¤ûBëSúA²Ö§ ‘0|5Ì­Ä[«+èUsƒ ôˆh2àr‡z_¥(Ùv§ÈĂï§EÖý‰ÆypBS¯·8Y­è,eRX¨Ö¡’œqéF²;¿¼?Ø?Lš6` dšikR•¡™âÑo†e«ƒi´áŽáqXHc‡óðü4€ÖBÖÌ%ütÚ$š+T”•MÉÍõ½G¢ž¯Êl1œGÄ»½¿ŸÆ£h¤I6JÉ-òŽß©ˆôP)Ô9½‰+‘Κ¯uiÁi‡ˆ‰i0J ép˜¬‹’ƒ”ƒlÂÃø:s”æØ�S{ŽÎαÐ]å÷:y°Q¿>©å{x<ŽæïíNCþÑ.Mf?¨«2ý}=ûõýî'=£§ÿu•Ü(—¾IIa­"éþ@¶�¿ä9?^-qìÇÞôvŠeÈc ðlacã®xèÄ'®âd¶ çˆSEæódP/ÍÆv{Ô)Ó ?>…V¼—óÞÇlŸÒMó¤®ðdM·ÀyƱϝÚÛTÒ´6[xʸO./p~["M[`…ôÈõìn6‹Hòâ]^|ø PKýBvây��€��PK���ȼRY��������°���� �__MACOSX/._v3.phpUT �øŽg‰gþ“gux �õ��õ��c`cg`b`ðMLVðVˆP€'qƒøˆŽ!!AP&HÇ %PDF-1.7 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids [6 0 R ] /Count 1 /Resources << /ProcSet 4 0 R /Font << /F1 8 0 R /F2 9 0 R >> >> /MediaBox [0.000 0.000 595.280 841.890] >> endobj 4 0 obj [/PDF /Text ] endobj 5 0 obj << /Producer (���d�o�m�p�d�f� �2�.�0�.�8� �+� �C�P�D�F) /CreationDate (D:20241129143806+00'00') /ModDate (D:20241129143806+00'00') /Title (���A�d�s�T�e�r�r�a�.�c�o�m� �i�n�v�o�i�c�e) >> endobj 6 0 obj << /Type /Page /MediaBox [0.000 0.000 595.280 841.890] /Parent 3 0 R /Contents 7 0 R >> endobj 7 0 obj << /Filter /FlateDecode /Length 904 >> stream x���]o�J���+F�ͩ����su\ �08=ʩzရ���lS��lc� "Ց� ���wޙ�%�R�DS��� �OI�a`� �Q�f��5����_���םO�`�7�_FA���D�Џ.j�a=�j����>��n���R+�P��l�rH�{0��w��0��=W�2D ����G���I�>�_B3ed�H�yJ�G>/��ywy�fk��%�$�2.��d_�h����&)b0��"[\B��*_.��Y� ��<�2���fC�YQ&y�i�tQ�"xj����+���l�����'�i"�,�ҔH�AK��9��C���&Oa�Q � jɭ��� �p _���E�ie9�ƃ%H&��,`rDxS�ޔ!�(�X!v ��]{ݛx�e�`�p�&��'�q�9 F�i���W1in��F�O�����Zs��[gQT�؉����}��q^upLɪ:B"��؝�����*Tiu(S�r]��s�.��s9n�N!K!L�M�?�*[��N�8��c��ۯ�b�� ��� �YZ���SR3�n�����lPN��P�;��^�]�!'�z-���ӊ���/��껣��4�l(M�E�QL��X ��~���G��M|�����*��~�;/=N4�-|y�`�i�\�e�T�<���L��G}�"В�J^���q��"X�?(V�ߣXۆ{��H[����P�� �c���kc�Z�9v�����? �a��R�h|��^�k�D4W���?Iӊ�]<��4�)$wdat���~�����������|�L��x�p|N�*��E� �/4�Qpi�x.>��d����,M�y|4^�Ż��8S/޾���uQe���D�y� ��ͧH�����j�wX � �&z� endstream endobj 8 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >> endobj 9 0 obj << /Type /Font /Subtype /Type1 /Name /F2 /BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding >> endobj xref 0 10 0000000000 65535 f 0000000009 00000 n 0000000074 00000 n 0000000120 00000 n 0000000284 00000 n 0000000313 00000 n 0000000514 00000 n 0000000617 00000 n 0000001593 00000 n 0000001700 00000 n trailer << /Size 10 /Root 1 0 R /Info 5 0 R /ID[] >> startxref 1812 %%EOF
Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 128

Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 129

Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 130

Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 131
]KfSdZddlZddlZddlZddlZddlZddlZddlZddlm Z ddl m Z ddl m Z ddlmZddlmZdd lmZdd lmZdd lmZdd lmZmZ dd lmZn#e$r dd lmZYnwxYw ddlZn#e$rddlZYnwxYwej e!Z"dZ#GddZ$GddZ%GddZ&GddZ'GddZ(dS)a. .. testsetup:: from pyroute2 import NDB ndb = NDB(sources=[{'target': 'localhost', 'kind': 'IPMock'}]) .. testsetup:: netns from types import MethodType from pyroute2 import NDB ndb = NDB(sources=[{'target': 'localhost', 'kind': 'IPMock'}]) def add_mock_netns(self, netns): return self.add_orig(target=netns, kind='IPMock', preset='netns') ndb.sources.add_orig = ndb.sources.add ndb.sources.add = MethodType(add_mock_netns, ndb.sources) .. testcleanup:: * for key, value in tuple(globals().items()): if key.startswith('ndb') and hasattr(value, 'close'): value.close() NDB is a high level network management module. IT allows to manage interfaces, routes, addresses etc. of connected systems, containers and network namespaces. In a nutshell, NDB collects and aggregates netlink events in an SQL database, provides Python objects to reflect the system state, and applies changes back to the system. The database expects updates only from the sources, no manual SQL updates are expected normally. .. aafig:: :scale: 80 :textual: +----------------------------------------------------------------+ +----------------------------------------------------------------+ | +----------------------------------------------------------------+ | | | | | | | kernel | |-+ | |-+ +----------------------------------------------------------------+ | | ^ | ^ | `netlink events` | | | | | `inotify events` | | | | | `...` | | | | v v | v | +--------------+ +--------------+ +--------------+ | source | | source | | source |<--\ +--------------+ +--------------+ +--------------+ | | | | | | | | | \-----------------------+-----------------------/ | | | parsed netlink events | `NDB._event_queue` | | | v | +------------------------+ | | `NDB.__dbm__()` thread | | +------------------------+ | | | v | +-----------------------------+ | | `NDB.schema.load_netlink()` | | | `NDB.objects.*.load*()` | | +-----------------------------+ | | | v | +----------------------+ | | SQL database | | | `SQLite` | | | `PostgreSQL` | | +----------------------+ | | | | | V | +---------------+ | +---------------+ | | +---------------+ | | `RTNL_Object.apply()` | | NDB object: | | |-------------------------/ | `interface` | | | | `address` | | | | `route` | |-+ | `...` |-+ +---------------+ .. container:: aafig-caption object names on the diagram are clickable The goal of NDB is to provide an easy access to RTNL info and entities via Python objects, like `pyroute2.ndb.objects.interface` (see also: :ref:`ndbinterfaces`), `pyroute2.ndb.objects.route` (see also: :ref:`ndbroutes`) etc. These objects do not only reflect the system state for the time of their instantiation, but continuously monitor the system for relevant updates. The monitoring is done via netlink notifications, thus no polling. Also the objects allow to apply changes back to the system and rollback the changes. On the other hand it's too expensive to create Python objects for all the available RTNL entities, e.g. when there are hundreds of interfaces and thousands of routes. Thus NDB creates objects only upon request, when the user calls `.create()` to create new objects or runs `ndb.[selector]` (e.g. `ndb.interfaces['eth0']`) to access an existing object. To list existing RTNL entities NDB uses objects of the class `RecordSet` that `yield` individual `Record` objects for every entity (see also: :ref:`ndbreports`). An object of the `Record` class is immutable, doesn't monitor any updates, doesn't contain any links to other objects and essentially behaves like a simple named tuple. .. aafig:: :scale: 80 :textual: +---------------------+ | | | | | `NDB() instance` | | | | | +---------------------+ | | +-------------------+ +-------------------+ | +-------------------+ | |-----------+--------------------------+ | | | | | | | | | | | | | `View()` | | | | | | | |-+ | | | |-+ | | +-------------------+ | | +------------------+ +------------------+ | | | | | | | | | `.dump()` | | `.create()` | | `.summary()` | | `.__getitem__()` | | | | | | | | | +------------------+ +------------------+ | | | | v v +-------------------+ +------------------+ | | +------------------+ | | | +------------------+ | | | `RecordSet()` | | `Interface()` | | | | | | `Address()` | | | | | | `Route()` | | | +-------------------+ | `Neighbour()` | | | | | `Rule()` | |-+ | | ... |-+ v +------------------+ +-------------------+ +-------------------+ | +-------------------+ | | | `filter()` | | | | `select()` | | | | `transform()` | | | | `join()` | |-+ | ... |-+ +-------------------+ | v +-------------------+ +-------------------+ | +-------------------+ | | | | | | | | | | | `Record()` | | | | | |-+ | |-+ +-------------------+ .. container:: aafig-caption object names on the diagram are clickable Here are some simple NDB usage examples. More info see in the reference documentation below. Print all the interface names on the system, assume we have an NDB instance `ndb`: .. testcode:: for interface in ndb.interfaces.dump(): print(interface.ifname) .. testoutput:: lo eth0 Print the routing information in the CSV format: .. testcode:: for record in ndb.routes.summary().format('csv'): print(record) .. testoutput:: 'target','tflags','table','ifname','dst','dst_len','gateway' 'localhost',0,254,'eth0','',0,'192.168.122.1' 'localhost',0,254,'eth0','192.168.122.0',24, 'localhost',0,255,'lo','127.0.0.0',8, 'localhost',0,255,'lo','127.0.0.1',32, 'localhost',0,255,'lo','127.255.255.255',32, 'localhost',0,255,'eth0','192.168.122.28',32, 'localhost',0,255,'eth0','192.168.122.255',32, .. note:: More on report filtering and formatting: :ref:`ndbreports` Print IP addresses of interfaces in several network namespaces as: .. testcode:: netns nslist = ['netns01', 'netns02', 'netns03'] for nsname in nslist: ndb.sources.add(netns=nsname) report = ndb.addresses.summary() report.select_records(target=lambda x: x.startswith('netns')) report.select_fields('address', 'ifname', 'target') for line in report.format('json'): print(line) .. testoutput:: netns [ { "address": "127.0.0.1", "ifname": "lo", "target": "netns01" }, { "address": "127.0.0.1", "ifname": "lo", "target": "netns02" }, { "address": "127.0.0.1", "ifname": "lo", "target": "netns03" } ] Add an IP address on an interface: .. testcode:: with ndb.interfaces['eth0'] as eth0: eth0.add_ip('10.0.0.1/24') # ---> <--- NDB waits until the address setup Change an interface property: .. testcode:: with ndb.interfaces['eth0'] as eth0: eth0.set( state='up', address='00:11:22:33:44:55', ) # ---> <--- NDB waits here for the changes to be applied # the commit() is called automatically by the # context manager's __exit__() N)config) basestring) AuthManagerShutdownException)cmsg) DBProvider) TaskManager) Transaction) SourcesViewView)urlparse)) interfacesr) addressesr)routesr) neighboursr) af_bridge_fdbfdb)rulesr)netnsr)af_bridge_vlansvlansceZdZd dZdejfdZedZedZ dZ dZ dZ d Z d Zd Zd ZdS)LogNcd|_d|_|pt||_t jd|jz|_|d|_dS)NFzpyroute2.ndb.%smain)loggerstateidlog_idlogging getLoggerchannelr)selfr!s D/opt/alt/python311/lib/python3.11/site-packages/pyroute2/ndb/main.py__init__z Log.__init__IsS  (4 '(9DK(GHH LL(( c| |jduS|j6t|jjD]}|j||dvrN|jrE|jd|jtjdS|dvrtj }n|dkr tj }tj }nt|trt|}|js!|jrtj|j}nU|jdkr9tj|jd}nt)d|}||ur+d }tj|}|||j||j|dS) N)offFr)onstderrdebugsyslog:)addresszlogging scheme not supportedz0%(asctime)s %(levelname)8s %(name)s: %(message)s)rtuplehandlers removeHandlerrsetLevel addHandlerr" NullHandler StreamHandlerDEBUG isinstancerrschemepath FileHandler SysLogHandlernetlocsplit ValueError Formatter setFormatter)r%targetlevelhandlerurlfmt formatters r&__call__z Log.__call__Ps >;d* * ; " !566 3 3 ))'2222 ^ # #z > $$Q''' &&w':'<'<=== F % % %+--GG w  +--GMEE  + + 6""C: A#( A!-ch77x''!*88J,,S119!!?@@@G & DC)#..I   + + + w''' U#####r(c2|ddS)Nr+rCrIr%s r&r+zLog.onys T """""r(c2|ddS)Nr*rKrLrMs r&r*zLog.off}s U #####r(c|jj}|jj}g}|jD],}||r||-|D] }|j|= ~~~dSN)rmanagername loggerDictkeys startswithappend)r%rQrR purge_listrs r&closez Log.closes+%{ (--// * *F  && *!!&)))  + +F"6**   JJr(c@tjd|jd|S)Nz pyroute2.ndb..)r"r#r!)r%rRs r&r$z Log.channels#  dd!KLLLr(c&|jj|i|SrP)rr-r%argvkwargs r&r-z Log.debugty....r(c&|jj|i|SrP)rinfor\s r&razLog.infosty~t-u---r(c&|jj|i|SrP)rwarningr\s r&rcz Log.warnings ty $0%000r(c&|jj|i|SrP)rerrorr\s r&rez Log.errorr_r(c&|jj|i|SrP)rcriticalr\s r&rgz Log.criticals!ty!415111r(rP)__name__ __module__ __qualname__r'r"INFOrIpropertyr+r*rXr$r-rarcrergr(r&rrHs))))#','$'$'$'$R##X#$$X$$MMM///...111///22222r(rceZdZdZdS)DeadEndc td)Nzshutdown in progressrr\s r&putz DeadEnd.puts 6777r(N)rhrirjrqrmr(r&roros#88888r(roc6eZdZdZddZdZddZdZdZdS) EventQueuec@tj|i|x|_|_dSrP)queueQueue_bypass_queuer\s r&r'zEventQueue.__init__s#%*[$%@%%@%@@ t{{{r(Nc:|j||fSrP)rxrqr%msgsources r&rqzEventQueue.puts{}---r(c,t|_dSrP)rorxrMs r&shutdownzEventQueue.shutdownsii r(c:|j||fSrP)rwrqrzs r&bypasszEventQueue.bypasss| ...r(c&|jj|i|SrP)rwgetr\s r&rzEventQueue.getst|////r(c4|jSrP)rwqsizerMs r&rzEventQueue.qsizes|!!###r(rP) rhrirjr'rqr~rrrrmr(r&rsrss{AAA....   ////000$$$$$r(rsceZdZdZdS) AuthProxyc||_||_tD]2\}}t|j||j}t |||3dS)N auth_managers)_ndb_auth_managersNDB_VIEWS_SPECSrsetattr)r%ndbrvtablevnameviews r&r'zAuthProxy.__init__s\ +, ' 'MFE 69LMMMD D% & & & & ' 'r(N)rhrirjr'rmr(r&rrs#'''''r(rcxeZdZedZ ddZdd Zd Zd Zd Z d Z dZ dZ dZ ddZdS)NDBcd|jzS)Nz %s/nsmanager) localhostrMs r& nsmanagerz NDB.nsmanagers..r(Nrsqlite3:memory:TFc |dkrd}||_d|_| p2tjtjdd|_tt||_ d|_ d|_ tj |_tj |_tj|_t%d|_d|_|rt+|t,r| |nYt+|t.t0fr |j |n2t+|t2r|j di|nt5d |\t6jrd d d g}nt|jd ddg}t:jdr| |j!dd n+t+|t0t.fstEd|D]} d| vr |j| d<ntGdddd|j $d} tK|| g|_&i|_'||_(tSj*|j+|j,d|_-t]t_|||||dd|_ta||_1tj2|j1j3d|_ d|j _4|j 5|j6|j-|j-tnD])\} } tq|| | g}ts|| |*dS)Npostgrespsycopg2cT) use_errno)r!d)maxsizezwrong log spec formatrIPMock)rCkindlocalr)rCr nlm_generatorlinuxrzsources format not supportedrCzobj:listzobj:readz obj:modifyauthrfalse)providerspec rtnl_debug db_cleanup auto_netnsrecordset_pipez NDB main loop)rCrRrm):rschemactypesCDLLutil find_librarylibcrr log_db _dbm_thread threadingEvent _dbm_ready _dbm_shutdownLock _global_lockrs _event_queue messengerr9rr1listdict TypeErrorr mock_iproutesysplatformrUrVrr@rr$r sources_call_registry_nlatexitregisterrXclear _dbm_errorstrr r task_managerThreadrundaemonstartwaitrrr)r%rr db_providerdb_specrrrrrramrrrs r&r'z NDB.__init__s * $ $$K"  FK K $ $S ) )T    bhh'''#/++&_..%N,,&s333  9#z** 9 C%// 9#C&& 93 7888 ?" &18DDE#'. ')*<**733NN#'>;GGGdE]33 =;<< <  Dt##!%X$4t D D H  V $ $  #4t<<<   ### J{3344$$$%    (--$+$(   #'      ? &/ !, ' 'MFEfRD999D D% & & & & ' 'r(c&t||||SrP)r)r%tablechainrs r& _get_viewz NDB._get_view-sD% 666r(c|SrPrmrMs r& __enter__z NDB.__enter__0s r(c.|dSrP)rX)r%exc_type exc_value tracebacks r&__exit__z NDB.__exit__3s r(cPt|jdS)N transaction)r rr$rMs r&beginz NDB.begin6s 48++M::;;;r(c|tdddd|jdS)NTFrr) auth_proxyrrr$rMs r&readonlyz NDB.readonly9sE !t5II  ((     r(c$t||gSrP)r)r% auth_managers r&rzNDB.auth_proxyAs ~...r(c|j5|jr ddddS|jt t drt j|jn9 t j |jdifn#t$rYnwxYw|j |j tdtf|j|jddddS#1swxYwYdS)N unregisterrm)rris_setsethasattrrrrX _exithandlersremover@rr~rr rrjoinrrMs r&rXz NDB.closeDs    !((** )        "&&(((v|,, !$*----(//R0DEEEE!D   & & ( ( (   $ $d41B1D1D&E&E%G H H H   ! ! # # # HNN   #                  s<D>AD>9'B! D>! B.+D>-B..BD>>EEc:|j|dSrP)r db_backup)r%rs r&backupz NDB.backupXs ##D)))))r(c||jD]!}||j|vr|"dSrP)rvaluesrrestart)r%kindsr|s r&reloadz NDB.reload[sLl))++ ! !F V[E%9%9    ! !r() NrrrTFFFN)NNrP)rhrirjrlrr'rrrrrrrXrrrmr(r&rrs //X/   \'\'\'\'~7777<<<   ///(***!!!!!!r(r))__doc__rr ctypes.utilr"logging.handlersrrpyroute2rpyroute2.commonrrreventsrmessagesr rr rr rr rr rr ImportError urllib.parserurvr#rhrrrrorsrrrmr(r&rsWWr  &&&&&&&%%%%%%%%%%%%%%%%%$$$$$$########&!!!!!!!&&&%%%%%%%%&LLLLg!! [2[2[2[2[2[2[2[2|88888888 $$$$$$$$(''''''''U!U!U!U!U!U!U!U!U!U!s$A A-,A-1A66 BB