()
| 240 | } |
| 241 | |
| 242 | func (v *VirtualHarness) Stop() { |
| 243 | println("Stopping VirtualHarness") |
| 244 | v.Cancel(fmt.Errorf("stopping harness")) |
| 245 | for idx, _ := range v.Central.Routers { |
| 246 | v.Nylons[idx].Load().Stop() |
| 247 | } |
| 248 | v.Net.Stop() |
| 249 | println("Stopped VirtualHarness") |
| 250 | } |
| 251 | |
| 252 | type PacketFilter func(node state.NodeId, src, dst netip.Addr, data []byte) bool // return true to intercept, and stop the rest of the stack |
| 253 | func (h PacketFilter) TryApply(node state.NodeId, src, dst netip.Addr, data []byte) bool { |