Backend implements snix/platform.Backend via WinDivert on Windows.
| 24 | |
| 25 | // Backend implements snix/platform.Backend via WinDivert on Windows. |
| 26 | type Backend struct { |
| 27 | cfg Config |
| 28 | |
| 29 | mu sync.Mutex |
| 30 | opened bool |
| 31 | scope snixplatform.Scope |
| 32 | handle handleRaw |
| 33 | packets chan snixplatform.Packet |
| 34 | closed chan struct{} |
| 35 | reader sync.WaitGroup |
| 36 | // recvAddr is stored per-packet so Inject() can re-use it if needed. |
| 37 | // In our design the engine builds packets from scratch, so we only need |
| 38 | // to stash a representative outbound address for reinjection. |
| 39 | outboundAddr *Address |
| 40 | } |
| 41 | |
| 42 | // New constructs an unopened Backend. |
| 43 | func New(cfg Config) *Backend { |
nothing calls this directly
no outgoing calls
no test coverage detected