From 1a54d44a23de7b0bf0dfe62dd3d09d8167e5a597 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 10 May 1999 21:37:39 +0000 Subject: Added packet checksumming code. Watch the comments for an explanation. --- lib/checksum.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lib/checksum.h (limited to 'lib/checksum.h') diff --git a/lib/checksum.h b/lib/checksum.h new file mode 100644 index 0000000..8151554 --- /dev/null +++ b/lib/checksum.h @@ -0,0 +1,20 @@ +/* + * BIRD Library -- IP One-Complement Checksum + * + * (c) 1999 Martin Mares + * + * Can be freely distributed and used under the terms of the GNU GPL. + */ + +#ifndef _BIRD_CHECKSUM_H_ +#define _BIRD_CHECKSUM_H_ + +/* + * Both checksumming functions accept a vararg list of packet + * fragments finished by NULL pointer. + */ + +int ipsum_verify(void *frag, unsigned len, ...); +u16 ipsum_calculate(void *frag, unsigned len, ...); + +#endif -- cgit v1.2.3