PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  w{Zc@sRdZddlZddlZddljZddlZ ddl m Z m Z m Z ejejedZejejedZiZejejedZejejedZiZde fd YZd e fd YZd e fd YZdZdZdZedkrGeenedS(s Provides access to public OUI and IAB registration data published by the IEEE. More details can be found at the following URLs :- - IEEE Home Page - U{http://www.ieee.org/} - Registration Authority Home Page - U{http://standards.ieee.org/regauth/} iN(t Subscribert Publishertdos2unixsoui.txtsoui.idxsiab.txtsiab.idxt FileIndexercBs eZdZdZdZRS(s A concrete Subscriber that receives OUI record offset information that is written to an index data file as a set of comma separated records. cCs[t|dr*t|dr*||_nt|d|_tj|jdd|_dS(s Constructor. @param index_file: a file-like object or name of index file where index records will be written. treadlinettelltwtlineterminators N(thasattrtfhtopent_csvtwriter(tselft index_file((s4/usr/lib/python2.7/site-packages/netaddr/eui/ieee.pyt__init__Bs cCs|jj|dS(s Receives and writes index data to a CSV data file. @param data: record containing offset record information. N(R twriterow(R tdata((s4/usr/lib/python2.7/site-packages/netaddr/eui/ieee.pytupdatePs(t__name__t __module__t__doc__RR(((s4/usr/lib/python2.7/site-packages/netaddr/eui/ieee.pyR=s tOUIIndexParsercBs eZdZdZdZRS(s A concrete Publisher that parses OUI (Organisationally Unique Identifier) records from IEEE text-based registration files It notifies registered Subscribers as each record is encountered, passing on the record's position relative to the start of the file (offset) and the size of the record (in bytes). The file processed by this parser is available online from this URL :- - U{http://standards.ieee.org/regauth/oui/oui.txt} This is a sample of the record structure expected:: 00-CA-FE (hex) ACME CORPORATION 00CAFE (base 16) ACME CORPORATION 1 MAIN STREET SPRINGFIELD UNITED STATES cCsPtt|jt|dr=t|dr=||_nt||_dS(s Constructor. @param ieee_file: a file-like object or name of file containing OUI records. When using a file-like object always open it in binary mode otherwise offsets will probably misbehave. RRN(tsuperRRRR R (R t ieee_file((s4/usr/lib/python2.7/site-packages/netaddr/eui/ieee.pyRns cCs!t}d}d}xtr|jj}|s4Pn|rOd|krOt}n|r[qnd|kr|dk r|j||j|nt|}|jjt|}|j d}t |j ddd}||g}q|t|7}qW|j||j|dS(s Starts the parsing process which detects records and notifies registered subscribers as it finds each OUI record. is(hex)t-tiN( tTruetNoneR RtFalsetappendtnotifytlenRtsplittinttreplace(R t skip_headertrecordtsizetlinetoffsettouitindex((s4/usr/lib/python2.7/site-packages/netaddr/eui/ieee.pytparse}s.       (RRRRR+(((s4/usr/lib/python2.7/site-packages/netaddr/eui/ieee.pyRYs tIABIndexParsercBs eZdZdZdZRS(s A concrete Publisher that parses IAB (Individual Address Block) records from IEEE text-based registration files It notifies registered Subscribers as each record is encountered, passing on the record's position relative to the start of the file (offset) and the size of the record (in bytes). The file processed by this parser is available online from this URL :- - U{http://standards.ieee.org/regauth/oui/iab.txt} This is a sample of the record structure expected:: 00-50-C2 (hex) ACME CORPORATION ABC000-ABCFFF (base 16) ACME CORPORATION 1 MAIN STREET SPRINGFIELD UNITED STATES cCsPtt|jt|dr=t|dr=||_nt||_dS(s Constructor. @param ieee_file: a file-like object or name of file containing IAB records. When using a file-like object always open it in binary mode otherwise offsets will probably misbehave. RRN(RR,RRR R (R R((s4/usr/lib/python2.7/site-packages/netaddr/eui/ieee.pyRs c Cst}d}d}xLtr`|jj}|s4Pn|rOd|krOt}n|r[qnd|kr|dk r|j||j|n|jjt|}|j d}|}||g}t|}qd|krM|t|7}|dj dd}|j d} | j dd} t || dd?|d s*   OT