Help for this page

Select Code to Download


  1. or download this
    use strict;
    use Socket;
    ...
      $chk = ($chk >> 16) + ($chk & 0xffff); # Foldhigh into low
      return(~(($chk >> 16) + $chk) & 0xffff); # Again and complement
    }
    
  2. or download this
      my $buff;
      defined(recv(SOCK,$buff,256,0)) or die "error: $! \n";
    ...
        print "not an icmp reply\n";
      }
    }