ioctl

package
v0.0.0-...-b79a0d8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package ioctl uses IOCTL's to find block device size, adjust network interface state, etc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlkGetSectorSize

func BlkGetSectorSize(f FDer) (uint64, error)

BLKSSZGET

func BlkGetSize64

func BlkGetSize64(f FDer) (uint64, error)

BLKGETSIZE64

func GetIfFlags

func GetIfFlags(fd int, name string) (uint16, error)

func Ioctl1

func Ioctl1(fd uintptr, cmd int) (res uint64, err error)

func NicIsUp

func NicIsUp(name string) (up bool)

return true if no errors and nic is up, false otherwise

func SetIfFlags

func SetIfFlags(fd int, name string, flags uint16) error

func SetNicState

func SetNicState(name string, up bool) error

Types

type FDer

type FDer interface {
	Fd() uintptr
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL