4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change
on this file since b06e535 was
5959435,
checked in by Perry Lorier <perry@…>, 17 years ago
|
Add new munge program to the libtrace examples
|
-
Property mode set to
100644
|
File size:
667 bytes
|
Line | |
---|
1 | #include "lib.h" |
---|
2 | #include <assert.h> |
---|
3 | #include <stdio.h> |
---|
4 | |
---|
5 | int main(int argc, char **argv) |
---|
6 | { |
---|
7 | trace_enc_init(ENC_NONE,""); |
---|
8 | printf("none : %08x\n",trace_enc_ip (0x7f000001)); |
---|
9 | assert( trace_enc_ip( 0x7f000001) == 0x7f000001); |
---|
10 | |
---|
11 | trace_enc_init(ENC_PREFIX_SUBSTITUTION,"10.10.0.0/16"); |
---|
12 | printf("prefix : %08x\n",trace_enc_ip (0x7f000001)); |
---|
13 | assert( trace_enc_ip( 0x7f000001) == 0x0a0a0001); |
---|
14 | |
---|
15 | printf("prefix : %08x\n",trace_enc_ip (0x12345678)); |
---|
16 | assert( trace_enc_ip( 0x12345678) == 0x0a0a5678); |
---|
17 | |
---|
18 | trace_enc_init(ENC_CRYPTOPAN,"swordfish"); |
---|
19 | printf("cryptopan: %08x\n",trace_enc_ip (0x7f000001)); |
---|
20 | assert( trace_enc_ip( 0x7f000001) == 0x9eff7fe1); |
---|
21 | return 0; |
---|
22 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.