mirror of
https://github.com/ntop/n2n.git
synced 2024-09-19 16:41:11 +02:00
Minor code claanup
This commit is contained in:
parent
de86a22705
commit
0bf7ae0a01
|
@ -129,6 +129,7 @@ typedef struct ether_hdr ether_hdr_t;
|
|||
#include <signal.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
|
|
@ -43,10 +43,11 @@
|
|||
#define IP4_MIN_SIZE 20
|
||||
#define UDP_SIZE 8
|
||||
|
||||
#if 0
|
||||
/* 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) ]
|
||||
static HEAP_ALLOC(wrkmem, LZO1X_1_MEM_COMPRESS);
|
||||
|
||||
#endif
|
||||
|
||||
/* N2N compression indicators. */
|
||||
/* Compression is disabled by default for outgoing packets if no cli
|
||||
|
|
|
@ -18,6 +18,10 @@
|
|||
|
||||
#include "n2n.h"
|
||||
|
||||
/* 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) ]
|
||||
static HEAP_ALLOC(wrkmem, LZO1X_1_MEM_COMPRESS);
|
||||
|
||||
/* ************************************** */
|
||||
|
||||
static const char * supernode_ip(const n2n_edge_t * eee);
|
||||
|
|
|
@ -40,7 +40,7 @@ n2n-decode: n2n_decode.c $(N2N_LIB) $(HEADERS)
|
|||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
clean:
|
||||
rm -rf $(TOOLS) $(N2N_LIB) *.o *.dSYM *~
|
||||
rm -rf $(TOOLS) *.o *.dSYM *~
|
||||
|
||||
install: $(TOOLS)
|
||||
$(INSTALL_PROG) $(TOOLS) $(SBINDIR)/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* (C) 2007-18 - ntop.org and contributors
|
||||
* (C) 2007-20 - ntop.org and contributors
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -16,20 +16,9 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "n2n_wire.h"
|
||||
#include "n2n_transforms.h"
|
||||
#include "n2n.h"
|
||||
#ifdef __GNUC__
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
#if defined(WIN32) && !defined(__GNUC__)
|
||||
#include <windows.h>
|
||||
|
||||
static int gettimeofday(struct timeval *tp, void *tzp)
|
||||
{
|
||||
time_t clock;
|
||||
|
|
Loading…
Reference in New Issue
Block a user