Beispiel #1
0
    def __init__(self,
                 configfile='proxy.ini',
                 client_port=68,
                 server_port=67,
                 shared_acl=None,
                 shared_map=None):

        self.client_port = int(client_port)
        self.server_port = int(server_port)
        self.config = parse_config(configfile)
        DhcpServerBase.__init__(self, self.config['proxy']["listen_address"],
                                self.client_port, self.server_port)
        self.log(
            'info', "Starting DHCP on ports client: %s, server: %s" %
            (self.client_port, self.server_port))

        #ip_pool
        # start_ip should be something like [192.168.1.100]
        self.start_ip = map(int, self.config['network']["ip_start"].split("."))
        self.pool_size = int(self.config['network']["pool_size"])
        if self.start_ip[3] + self.pool_size >= 255:
            self.log(
                'error',
                "Defined start ip address and pool size is too big for class C subnet"
            )

        # Shared objects for access control
        self.acl = shared_acl
        self.mac_to_ip = shared_map

        # Keep track of what file each mac is booting
        self.mac_to_bootfile = {}
Beispiel #2
0
 def __init__(self,configfile='proxy.ini',client_port=68,server_port=67):
     
     self.client_port = int(client_port)
     self.server_port = int(server_port)
     self.config = parse_config(configfile)
     DhcpServerBase.__init__(self,self.config['proxy']["listen_address"],self.client_port,self.server_port)
     self.log('info',"Starting DHCP on ports client: %s, server: %s"%(self.client_port,self.server_port))
Beispiel #3
0
 def __init__(self,
              configfile='proxy.ini',
              client_port=68,
              server_port=4011):
     self.config = parse_config(configfile)
     self.client_port = client_port
     self.server_port = server_port
     DHCPD.__init__(self, configfile, server_port=server_port)
Beispiel #4
0
    def __init__(self, configfile='proxy.ini', client_port=68, server_port=67):

        self.client_port = int(client_port)
        self.server_port = int(server_port)
        self.config = parse_config(configfile)
        DhcpServerBase.__init__(self, self.config['proxy']["listen_address"],
                                self.client_port, self.server_port)
        self.log(
            'info', "Starting DHCP on ports client: %s, server: %s" %
            (self.client_port, self.server_port))
Beispiel #5
0
    def __init__(self,configfile='proxy.ini',client_port=68,server_port=67,
                 shared_acl=None,
                 shared_map=None):
                
        self.client_port = int(client_port)
        self.server_port = int(server_port)
        self.config = parse_config(configfile)
        DhcpServerBase.__init__(self,self.config['proxy']["listen_address"],self.client_port,self.server_port)
        self.log('info',"Starting DHCP on ports client: %s, server: %s"%(self.client_port,self.server_port))

        #ip_pool
        # start_ip should be something like [192.168.1.100]
        self.start_ip = map(int, self.config['network']["ip_start"].split("."))
        self.pool_size = int(self.config['network']["pool_size"])
        if self.start_ip[3] + self.pool_size >= 255:
            self.log('error', "Defined start ip address and pool size is too big for class C subnet")

        # Shared objects for access control
        self.acl = shared_acl
        self.mac_to_ip = shared_map
        
        # Keep track of what file each mac is booting
        self.mac_to_bootfile = {}
Beispiel #6
0
 def __init__(self,configfile='proxy.ini',client_port=68,server_port=67):
     self.config = parse_config(configfile)
     self.client_port = client_port
     self.server_port = server_port
     DHCPD.__init__(self,configfile,server_port=server_port)