Files
trojan-go/tunnel/tproxy/getsockopt_i386.go
T
LoyalsoldierandGitHub 2dc60f52e7 Chore: format code & update dependencies (#385)
* Chore: check Go modules before test & update dependencies
* Chore: run go fmt to format code
2021-09-14 15:41:24 +08:00

22 lines
401 B
Go

//go:build linux && 386
// +build linux,386
package tproxy
import (
"syscall"
"unsafe"
)
const GETSOCKOPT = 15
func getsockopt(fd int, level int, optname int, optval unsafe.Pointer, optlen *uint32) (err error) {
_, _, e := syscall.Syscall6(
GETSOCKOPT, uintptr(fd), uintptr(level), uintptr(optname),
uintptr(optval), uintptr(unsafe.Pointer(optlen)), 0)
if e != 0 {
return e
}
return
}