mirror of
https://github.com/ntop/n2n.git
synced 2024-09-19 16:41:11 +02:00
iwyu: n2n.h
There is still cleanup work to be done in the headers, but this concludes the major include-what-you-use refactoring. No functional change is intended or expected and all tests are passing. It is now a lot easier to see what is used from each header and work on possible refactoring in the future. The include-what-you-use tool is awkward to use with the current state of the build system - and will always be difficult to use in a multi-platform safe way. However, I hope to provide a non manual process for running with the tool in the future.
This commit is contained in:
parent
771fdec013
commit
585b3cec59
|
@ -47,106 +47,51 @@
|
|||
#undef N2N_HAVE_DAEMON
|
||||
#undef N2N_HAVE_TCP /* as explained on https://github.com/ntop/n2n/pull/627#issuecomment-782093706 */
|
||||
#undef N2N_HAVE_SETUID
|
||||
#endif
|
||||
#endif /* WIN32 */
|
||||
|
||||
|
||||
#include <stdio.h> // for size_t, FILE
|
||||
#include "n2n_define.h"
|
||||
#include "n2n_typedefs.h"
|
||||
|
||||
#include <time.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef WIN32
|
||||
#include <lmaccess.h> /* for privilege check in tools/n2n-route */
|
||||
#include <lmapibuf.h> /* for privilege check in tools/n2n-route */
|
||||
#include <sys/stat.h>
|
||||
#include <windows.h> /* for privilege check in tools/n2n-route */
|
||||
#include <winsock2.h> /* for tcp */
|
||||
#include "wintap.h"
|
||||
#define SHUT_RDWR SD_BOTH /* for tcp */
|
||||
#endif /* #ifdef WIN32 */
|
||||
|
||||
#ifndef WIN32
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include <getopt.h>
|
||||
#endif /* #ifndef _MSC_VER */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifndef WIN32
|
||||
#include <unistd.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/param.h>
|
||||
#include <pthread.h>
|
||||
#include <netinet/in.h> // for in_addr (ptr only), in_addr_t
|
||||
#include <pwd.h>
|
||||
#include <stdint.h> // for uint8_t, uint64_t, uint32_t, uint16_t
|
||||
#include <sys/types.h> // for time_t
|
||||
#include <unistd.h> // for close
|
||||
#define closesocket(a) close(a)
|
||||
|
||||
#ifdef __linux__
|
||||
#define N2N_CAN_NAME_IFACE 1
|
||||
#include <linux/netlink.h>
|
||||
#include <linux/rtnetlink.h>
|
||||
#include <unistd.h>
|
||||
#include <net/if_arp.h>
|
||||
#include <net/if.h>
|
||||
#include <linux/if_tun.h>
|
||||
#include <net/route.h>
|
||||
#endif /* #ifdef __linux__ */
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <netinet/in_systm.h>
|
||||
#endif /* #ifdef __FreeBSD__ */
|
||||
|
||||
#include <syslog.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#ifdef HAVE_ZSTD
|
||||
#include <zstd.h>
|
||||
#endif
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/udp.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdint.h>
|
||||
#if defined (HAVE_OPENSSL_1_1)
|
||||
#include <openssl/opensslv.h>
|
||||
#include <openssl/crypto.h>
|
||||
#endif
|
||||
|
||||
#define closesocket(a) close(a)
|
||||
#endif /* #ifndef WIN32 */
|
||||
|
||||
#include "minilzo.h"
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include "lzoconf.h"
|
||||
#include "uthash.h"
|
||||
#include "n2n_define.h"
|
||||
#include "n2n_typedefs.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h> /* for privilege check in tools/n2n-route */
|
||||
#include <lmaccess.h> /* for privilege check in tools/n2n-route */
|
||||
#include <lmapibuf.h> /* for privilege check in tools/n2n-route */
|
||||
#include <winsock2.h> /* for tcp */
|
||||
#define SHUT_RDWR SD_BOTH /* for tcp */
|
||||
#include "wintap.h"
|
||||
#include <sys/stat.h>
|
||||
#else
|
||||
#include <pwd.h>
|
||||
#endif /* #ifdef WIN32 */
|
||||
|
||||
#include "n2n_wire.h"
|
||||
#include "portable_endian.h"
|
||||
#include "aes.h"
|
||||
#include "curve25519.h"
|
||||
#include "n2n_regex.h"
|
||||
#include "sn_selection.h"
|
||||
#include "network_traffic_filter.h"
|
||||
|
||||
#include "n2n_port_mapping.h"
|
||||
|
||||
/* ************************************** */
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
*/
|
||||
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "n2n.h"
|
||||
|
||||
|
||||
|
|
|
@ -16,8 +16,11 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <errno.h> // for errno
|
||||
#include <pcap.h>
|
||||
#include <signal.h> // for signal, SIGINT, SIGTERM
|
||||
#include "n2n.h"
|
||||
#include "n2n_wire.h"
|
||||
|
||||
#define SNAPLEN 1500
|
||||
#define TIMEOUT 200
|
||||
|
|
Loading…
Reference in New Issue
Block a user