A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
+ Collaboration diagram for Hash test suite:

Files

file  hash-test-suite.cc
 Hash test suite.
 

Classes

class  ns3::tests::DefaultHashTestCase
 Test default hash on fixed string. More...
 
class  ns3::tests::Fnv1aTestCase
 FNV hash on fixed string. More...
 
class  ns3::tests::Hash32FunctionPtrTestCase
 Test 32-bit function pointer. More...
 
class  ns3::tests::Hash64FunctionPtrTestCase
 Test 64-bit function pointer. More...
 
class  ns3::tests::HashTestCase
 Base class for hash tests. More...
 
class  ns3::tests::HashTestSuite
 Hash functions test suite. More...
 
class  ns3::tests::IncrementalTestCase
 Test incremental hashing. More...
 
class  ns3::tests::Murmur3TestCase
 Test Murmur3 hash on fixed string. More...
 

Functions

uint16_t ns3::tests::gnu_sum (const char *buffer, const std::size_t size)
 Simple hash function based on the GNU sum program.
 
uint32_t ns3::tests::gnu_sum32 (const char *buffer, const std::size_t size)
 A 32-bit hash function, based on gnu_sum().
 
uint64_t ns3::tests::gnu_sum64 (const char *buffer, const std::size_t size)
 A 64-bit hash function, base on gnu_sum().
 

Variables

static HashTestSuite ns3::tests::g_hashTestSuite
 HashTestSuite instance variable.
 

Detailed Description

Function Documentation

◆ gnu_sum()

uint16_t ns3::tests::gnu_sum ( const char * buffer,
const std::size_t size )

Simple hash function based on the GNU sum program.

16-bit checksum algorithm. See http://svnweb.freebsd.org/base/stable/9/usr.bin/cksum/sum1.c?view=markup

Used to test Hash32Function_ptr/Hash64Function_ptr

Parameters
[in,out]bufferThe data to hash.
[in]sizeThe buffer size.
Returns
The checksum of the buffer contents.

Definition at line 260 of file hash-test-suite.cc.

Referenced by ns3::tests::gnu_sum32().

+ Here is the caller graph for this function:

◆ gnu_sum32()

uint32_t ns3::tests::gnu_sum32 ( const char * buffer,
const std::size_t size )

A 32-bit hash function, based on gnu_sum().

16-bit checksum algorithm. See http://svnweb.freebsd.org/base/stable/9/usr.bin/cksum/sum1.c?view=markup

Used to test Hash32Function_ptr/Hash64Function_ptr

Parameters
[in,out]bufferThe data to hash.
[in]sizeThe buffer size.
Returns
The checksum of the buffer contents.

Definition at line 281 of file hash-test-suite.cc.

References ns3::tests::gnu_sum().

Referenced by ns3::tests::Hash32FunctionPtrTestCase::DoRun(), and ns3::tests::gnu_sum64().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gnu_sum64()

uint64_t ns3::tests::gnu_sum64 ( const char * buffer,
const std::size_t size )

A 64-bit hash function, base on gnu_sum().

16-bit checksum algorithm. See http://svnweb.freebsd.org/base/stable/9/usr.bin/cksum/sum1.c?view=markup

Used to test Hash32Function_ptr/Hash64Function_ptr

Parameters
[in,out]bufferThe data to hash.
[in]sizeThe buffer size.
Returns
The checksum of the buffer contents.

Definition at line 293 of file hash-test-suite.cc.

References ns3::tests::gnu_sum32().

Referenced by ns3::tests::Hash64FunctionPtrTestCase::DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ g_hashTestSuite

HashTestSuite ns3::tests::g_hashTestSuite
static

HashTestSuite instance variable.

Definition at line 455 of file hash-test-suite.cc.