2000-12-13 02:24:23 +00:00
|
|
|
/* in_cksum.h
|
|
|
|
* Declaration of Internet checksum routine.
|
|
|
|
*
|
2004-07-18 00:24:25 +00:00
|
|
|
* $Id$
|
2000-12-13 02:24:23 +00:00
|
|
|
*/
|
|
|
|
|
2011-09-14 14:53:49 +00:00
|
|
|
#ifndef __IN_CKSUM_H__
|
|
|
|
#define __IN_CKSUM_H__
|
|
|
|
|
2013-03-01 23:53:11 +00:00
|
|
|
#include "ws_symbol_export.h"
|
|
|
|
|
2000-12-13 02:24:23 +00:00
|
|
|
typedef struct {
|
|
|
|
const guint8 *ptr;
|
|
|
|
int len;
|
|
|
|
} vec_t;
|
|
|
|
|
2013-03-01 23:53:11 +00:00
|
|
|
WS_DLL_PUBLIC int in_cksum(const vec_t *vec, int veclen);
|
2000-12-13 02:24:23 +00:00
|
|
|
|
2013-03-01 23:53:11 +00:00
|
|
|
guint16 in_cksum_shouldbe(guint16 sum, guint16 computed_sum);
|
2011-09-14 14:53:49 +00:00
|
|
|
|
|
|
|
#endif /* __IN_CKSUM_H__ */
|