Query regarding support for IPv6 in python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pramod TK

    #1

    Query regarding support for IPv6 in python

    Hello All,
    I have some queries related to python support for IPv6. Can you kindly
    clarify the doubts which I have -
    1. Does python support IPv6? [128 bit IP addresses?]
    2. Does it support setting of QoS flags?
    3. Does it support tunneling of IPv6 on a IPv4 network?
    4. If an IPv4 address is given, does it support this on a IPv6 network?
    If not can you kindly let me know, Are there any plans for supporting these
    features in future?

    For Example -
    In IPv4 we have gethostbyname() function, which is deprecated in IPv6. In
    IPv6, getaddrinfo() and new data structure like struct addrinfo is
    introduced.
    Is this new function getaddrinfo() of IPv6 is supported in Win32 Extensions
    for python.


    Thanks in Advance,
    Pramod TK


  • Sybren Stuvel

    #2
    Re: Query regarding support for IPv6 in python

    Pramod TK enlightened us with:[color=blue]
    > 1. Does python support IPv6? [128 bit IP addresses?][/color]

    Yes.
    [color=blue]
    > 2. Does it support setting of QoS flags?[/color]

    No idea.
    [color=blue]
    > 3. Does it support tunneling of IPv6 on a IPv4 network?[/color]

    IIRC that's the OS's job, not Python's.
    [color=blue]
    > 4. If an IPv4 address is given, does it support this on a IPv6
    > network?[/color]

    It does if you use the compatability notation ::ffff:127.0.0. 1
    [color=blue]
    > Is this new function getaddrinfo() of IPv6 is supported in Win32
    > Extensions for python.[/color]

    I don't know anything about windows.

    Sybren
    --
    The problem with the world is stupidity. Not saying there should be a
    capital punishment for stupidity, but why don't we just take the
    safety labels off of everything and let the problem solve itself?
    Frank Zappa

    Comment

    • Martin v. Löwis

      #3
      Re: Query regarding support for IPv6 in python

      Pramod TK wrote:[color=blue]
      > Is this new function getaddrinfo() of IPv6 is supported in Win32 Extensions
      > for python.[/color]

      Yes, since Python 2.4 (actually, not in the Win32 extensions, but in the
      standard Python socket module for Win32).

      Regards,
      Martin

      Comment

      • Heiko Wundram

        #4
        Re: Query regarding support for IPv6 in python

        Am Mittwoch 26 April 2006 17:02 schrieb Pramod TK:[color=blue]
        > 1. Does python support IPv6? [128 bit IP addresses?][/color]

        Yes.
        [color=blue]
        > 2. Does it support setting of QoS flags?[/color]

        Yes. That's a socket option which you can set just as you would set it using C
        (at least under Unix, under Windows: no idea).
        [color=blue]
        > 3. Does it support tunneling of IPv6 on a IPv4 network?[/color]

        No. That's an OS's job. You could, of course, implement a 6in4-tunnel using
        TUN interfaces, completely in Python. But I don't think that's what you want
        to do. And, anyway, your host OS would need IPv6 support for this to work. I
        wouldn't know how you'd go about implementing this on Windows, though.
        [color=blue]
        > 4. If an IPv4 address is given, does it support this on a IPv6 network?[/color]

        Depends on the OS. If the OS supports 6to4, then Python does too (because an
        IPv4-Adress is simply mapped to an IPv6-Network with a certain notation, look
        up the documentation for the 2001::-network on Wikipedia, for example). If
        the OS doesn't, Python doesn't either. This is also an OS job, not a Python
        job.

        --- Heiko.

        Comment

        Working...