1
0
mirror of https://github.com/CPunch/Laika.git synced 2024-09-20 02:28:19 +00:00
Laika/cnc/include/cnc.h
CPunch a023929190 Added key exchange to LAIKA_HANDSHAKE_*
- test keys are defined in laika.h
- bug fixes & refactoring with laikaM_growarray()
2022-01-27 19:55:28 -06:00

22 lines
545 B
C

#ifndef LAIKA_CNC_H
#define LAIKA_CNC_H
#include "laika.h"
#include "lpacket.h"
#include "lsocket.h"
#include "lpolllist.h"
#include "lpeer.h"
struct sLaika_cnc {
uint8_t priv[crypto_box_SECRETKEYBYTES], pub[crypto_box_PUBLICKEYBYTES];
struct sLaika_socket sock;
struct sLaika_pollList pList;
};
struct sLaika_cnc *laikaC_newCNC(uint16_t port);
void laikaC_freeCNC(struct sLaika_cnc *cnc);
void laikaC_killPeer(struct sLaika_cnc *cnc, struct sLaika_peer *peer);
bool laikaC_pollPeers(struct sLaika_cnc *cnc, int timeout);
#endif