logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

packet.internet.ipv6addr - IPv6Addr module

Author

       Jorge Mora (mora@netapp.com)

NFStest 3.2                                       21 March 2023                                      IPV6ADDR(3)

Bugs

       No known bugs.

Classes

classIPv6Addr(builtins.str)
       IPv6Addr address object

       Usage:
           from packet.internet.ipv6addr import IPv6Addr

           ip = IPv6Addr('fe80000000000000020c29fffe5409ef')

       The following expressions are equivalent:
           ip == 0xFE80000000000000020C29FFFE5409EF
           ip == 0xfe80000000000000020c29fffe5409ef
           ip == '0xFE80000000000000020C29FFFE5409EF'
           ip == '0xfe80000000000000020c29fffe5409ef'
           ip == 'FE80000000000000020C29FFFE5409EF'
           ip == 'fe80000000000000020c29fffe5409ef'
           ip == 'FE80:0000:0000:0000:020C:29FF:FE54:09EF'
           ip == 'fe80:0000:0000:0000:020c:29ff:fe54:09ef'
           ip == 'FE80::020C:29FF:FE54:09EF'
           ip == 'fe80::020c:29ff:fe54:09ef'
           ip == 'FE80::20C:29FF:FE54:9EF'
           ip == 'fe80::20c:29ff:fe54:9ef'

       Methodsdefinedhere:
       ---------------------

       __eq__(self,other)
       Compare two IPv6 addresses and return True if both are equal.

       __ne__(self,other)
       Compare two IPv6 addresses and return False if both are equal.

       Staticmethodsdefinedhere:
       ----------------------------

       __new__(cls,ip)
       Create new instance by converting input int/string into a persistent
       representation of an IPv6 address.

Description

       Create an object to represent an IPv6 address. An IPv6 address is given either by a series of hexadecimal
       numbers  or  using  the  ":"  notation.  It provides a mechanism for comparing this object with a regular
       string. It also takes care of '::' notation and leading zeroes.

Name

       packet.internet.ipv6addr - IPv6Addr module

See Also