Sort #includes in all source files.

This commit is contained in:
iphydf 2016-09-01 00:33:20 +01:00
parent ad13518153
commit 77db27331e
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9
54 changed files with 125 additions and 124 deletions

View File

@ -2,15 +2,15 @@
#include "config.h" #include "config.h"
#endif #endif
#include <sys/types.h>
#include <stdint.h>
#include <string.h>
#include <check.h> #include <check.h>
#include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <time.h> #include <time.h>
#include "../toxcore/TCP_server.h"
#include "../toxcore/TCP_client.h" #include "../toxcore/TCP_client.h"
#include "../toxcore/TCP_server.h"
#include "../toxcore/util.h" #include "../toxcore/util.h"

View File

@ -7,9 +7,9 @@
#include "../toxcore/assoc.h" #include "../toxcore/assoc.h"
#include "../toxcore/util.h" #include "../toxcore/util.h"
#include <sys/types.h>
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
#include <sys/types.h>
#include <check.h> #include <check.h>

View File

@ -2,13 +2,13 @@
#include "config.h" #include "config.h"
#endif #endif
#include "../toxcore/net_crypto.h"
#include <sys/types.h>
#include <stdint.h>
#include <string.h>
#include <check.h> #include <check.h>
#include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <time.h> #include <time.h>
#include "../toxcore/net_crypto.h"
#include "helpers.h" #include "helpers.h"

View File

@ -5,8 +5,8 @@
#include <sys/param.h> #include <sys/param.h>
#include <time.h> #include <time.h>
#include "../toxcore/tox.h"
#include "../toxcore/DHT.c" #include "../toxcore/DHT.c"
#include "../toxcore/tox.h"
#include "helpers.h" #include "helpers.h"

View File

@ -2,19 +2,19 @@
#include "config.h" #include "config.h"
#endif #endif
#include <sys/types.h>
#include <stdint.h>
#include <string.h>
#include <check.h> #include <check.h>
#include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <time.h> #include <time.h>
#include "helpers.h" #include "helpers.h"
#include "../toxcore/tox.h" #include "../toxcore/tox.h"
#include "../toxencryptsave/toxencryptsave.h"
#include "../toxcore/crypto_core.h" #include "../toxcore/crypto_core.h"
#include "../toxencryptsave/toxencryptsave.h"
#ifdef VANILLA_NACL #ifdef VANILLA_NACL
#include "../toxencryptsave/crypto_pwhash_scryptsalsa208sha256/crypto_pwhash_scryptsalsa208sha256.h" #include "../toxencryptsave/crypto_pwhash_scryptsalsa208sha256/crypto_pwhash_scryptsalsa208sha256.h"
#endif #endif

View File

@ -14,12 +14,12 @@
#include "config.h" #include "config.h"
#endif #endif
#include "../testing/misc_tools.c" // hex_string_to_bin #include <check.h>
#include "../toxcore/Messenger.h"
#include <sys/types.h>
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
#include <check.h> #include <sys/types.h>
#include "../testing/misc_tools.c" // hex_string_to_bin
#include "../toxcore/Messenger.h"
#include "helpers.h" #include "helpers.h"

View File

@ -2,11 +2,11 @@
#include "config.h" #include "config.h"
#endif #endif
#include <sys/types.h>
#include <stdint.h>
#include <string.h>
#include <check.h> #include <check.h>
#include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <time.h> #include <time.h>
#include "../toxcore/network.h" #include "../toxcore/network.h"

View File

@ -2,11 +2,11 @@
#include "config.h" #include "config.h"
#endif #endif
#include <sys/types.h>
#include <stdint.h>
#include <string.h>
#include <check.h> #include <check.h>
#include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <time.h> #include <time.h>
#include "../toxcore/onion.h" #include "../toxcore/onion.h"

View File

