File: //proc/self/root/proc/3/root/usr/lib/python2.4/site-packages/dns/inet.pyc
mò
!`Nc @ s{ d Z d k Z d k Z d k Z e i Z y
e i Z Wn e j
o
d Z n Xd „ Z d „ Z d „ Z
d „ Z d S( s* Generic Internet address helper functions.Ni' c C sL | t j o t i i | ƒ Sn( | t j o t i i | ƒ Sn t ‚ d S( s* Convert the textual form of a network address into its binary form.
@param family: the address family
@type family: int
@param text: the textual address
@type text: string
@raises NotImplementedError: the address family specified is not
implemented.
@rtype: string
N( t familyt AF_INETt dnst ipv4t inet_atont textt AF_INET6t ipv6t NotImplementedError( R R ( ( t, /usr/lib/python2.4/site-packages/dns/inet.pyt inet_pton% s
c C sL | t j o t i i | ƒ Sn( | t j o t i i | ƒ Sn t ‚ d S( s/ Convert the binary form of a network address into its textual form.
@param family: the address family
@type family: int
@param address: the binary address
@type address: string
@raises NotImplementedError: the address family specified is not
implemented.
@rtype: string
N( R R R R t inet_ntoat addressR R R ( R R ( ( R t inet_ntop8 s
c C sR y t i i | ƒ } t SWn1 y t i i | ƒ } t SWqN t ‚ qN Xn Xd S( sá Determine the address family of a textual-form network address.
@param text: the textual address
@type text: string
@raises ValueError: the address family cannot be determined from the input.
@rtype: int
N( R R R R t junkR R R t
ValueError( R R ( ( R t af_for_addressJ s c C s y7 t t i i | ƒ d ƒ } | d j o
| d j SWnA y* t t i i | ƒ d ƒ } | d j SWq{ t ‚ q{ Xn Xd S( sÄ Is the textual-form network address a multicast address?
@param text: the textual address
@raises ValueError: the address family cannot be determined from the input.
@rtype: bool
i ià iï iÿ N( t ordR R R R t firstR R ( R R ( ( R t is_multicast\ s ( t __doc__t sockett dns.ipv4R t dns.ipv6R R t AttributeErrorR
R
R R ( R R R
R R
R R R ( ( R t ? s