NAME

Udev::FFI::Monitor

SYNOPSIS

use Udev::FFI;

my $udev = Udev::FFI->new() or
    die("Can't create Udev::FFI object: $@");

my $monitor = $udev->new_monitor() or
    die("Can't create udev monitor: $@");

$monitor->filter_by_subsystem_devtype('usb');

$monitor->start();

for (;;) {
    my $device = $monitor->poll(); # blocking read

    print('ACTION: '.$device->get_action()."\n");
    print('SYSNAME: '.$device->get_sysname()."\n");
    print('DEVPATH: '.$device->get_devpath()."\n");
}

METHODS

set_receive_buffer_size( BYTES )

Set the size of the kernel socket buffer. This call needs the appropriate privileges to succeed.

Returns: 1 on success, otherwise 0 on error.

filter_by_subsystem_devtype( SUBSYSTEM [, DEVTYPE] )

filter_by_tag( TAG )

filter_update()

filter_remove()

start()

poll( [TIMEOUT] )

is_started()

get_udev()

SEE ALSO

Udev::FFI main Udev::FFI documentation