#1706 - Applied some final changes from PR. Fixed the PCAP log name on SwitchPort so that a pcap file is generated for each port.

This commit is contained in:
Chris McCarthy
2023-08-10 13:26:51 +01:00
parent ad81a81949
commit 9ee0ef2fd6
8 changed files with 35 additions and 24 deletions

View File

@@ -308,7 +308,7 @@ class SwitchPort(SimComponent):
self.enabled = True
self.connected_node.sys_log.info(f"SwitchPort {self} enabled")
self.pcap = PacketCapture(hostname=self.connected_node.hostname)
self.pcap = PacketCapture(hostname=self.connected_node.hostname, switch_port_number=self.port_num)
if self.connected_link:
self.connected_link.endpoint_up()