mirror of
https://github.com/CPunch/Laika.git
synced 2025-10-02 22:40:06 +00:00
Added .clang-format, formatted codebase
This commit is contained in:
@@ -3,14 +3,15 @@
|
||||
|
||||
#include "laika.h"
|
||||
#include "lpacket.h"
|
||||
#include "lsocket.h"
|
||||
#include "lpeer.h"
|
||||
#include "ltask.h"
|
||||
#include "lpolllist.h"
|
||||
#include "lsocket.h"
|
||||
#include "lsodium.h"
|
||||
#include "ltask.h"
|
||||
|
||||
struct sLaika_shell;
|
||||
struct sLaika_bot {
|
||||
struct sLaika_bot
|
||||
{
|
||||
uint8_t priv[crypto_kx_SECRETKEYBYTES], pub[crypto_kx_PUBLICKEYBYTES];
|
||||
struct sLaika_shell *shells[LAIKA_MAX_SHELLS];
|
||||
struct sLaika_pollList pList;
|
||||
@@ -23,9 +24,11 @@ struct sLaika_bot {
|
||||
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 */
|
||||
/* can throw a LAIKA_ERROR */
|
||||
void laikaB_connectToCNC(struct sLaika_bot *bot, char *ip, char *port);
|
||||
bool laikaB_poll(struct sLaika_bot *bot);
|
||||
|
||||
void laikaB_pingTask(struct sLaika_taskService *service, struct sLaika_task *task, clock_t currTick, void *uData);
|
||||
void laikaB_pingTask(struct sLaika_taskService *service, struct sLaika_task *task, clock_t currTick,
|
||||
void *uData);
|
||||
|
||||
#endif
|
@@ -2,11 +2,13 @@
|
||||
#define LAIKA_SHELL_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define LAIKA_SHELL_TASK_DELTA 50
|
||||
|
||||
struct sLaika_bot;
|
||||
struct sLaika_shell {
|
||||
struct sLaika_shell
|
||||
{
|
||||
uint32_t id;
|
||||
};
|
||||
|
||||
@@ -19,13 +21,15 @@ void laikaB_freeRAWShell(struct sLaika_bot *bot, struct sLaika_shell *shell);
|
||||
|
||||
/* handles reading & writing to shell pipes */
|
||||
bool laikaB_readShell(struct sLaika_bot *bot, struct sLaika_shell *shell);
|
||||
bool laikaB_writeShell(struct sLaika_bot *bot, struct sLaika_shell *shell, char *buf, size_t length);
|
||||
bool laikaB_writeShell(struct sLaika_bot *bot, struct sLaika_shell *shell, char *buf,
|
||||
size_t length);
|
||||
|
||||
/* packet handlers */
|
||||
void laikaB_handleShellOpen(struct sLaika_peer *peer, LAIKAPKT_SIZE sz, void *uData);
|
||||
void laikaB_handleShellClose(struct sLaika_peer *peer, LAIKAPKT_SIZE sz, void *uData);
|
||||
void laikaB_handleShellData(struct sLaika_peer *peer, LAIKAPKT_SIZE sz, void *uData);
|
||||
|
||||
void laikaB_shellTask(struct sLaika_taskService *service, struct sLaika_task *task, clock_t currTick, void *uData);
|
||||
void laikaB_shellTask(struct sLaika_taskService *service, struct sLaika_task *task,
|
||||
clock_t currTick, void *uData);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user