Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def on_flow_init(self, flow):
NFStreamClassifier.on_flow_init(self, flow)
flow.classifiers[self.name]['ndpi_flow'] = NDPIFlowStruct()
memset(byref(flow.classifiers[self.name]['ndpi_flow']), 0, sizeof(NDPIFlowStruct))
flow.classifiers[self.name]['detected_protocol'] = NDPIProtocol()
flow.classifiers[self.name]['detection_completed'] = 0
flow.classifiers[self.name]['src_id'] = pointer(NDPIIdStruct())
flow.classifiers[self.name]['dst_id'] = pointer(NDPIIdStruct())
flow.classifiers[self.name]['application_name'] = ''
flow.classifiers[self.name]['category_name'] = ''
flow.classifiers[self.name]['guessed'] = 0