Commit 37a6adf1 authored by Christopher Wedgwood's avatar Christopher Wedgwood Committed by Russ Cox

syscall: linux, implement BindToDevice

R=rsc
CC=adg, golang-dev, r
https://golang.org/cl/1253043
parent 5265857a
......@@ -403,6 +403,11 @@ func Sendto(fd int, p []byte, flags int, to Sockaddr) (errno int) {
return sendto(fd, p, flags, ptr, n)
}
// BindToDevice binds the socket associated with fd to device.
func BindToDevice(fd int, device string) (errno int) {
return SetsockoptString(fd, SOL_SOCKET, SO_BINDTODEVICE, device)
}
//sys ptrace(request int, pid int, addr uintptr, data uintptr) (errno int)
func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, errno int) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment