a418946837
Implement siphash routines for initial TCP sequence numbers (12 bytes input for IPv4, 36 bytes input for IPv6), and while at it, also functions we'll use later on for hash table indices and TCP timestamp offsets (with 8, 20, 32 bytes of input). Use these to set the initial sequence number, according to RFC 6528, for connections originating either from the tap device or from sockets. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
5 lines
299 B
C
5 lines
299 B
C
uint64_t siphash_8b(const uint8_t *in, const uint64_t *k);
|
|
uint32_t siphash_12b(const uint8_t *in, const uint64_t *k);
|
|
uint64_t siphash_20b(const uint8_t *in, const uint64_t *k);
|
|
uint32_t siphash_32b(const uint8_t *in, const uint64_t *k);
|
|
uint32_t siphash_36b(const uint8_t *in, const uint64_t *k);
|