line |
true |
false |
branch |
18
|
0 |
0 |
unless defined $message |
25
|
0 |
0 |
if ($^O eq 'darwin') { } |
|
0 |
0 |
elsif ($^O eq 'linux') { } |
27
|
0 |
0 |
unless open NETSTAT, '-|', 'netstat', '-rlnf', 'inet' |
29
|
0 |
0 |
if /^default\s+(\d+\.\d+\.\d+\.\d+)/ |
33
|
0 |
0 |
unless open ROUTE, '<', '/proc/net/route' |
35
|
0 |
0 |
if /^\S+\s+00000000\s+([0-9A-F]+)/ |
40
|
0 |
0 |
if $gateway |
52
|
0 |
0 |
$$self{'socket'} ? : |
58
|
0 |
0 |
unless defined $self->socket->send(pack('CC', Version(), $op)) |
60
|
0 |
0 |
unless defined $self->socket->recv($packet, 12) |
63
|
0 |
0 |
unless $response{'op'} == 128 + $op |
64
|
0 |
0 |
unless $response{'result_code'} == 0 |
71
|
0 |
0 |
unless defined $external_port |
72
|
0 |
0 |
unless defined $lifetime_seconds |
73
|
0 |
0 |
$udp ? : |
74
|
0 |
0 |
unless defined $self->socket->send(pack('CCnnnN', Version(), $op, 0, $internal_port, $external_port, $lifetime_seconds)) |
76
|
0 |
0 |
unless defined $self->socket->recv($packet, 16) |
79
|
0 |
0 |
unless $response{'op'} == 128 + $op |
80
|
0 |
0 |
unless $response{'result_code'} == 0 |