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

Function SetParam

platform/windows/windivert_api.go:165–172  ·  view source on GitHub ↗

SetParam tunes a kernel parameter on an open handle.

(h handleRaw, param uint32, value uint64)

Source from the content-addressed store, hash-verified

163
164// SetParam tunes a kernel parameter on an open handle.
165func SetParam(h handleRaw, param uint32, value uint64) error {
166 r1, _, e1 := procWinDivertSetParam.Call(
167 uintptr(h), uintptr(param), uintptr(value))
168 if r1 == 0 {
169 return fmt.Errorf("WinDivertSetParam(%d,%d): %w", param, value, translateErr(e1))
170 }
171 return nil
172}
173
174// Windows errno values WinDivert returns. Exposed as typed constants so
175// callers (the backend recv loop) can recognize graceful-close without

Callers 1

OpenMethod · 0.85

Calls 1

translateErrFunction · 0.85

Tested by

no test coverage detected