syscall: GetsockoptInt.

R=rsc, iant
CC=golang-dev
https://golang.org/cl/4271060
This commit is contained in:
Albert Strasheim 2011-03-23 14:33:48 -04:00 committed by Russ Cox
parent f2483c74f6
commit c6810e76ed
7 changed files with 33 additions and 4 deletions

View file

@ -130,6 +130,11 @@ func socket(domain int, typ int, proto int) (fd int, errno int) {
return
}
func getsockopt(s int, level int, name int, val uintptr, vallen *_Socklen) (errno int) {
_, errno = socketcall(_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
return
}
func setsockopt(s int, level int, name int, val uintptr, vallen int) (errno int) {
_, errno = socketcall(_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
return