2022-01-25 03:46:29 +00:00
|
|
|
#ifndef LAIKA_BOT_H
|
|
|
|
#define LAIKA_BOT_H
|
|
|
|
|
|
|
|
#include "laika.h"
|
|
|
|
#include "lpacket.h"
|
|
|
|
#include "lsocket.h"
|
|
|
|
#include "lpeer.h"
|
|
|
|
#include "lpolllist.h"
|
2022-01-28 01:55:28 +00:00
|
|
|
#include "lrsa.h"
|
2022-01-25 03:46:29 +00:00
|
|
|
|
|
|
|
struct sLaika_bot {
|
2022-01-28 01:55:28 +00:00
|
|
|
uint8_t priv[crypto_box_SECRETKEYBYTES], pub[crypto_box_PUBLICKEYBYTES], nonce[LAIKA_NONCESIZE];
|
2022-01-25 03:46:29 +00:00
|
|
|
struct sLaika_pollList pList;
|
2022-01-28 01:55:28 +00:00
|
|
|
struct sLaika_peer *peer;
|
2022-01-25 03:46:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct sLaika_bot *laikaB_newBot(void);
|
|
|
|
void laikaB_freeBot(struct sLaika_bot *bot);
|
|
|
|
|
|
|
|
void laikaB_connectToCNC(struct sLaika_bot *bot, char *ip, char *port); /* can throw a LAIKA_ERROR */
|
|
|
|
bool laikaB_poll(struct sLaika_bot *bot, int timeout);
|
|
|
|
|
|
|
|
#endif
|