summaryrefslogtreecommitdiff
path: root/packet-osi.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-06-05 09:06:19 +0000
committerGuy Harris <guy@alum.mit.edu>2001-06-05 09:06:19 +0000
commitf2e04def43530c4e42c9aa128da97a7a4ca30c4f (patch)
treede9ebbd5bbbb05574f9d481c9a16ed2f62e4e20b /packet-osi.h
parent2851b7ef7678a6dbe177c33efc545033a38c6628 (diff)
downloadwireshark-f2e04def43530c4e42c9aa128da97a7a4ca30c4f.tar.gz
Correctly compute the OSI checksum.
Have "calc_checksum()" just return an indication of the status of the checksum. Check the CLNP header checksum, and put display its status. svn path=/trunk/; revision=3514
Diffstat (limited to 'packet-osi.h')
-rw-r--r--packet-osi.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/packet-osi.h b/packet-osi.h
index 6694ef1ef5..6b2573526f 100644
--- a/packet-osi.h
+++ b/packet-osi.h
@@ -1,11 +1,10 @@
/* packet-osi.h
*
- * $Id: packet-osi.h,v 1.7 2001/04/01 05:48:14 hagbard Exp $
+ * $Id: packet-osi.h,v 1.8 2001/06/05 09:06:19 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
- *
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -85,6 +84,13 @@ dissector_table_t osinl_subdissector_table;
* published API functions
*/
-extern gchar *calc_checksum ( tvbuff_t *, int, u_int, u_int );
+typedef enum {
+ NO_CKSUM, /* checksum field is 0 */
+ DATA_MISSING, /* not all the data covered by the checksum was captured */
+ CKSUM_OK, /* checksum is OK */
+ CKSUM_NOT_OK /* checksum is not OK */
+} cksum_status_t;
+
+extern cksum_status_t calc_checksum(tvbuff_t *, int, u_int, u_int);
#endif /* _PACKET_OSI_H */