summaryrefslogtreecommitdiff
path: root/src/pkg/syscall/syscall_linux.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/syscall/syscall_linux.go')
-rw-r--r--src/pkg/syscall/syscall_linux.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pkg/syscall/syscall_linux.go b/src/pkg/syscall/syscall_linux.go
index 39ab10309..c0f580c7b 100644
--- a/src/pkg/syscall/syscall_linux.go
+++ b/src/pkg/syscall/syscall_linux.go
@@ -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) {