diff --git a/dhcp/midasd.py b/dhcp/midasd.py index ba92ba0..101625c 100644 --- a/dhcp/midasd.py +++ b/dhcp/midasd.py @@ -130,6 +130,7 @@ class Packet(): _type: type of packet to construct, Offer or Ack source_ip: IP address that the DHCP packet was received from topology: networkx Graph object detailing the network topology + settings: settings file containing DHCP and TFTP server IPs, required for the packet contents Returns: DHCP packet of type Offer or Ack @@ -294,6 +295,10 @@ class Packet(): class DHCPServer(object): def __init__(self, SETTINGS_FILE): + ''' + Summary: + Constructs the DHCPServer object using the contents of the settings YAML file. + ''' self.SETTINGS = yaml.load(open(SETTINGS_FILE), Loader=yaml.SafeLoader) self.DHCP_SERVER_IP = self.SETTINGS['DHCP']['SERVER_IP'] self.DHCP_SERVER_PORT = self.SETTINGS['DHCP']['SERVER_PORT']