def __init__(self):
        # access dynamic PREFIX
        global PREFIX
        self.PREFIX = PREFIX

        # default settings
        # Server cfg.INTERFACE + addresses
        self.INTERFACE = "eth0"
        self.MCAST = "ff02::1:2"
        self.PORT = "547"
        self.ADDRESS = "2001:db8::1"
        # effective user and group - will have to be set mainly by distribution package
        self.USER = "root"
        self.GROUP = "root"
        # lets make the water turn black... or build a shiny server DUID
        # in case someone will ever debug something here: Wireshark shows
        # year 2042 even if it is 2012 - time itself is OK
        self.SERVERDUID = GenerateDUID()
        self.NAMESERVER = ""

        # domain for FQDN hostnames
        self.DOMAIN = "domain"
        # domain search list for option 24, according to RFC 3646
        # defaults to DOMAIN
        self.DOMAIN_SEARCH_LIST = ""

        # IA_NA Options
        # Default preferred lifetime for addresses
        self.PREFERRED_LIFETIME = "5400"
        # Default valid lifetime for addresses
        self.VALID_LIFETIME = "7200"
        # T1 RENEW
        self.T1 = "2700"
        # T2 REBIND
        self.T2 = "4050"
        
        # Server Preference
        self.SERVER_PREFERENCE = "255"

        # SNTP SERVERS Option 31
        self.SNTP_SERVERS = [ self.ADDRESS ]

        # INFORMATION REFRESH TIME option 32 for option 11 (INFORMATION REQUEST)
        # see RFC http://tools.ietf.org/html/rfc4242
        self.INFORMATION_REFRESH_TIME = "6000"    
        
        # config type
        # one of file, mysql, sqlite or none
        self.STORE_CONFIG = "none"
        # one of mysql or sqlite
        self.STORE_VOLATILE = "sqlite"

        # file for client information
        self.STORE_FILE_CONFIG = "clients.conf"
        
        # DB data
        self.STORE_DB_HOST = "localhost"
        self.STORE_DB_DB = "dhcpy6d"
        self.STORE_DB_USER = "user"
        self.STORE_DB_PASSWORD = "password"
        
        self.STORE_SQLITE_CONFIG = "config.sqlite"
        self.STORE_SQLITE_VOLATILE = "volatile.sqlite"

        # whether MAC-LLIP pairs should be stored forever or retrieved freshly if needed
        self.CACHE_MAC_LLIP = "False"

        # DNS Update settings
        self.DNS_UPDATE = "False"
        self.DNS_UPDATE_NAMESERVER = "::1"
        self.DNS_TTL = 86400
        self.DNS_RNDC_KEY = "rndc-key"
        self.DNS_RNDC_SECRET = "0000000000000000000000000000000000000000000000000000000000000"
        # DNS RFC 4704 client DNS wishes          
        # use client supplied hostname
        self.DNS_USE_CLIENT_HOSTNAME = "False"
        # ignore client ideas about DNS (if at all, what name to use, self-updating...) 
        self.DNS_IGNORE_CLIENT = "True"

        # Log ot not
        self.LOG = "False"
        # Log level
        self.LOG_LEVEL = "INFO"
        # Log on console
        self.LOG_CONSOLE = "False"
        # Logfile
        self.LOG_FILE = ""
        # Log to syslog
        self.LOG_SYSLOG = "False"
        # Syslog facility
        self.LOG_SYSLOG_FACILITY = "daemon"
        # Local syslog socket or server:port
        if platform.system() in ["Linux", "OpenBSD"]:
            self.LOG_SYSLOG_DESTINATION = "/dev/log"
        else:
            self.LOG_SYSLOG_DESTINATION = "/var/run/log"

        # Log newly found MAC addresses - if CACHE_MAC_LLIP is false this might be way too much
        self.LOG_MAC_LLIP = "False"
        
        # some 128 bits
        self.AUTHENTICATION_INFORMATION = "00000000000000000000000000000000"
        
        # for debugging - if False nothing is done 
        self.REALLY_DO_IT = "True"
        
        # interval for TidyUp thread - time to sleep in TidyUpThread
        self.CLEANING_INTERVAL = 5
        
        # Address and class schemes
        self.ADDRESSES = dict()
        self.CLASSES = dict()
        
        self.IDENTIFICATION = "mac"
        self.IDENTIFICATION_MODE = "match_all"
        
        # regexp filters for hostnames etc.
        self.FILTERS = {"mac":[], "duid":[], "hostname":[]}
        
        # define a fallback default class and address scheme
        self.ADDRESSES["default"] = ConfigAddress(ia_type="na",
                                                   category="mac",
                                                   pattern="fdef::$mac$",
                                                   aclass="default",
                                                   atype="default",
                                                   prototype="fdef0000000000000000XXXXXXXXXXXX")
        
        self.CLASSES["default"] = Class()
        self.CLASSES["default"].ADDRESSES.append("default")
        
        # define dummy address scheme for fixed addresses
        # pattern and prototype are not really needed as this
        # addresses are fixed
        self.ADDRESSES["fixed"] = ConfigAddress(ia_type="na",
                                                   category="fixed",
                                                   pattern="fdef0000000000000000000000000001",
                                                   aclass="default",
                                                   atype="fixed",
                                                   prototype="fdef0000000000000000000000000000")
        
        # config file from command line
        # default config file and cli values
        configfile = self.cli_options = self.cli_user = self.cli_group = self.cli_duid = self.cli_really_do_it = None
        # get multiple options
        try:
            self.cli_options, cli_remains = getopt.gnu_getopt(sys.argv[1:], "c:u:g:d:r:p:G",
                                                                      ["config=",
                                                                       "user=",
                                                                       "group=",
                                                                       "duid=",
                                                                       "really-do-it=",
                                                                       'prefix=',
                                                                       "generate-duid"])
            for opt, arg in self.cli_options:
                if opt in ("-c", "--config"):
                    configfile = arg
                if opt in ("-g", "--group"):
                    self.cli_group = arg
                if opt in ("-u", "--user"):
                    self.cli_user = arg
                if opt in ("-d", "--duid"):
                    self.cli_duid = arg
                if opt in ("-r", "--really-do-it"):
                    self.cli_really_do_it = arg
                if opt in ('-p', '--prefix'):
                    PREFIX = arg
                    self.PREFIX = PREFIX
                if opt in ("-G", "--generate-duid"):
                    print GenerateDUID()
                    sys.exit(0)

        except getopt.GetoptError, err:
            print err
            print USAGE
            sys.exit(1)

        if configfile == None:
           ErrorExit("No config file given - please use --config <config.file>")

        if os.path.exists(configfile):
            if not (os.path.isfile(configfile) or
               os.path.islink(configfile)):
                ErrorExit("Configuration file '%s' is no file or link." % (configfile))
        else:
            ErrorExit("Configuration file '%s' does not exist." % (configfile))

        # read config at once
        self.ReadConfig(configfile)
define defaults
dataset/ETHPy150Open HenriWahl/dhcpy6d/dhcpy6/Config.py/Config.__init__