return true to intercept, and stop the rest of the stack
(node state.NodeId, src, dst netip.Addr, data []byte)
| 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 { |
| 254 | if h == nil { |
| 255 | return false |
| 256 | } |
| 257 | return h(node, src, dst, data) |
| 258 | } |
| 259 | |
| 260 | type OutMapping func(curNode state.NodeId, to bindtest.ChannelEndpoint2) bindtest.ChannelEndpoint2 |
| 261 |