import collections
+# these need to be defined here so that they can be imported by import *
cfg = ConfigParser()
optparser = OptionParser()
+class ConfigResults:
+ def __init__(self, d = { }):
+ self.__dict__ = d
+ def __repr__(self):
+ return 'ConfigResults('+repr(self.__dict__)+')'
+
+c = ConfigResults()
+
#---------- packet parsing ----------
def packet_addrs(packet):
if event.get('log_level') >= LogLevel.critical:
crash(twisted.logger.formatEvent(event))
+#---------- config processing ----------
+
+def process_cfg_common_always():
+ global mtu
+ c.mtu = cfg.get('virtual','mtu')
+
#---------- startup ----------
def common_startup(defcfg):