mirror of
https://github.com/luscis/openlan.git
synced 2025-10-07 17:40:54 +08:00
clone from danieldin95
This commit is contained in:
17
vendor/github.com/shadowsocks/go-shadowsocks2/nfutil/socketcall_linux_386.go
generated
vendored
Normal file
17
vendor/github.com/shadowsocks/go-shadowsocks2/nfutil/socketcall_linux_386.go
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
package nfutil
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
const GETSOCKOPT = 15 // https://golang.org/src/syscall/syscall_linux_386.go#L183
|
||||
|
||||
func socketcall(call, a0, a1, a2, a3, a4, a5 uintptr) error {
|
||||
var a [6]uintptr
|
||||
a[0], a[1], a[2], a[3], a[4], a[5] = a0, a1, a2, a3, a4, a5
|
||||
if _, _, errno := syscall.Syscall6(syscall.SYS_SOCKETCALL, call, uintptr(unsafe.Pointer(&a)), 0, 0, 0, 0); errno != 0 {
|
||||
return errno
|
||||
}
|
||||
return nil
|
||||
}
|
Reference in New Issue
Block a user