@ -2,11 +2,11 @@
#include "config.h" #include "config.h"
#endif #endif
#include <sys/types.h>
#include <stdint.h>
#include <string.h>
#include <check.h> #include <check.h>
#include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <time.h> #include <time.h>
#include "helpers.h" #include "helpers.h"

View File

@ -14,13 +14,13 @@
#include "config.h" #include "config.h"
#endif #endif
#include <check.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h> #include <sys/param.h>
#include <sys/types.h> #include <sys/types.h>
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <check.h>
#include <stdlib.h>
#include <time.h> #include <time.h>
#include "../toxcore/tox.h" #include "../toxcore/tox.h"

View File

@ -12,20 +12,20 @@
# include "helpers.h" # include "helpers.h"
#endif #endif
#include <sys/types.h>
#include <stdint.h> #include <stdint.h>
#include <string.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <time.h> #include <time.h>
#include <vpx/vpx_image.h> #include <vpx/vpx_image.h>
#include "../toxav/toxav.h"
#include "../toxcore/crypto_core.h"
#include "../toxcore/logger.h"
#include "../toxcore/tox.h" #include "../toxcore/tox.h"
#include "../toxcore/util.h" #include "../toxcore/util.h"
#include "../toxcore/logger.h"
#include "../toxcore/crypto_core.h"
#include "../toxav/toxav.h"
#if defined(_WIN32) || defined(__WIN32__) || defined (WIN32) #if defined(_WIN32) || defined(__WIN32__) || defined (WIN32)

View File

@ -12,26 +12,26 @@
# include "helpers.h" # include "helpers.h"
#endif #endif
#include <sys/types.h>
#include <stdint.h> #include <stdint.h>
#include <string.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <time.h> #include <time.h>
#include <vpx/vpx_image.h> #include <vpx/vpx_image.h>
#include "../toxav/toxav.h"
#include "../toxcore/crypto_core.h"
#include "../toxcore/logger.h"
#include "../toxcore/tox.h" #include "../toxcore/tox.h"
#include "../toxcore/util.h" #include "../toxcore/util.h"
#include "../toxcore/logger.h"
#include "../toxcore/crypto_core.h"
#include "../toxav/toxav.h"
#if defined(_WIN32) || defined(__WIN32__) || defined (WIN32) #if defined(_WIN32) || defined(__WIN32__) || defined (WIN32)
#define c_sleep(x) Sleep(1*x) #define c_sleep(x) Sleep(1*x)
#else #else
#include <unistd.h>
#include <pthread.h> #include <pthread.h>
#include <unistd.h>
#define c_sleep(x) usleep(1000*x) #define c_sleep(x) usleep(1000*x)
#endif #endif

View File

@ -50,8 +50,8 @@
#if defined(_WIN32) || defined(__WIN32__) || defined (WIN32) #if defined(_WIN32) || defined(__WIN32__) || defined (WIN32)
#define c_sleep(x) Sleep(1*x) #define c_sleep(x) Sleep(1*x)
#else #else
#include <unistd.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <unistd.h>
#define c_sleep(x) usleep(1000*x) #define c_sleep(x) usleep(1000*x)
#endif #endif

View File

@ -29,7 +29,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <string.h>
#include <libconfig.h> #include <libconfig.h>

View File

@ -33,8 +33,8 @@
// toxcore // toxcore
#include "../../../toxcore/LAN_discovery.h" #include "../../../toxcore/LAN_discovery.h"
#include "../../../toxcore/onion_announce.h"
#include "../../../toxcore/TCP_server.h" #include "../../../toxcore/TCP_server.h"
#include "../../../toxcore/onion_announce.h"
#include "../../../toxcore/util.h" #include "../../../toxcore/util.h"
// misc // misc

View File

@ -44,8 +44,8 @@
#define c_sleep(x) Sleep(1*x) #define c_sleep(x) Sleep(1*x)
#else #else
#include <unistd.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <unistd.h>
#define c_sleep(x) usleep(1000*x) #define c_sleep(x) usleep(1000*x)
#endif #endif

View File

@ -49,8 +49,8 @@
#define c_sleep(x) Sleep(1*x) #define c_sleep(x) Sleep(1*x)
#else #else
#include <unistd.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <unistd.h>
#define c_sleep(x) usleep(1000*x) #define c_sleep(x) usleep(1000*x)
#define PORT 33445 #define PORT 33445

View File

@ -24,9 +24,9 @@
#include "../toxav/toxav.h" #include "../toxav/toxav.h"
#include "../toxcore/network.h" /* current_time_monotonic() */
#include "../toxcore/tox.h" #include "../toxcore/tox.h"
#include "../toxcore/util.h" #include "../toxcore/util.h"
#include "../toxcore/network.h" /* current_time_monotonic() */
/* Playing audio data */ /* Playing audio data */
#include <portaudio.h> #include <portaudio.h>
@ -35,16 +35,16 @@
/* Reading and Displaying video data */ /* Reading and Displaying video data */
#include <opencv/cv.h> #include <opencv/cv.h>
#include <opencv/highgui.h>
#include <opencv/cvwimage.h> #include <opencv/cvwimage.h>
#include <opencv/highgui.h>
#include <sys/stat.h>
#include <assert.h> #include <assert.h>
#include <errno.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <time.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <sys/stat.h>
#include <time.h>
#include <unistd.h> #include <unistd.h>
#ifdef __APPLE__ #ifdef __APPLE__

View File

@ -1,8 +1,8 @@
#include "../toxdns/toxdns.h"
#include "../toxcore/tox.h"
#include "../toxcore/network.h" #include "../toxcore/network.h"
#include "../toxcore/tox.h"
#include "../toxdns/toxdns.h"
#include "misc_tools.c" #include "misc_tools.c"
#if defined(_WIN32) || defined(__WIN32__) || defined (WIN32) #if defined(_WIN32) || defined(__WIN32__) || defined (WIN32)

View File

@ -1,19 +1,19 @@
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h> #include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <errno.h> #include <errno.h>
#include <fcntl.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/types.h> #include <sys/types.h>
#include <netdb.h>
#include <unistd.h> #include <unistd.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>

View File

@ -25,10 +25,10 @@
#include "config.h" #include "config.h"
#endif #endif
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h> #include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef TOX_DEBUG #ifdef TOX_DEBUG
#include <assert.h> #include <assert.h>

View File

@ -29,21 +29,21 @@
#include <winsock2.h> #include <winsock2.h>
#include <ws2tcpip.h> #include <ws2tcpip.h>
#else #else
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <sys/types.h>
#include <netdb.h> #include <netdb.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/types.h>
#endif #endif
#include <sys/select.h> #include <sys/select.h>
#include "nTox.h"
#include "misc_tools.c" #include "misc_tools.c"
#include "nTox.h"
#include <locale.h>
#include <stdio.h> #include <stdio.h>
#include <time.h> #include <time.h>
#include <locale.h>
#if defined(_WIN32) || defined(__WIN32__) || defined (WIN32) #if defined(_WIN32) || defined(__WIN32__) || defined (WIN32)
#define c_sleep(x) Sleep(1*x) #define c_sleep(x) Sleep(1*x)

View File

@ -40,8 +40,8 @@
#else #else
#include <pty.h> #include <pty.h>
#endif #endif
#include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h>
#define c_sleep(x) usleep(1000*x) #define c_sleep(x) usleep(1000*x)

View File

