Vendor github.com/mdlayher/wifi and dependencies
This commit is contained in:
parent
e9cea11553
commit
82a2b8fc02
34 changed files with 8970 additions and 0 deletions
26
vendor/github.com/mdlayher/netlink/sockopt_linux.go
generated
vendored
Normal file
26
vendor/github.com/mdlayher/netlink/sockopt_linux.go
generated
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
// +build linux,!386
|
||||
|
||||
package netlink
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
// setsockopt provides access to the setsockopt syscall.
|
||||
func setsockopt(fd, level, name int, v unsafe.Pointer, l uint32) error {
|
||||
_, _, errno := syscall.Syscall6(
|
||||
syscall.SYS_SETSOCKOPT,
|
||||
uintptr(fd),
|
||||
uintptr(level),
|
||||
uintptr(name),
|
||||
uintptr(v),
|
||||
uintptr(l),
|
||||
0,
|
||||
)
|
||||
if errno != 0 {
|
||||
return error(errno)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue