Ñò î¡ßNc @ s` d Z d d k Z d d k i Z d d k Z d d k Z d d k l Z l Z l Z d d k l Z l Z l Z l Z l Z d d k l Z h h d 6h d 6h d 6Z d e f d „ ƒ YZ d e f d „ ƒ YZ d e f d „ ƒ YZ d e f d „ ƒ YZ d e f d „ ƒ YZ d „ Z d d „ Z d „ Z d „ Z e! d j o e ƒ n e ƒ d S( s Routines for accessing data published by IANA (Internet Assigned Numbers Authority). More details can be found at the following URLs :- - IANA Home Page - U{http://www.iana.org/} - IEEE Protocols Information Home Page - U{http://www.iana.org/protocols/} iÿÿÿÿN( t Publishert Subscribert PrettyPrinter( t IPAddresst IPNetworkt IPRanget cidr_abbrev_to_verboset iprange_to_cidrs( t _dict_itemst IPv4t IPv6t multicastt LineRecordParserc B s) e Z d Z d „ Z d „ Z d „ Z RS( sQ A configurable Parser that understands how to parse line based records. c K s¤ t t | ƒ i ƒ | | _ | i i | ƒ d | i j o d | _ n d | i j o d | _ n d | i j o d | _ n d | i j o t | _ n d S( sa Constructor. fh - a valid, open file handle to line based record data. t re_starts ^.*$t re_parse_linet re_stopt skip_blank_linesN( t superR t __init__t fht __dict__t updateR R R t FalseR ( t selfR t kwargs( ( s3 /usr/lib/python2.6/site-packages/netaddr/ip/iana.pyR 8 s c C s | S( sX This is the callback method invoked for every line considered valid by the line parser's settings. It is usually over-ridden by base classes to provide specific line parsing and line skipping logic. Any line can be vetoed (not passed to registered Subscriber objects) by simply returning None. ( ( R t line( ( s3 /usr/lib/python2.6/site-packages/netaddr/ip/iana.pyt parse_lineS s c C s d } t } t } x| i D]ú } | i ƒ } | i o | d j o q n | o, t t i | i | ƒ ƒ d j o t } n | o, t t i | i | ƒ ƒ d j o t } n | o Pn | o) t t i | i | ƒ ƒ d j o q n | o | i | ƒ } | i | ƒ q q Wd S( s Parse and normalises records, notifying registered subscribers with record data as it is encountered. t i N( t NoneR R t stripR t lent _ret findallR t TrueR R R t notify( R t recordt section_startt section_endR ( ( s3 /usr/lib/python2.6/site-packages/netaddr/ip/iana.pyt parse^ s&