@ -38,10 +38,10 @@
#include <unistd.h> #include <unistd.h>
#define c_sleep(x) usleep(1000*x) #define c_sleep(x) usleep(1000*x)
#include <dirent.h>
#include <stdio.h>
#include <netinet/in.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <dirent.h>
#include <netinet/in.h>
#include <stdio.h>
#define NUM_FILE_SENDERS 256 #define NUM_FILE_SENDERS 256
typedef struct { typedef struct {

View File

@ -24,9 +24,9 @@
#endif /* HAVE_CONFIG_H */ #endif /* HAVE_CONFIG_H */
#include <assert.h> #include <assert.h>
#include "bwcontroller.h"
#include "../toxcore/logger.h" #include "../toxcore/logger.h"
#include "../toxcore/util.h" #include "../toxcore/util.h"
#include "bwcontroller.h"
#define BWC_PACKET_ID 196 #define BWC_PACKET_ID 196
#define BWC_SEND_INTERVAL_MS 1000 #define BWC_SEND_INTERVAL_MS 1000

View File

@ -22,9 +22,9 @@
#include "config.h" #include "config.h"
#endif /* HAVE_CONFIG_H */ #endif /* HAVE_CONFIG_H */
#include "group.h"
#include "../toxcore/util.h"
#include "../toxcore/logger.h" #include "../toxcore/logger.h"
#include "../toxcore/util.h"
#include "group.h"
#define GROUP_JBUF_SIZE 6 #define GROUP_JBUF_SIZE 6
#define GROUP_JBUF_DEAD_SECONDS 4 #define GROUP_JBUF_DEAD_SECONDS 4

View File

@ -24,15 +24,15 @@
#include "config.h" #include "config.h"
#endif /* HAVE_CONFIG_H */ #endif /* HAVE_CONFIG_H */
#include "msi.h"
#include "../toxcore/logger.h" #include "../toxcore/logger.h"
#include "../toxcore/util.h" #include "../toxcore/util.h"
#include "msi.h"
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <assert.h> #include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#define MSI_MAXMSG_SIZE 256 #define MSI_MAXMSG_SIZE 256

View File

@ -25,9 +25,9 @@
#include <inttypes.h> #include <inttypes.h>
#include <pthread.h> #include <pthread.h>
#include "../toxcore/Messenger.h"
#include "audio.h" #include "audio.h"
#include "video.h" #include "video.h"
#include "../toxcore/Messenger.h"
/** /**
* Error codes. * Error codes.

View File

@ -23,14 +23,14 @@
#include "config.h" #include "config.h"
#endif /* HAVE_CONFIG_H */ #endif /* HAVE_CONFIG_H */
#include "rtp.h" #include "../toxcore/Messenger.h"
#include "bwcontroller.h"
#include "../toxcore/logger.h" #include "../toxcore/logger.h"
#include "../toxcore/util.h" #include "../toxcore/util.h"
#include "../toxcore/Messenger.h" #include "bwcontroller.h"
#include "rtp.h"
#include <stdlib.h>
#include <assert.h> #include <assert.h>
#include <stdlib.h>
int handle_rtp_packet (Messenger *m, uint32_t friendnumber, const uint8_t *data, uint16_t length, void *object); int handle_rtp_packet (Messenger *m, uint32_t friendnumber, const uint8_t *data, uint16_t length, void *object);

View File

@ -22,8 +22,8 @@
#ifndef RTP_H #ifndef RTP_H
#define RTP_H #define RTP_H
#include "bwcontroller.h"
#include "../toxcore/Messenger.h" #include "../toxcore/Messenger.h"
#include "bwcontroller.h"
#include "stdbool.h" #include "stdbool.h"
/** /**

View File

@ -22,8 +22,8 @@
* This file contains the group chats code for the backwards compatibility. * This file contains the group chats code for the backwards compatibility.
*/ */
#include "toxav.h"
#include "group.h" #include "group.h"
#include "toxav.h"
/* Create a new toxav group. /* Create a new toxav group.
* *

View File

@ -23,12 +23,12 @@
#include "config.h" #include "config.h"
#endif /* HAVE_CONFIG_H */ #endif /* HAVE_CONFIG_H */
#include <stdlib.h>
#include <assert.h> #include <assert.h>
#include <stdlib.h>
#include "video.h"
#include "msi.h" #include "msi.h"
#include "rtp.h" #include "rtp.h"
#include "video.h"
#include "../toxcore/logger.h" #include "../toxcore/logger.h"
#include "../toxcore/network.h" #include "../toxcore/network.h"

View File

@ -24,9 +24,10 @@
#include <vpx/vpx_decoder.h> #include <vpx/vpx_decoder.h>
#include <vpx/vpx_encoder.h> #include <vpx/vpx_encoder.h>
#include <vpx/vp8dx.h>
#include <vpx/vp8cx.h>
#include <vpx/vpx_image.h> #include <vpx/vpx_image.h>
#include <vpx/vp8cx.h>
#include <vpx/vp8dx.h>
#define VIDEO_CODEC_DECODER_INTERFACE (vpx_codec_vp8_dx()) #define VIDEO_CODEC_DECODER_INTERFACE (vpx_codec_vp8_dx())
#define VIDEO_CODEC_ENCODER_INTERFACE (vpx_codec_vp8_cx()) #define VIDEO_CODEC_ENCODER_INTERFACE (vpx_codec_vp8_cx())

View File

@ -41,9 +41,9 @@
#include "ping.h" #include "ping.h"
#include "network.h"
#include "LAN_discovery.h" #include "LAN_discovery.h"
#include "misc_tools.h" #include "misc_tools.h"
#include "network.h"
#include "util.h" #include "util.h"
/* The timeout after which a node is discarded completely. */ /* The timeout after which a node is discarded completely. */

View File

@ -30,9 +30,9 @@
/* Used for get_broadcast(). */ /* Used for get_broadcast(). */
#ifdef __linux #ifdef __linux
#include <sys/ioctl.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <sys/ioctl.h>
#endif #endif
#define MAX_INTERFACES 16 #define MAX_INTERFACES 16

View File

@ -29,9 +29,9 @@
#include <assert.h> #include <assert.h>
#endif #endif
#include "logger.h"
#include "Messenger.h" #include "Messenger.h"
#include "assoc.h" #include "assoc.h"
#include "logger.h"
#include "network.h" #include "network.h"
#include "util.h" #include "util.h"

View File

@ -26,8 +26,8 @@
#ifndef MESSENGER_H #ifndef MESSENGER_H
#define MESSENGER_H #define MESSENGER_H
#include "friend_requests.h"
#include "friend_connection.h" #include "friend_connection.h"
#include "friend_requests.h"
#include "logger.h" #include "logger.h"
#define MAX_NAME_LENGTH 128 #define MAX_NAME_LENGTH 128

View File

@ -24,8 +24,8 @@
#ifndef TCP_CLIENT_H #ifndef TCP_CLIENT_H
#define TCP_CLIENT_H #define TCP_CLIENT_H
#include "crypto_core.h"
#include "TCP_server.h" #include "TCP_server.h"
#include "crypto_core.h"
#define TCP_CONNECTION_TIMEOUT 10 #define TCP_CONNECTION_TIMEOUT 10

View File

@ -24,8 +24,8 @@
#define TCP_SERVER_H #define TCP_SERVER_H
#include "crypto_core.h" #include "crypto_core.h"
#include "onion.h"
#include "list.h" #include "list.h"
#include "onion.h"
#ifdef TCP_SERVER_USE_EPOLL #ifdef TCP_SERVER_USE_EPOLL
#include "sys/epoll.h" #include "sys/epoll.h"

View File

@ -3,9 +3,9 @@
#include "config.h" #include "config.h"
#endif #endif
#include "logger.h"
#include "DHT.h" #include "DHT.h"
#include "assoc.h" #include "assoc.h"
#include "logger.h"
#include "ping.h" #include "ping.h"
#include "LAN_discovery.h" #include "LAN_discovery.h"

View File

@ -30,12 +30,12 @@
#include <sodium.h> #include <sodium.h>
#else #else
#include <crypto_box.h> #include <crypto_box.h>
#include <randombytes.h>
#include <crypto_hash_sha256.h> #include <crypto_hash_sha256.h>
#include <crypto_hash_sha512.h> #include <crypto_hash_sha512.h>
#include <crypto_scalarmult_curve25519.h>
#include <crypto_verify_16.h> #include <crypto_verify_16.h>
#include <crypto_verify_32.h> #include <crypto_verify_32.h>
#include <crypto_scalarmult_curve25519.h> #include <randombytes.h>
#define crypto_box_MACBYTES (crypto_box_ZEROBYTES - crypto_box_BOXZEROBYTES) #define crypto_box_MACBYTES (crypto_box_ZEROBYTES - crypto_box_BOXZEROBYTES)
/* I know */ /* I know */
#define sodium_memcmp(a, b, c) memcmp(a, b, c) #define sodium_memcmp(a, b, c) memcmp(a, b, c)

View File

@ -25,9 +25,9 @@
#ifndef FRIEND_CONNECTION_H #ifndef FRIEND_CONNECTION_H
#define FRIEND_CONNECTION_H #define FRIEND_CONNECTION_H
#include "net_crypto.h"
#include "DHT.h" #include "DHT.h"
#include "LAN_discovery.h" #include "LAN_discovery.h"
#include "net_crypto.h"
#include "onion_client.h" #include "onion_client.h"

View File

@ -26,8 +26,8 @@
#ifndef LIST_H #ifndef LIST_H
#define LIST_H #define LIST_H
#include <stdlib.h>
#include <stdint.h> #include <stdint.h>
#include <stdlib.h>
#include <string.h> #include <string.h>
typedef struct { typedef struct {

View File

@ -27,9 +27,9 @@
#include "config.h" #include "config.h"
#endif #endif
#include "math.h"
#include "net_crypto.h" #include "net_crypto.h"
#include "util.h" #include "util.h"
#include "math.h"
static uint8_t crypt_connection_id_not_valid(const Net_Crypto *c, int crypt_connection_id) static uint8_t crypt_connection_id_not_valid(const Net_Crypto *c, int crypt_connection_id)
{ {

View File

@ -24,11 +24,11 @@
#ifndef NET_CRYPTO_H #ifndef NET_CRYPTO_H
#define NET_CRYPTO_H #define NET_CRYPTO_H
#include <pthread.h>
#include "DHT.h" #include "DHT.h"
#include "LAN_discovery.h" #include "LAN_discovery.h"
#include "TCP_connection.h" #include "TCP_connection.h"
#include "logger.h" #include "logger.h"
#include <pthread.h>
#define CRYPTO_CONN_NO_CONNECTION 0 #define CRYPTO_CONN_NO_CONNECTION 0
#define CRYPTO_CONN_COOKIE_REQUESTING 1 //send cookie request packets #define CRYPTO_CONN_COOKIE_REQUESTING 1 //send cookie request packets

View File

@ -25,15 +25,16 @@
#define NETWORK_H #define NETWORK_H
#ifdef PLAN9 #ifdef PLAN9
#include <u.h> //Plan 9 requires this is imported first #include <u.h> // Plan 9 requires this is imported first
// Comment line here to avoid reordering by source code formatters.
#include <libc.h> #include <libc.h>
#endif #endif
#include "logger.h" #include "logger.h"
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h> #include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
@ -42,8 +43,8 @@
//Windows XP //Windows XP
#define WINVER 0x0501 #define WINVER 0x0501
#endif #endif
#include <winsock2.h>
#include <windows.h> #include <windows.h>
#include <winsock2.h>
#include <ws2tcpip.h> #include <ws2tcpip.h>
#ifndef IPV6_V6ONLY #ifndef IPV6_V6ONLY
@ -60,14 +61,14 @@ typedef short sa_family_t;
#else // Linux includes #else // Linux includes
#include <fcntl.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <errno.h> #include <errno.h>
#include <fcntl.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/types.h> #include <sys/types.h>
#include <netdb.h>
#include <unistd.h> #include <unistd.h>
typedef int sock_t; typedef int sock_t;

View File

@ -23,8 +23,8 @@
#include "config.h" #include "config.h"
#endif #endif
#include "onion_announce.h"
#include "LAN_discovery.h" #include "LAN_discovery.h"
#include "onion_announce.h"
#include "util.h" #include "util.h"
#define PING_ID_TIMEOUT 20 #define PING_ID_TIMEOUT 20

View File

@ -24,9 +24,9 @@
#include "config.h" #include "config.h"
#endif #endif
#include "LAN_discovery.h"
#include "onion_client.h" #include "onion_client.h"
#include "util.h" #include "util.h"
#include "LAN_discovery.h"
/* defines for the array size and /* defines for the array size and
timeout for onion announce packets. */ timeout for onion announce packets. */

View File

@ -24,8 +24,8 @@
#ifndef ONION_CLIENT_H #ifndef ONION_CLIENT_H
#define ONION_CLIENT_H #define ONION_CLIENT_H
#include "onion_announce.h"
#include "net_crypto.h" #include "net_crypto.h"
#include "onion_announce.h"
#include "ping_array.h" #include "ping_array.h"
#define MAX_ONION_CLIENTS 8 #define MAX_ONION_CLIENTS 8

View File

@ -33,8 +33,8 @@
#include "ping.h" #include "ping.h"
#include "network.h" #include "network.h"
#include "util.h"
#include "ping_array.h" #include "ping_array.h"
#include "util.h"
#define PING_NUM_MAX 512 #define PING_NUM_MAX 512

View File

@ -26,8 +26,8 @@
#include "config.h" #include "config.h"
#endif #endif
#include "ping_array.h"
#include "crypto_core.h" #include "crypto_core.h"
#include "ping_array.h"
#include "util.h" #include "util.h"
static void clear_entry(Ping_Array *array, uint32_t index) static void clear_entry(Ping_Array *array, uint32_t index)

View File

@ -25,9 +25,9 @@
#ifndef __UTIL_H__ #ifndef __UTIL_H__
#define __UTIL_H__ #define __UTIL_H__
#include <pthread.h>
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
#include <pthread.h>
#define MIN(a,b) (((a)<(b))?(a):(b)) #define MIN(a,b) (((a)<(b))?(a):(b))
#define PAIR(TYPE1__, TYPE2__) struct { TYPE1__ first; TYPE2__ second; } #define PAIR(TYPE1__, TYPE2__) struct { TYPE1__ first; TYPE2__ second; }

View File

@ -25,14 +25,14 @@
#include "config.h" #include "config.h"
#endif #endif
#include "toxencryptsave.h"
#include "defines.h"
#include "../toxcore/crypto_core.h" #include "../toxcore/crypto_core.h"
#include "defines.h"
#include "toxencryptsave.h"
#define SET_ERROR_PARAMETER(param, x) {if(param) {*param = x;}} #define SET_ERROR_PARAMETER(param, x) {if(param) {*param = x;}}
#ifdef VANILLA_NACL #ifdef VANILLA_NACL
#include "crypto_pwhash_scryptsalsa208sha256/crypto_pwhash_scryptsalsa208sha256.h"
#include <crypto_hash_sha256.h> #include <crypto_hash_sha256.h>
#include "crypto_pwhash_scryptsalsa208sha256/crypto_pwhash_scryptsalsa208sha256.h"
#endif #endif
#if TOX_PASS_SALT_LENGTH != crypto_pwhash_scryptsalsa208sha256_SALTBYTES #if TOX_PASS_SALT_LENGTH != crypto_pwhash_scryptsalsa208sha256_SALTBYTES

View File

@ -28,9 +28,9 @@
extern "C" { extern "C" {
#endif #endif
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h> #include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#ifndef TOX_DEFINED #ifndef TOX_DEFINED
#define TOX_DEFINED #define TOX_DEFINED