Help for this page

Select Code to Download


  1. or download this
    use Socket;
    use strict;
    ...
      return(~(($chk >> 16) + $chk) & 0xffff);
    }
    
  2. or download this
    use Socket;
    
    ...
    print "the value of checksum is:", unpack('H4', pack('n',32127)), "\n"
    +;
    print "[And you should see this in your tcpdump -i lo icmp -xxx]\n";
    send(SOCK,$msg,0,sockaddr_in(0,inet_aton('localhost'))) || die "Error:
    + $! \n";