1
0
mirror of https://github.com/CPunch/Laika.git synced 2024-11-14 09:50:05 +00:00
Laika/lib/src/lpacket.c
CPunch 9694ae67d8 Added LAIKAPKT_PINGPONG
- shell now has it's own task service, it's polled in shellC_poll()
- default timeout for peers is 60 seconds, to change this edit the LAIKA_PEER_TIMEOUT in cnc.h
2022-04-13 12:19:06 -05:00

27 lines
854 B
C

#include "lpacket.h"
#ifdef DEBUG
const char* laikaD_getPacketName(LAIKAPKT_ID id) {
const char *PKTNAMES[] = {
"LAIKAPKT_VARPKT",
"LAIKAPKT_HANDSHAKE_REQ",
"LAIKAPKT_HANDSHAKE_RES",
"LAIKAPKT_PINGPONG",
"LAIKAPKT_TUNNEL_OPEN",
"LAIKAPKT_TUNNEL_CLOSE",
"LAIKAPKT_TUNNEL_CONNECTION_ADD",
"LAIKAPKT_TUNNEL_CONNECTION_RMV",
"LAIKAPKT_TUNNEL_CONNECTION_DATA",
"LAIKAPKT_SHELL_OPEN",
"LAIKAPKT_SHELL_CLOSE",
"LAIKAPKT_SHELL_DATA",
"LAIKAPKT_AUTHENTICATED_HANDSHAKE_REQ",
"LAIKAPKT_AUTHENTICATED_ADD_PEER_RES",
"LAIKAPKT_AUTHENTICATED_RMV_PEER_RES",
"LAIKAPKT_AUTHENTICATED_SHELL_OPEN_REQ",
"LAIKAPKT_AUTHENTICATED_TUNNEL_OPEN_REQ"
};
return id >= LAIKAPKT_MAXNONE ? "LAIKAPKT_UNKNOWN" : PKTNAMES[id];
}
#endif