github.com/dylandreimerink/gobpfld@v0.6.1-0.20220205171531-e79c330ad608/internal/syscall/ioctl.go (about)

     1  package syscall
     2  
     3  import "golang.org/x/sys/unix"
     4  
     5  func IOCtl(fd int, req uint, arg uintptr) (err error) {
     6  	_, _, e1 := unix.Syscall(unix.SYS_IOCTL, uintptr(fd), uintptr(req), arg)
     7  	if e1 != 0 {
     8  		err = &Error{
     9  			Errno: e1,
    10  		}
    11  	}
    12  	return
    13  }