summaryrefslogtreecommitdiff
path: root/core/net_crypto.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/net_crypto.c')
-rw-r--r--core/net_crypto.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/net_crypto.c b/core/net_crypto.c
index 0bae2d2e..2af5239b 100644
--- a/core/net_crypto.c
+++ b/core/net_crypto.c
@@ -50,17 +50,17 @@ typedef struct
50 50
51#define MAX_CRYPTO_CONNECTIONS 256 51#define MAX_CRYPTO_CONNECTIONS 256
52 52
53Crypto_Connection crypto_connections[MAX_CRYPTO_CONNECTIONS]; 53static Crypto_Connection crypto_connections[MAX_CRYPTO_CONNECTIONS];
54 54
55#define MAX_FRIEND_REQUESTS 32 55#define MAX_FRIEND_REQUESTS 32
56 56
57//keeps track of the connection numbers for friends request so we can check later if they were sent 57//keeps track of the connection numbers for friends request so we can check later if they were sent
58int outbound_friendrequests[MAX_FRIEND_REQUESTS]; 58static int outbound_friendrequests[MAX_FRIEND_REQUESTS];
59 59
60#define MAX_INCOMING 64 60#define MAX_INCOMING 64
61 61
62//keeps track of the connection numbers for friends request so we can check later if they were sent 62//keeps track of the connection numbers for friends request so we can check later if they were sent
63int incoming_connections[MAX_INCOMING]; 63static int incoming_connections[MAX_INCOMING];
64 64
65//encrypts plain of length length to encrypted of length + 16 using the 65//encrypts plain of length length to encrypted of length + 16 using the
66//public key(32 bytes) of the receiver and the secret key of the sender and a 24 byte nonce 66//public key(32 bytes) of the receiver and the secret key of the sender and a 24 byte nonce
@@ -587,7 +587,7 @@ int new_incoming(int id)
587 587
588//TODO: optimize this 588//TODO: optimize this
589//handle all new incoming connections. 589//handle all new incoming connections.
590void handle_incomings() 590static void handle_incomings()
591{ 591{
592 int income; 592 int income;
593 while(1) 593 while(1)
@@ -601,7 +601,7 @@ void handle_incomings()
601} 601}
602 602
603//handle received packets for not yet established crypto connections. 603//handle received packets for not yet established crypto connections.
604void receive_crypto() 604static void receive_crypto()
605{ 605{
606 uint32_t i; 606 uint32_t i;
607 for(i = 0; i < MAX_CRYPTO_CONNECTIONS; i++) 607 for(i = 0; i < MAX_CRYPTO_CONNECTIONS; i++)
@@ -687,7 +687,7 @@ void initNetCrypto()
687 memset(incoming_connections, -1 ,sizeof(incoming_connections)); 687 memset(incoming_connections, -1 ,sizeof(incoming_connections));
688} 688}
689 689
690void killTimedout() 690static void killTimedout()
691{ 691{
692 uint32_t i; 692 uint32_t i;
693 for(i = 0; i < MAX_CRYPTO_CONNECTIONS; i++) 693 for(i = 0; i < MAX_CRYPTO_CONNECTIONS; i++)