# Path: dyndnsc/detector/base.py
# LOG = logging.getLogger(__name__)
# class IPDetector(Subject, DynamicCliMixin):
#     def __init__(self, *args, **kwargs):
#     def can_detect_offline(self):
#     def af(self):
#     def get_old_value(self):
#     def set_old_value(self, value):
#     def get_current_value(self, default=None):
#     def set_current_value(self, value):
#     def has_changed(self):
#     def configuration_key_prefix():
# 
# Path: dyndnsc/common/six.py
# def ipaddress(addr):
#     """Return an ipaddress.ip_address object from the given string IP."""
#     return _ipaddress.ip_address(addr)
# 
# def ipnetwork(addr):
#     """Return an ipaddress.ip_network object from the given string IP."""
#     return _ipaddress.ip_network(addr)


import logging
import netifaces
    import platform
from .base import IPDetector, AF_INET6
from ..common.six import ipaddress, ipnetwork
        :param netmask: netmask to be matched if multiple IPs on interface
                (default: none (match all)", example for teredo:
                "2001:0000::/32")
        """
        super(IPDetector_Iface, self).__init__(*args, family=family, **kwargs)

        self.opts_iface = iface if iface else _default_interface()
        self.opts_netmask = netmask

        # ensure an interface name was specified:
        if self.opts_iface is None:
            raise ValueError("No network interface specified!")
        # parse/validate given netmask:
        if self.opts_netmask is not None:  # if a netmask was given
            # This might fail here, but that's OK since we must avoid sending
            # an IP to the outside world that should be hidden (because in a
            # "private" netmask)
            self.netmask = ipnetwork(self.opts_netmask)
        else:
            self.netmask = None

    def can_detect_offline(self):
        """Return true, as this detector only queries local data."""
        return True

    def _detect(self):
        """Use the netifaces module to detect ifconfig information."""
        theip = None
        try:
            if self.opts_family == AF_INET6:

# Path: dyndnsc/detector/base.py
# LOG = logging.getLogger(__name__)
# class IPDetector(Subject, DynamicCliMixin):
#     def __init__(self, *args, **kwargs):
#     def can_detect_offline(self):
#     def af(self):
#     def get_old_value(self):
#     def set_old_value(self, value):
#     def get_current_value(self, default=None):
#     def set_current_value(self, value):
#     def has_changed(self):
#     def configuration_key_prefix():
# 
# Path: dyndnsc/common/six.py
# def ipaddress(addr):
#     """Return an ipaddress.ip_address object from the given string IP."""
#     return _ipaddress.ip_address(addr)
# 
# def ipnetwork(addr):
#     """Return an ipaddress.ip_network object from the given string IP."""
#     return _ipaddress.ip_network(addr)


# Path: dyndnsc/detector/iface.py
import logging
import netifaces
    import platform
from .base import IPDetector, AF_INET6
from ..common.six import ipaddress, ipnetwork

        :param netmask: netmask to be matched if multiple IPs on interface
                (default: none (match all)", example for teredo:
                "2001:0000::/32")
        """
        super(IPDetector_Iface, self).__init__(*args, family=family, **kwargs)

        self.opts_iface = iface if iface else _default_interface()
        self.opts_netmask = netmask

        # ensure an interface name was specified:
        if self.opts_iface is None:
            raise ValueError("No network interface specified!")
        # parse/validate given netmask:
        if self.opts_netmask is not None:  # if a netmask was given
            # This might fail here, but that's OK since we must avoid sending
            # an IP to the outside world that should be hidden (because in a
            # "private" netmask)
            self.netmask = ipnetwork(self.opts_netmask)
        else:
            self.netmask = None

    def can_detect_offline(self):
        """Return true, as this detector only queries local data."""
        return True

    def _detect(self):
        """Use the netifaces module to detect ifconfig information."""
        theip = None
        try:
            if self.opts_family == AF_INET6:

                addrlist = netifaces.ifaddresses(self.opts_iface)[netifaces.AF_INET6]