mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
syscall: linux, implement BindToDevice
R=rsc CC=adg, golang-dev, r https://golang.org/cl/1253043
This commit is contained in:
parent
5265857ac4
commit
37a6adf1d3
1 changed files with 5 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue