A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
hash-function.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2012 Lawrence Livermore National Laboratory
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Peter D. Barnes, Jr. <pdbarnes@llnl.gov>
7
*/
8
9
#include "
hash-function.h
"
10
11
#include "
log.h
"
12
13
/**
14
* \file
15
* \ingroup hash
16
* \brief ns3::Hash::Implementation::GetHash64 default implementation.
17
*/
18
19
namespace
ns3
20
{
21
22
NS_LOG_COMPONENT_DEFINE
(
"HashFunction"
);
23
24
namespace
Hash
25
{
26
27
uint64_t
28
Implementation::GetHash64
(
const
char
* buffer,
const
std::size_t size)
29
{
30
NS_LOG_WARN
(
"64-bit hash requested, only 32-bit implementation available"
);
31
return
GetHash32
(buffer, size);
32
}
33
34
}
// namespace Hash
35
36
}
// namespace ns3
ns3::Hash::Implementation::GetHash64
virtual uint64_t GetHash64(const char *buffer, const std::size_t size)
Compute 64-bit hash of a byte buffer.
Definition
hash-function.cc:28
ns3::Hash::Implementation::GetHash32
virtual uint32_t GetHash32(const char *buffer, const std::size_t size)=0
Compute 32-bit hash of a byte buffer.
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition
log.h:191
NS_LOG_WARN
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
Definition
log.h:250
hash-function.h
ns3::Hash::Implementation, ns3::Hash::Function::Hash32 and ns3::Hash::Function::Hash64 declarations.
log.h
Debug message logging.
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
core
model
hash-function.cc
Generated on Fri Nov 8 2024 13:58:59 for ns-3 by
1.11.0