Package netaddr :: Package eui :: Module ieee :: Class IABIndexParser
[hide private]
[frames] | no frames]

Class IABIndexParser

    object --+    
             |    
core.Publisher --+
                 |
                IABIndexParser

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 :-

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
Instance Methods [hide private]
 
__init__(self, ieee_file)
Constructor.
 
parse(self)
Starts the parsing process which detects records and notifies registered subscribers as it finds each IAB record.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

    Inherited from core.Publisher
 
attach(self, subscriber)
Add a new subscriber.
 
detach(self, subscriber)
Remove an existing subscriber.
 
notify(self, data)
Send update data to to all registered Subscribers.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, ieee_file)
(Constructor)

 

Constructor.

Parameters:
  • 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.
Overrides: object.__init__