Ethereal-cvs: [ethereal-cvs] cvs commit: ethereal packet-ip.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Sat, 5 Aug 2000 00:08:27 -0500 (CDT)
guy         2000/08/05 00:08:25 CDT

  Modified files:
    .                    packet-ip.c 
  Log:
  Make "ip_checksum()" take just pointer and length arguments, and make
  "ip_checksum_shouldbe()" compute the correct checksum given the computed
  whole-packet checksum and the value of the checksum field; that scheme
  can be better extended in the future to handle checksums other than the
  IP header checksum, e.g. ICMP, UDP, and TCP checksums (although we'd
  want a somewhat more optimized checksumming routine for that, and
  perhaps have an option to control whether to do checksum checking on TCP
  and UDP packets, as that could be expensive).
  
  That requires that we remember the value of the computed checksum, not
  just check it against 0; that renders "ip_checksum_state()"
  uninteresting, as we can just compare the value against 0 in line.
  
  Revision  Changes    Path
  1.98      +36 -30    ethereal/packet-ip.c