line |
true |
false |
branch |
35
|
5 |
44 |
if @_ == 1 |
49
|
0 |
34 |
unless defined $name |
50
|
34 |
0 |
if exists $proto_number{$name} |
53
|
0 |
0 |
unless @proto |
61
|
0 |
34 |
unless defined $num |
62
|
34 |
0 |
if exists $proto_name{$num} |
65
|
0 |
0 |
unless @proto |
76
|
7 |
45 |
if defined $addr and $addr =~ s[:([\w\(\)/]+)$][] |
79
|
22 |
30 |
if (defined $proto and $proto =~ /\D/) |
81
|
0 |
22 |
unless (defined $num) |
88
|
10 |
42 |
if (defined $port) |
89
|
0 |
10 |
$port =~ s/\((\d+)\)$// ? : |
92
|
0 |
10 |
if $port =~ /\D/ |
96
|
0 |
10 |
unless (defined $port) |
101
|
0 |
10 |
if @serv and not $proto |
116
|
0 |
0 |
$_[0] =~ /^$title/ ? : |
117
|
0 |
0 |
if defined fileno $sock |
127
|
0 |
9 |
if ($multi and not $addr_str =~ /^\d+(?:\.\d+){3}$/) { } |
131
|
9 |
0 |
if defined $h |
142
|
0 |
34 |
if exists $arg->{'LocalHost'} and not exists $arg->{'LocalAddr'} |
147
|
0 |
34 |
unless ($laddr, $lport, $proto) = _sock_info($arg->{'LocalAddr'}, $arg->{'LocalPort'}, $arg->{'Proto'}) |
149
|
22 |
12 |
defined $laddr ? : |
152
|
0 |
34 |
unless defined $laddr |
156
|
0 |
34 |
if exists $arg->{'PeerHost'} and not exists $arg->{'PeerAddr'} |
158
|
18 |
16 |
unless (exists $arg->{'Listen'}) |
161
|
0 |
18 |
unless ($raddr, $rport, $proto) = _sock_info($arg->{'PeerAddr'}, $arg->{'PeerPort'}, $proto) |
171
|
10 |
24 |
if (defined $raddr) |
173
|
0 |
10 |
unless @raddr |
179
|
0 |
36 |
unless $sock->socket(2, $type, $proto) |
182
|
1 |
35 |
if (defined $arg->{'Blocking'}) |
184
|
0 |
1 |
unless defined $sock->blocking($arg->{'Blocking'}) |
187
|
0 |
36 |
if ($arg->{'Reuse'} or $arg->{'ReuseAddr'}) |
188
|
0 |
0 |
unless $sock->sockopt(2, 1) |
192
|
0 |
36 |
if ($arg->{'ReusePort'}) |
193
|
0 |
0 |
unless $sock->sockopt(15, 1) |
197
|
0 |
36 |
if ($arg->{'Broadcast'}) |
198
|
0 |
0 |
unless $sock->sockopt(6, 1) |
202
|
23 |
13 |
if ($lport or $laddr ne "\0\0\0\0" or exists $arg->{'Listen'}) |
203
|
0 |
23 |
unless $sock->bind($lport || 0, $laddr) |
207
|
16 |
20 |
if (exists $arg->{'Listen'}) |
208
|
0 |
16 |
unless $sock->listen($arg->{'Listen'} || 5) |
214
|
8 |
12 |
unless exists $arg->{'PeerAddr'} |
218
|
0 |
0 |
unless $rport or $type == 2 or $type == 3 |
222
|
0 |
12 |
unless $type == 1 or defined $raddr |
224
|
0 |
12 |
unless defined $raddr |
231
|
10 |
2 |
if ($sock->connect(pack_sockaddr_in($rport, $raddr))) |
236
|
0 |
2 |
unless @raddr |
253
|
0 |
11 |
unless @_ == 2 or @_ == 3 |
256
|
11 |
0 |
@_ == 1 ? : |
260
|
0 |
23 |
unless @_ == 2 or @_ == 3 |
263
|
0 |
23 |
@_ == 1 ? : |
267
|
0 |
0 |
unless @_ == 1 |
270
|
0 |
0 |
$name ? : |
274
|
0 |
18 |
unless @_ == 1 |
277
|
18 |
0 |
$name ? : |
281
|
0 |
0 |
unless @_ == 1 |
284
|
0 |
0 |
$addr ? : |
288
|
0 |
0 |
unless @_ == 1 |
291
|
0 |
0 |
$name ? : |
295
|
0 |
0 |
unless @_ == 1 |
298
|
0 |
0 |
$name ? : |
302
|
0 |
0 |
unless @_ == 1 |
305
|
0 |
0 |
$addr ? : |