1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 8.0.0.0 for Windows">
7<META http-equiv="Content-Style-Type" content="text/css">
8<title>MATH_Checksum*Init</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">MATH_Checksum*Init <img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></H1>
15<H2>Syntax</H2>
16
17<dl>
18  <dd>
19  <PRE><CODE>#include &lt;nitro/math/checksum.h&gt;
20
21static inline void MATH_Checksum8Init( <A href="MATHChecksumContext.html">MATHChecksum8Context</A> *context );
22static inline void MATH_Checksum16Init( <A href="MATHChecksumContext.html">MATHChecksum16Context</A> *context );
23</CODE></PRE>
24  </dd>
25</dl><h2>Arguments</h2>
26
27<table border="1" width="100%">
28    <TR>
29<TD width="176"><CODE>context</CODE></TD>
30<TD width="670">Pointer to the context structure to initialize for calculating checksums.</TD>
31    </TR>
32  </table>
33<h2>Return Values</h2>
34<p>None.</p>
35<H2>Description</H2>
36<P>Initializes a context structure of type <a href="MATHChecksumContext.html"><code>MATHChecksum8Context</code></a> or <a href="MATHChecksumContext.html"><code>MATHChecksum16Context</code></a>, which is used to calculate 8-bit and 16-bit checksums. Make sure that this function is called before using the <CODE><A href="MATH_ChecksumUpdate.html">MATH_Checksum*Update</A></CODE> and <CODE><A href="MATH_ChecksumGetHash.html">MATH_Checksum*GetHash</A></CODE> functions.<BR>You can re-apply this function to a context structure that is already initialized. In this case, it will return the context structure to its initial state. 8-bit Checksum is an algorithm to find the 8-bit hash value. It computes the one's complement of the one's complement sum in 8-bit units. 16-bit Checksum is an algorithm to find the 16-bit hash value. It computes the one's complement of the one's complement sum in 16-bit units. 16-bit Checksum returns the same value as IP Checksum or Internet Checksum, which are used with IP, UDP, and TCP protocols. For details on Internet Checksum, see RFC (Request For Comments) 1071, which is published by IETF (The Internet Engineering Task Force).
37</P>
38<h2>See Also</h2>
39<P><a href="MATH_ChecksumGetHash.html"><code>MATH_Checksum*GetHash</code></a><BR><a href="MATH_ChecksumUpdate.html"><code>MATH_Checksum*Update</code></a></P>
40<H2>Revision History</H2>
41<P>
422005/06/24  Corrected error in Syntax. <BR>2005/04/12 Initial version.
43</P>
44<hr><p>CONFIDENTIAL</p></body>
45</html>
46