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   7 use Carp;
  2         3  
  2         209  
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   9 use constant NETLINK_GENERIC => 16;
  2         3  
  2         346  
7              
8             sub pack_genlmsghdr
9             {
10 5 50   5 1 10 @_ >= 2 or croak "usage: pack_genlmsghdr(cmd, version, [tail])";
11 5         10 my @v = @_;
12 5         73 pack "C C x2a*", @v;
13             }
14              
15             sub unpack_genlmsghdr
16             {
17 2 50   2 1 6 length $_[0] >= 4 or croak "unpack_genlmsghdr: expected 4 bytes, got " . length $_[0];
18 2         12 my @v = unpack "C C x2a*", $_[0];
19 2         6 @v;
20             }
21 2     2   10 use constant CTRL_CMD_UNSPEC => 0;
  2         2  
  2         93  
22 2     2   7 use constant CTRL_CMD_NEWFAMILY => 1;
  2         2  
  2         81  
23 2     2   6 use constant CTRL_CMD_DELFAMILY => 2;
  2         4  
  2         89  
24 2     2   7 use constant CTRL_CMD_GETFAMILY => 3;
  2         3  
  2         93  
25 2     2   7 use constant CTRL_CMD_NEWOPS => 4;
  2         3  
  2         74  
26 2     2   6 use constant CTRL_CMD_DELOPS => 5;
  2         2  
  2         88  
27 2     2   7 use constant CTRL_CMD_GETOPS => 6;
  2         2  
  2         79  
28 2     2   6 use constant CTRL_ATTR_UNSPEC => 0;
  2         4  
  2         73  
29 2     2   8 use constant CTRL_ATTR_FAMILY_ID => 1;
  2         2  
  2         82  
30 2     2   6 use constant CTRL_ATTR_FAMILY_NAME => 2;
  2         2  
  2         73  
31 2     2   8 use constant CTRL_CMD_NEWMCAST_GRP => 7;
  2         1  
  2         84  
32 2     2   7 use constant CTRL_CMD_DELMCAST_GRP => 8;
  2         1  
  2         75  
33 2     2   7 use constant CTRL_CMD_GETMCAST_GRP => 9;
  2         3  
  2         75  
34 2     2   8 use constant CTRL_ATTR_VERSION => 3;
  2         1  
  2         77  
35 2     2   7 use constant CTRL_ATTR_HDRSIZE => 4;
  2         2  
  2         94  
36 2     2   7 use constant CTRL_ATTR_MAXATTR => 5;
  2         2  
  2         89  
37 2     2   7 use constant CTRL_ATTR_OPS => 6;
  2         2  
  2         84  
38 2     2   7 use constant CTRL_ATTR_MCAST_GROUPS => 7;
  2         1  
  2         78  
39 2     2   6 use constant CTRL_ATTR_OP_UNSPEC => 0;
  2         2  
  2         98  
40 2     2   8 use constant CTRL_ATTR_OP_ID => 1;
  2         2  
  2         75  
41 2     2   7 use constant CTRL_ATTR_OP_FLAGS => 2;
  2         2  
  2         78  
42 2     2   7 use constant CTRL_ATTR_MCAST_GRP_UNSPEC => 0;
  2         2  
  2         93  
43 2     2   7 use constant CTRL_ATTR_MCAST_GRP_NAME => 1;
  2         2  
  2         71  
44 2     2   7 use constant CTRL_ATTR_MCAST_GRP_ID => 2;
  2         2  
  2         79  
45              
46             1;