Skip to content
Commits on Jan 16, 2016
  1. Ignoring Vagrant files

    Roman Lisagor committed
  2. Python 3 support

    Roman Lisagor committed
    - Everything uses binary strings (bytes/str)
    - dict(zip...) => dict(list(zip...))
    - print => print()
  3. First steps towards Py3 compatibility

    Roman Lisagor committed
  4. @rhgrant10

    Fixed relative imports

    rhgrant10 committed with Roman Lisagor
Commits on Jan 15, 2016
  1. Merge pull request #7 from williamjoy/patch-1

    committed
    fix a comment
  2. Added Makefile

    Roman Lisagor committed
  3. Tests for tap

    Roman Lisagor committed
  4. Tests for route

    Roman Lisagor committed
  5. Tests for brctl

    Roman Lisagor committed
Commits on Jan 13, 2016
  1. Test framework + tests for ifconfig

    Roman Lisagor committed
Commits on Feb 25, 2015
  1. @williamjoy

    fix a comment

    williamjoy committed
Commits on Nov 14, 2013
  1. Bugfix: current code computes the wrong netmask on some architectures.

    Carlo Contavalli committed
    See example below, it prints all possible netmasks with the current code
    and fixed code. For network masks like 0xffffffe0, math.log(netmask, 2)
    returns 4.99999999 on some architectures, which rounded gives 4, which
    in turn leads to a netmask of 28 instead of the correct 27.
    
    See the repeated 31 and 28 in the netmasks below.
    
        >>> import math
        >>> import ctypes
        >>> [32 - int(math.log(ctypes.c_uint32(~(0xffffffff << i)).value + 1, 2)) for i in range(32)]
        [32, 31, 31, 29, 28, 28, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
        >>> [32 - int(round(math.log(ctypes.c_uint32(~(0xffffffff << i)).value + 1, 2), 1)) for i in range(32)]
        [32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
Commits on Nov 1, 2013
  1. Fix set_netmask() handling of negative numbers.

    Carlo Contavalli committed
    If the netmask happens to have the first bit set to 1, which is fairly common
    (think 255.255.255.0), struct.pack(...i...) will fail, as 'i' takes signed 32
    bit integers, and will refuse to take any integer >= 2^31.
    
    Example:
    >>> struct.pack("i", 2**31)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    struct.error: 'i' format requires -2147483648 <= number <= 2147483647
    >>> struct.pack("i", 2**31 - 1)
    '\0xff\0xff\0xff\0xf7'
Commits on Dec 18, 2012
  1. Bumped version number

    Roman Lisagor committed
  2. Added a __repr__ niceness to Interfaces

    Roman Lisagor committed
Commits on Jan 19, 2010
  1. Added some classifiers to the python distro

    Roman Lisagor committed
  2. Including debian packaging in the source distribution

    Roman Lisagor committed
  3. Packaged for Debian

    Roman Lisagor committed
  4. Fixed formatting in readme file

    Roman Lisagor committed
  5. Better description for the project

    Roman Lisagor committed
  6. Added a license

    Roman Lisagor committed
  7. gitignore file

    Roman Lisagor committed
Commits on Jan 18, 2010
  1. Added setup.py

    Roman Lisagor committed
  2. Added route sub-module import to the top level

    Roman Lisagor committed
  3. Moved library into a subdirectory

    Roman Lisagor committed
  4. Added a readme file

    Roman Lisagor committed
  5. Initial commit

    Roman Lisagor committed
Something went wrong with that request. Please try again.