Changeset e4eaca5 for lib


Ignore:
Timestamp:
02/28/18 15:13:55 (3 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
cachetimestamps, develop, etsilive, master, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance
Children:
92db9e4
Parents:
e375e0f
Message:

Add DLLEXPORT to all hash_toeplitz API functions.

This allows the toeplitz hasher to be used outside of
libtrace -- e.g. a user can create their own hasher and pass
it into trace_set_hasher.

This is useful if a user wants to use the same hasher (and
therefore the same seed) across multiple traces -- libtrace
in-built hashers are re-seeded for each trace file so their
hashing is not consistent across multiple inputs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/hash_toeplitz.h

    r6f7cd4b re4eaca5  
    2828 * toeplitz hashing - see microsoft rss code
    2929 */
     30#include "config.h"
    3031#include <stdint.h>
    3132#include <stddef.h>
     
    5354} toeplitz_conf_t;
    5455
    55 void toeplitz_hash_expand_key(toeplitz_conf_t *conf);
    56 uint32_t toeplitz_hash(const toeplitz_conf_t *tc, const uint8_t *data, size_t offset, size_t n, uint32_t result);
    57 uint32_t toeplitz_first_hash(const toeplitz_conf_t *tc, const uint8_t *data, size_t n);
    58 void toeplitz_init_config(toeplitz_conf_t *conf, bool bidirectional);
    59 uint64_t toeplitz_hash_packet(const libtrace_packet_t * pkt, const toeplitz_conf_t *cnf);
    60 void toeplitz_ncreate_bikey(uint8_t *key, size_t num);
    61 void toeplitz_create_bikey(uint8_t *key);
    62 void toeplitz_ncreate_unikey(uint8_t *key, size_t num);
    63 void toeplitz_create_unikey(uint8_t *key);
     56DLLEXPORT void toeplitz_hash_expand_key(toeplitz_conf_t *conf);
     57DLLEXPORT uint32_t toeplitz_hash(const toeplitz_conf_t *tc, const uint8_t *data, size_t offset, size_t n, uint32_t result);
     58DLLEXPORT uint32_t toeplitz_first_hash(const toeplitz_conf_t *tc, const uint8_t *data, size_t n);
     59DLLEXPORT void toeplitz_init_config(toeplitz_conf_t *conf, bool bidirectional);
     60DLLEXPORT uint64_t toeplitz_hash_packet(const libtrace_packet_t * pkt, const toeplitz_conf_t *cnf);
     61DLLEXPORT void toeplitz_ncreate_bikey(uint8_t *key, size_t num);
     62DLLEXPORT void toeplitz_create_bikey(uint8_t *key);
     63DLLEXPORT void toeplitz_ncreate_unikey(uint8_t *key, size_t num);
     64DLLEXPORT void toeplitz_create_unikey(uint8_t *key);
    6465
    6566
Note: See TracChangeset for help on using the changeset viewer.