asda?‰PNG  IHDR ? f ??C1 sRGB ??é gAMA ±? üa pHYs ? ??o¨d GIDATx^íüL”÷e÷Y?a?("Bh?_ò???¢§?q5k?*:t0A-o??¥]VkJ¢M??f?±8\k2íll£1]q?ù???T 3 bW @sjdZddlZddlZddlZejZy ejZWnek rDdZYnXddZddZ dd Z d d Z dS) z*Generic Internet address helper functions.Ni'cCs0|tkrtjj|S|tkr(tjj|StdS)a*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)AF_INETdnsipv4 inet_atonAF_INET6ipv6NotImplementedError)familytextr /usr/lib/python3.6/inet.py inet_pton&s   r cCs0|tkrtjj|S|tkr(tjj|StdS)a/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)rrrZ inet_ntoarrr)r Zaddressr r r inet_ntop:s   rcCsLytjj|tStk rFytjj|tStYnXYnXdS)zDetermine 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)rrrr Exceptionrr ValueError)r r r r af_for_addressMs  rcCsty$ttjj|d}|dko$|dkStk rnyttjj|d}|dkStk rhtYnXYnXdS)zIs 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 rN)ordrrrrrr)r firstr r r is_multicast`sr) __doc__ZsocketZdns.ipv4rZdns.ipv6rrAttributeErrorr rrrr r r r s