mirror of
https://github.com/ntop/n2n.git
synced 2024-09-19 16:41:11 +02:00
iwyu: tools/test*.c
This commit is contained in:
parent
0a20265228
commit
771fdec013
|
@ -16,11 +16,13 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <inttypes.h>
|
|
||||||
|
|
||||||
|
#include <stdint.h> // for uint8_t
|
||||||
|
#include <stdio.h> // for printf, fprintf, stdout, stderr
|
||||||
|
#include <string.h> // for memset
|
||||||
#include "auth.h" // for ascii_to_bin, bin_to_ascii, generate_private_key
|
#include "auth.h" // for ascii_to_bin, bin_to_ascii, generate_private_key
|
||||||
#include "n2n.h"
|
#include "hexdump.h" // for fhexdump
|
||||||
#include "hexdump.h"
|
#include "n2n.h" // for n2n_private_public_key_t
|
||||||
|
|
||||||
|
|
||||||
uint8_t PKT_CONTENT1[]={
|
uint8_t PKT_CONTENT1[]={
|
||||||
|
|
|
@ -16,12 +16,17 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <inttypes.h>
|
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h> // for assert
|
||||||
|
#include <inttypes.h> // for PRIx64
|
||||||
|
#include <stdint.h> // for uint8_t
|
||||||
|
#include <stdio.h> // for printf, fprintf, stderr, stdout, NULL
|
||||||
|
#include <stdlib.h> // for exit
|
||||||
|
#include <string.h> // for memcmp
|
||||||
|
#include "hexdump.h" // for fhexdump
|
||||||
|
#include "minilzo.h" // for lzo1x_1_compress, lzo1x_decompress, LZO1X_1_ME...
|
||||||
|
#include "n2n.h" // for N2N_PKT_BUF_SIZE, TRACE_ERROR, traceEvent
|
||||||
|
|
||||||
#include "n2n.h"
|
|
||||||
#include "hexdump.h"
|
|
||||||
|
|
||||||
/* heap allocation for compression as per lzo example doc */
|
/* heap allocation for compression as per lzo example doc */
|
||||||
#define HEAP_ALLOC(var,size) lzo_align_t __LZO_MMODEL var [ ((size) + (sizeof(lzo_align_t) - 1)) / sizeof(lzo_align_t) ]
|
#define HEAP_ALLOC(var,size) lzo_align_t __LZO_MMODEL var [ ((size) + (sizeof(lzo_align_t) - 1)) / sizeof(lzo_align_t) ]
|
||||||
|
|
|
@ -16,8 +16,12 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "n2n.h"
|
|
||||||
#include "hexdump.h"
|
#include <stdio.h> // for printf, fprintf, stdout, stderr
|
||||||
|
#include <string.h> // for memset
|
||||||
|
#include "curve25519.h" // for curve25519
|
||||||
|
#include "hexdump.h" // for fhexdump
|
||||||
|
|
||||||
|
|
||||||
void test_curve25519 (unsigned char *pkt_input, unsigned char *key) {
|
void test_curve25519 (unsigned char *pkt_input, unsigned char *key) {
|
||||||
char *test_name = "curve25519";
|
char *test_name = "curve25519";
|
||||||
|
|
|
@ -16,8 +16,10 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <inttypes.h>
|
|
||||||
|
|
||||||
|
#include <inttypes.h> // for PRIx64, PRIx16, PRIx32
|
||||||
|
#include <stdint.h> // for uint8_t, uint16_t, uint32_t, uint64_t
|
||||||
|
#include <stdio.h> // for printf, fprintf, stderr, stdout
|
||||||
#include "n2n.h"
|
#include "n2n.h"
|
||||||
#include "hexdump.h" // for fhexdump
|
#include "hexdump.h" // for fhexdump
|
||||||
#include "pearson.h" // for pearson_hash_128, pearson_hash_16, pearson_has...
|
#include "pearson.h" // for pearson_hash_128, pearson_hash_16, pearson_has...
|
||||||
|
|
|
@ -16,10 +16,17 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <inttypes.h>
|
|
||||||
|
|
||||||
#include "n2n.h"
|
#include <inttypes.h> // for PRIx64
|
||||||
#include "hexdump.h"
|
#include <stdint.h> // for uint8_t
|
||||||
|
#include <stdio.h> // for printf, fprintf, size_t, stderr, stdout
|
||||||
|
#include <stdlib.h> // for exit
|
||||||
|
#include <string.h> // for memcpy, memset, memcmp, strncpy
|
||||||
|
#include <sys/types.h> // for ssize_t
|
||||||
|
#include "hexdump.h" // for fhexdump
|
||||||
|
#include "n2n.h" // for n2n_trans_op_t, n2n_edge_conf_t, n2n_common_t
|
||||||
|
#include "n2n_wire.h" // for decode_PACKET, decode_common, encode_PACKET
|
||||||
|
|
||||||
|
|
||||||
#define DURATION 2.5 // test duration per algorithm
|
#define DURATION 2.5 // test duration per algorithm
|
||||||
#define PACKETS_BEFORE_GETTIME 2047 // do not check time after every packet but after (2 ^ n - 1)
|
#define PACKETS_BEFORE_GETTIME 2047 // do not check time after every packet but after (2 ^ n - 1)
|
||||||
|
|
|
@ -16,10 +16,15 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <inttypes.h>
|
|
||||||
|
|
||||||
#include "n2n.h"
|
#include <inttypes.h> // for PRIx64, PRIi32
|
||||||
#include "hexdump.h"
|
#include <stdint.h> // for uint8_t
|
||||||
|
#include <stdio.h> // for printf, fprintf, size_t, stderr, stdout
|
||||||
|
#include <string.h> // for memset, strcpy, strncpy
|
||||||
|
#include "hexdump.h" // for fhexdump
|
||||||
|
#include "n2n.h" // for n2n_common_t, n2n_REGISTER_SUPER_t, n2n_REGIST...
|
||||||
|
#include "n2n_wire.h" // for encode_REGISTER, encode_REGISTER_SUPER, encode...
|
||||||
|
|
||||||
|
|
||||||
void init_ip_subnet (n2n_ip_subnet_t * d) {
|
void init_ip_subnet (n2n_ip_subnet_t * d) {
|
||||||
d->net_addr = 0x20212223;
|
d->net_addr = 0x20212223;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user