mirror of
https://github.com/CPunch/Laika.git
synced 2025-09-26 03:40:05 +00:00
Added LibSodium, new tools/, genKey, sLaika_peer::type
- sLaika_peer has a new member, (PEERTYPE)type - LibSodium dependency added
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
#define ARRAY_START 4
|
||||
|
||||
#ifdef DEBUG
|
||||
#define LAIKA_DEBUG(...) printf(__VA_ARGS__);
|
||||
#define LAIKA_DEBUG(...) printf("[~] " __VA_ARGS__);
|
||||
#else
|
||||
#define LAIKA_DEBUG(...)
|
||||
#endif
|
||||
|
@@ -6,6 +6,12 @@
|
||||
#include "lpacket.h"
|
||||
#include "lpolllist.h"
|
||||
|
||||
typedef enum {
|
||||
PEER_BOT,
|
||||
PEER_CNC, /* cnc 2 cnc communication */
|
||||
PEER_AUTH /* authorized peers can send commands to cnc */
|
||||
} PEERTYPE;
|
||||
|
||||
struct sLaika_peer {
|
||||
struct sLaika_socket sock; /* DO NOT MOVE THIS. this member HAS TO BE FIRST so that typecasting sLaika_peer* to sLaika_sock* works as intended */
|
||||
struct sLaika_pollList *pList; /* pollList we're active in */
|
||||
@@ -14,6 +20,7 @@ struct sLaika_peer {
|
||||
LAIKAPKT_SIZE *pktSizeTable; /* const table to pull pkt size data from */
|
||||
LAIKAPKT_SIZE pktSize; /* current pkt size */
|
||||
LAIKAPKT_ID pktID; /* current pkt ID */
|
||||
PEERTYPE type;
|
||||
bool setPollOut; /* is EPOLLOUT/POLLOUT is set on sock's pollfd ? */
|
||||
};
|
||||
|
||||
|
6
lib/include/lrsa.h
Normal file
6
lib/include/lrsa.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef LAIKA_RSA_H
|
||||
#define LAIKA_RSA_H
|
||||
|
||||
#include "sodium.h"
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user