+ def _configure_traces(self):
+ if self.trace_enabled("pcap"):
+ helper_uuid = self.device_helper_uuid
+
+ filename = "trace-pcap-netdev-%d.pcap" % self.guid
+ self._trace_filename["pcap"] = filename
+
+ filepath = self.simulation.trace_filepath(filename)
+
+ self.simulation.invoke(helper_uuid, "EnablePcap", filepath,
+ self.uuid, promiscuous = False, explicitFilename = True)
+
+ if self.trace_enabled("promiscPcap"):
+ helper_uuid = self.device_helper_uuid
+
+ filename = "trace-promisc-pcap-netdev-%d.pcap" % self.guid
+ self._trace_filename["promiscPcap"] = filename
+
+ filepath = self.simulation.trace_filepath(filename)
+
+ self.simulation.invoke(helper_uuid, "EnablePcap", filepath,
+ self.uuid, promiscuous = True, explicitFilename = True)
+
+ if self.trace_enabled("ascii"):
+ helper_uuid = self.device_helper_uuid
+ ascii_helper_uuid = self.ascii_helper_uuid
+
+ filename = "trace-ascii-netdev-%d.tr" % self.guid
+ self._trace_filename["ascii"] = filename
+
+ filepath = self.simulation.trace_filepath(filename)
+ stream_uuid = self.simulation.invoke(ascii_helper_uuid,
+ "CreateFileStream", filepath)
+ self.simulation.invoke(helper_uuid, "EnableAscii", stream_uuid,
+ self.uuid)
+