Documentation
¶
Overview ¶
Package uevent implements a Linux kernel uevent reader and decoder. The reader uses a Netlink (AF_NETLINK) socket to listen to kernel udev events (see netlink(7)). The decoder takes an arbitrary io.Reader and decodes Uevent objects.
Index ¶
Constants ¶
View Source
const NETLINK_KOBJECT_UEVENT = 15
NETLINK_KOBJECT_UEVENT is the socket protocol for kernel uevent, see /usr/include/linux/netlink.h
Variables ¶
This section is empty.
Functions ¶
func NewReader ¶
func NewReader() (io.ReadCloser, error)
NewReader returns a new netlink socket reader. It opens a raw AF_NETLINK domain socket using the uevent protocol and binds it to the PID of the calling program.
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder decodes uevents from a reader.
func NewDecoder ¶
NewDecoder creates an uevent decoder using the given reader to read uevents from.
Click to show internal directories.
Click to hide internal directories.