File Coverage

blib/lib/Socket/Netlink/Generic_const.pm
Criterion Covered Total %
statement 84 84 100.0
branch 2 4 50.0
condition n/a
subroutine 28 28 100.0
pod 2 2 100.0
total 116 118 98.3


line stmt bran cond sub pod time code
1             package Socket::Netlink::Generic;
2             # This module was generated automatically by ExtUtils::H2PM from lib/Socket/Netlink/Generic_const.pm.PL
3              
4 2     2   12 use Carp;
  2         6  
  2         299  
5             push @EXPORT, 'NETLINK_GENERIC', 'pack_genlmsghdr', 'unpack_genlmsghdr', 'CTRL_CMD_UNSPEC', 'CTRL_CMD_NEWFAMILY', 'CTRL_CMD_DELFAMILY', 'CTRL_CMD_GETFAMILY', 'CTRL_CMD_NEWOPS', 'CTRL_CMD_DELOPS', 'CTRL_CMD_GETOPS', 'CTRL_ATTR_UNSPEC', 'CTRL_ATTR_FAMILY_ID', 'CTRL_ATTR_FAMILY_NAME', 'CTRL_CMD_NEWMCAST_GRP', 'CTRL_CMD_DELMCAST_GRP', 'CTRL_CMD_GETMCAST_GRP', 'CTRL_ATTR_VERSION', 'CTRL_ATTR_HDRSIZE', 'CTRL_ATTR_MAXATTR', 'CTRL_ATTR_OPS', 'CTRL_ATTR_MCAST_GROUPS', 'CTRL_ATTR_OP_UNSPEC', 'CTRL_ATTR_OP_ID', 'CTRL_ATTR_OP_FLAGS', 'CTRL_ATTR_MCAST_GRP_UNSPEC', 'CTRL_ATTR_MCAST_GRP_NAME', 'CTRL_ATTR_MCAST_GRP_ID';
6 2     2   12 use constant NETLINK_GENERIC => 16;
  2         4  
  2         413  
7              
8             sub pack_genlmsghdr
9             {
10 5 50   5 1 15 @_ >= 2 or croak "usage: pack_genlmsghdr(cmd, version, [tail])";
11 5         12 my @v = @_;
12 5         54 pack "C C x2a*", @v;
13             }
14              
15             sub unpack_genlmsghdr
16             {
17 2 50   2 1 9 length $_[0] >= 4 or croak "unpack_genlmsghdr: expected 4 bytes, got " . length $_[0];
18 2         15 my @v = unpack "C C x2a*", $_[0];
19 2         9 @v;
20             }
21 2     2   12 use constant CTRL_CMD_UNSPEC => 0;
  2         4  
  2         107  
22 2     2   12 use constant CTRL_CMD_NEWFAMILY => 1;
  2         4  
  2         118  
23 2     2   9 use constant CTRL_CMD_DELFAMILY => 2;
  2         4  
  2         100  
24 2     2   11 use constant CTRL_CMD_GETFAMILY => 3;
  2         4  
  2         106  
25 2     2   14 use constant CTRL_CMD_NEWOPS => 4;
  2         4  
  2         109  
26 2     2   11 use constant CTRL_CMD_DELOPS => 5;
  2         4  
  2         96  
27 2     2   14 use constant CTRL_CMD_GETOPS => 6;
  2         4  
  2         124  
28 2     2   17 use constant CTRL_ATTR_UNSPEC => 0;
  2         3  
  2         84  
29 2     2   12 use constant CTRL_ATTR_FAMILY_ID => 1;
  2         11  
  2         108  
30 2     2   10 use constant CTRL_ATTR_FAMILY_NAME => 2;
  2         2  
  2         94  
31 2     2   10 use constant CTRL_CMD_NEWMCAST_GRP => 7;
  2         4  
  2         93  
32 2     2   10 use constant CTRL_CMD_DELMCAST_GRP => 8;
  2         4  
  2         105  
33 2     2   12 use constant CTRL_CMD_GETMCAST_GRP => 9;
  2         5  
  2         82  
34 2     2   17 use constant CTRL_ATTR_VERSION => 3;
  2         3  
  2         78  
35 2     2   10 use constant CTRL_ATTR_HDRSIZE => 4;
  2         4  
  2         84  
36 2     2   10 use constant CTRL_ATTR_MAXATTR => 5;
  2         3  
  2         66  
37 2     2   10 use constant CTRL_ATTR_OPS => 6;
  2         3  
  2         91  
38 2     2   9 use constant CTRL_ATTR_MCAST_GROUPS => 7;
  2         6  
  2         96  
39 2     2   17 use constant CTRL_ATTR_OP_UNSPEC => 0;
  2         4  
  2         76  
40 2     2   10 use constant CTRL_ATTR_OP_ID => 1;
  2         3  
  2         84  
41 2     2   11 use constant CTRL_ATTR_OP_FLAGS => 2;
  2         4  
  2         78  
42 2     2   16 use constant CTRL_ATTR_MCAST_GRP_UNSPEC => 0;
  2         3  
  2         94  
43 2     2   8 use constant CTRL_ATTR_MCAST_GRP_NAME => 1;
  2         4  
  2         80  
44 2     2   9 use constant CTRL_ATTR_MCAST_GRP_ID => 2;
  2         3  
  2         86  
45              
46             1;