4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change
on this file since e81d1af was
e81d1af,
checked in by Daniel Lawson <dlawson@…>, 16 years ago
|
s/stdint.h/inttypes.h/
|
-
Property mode set to
100644
|
File size:
914 bytes
|
Line | |
---|
1 | #ifndef LIB_H |
---|
2 | #define LIB_H |
---|
3 | #include <inttypes.h> |
---|
4 | #include <libtrace.h> |
---|
5 | |
---|
6 | /** The encryption algorithm used |
---|
7 | */ |
---|
8 | enum enc_type_t { |
---|
9 | ENC_NONE, /**< No encryption */ |
---|
10 | ENC_PREFIX_SUBSTITUTION, /**< Substitute a prefix */ |
---|
11 | ENC_CRYPTOPAN /**< Prefix preserving encryption */ |
---|
12 | }; |
---|
13 | |
---|
14 | /** File type to write |
---|
15 | */ |
---|
16 | enum trace_format_t { |
---|
17 | TRACE_FORMAT_ERF, /**< ERF format */ |
---|
18 | TRACE_FORMAT_PCAP, /**< PCAP format */ |
---|
19 | }; |
---|
20 | |
---|
21 | /** (re)initialise the IP encryption module |
---|
22 | * @param type The encryption type |
---|
23 | * @param key a key (format dependant on the type of key) |
---|
24 | * |
---|
25 | * @note calling this function clears the cache. |
---|
26 | */ |
---|
27 | void trace_enc_init(enum enc_type_t type,char *key); |
---|
28 | |
---|
29 | /** encrypt one IP address |
---|
30 | * @param orig_addr the original IP address in HOST byte order |
---|
31 | * @returns the encrypted IP in HOST byte order |
---|
32 | * |
---|
33 | * @note: requires you to have called trace_enc_init() first |
---|
34 | */ |
---|
35 | uint32_t trace_enc_ip(uint32_t orig_addr); |
---|
36 | |
---|
37 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.