MCPcopy Create free account
hub / github.com/FiloSottile/captive-browser / bindToDevice

Function bindToDevice

bind_device_linux.go:8–17  ·  view source on GitHub ↗
(device string)

Source from the content-addressed store, hash-verified

6)
7
8func bindToDevice(device string) func(network, address string, c syscall.RawConn) error {
9 return func(network, address string, c syscall.RawConn) error {
10 return c.Control(func(fd uintptr) {
11 err := syscall.BindToDevice(int(fd), device)
12 if err != nil {
13 log.Fatalf("Failed to bind to %q: %s", device, err)
14 }
15 })
16 }
17}

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected