Lines Matching refs:fh

222     $self->{fh} = FileHandle->new();
223 socket($self->{fh}, PF_INET, SOCK_DGRAM,
234 $self->{fh} = FileHandle->new();
235 socket($self->{fh}, PF_INET, SOCK_RAW, $self->{proto_num}) ||
239 setsockopt($self->{fh}, IPPROTO_IP, IP_TTL, pack("I*", $self->{'ttl'}))
252 $self->{fh} = FileHandle->new();
253 socket($self->{fh}, $AF_INET6, SOCK_RAW, $self->{proto_num}) ||
265 setsockopt($self->{fh}, $IPPROTO_IPV6, $IPV6_NEXTHOP, _pack_sockaddr_in($ip))
270 setsockopt($self->{fh}, $IPPROTO_IPV6, $IPV6_USE_MIN_MTU,
276 setsockopt($self->{fh}, $IPPROTO_IPV6, $IPV6_RECVPATHMTU,
282 setsockopt($self->{fh}, $proto, IP_TOS, pack("I*", $self->{'tos'}))
287 setsockopt($self->{fh}, $proto, IP_TTL, pack("I*", $self->{'ttl'}))
298 $self->{fh} = FileHandle->new();
310 $self->{fh} = FileHandle->new();
479 setsockopt($self->{fh}, $IPPROTO_IPV6, $IPV6_USE_MIN_MTU,
501 setsockopt($self->{fh}, $IPPROTO_IPV6, $IPV6_RECVPATHMTU,
530 $fh, # the file handle whose flags are to be modified
541 ioctl($fh, $f, $v) or croak("ioctl failed: $!");
544 if ($flags = fcntl($fh, F_GETFL, 0)) {
546 if (!fcntl($fh, F_SETFL, $flags)) {
718 socket($self->{fh}, $ip->{family}, SOCK_RAW, $self->{proto_num}) ||
722 !CORE::bind($self->{fh}, _pack_sockaddr_in(0, $self->{local_addr}))) {
762 send($self->{fh}, $msg, ICMP_FLAGS, $saddr); # Send the message
765 vec($rbits, $self->{fh}->fileno(), 1) = 1;
783 $from_saddr = recv($self->{fh}, $recv_msg, 1500, ICMP_FLAGS);
899 $self->{fh}->close();
919 socket($self->{fh}, $ip->{family}, SOCK_STREAM, $self->{proto_num}) ||
922 !CORE::bind($self->{fh}, _pack_sockaddr_in(0, $self->{local_addr}))) {
931 return ($ret = connect($self->{fh}, $saddr) || ($! == ECONNREFUSED && !$self->{econnrefused}));
935 $self->socket_blocking_mode($self->{fh}, 0);
938 if (!connect($self->{fh}, $saddr)) {
954 vec($wbits, $self->{fh}->fileno, 1) = 1;
962 if ($nfound && vec($wout, $self->{fh}->fileno, 1)) {
967 if (getpeername($self->{fh})) {
976 sysread($self->{fh},$char,1);
990 if ($nfound && vec($wexc, $self->{fh}->fileno, 1)) {
991 $! = unpack("i", getsockopt($self->{fh}, SOL_SOCKET,
1003 $self->socket_blocking_mode($self->{fh}, 1);
1028 $self->{fh}->close();
1109 vec($rin, $self->{fh}->fileno(), 1) = 1;
1114 vec($rout, $self->{fh}->fileno(), 1) = 1;
1119 if($rout && vec($rout,$self->{fh}->fileno(),1)) {
1120 my $num = syswrite($self->{fh}, $wrstr, length $wrstr);
1130 if(vec($rin,$self->{fh}->fileno(),1)) {
1132 if(sysread($self->{fh},$reply,length($pingstring)-length($rdstr))) {
1160 if(!defined $self->{fh}->fileno()) {
1201 if (defined($self->{fh}->fileno())) {
1216 setsockopt($self->{fh}, IPPROTO_IP, $IP_DONTFRAG, pack("I*", $i))
1225 setsockopt($self->{fh}, IPPROTO_IP, IP_MTU_DISCOVER, pack("I*", $i))
1235 setsockopt($self->{fh}, SOL_SOCKET, SO_BINDTODEVICE, pack("Z*", $self->{'device'}))
1239 setsockopt($self->{fh}, IPPROTO_IP, IP_TOS, pack("I*", $self->{'tos'}))
1282 socket($self->{fh}, $ip->{family}, SOCK_DGRAM,
1287 !CORE::bind($self->{fh}, _pack_sockaddr_in(0, $self->{local_addr}))) {
1313 socket($self->{fh}, $ip->{family}, SOCK_DGRAM,
1320 connect($self->{fh}, $saddr); # Tie destination to socket
1323 send($self->{fh}, $msg, UDP_FLAGS); # Send it
1326 vec($rbits, $self->{fh}->fileno(), 1) = 1;
1351 $from_saddr = recv($self->{fh}, $from_msg, 1500, UDP_FLAGS);
1382 if (send($self->{fh}, $msg, UDP_FLAGS)) {
1413 my $fh = FileHandle->new();
1417 if (!socket ($fh, $ip->{family}, SOCK_STREAM, $self->{proto_num})) {
1422 !CORE::bind($fh, _pack_sockaddr_in(0, $self->{local_addr}))) {
1428 $self->socket_blocking_mode($fh, 0);
1432 if (connect($fh, $saddr)) {
1449 my $entry = [ $host, $ip, $fh, $start_time, $stop_time, $self->{port_num} ];
1450 $self->{syn}->{$fh->fileno} = $entry;
1454 vec($self->{wbits}, $fh->fileno, 1) = 1;
1479 if (!socket ($self->{fh}, $ip->{family}, SOCK_STREAM, $self->{proto_num})) {
1484 !CORE::bind($self->{fh}, _pack_sockaddr_in(0, $self->{local_addr}))) {
1492 connect($self->{fh}, $saddr);
1758 $self->{fh}->close();
2250 =item $p->socket_blocking_mode( $fh, $mode );