NDN-DPDK
High-Speed Named Data Networking Forwarder
Main Page
Related Pages
Data Structures
Data Structures
Data Structure Index
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Functions
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
w
Functions
_
b
c
d
e
f
h
i
l
m
n
p
r
s
t
u
Variables
_
b
c
d
e
f
g
i
l
m
p
r
s
t
v
w
Typedefs
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
Enumerations
Enumerator
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
Macros
a
b
c
d
f
h
i
l
m
n
p
r
s
t
u
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
csrc
core
siphash.h
Go to the documentation of this file.
1
#ifndef NDNDPDK_CORE_SIPHASH_H
2
#define NDNDPDK_CORE_SIPHASH_H
3
6
#include "
common.h
"
7
8
#include "../vendor/siphash-20201003.h"
9
11
typedef
struct
sipkey
SipHashKey
;
12
13
enum
{
14
SipHashKeyLength
= SIP_KEYLEN,
15
};
16
17
__attribute__((nonnull))
static
inline
void
18
SipHashKey_FromBuffer(
SipHashKey
* key,
const
uint8_t buf[
SipHashKeyLength
]) {
19
sip_tokey(key, buf);
20
}
21
23
typedef
struct
siphash
SipHash
;
24
26
__attribute__((nonnull))
static
inline
void
27
SipHash_Init(
SipHash
* h,
const
SipHashKey
* key) {
28
sip24_init(h, key);
29
}
30
32
__attribute__((nonnull))
static
inline
void
33
SipHash_Write(
SipHash
* h,
const
uint8_t* input,
size_t
count) {
34
sip24_update(h, input, count);
35
}
36
41
__attribute__((nonnull))
static
inline
uint64_t
42
SipHash_Final(
SipHash
* h) {
43
return
sip24_final(h);
44
}
45
50
__attribute__((nonnull))
static
inline
uint64_t
51
SipHash_Sum(
const
SipHash
* h) {
52
SipHash
copy = *h;
53
copy.p = RTE_PTR_ADD(copy.buf, RTE_PTR_DIFF(h->p, h->buf));
54
return
sip24_final(©);
55
}
56
57
#undef _SIP_ULL
58
#undef SIP_ROTL
59
#undef SIP_U32TO8_LE
60
#undef SIP_U64TO8_LE
61
#undef SIP_U8TO64_LE
62
#undef SIPHASH_INITIALIZER
63
#undef sip_keyof
64
#undef sip_endof
65
66
#endif
// NDNDPDK_CORE_SIPHASH_H
SipHashKey
struct sipkey SipHashKey
A key for SipHash.
Definition:
siphash.h:11
SipHashKeyLength
@ SipHashKeyLength
Definition:
siphash.h:14
SipHash
struct siphash SipHash
Context for SipHash.
Definition:
siphash.h:23
common.h
Generated by
1.9.1