MCPcopy Create free account
hub / github.com/SamNet-dev/snix / Backend

Struct Backend

platform/windows/backend.go:26–40  ·  view source on GitHub ↗

Backend implements snix/platform.Backend via WinDivert on Windows.

Source from the content-addressed store, hash-verified

24
25// Backend implements snix/platform.Backend via WinDivert on Windows.
26type 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.
43func New(cfg Config) *Backend {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected