1IO::Socket::Netlink::GeUnseerricC(o3n)tributed Perl DocuImOe:n:tSaotcikoent::Netlink::Generic(3)
2
3
4

NAME

6       "IO::Socket::Netlink::Generic" - Object interface to "NETLINK_GENERIC"
7       netlink protocol sockets
8

SYNOPSIS

10        use IO::Socket::Netlink::Generic;
11
12        my $genlsock = IO::Socket::Netlink::Generic->new or die "socket: $!";
13
14        printf "TASKSTATS family ID is %d\n",
15           $genlsock->get_family_by_name( "TASKSTATS" )->{id};
16

DESCRIPTION

18       This subclass of IO::Socket::Netlink implements the "NETLINK_GENERIC"
19       protocol. It is itself intended to serve as a base class for particular
20       generic families to extend.
21

CLASS METHODS

23   register_family_name
24          $class->register_family_name( $name )
25
26       Must be called by a subclass implementing a particular protocol family,
27       to declare its family name. The first time a socket in that class is
28       constructed, this name will be looked up into an ID number.
29

METHODS

31   get_family_by_name
32          $family = $sock->get_family_by_name( $name )
33
34   get_family_by_id
35          $family = $sock->get_family_by_id( $id )
36
37       Query the kernel for information on the "NETLINK_GENERIC" family
38       specifed by name or ID number, and return information about it. Returns
39       a HASH reference containing the following fields:
40
41       id => NUMBER
42       name => STRING
43       version => NUMBER
44       hdrsize => NUMBER
45       maxattr => NUMBER
46

MESSAGE OBJECTS

48       Sockets in this class provide the following extra field accessors on
49       their message objects:
50
51       ·       $message->cmd
52
53               ID number of the command to give to the family
54
55       ·       $message->version
56
57               Version number of the interface
58
59       ·       $message->genlmsg
60
61               Accessor for the trailing data buffer; intended for subclasses
62               to use
63

SEE ALSO

65       ·   Socket::Netlink::Generic - interface to Linux's "NETLINK_GENERIC"
66           netlink socket protocol
67
68       ·   IO::Socket::Netlink - Object interface to "AF_NETLINK" domain
69           sockets
70

AUTHOR

72       Paul Evans <leonerd@leonerd.org.uk>
73
74
75
76perl v5.32.0                      2020-07-28   IO::Socket::Netlink::Generic(3)
Impressum