Move command registry from components/command/ into components/core/. New modules: mod_canbus, mod_honeypot, mod_fallback, mod_redteam, mod_ota. Replace mod_proxy with tun_core (multiplexed SOCKS5 tunnel). Kconfig extended with per-module settings and async worker config.
108 lines
3.7 KiB
C
108 lines
3.7 KiB
C
/* Automatically generated nanopb header */
|
|
/* Generated by nanopb-1.0.0-dev */
|
|
|
|
#ifndef PB_C2_PROTO_C2_PB_H_INCLUDED
|
|
#define PB_C2_PROTO_C2_PB_H_INCLUDED
|
|
#include <pb.h>
|
|
|
|
#if PB_PROTO_HEADER_VERSION != 40
|
|
#error Regenerate this file with the current version of nanopb generator.
|
|
#endif
|
|
|
|
/* Enum definitions */
|
|
typedef enum _c2_AgentMsgType {
|
|
c2_AgentMsgType_AGENT_INFO = 0,
|
|
c2_AgentMsgType_AGENT_ERROR = 1,
|
|
c2_AgentMsgType_AGENT_DATA = 2,
|
|
c2_AgentMsgType_AGENT_LOG = 3,
|
|
c2_AgentMsgType_AGENT_CMD_RESULT = 4
|
|
} c2_AgentMsgType;
|
|
|
|
/* Struct definitions */
|
|
typedef struct _c2_Command {
|
|
char device_id[64];
|
|
char command_name[32];
|
|
pb_size_t argv_count;
|
|
char argv[8][256];
|
|
char request_id[64];
|
|
} c2_Command;
|
|
|
|
typedef PB_BYTES_ARRAY_T(256) c2_AgentMessage_payload_t;
|
|
typedef struct _c2_AgentMessage {
|
|
char device_id[64];
|
|
c2_AgentMsgType type;
|
|
char source[32];
|
|
char request_id[64];
|
|
c2_AgentMessage_payload_t payload;
|
|
bool eof;
|
|
} c2_AgentMessage;
|
|
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* Helper constants for enums */
|
|
#define _c2_AgentMsgType_MIN c2_AgentMsgType_AGENT_INFO
|
|
#define _c2_AgentMsgType_MAX c2_AgentMsgType_AGENT_CMD_RESULT
|
|
#define _c2_AgentMsgType_ARRAYSIZE ((c2_AgentMsgType)(c2_AgentMsgType_AGENT_CMD_RESULT+1))
|
|
|
|
|
|
#define c2_AgentMessage_type_ENUMTYPE c2_AgentMsgType
|
|
|
|
|
|
/* Initializer values for message structs */
|
|
#define c2_Command_init_default {"", "", 0, {"", "", "", "", "", "", "", ""}, ""}
|
|
#define c2_AgentMessage_init_default {"", _c2_AgentMsgType_MIN, "", "", {0, {0}}, 0}
|
|
#define c2_Command_init_zero {"", "", 0, {"", "", "", "", "", "", "", ""}, ""}
|
|
#define c2_AgentMessage_init_zero {"", _c2_AgentMsgType_MIN, "", "", {0, {0}}, 0}
|
|
|
|
/* Field tags (for use in manual encoding/decoding) */
|
|
#define c2_Command_device_id_tag 1
|
|
#define c2_Command_command_name_tag 2
|
|
#define c2_Command_argv_tag 3
|
|
#define c2_Command_request_id_tag 4
|
|
#define c2_AgentMessage_device_id_tag 1
|
|
#define c2_AgentMessage_type_tag 2
|
|
#define c2_AgentMessage_source_tag 3
|
|
#define c2_AgentMessage_request_id_tag 4
|
|
#define c2_AgentMessage_payload_tag 5
|
|
#define c2_AgentMessage_eof_tag 6
|
|
|
|
/* Struct field encoding specification for nanopb */
|
|
#define c2_Command_FIELDLIST(X, a) \
|
|
X(a, STATIC, SINGULAR, STRING, device_id, 1) \
|
|
X(a, STATIC, SINGULAR, STRING, command_name, 2) \
|
|
X(a, STATIC, REPEATED, STRING, argv, 3) \
|
|
X(a, STATIC, SINGULAR, STRING, request_id, 4)
|
|
#define c2_Command_CALLBACK NULL
|
|
#define c2_Command_DEFAULT NULL
|
|
|
|
#define c2_AgentMessage_FIELDLIST(X, a) \
|
|
X(a, STATIC, SINGULAR, STRING, device_id, 1) \
|
|
X(a, STATIC, SINGULAR, UENUM, type, 2) \
|
|
X(a, STATIC, SINGULAR, STRING, source, 3) \
|
|
X(a, STATIC, SINGULAR, STRING, request_id, 4) \
|
|
X(a, STATIC, SINGULAR, BYTES, payload, 5) \
|
|
X(a, STATIC, SINGULAR, BOOL, eof, 6)
|
|
#define c2_AgentMessage_CALLBACK NULL
|
|
#define c2_AgentMessage_DEFAULT NULL
|
|
|
|
extern const pb_msgdesc_t c2_Command_msg;
|
|
extern const pb_msgdesc_t c2_AgentMessage_msg;
|
|
|
|
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
|
#define c2_Command_fields &c2_Command_msg
|
|
#define c2_AgentMessage_fields &c2_AgentMessage_msg
|
|
|
|
/* Maximum encoded size of messages (where known) */
|
|
#define C2_PROTO_C2_PB_H_MAX_SIZE c2_Command_size
|
|
#define c2_AgentMessage_size 426
|
|
#define c2_Command_size 2227
|
|
|
|
#ifdef __cplusplus
|
|
} /* extern "C" */
|
|
#endif
|
|
|
|
#endif
|