| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/system-config-network/netconfpkg/ |
Upload File : |
Ñò
:®Jc @ sb d d k Z d d k Z d d d „ ƒ YZ d „ Z e d j o e ƒ n d Z d Z d Z d S(
iÿÿÿÿNt IPCalcc B sA e Z d Z d d d „ Z d „ Z d „ Z d „ Z d „ Z RS( s« A wrapper class that encapsulates the command line
functionality of the ipcalc command, providing access to computing
network prefixes, netmasks, etc. from python.c C s | | _ | | _ | | _ d S( s· Initialize an IPCalc object. Address must be provided, and
in order for most of the other calculations to be possible,
one of prefix or netmask must also be provided.N( t _addresst _prefixt _netmask( t selft addresst prefixt netmask( ( s5 /usr/share/system-config-network/netconfpkg/ipcalc.pyt __init__ s c C sª | i o | i S| i p? t i d | i ƒ i ƒ } t i d | ƒ i ƒ d | _ n t i d | i | i f ƒ i ƒ } t i d | ƒ i ƒ d | _ | i Sd S( Ns ipcalc -m %ss
NETMASK=(\S+)i s ipcalc -p %s %ss PREFIX=(\d+)( R R t ost popenR t readt ret matcht groups( R t text( ( s5 /usr/share/system-config-network/netconfpkg/ipcalc.pyR s
# c C s… | i o | i S| i p t i d | i ƒ i ƒ } n t i d | i | i f ƒ } t i d | ƒ i ƒ d | _ | i Sd S( Ns ipcalc -m %ss ipcalc -m %s/%ss
NETMASK=(\S+)i ( R R R R
R R R R
R ( R R ( ( s5 /usr/share/system-config-network/netconfpkg/ipcalc.pyR * s
c C sW | i p | i ƒ n t i d | i | i f ƒ i ƒ } t i d | ƒ i ƒ d S( Ns ipcalc -n %s/%ss
NETWORK=(\S+)i ( R R R R
R R R R
R ( R R ( ( s5 /usr/share/system-config-network/netconfpkg/ipcalc.pyt network6 s
c C sW | i p | i ƒ n t i d | i | i f ƒ i ƒ } t i d | ƒ i ƒ d S( Ns ipcalc -b %s/%ss BROADCAST=(\S+)i ( R R R R
R R R R
R ( R R ( ( s5 /usr/share/system-config-network/netconfpkg/ipcalc.pyt broadcast= s
N( t __name__t
__module__t __doc__t NoneR R R R R ( ( ( s5 /usr/share/system-config-network/netconfpkg/ipcalc.pyR s
c C sR t d d d ƒ} d G| i ƒ GHd G| i ƒ GHd G| i ƒ GHd G| i ƒ GHd S( s# Test function for the IPCalc class.s
207.175.42.15R s
255.255.254.0s prefix:s netmask:s bcast:s network:N( R R R R R ( t ipc( ( s5 /usr/share/system-config-network/netconfpkg/ipcalc.pyt testD s
t __main__s Harald Hoyer <harald@redhat.com>s $Date: 2007/03/14 09:29:37 $s $Revision: 1.8 $( ( R R R R R t
__author__t __date__t __version__( ( ( s5 /usr/share/system-config-network/netconfpkg/ipcalc.pyt <module> s 4