if 'nw_udp_listen' in obj.conf:
ip, sep, port = obj.conf['nw_udp_listen'].rpartition(':')
if not ip:
ip = '0.0.0.0'
dest = 'udp:' + ip + ':' + port
if dest not in self.special_listeners:
if self.add_listener('udp', ip, port):
self.special_listeners[dest][obj_type + 's'][oid] = {obj_type: obj, 'acl': acl}
else:
self.logger.warning("Could not add listener {} for {}".format(dest, oid))
else:
self.special_listeners[dest][obj_type + 's'][oid] = {obj_type: obj, 'acl': acl}
if generic:
self.generic_listeners[dest] = {'items': {}, 'logics': {}, 'acl': acl}
else:
self.special_listeners[dest] = {'items': {}, 'logics': {}, 'acl': acl}