14#define SNF_opcode_mmbr_t uint8_t
16#define SNF_opcode_mmbr_MAX UINT8_MAX
96 const char *Definition);
109 const char *Definition);
123 const char *Definition,
141 const char *Definition);
224#pragma region[Base Opcode Values]
227#define SNF_OPCODE_BASE_CAT (SNF_opcode_mmbr_t)0x00
230#define SNF_OPCODE_BASE_SUBCAT (SNF_opcode_mmbr_t)0x00
233#define SNF_OPCODE_BASE_DET_UNDETAILED (SNF_opcode_mmbr_t)0x00
237#define SNF_OPCODE_BASE_CMD_CONNECT (SNF_opcode_mmbr_t)0x00
240#define SNF_OPCODE_BASE_CMD_RECONNECT (SNF_opcode_mmbr_t)0x01
243#define SNF_OPCODE_BASE_CMD_DISCONNECT (SNF_opcode_mmbr_t)0x02
246#define SNF_OPCODE_BASE_CMD_SNF_VER (SNF_opcode_mmbr_t)0x03
249#define SNF_OPCODE_BASE_CMD_KICK (SNF_opcode_mmbr_t)0x04
252#define SNF_OPCODE_BASE_CMD_CONFIRM (SNF_opcode_mmbr_t)0x05
255#define SNF_OPCODE_BASE_CMD_REJECT (SNF_opcode_mmbr_t)0x06
257#pragma region[Base Command: Invalid]
260#define SNF_OPCODE_BASE_CMD_INVALID (SNF_opcode_mmbr_t)0xFF
262#define SNF_OPCODE_BASE_DET_INVALID_UNREGISTRED_OPCODE (SNF_opcode_mmbr_t)0x01
264#define SNF_OPCODE_BASE_DET_INVALID_ERROR_PROTOCOL (SNF_opcode_mmbr_t)0x02
266#define SNF_OPCODE_BASE_DET_INVALID_UNIMPLEMENTED_OPCODE (SNF_opcode_mmbr_t)0x03
270#pragma region[Base Opcode Function]
Main Header FileThis File Calls for all the header files exisitng in this library,...
SNF_opcode_LL_item * snf_opcode_get_base_detail(SNF_opcode_mmbr_t Command, SNF_opcode_mmbr_t Detail)
Fetches a base opcode Command from the opcode's data structure.
SNF_opcode * snf_opcode_getu(SNF_opcode_mmbr_t Category, SNF_opcode_mmbr_t SubCategory, SNF_opcode_mmbr_t Command)
Fetches a fully structured OPcode using the default Detail.
SNF_opcode * snf_opcode_getu_base(SNF_opcode_mmbr_t Command)
Fetches a fully structured OPcode witha base "Command" using the default Detail.
int snf_opcode_define_category(SNF_opcode_mmbr_t Code, const char *Definition)
Defines an opcode Category.
SNF_opcode_LL_item * snf_opcode_get_command(SNF_opcode_mmbr_t Category, SNF_opcode_mmbr_t SubCategory, SNF_opcode_mmbr_t Command)
Fetches the opcode Command from the opcode's data structure.
SNF_opcode_LL_item * snf_opcode_get_category(SNF_opcode_mmbr_t Category)
Fetches the opcode Category from the opcode's data structure.
#define SNF_opcode_mmbr_t
Defines SNF_opcode_mmbr_t 's size.
Definition opcode.h:14
int snf_opcode_define_detail(SNF_opcode_mmbr_t Category, SNF_opcode_mmbr_t SubCategory, SNF_opcode_mmbr_t Command, SNF_opcode_mmbr_t Code, const char *Definition)
Defines an opcode Detail.
int snf_opcode_define_command(SNF_opcode_mmbr_t Category, SNF_opcode_mmbr_t SubCategory, SNF_opcode_mmbr_t Code, const char *Definition, SNF_RQST *(func)(SNF_RQST *))
Defines an opcode Command.
int SNF_opcode_base_isinit
used to check if SNF's base opcodes are initialized
int snf_opcode_isbase(SNF_opcode *op)
SNF_opcode_LL_item * snf_opcode_get_sub_category(SNF_opcode_mmbr_t Category, SNF_opcode_mmbr_t SubCategory)
Fetches the opcode Sub-Category from the opcode's data structure.
SNF_opcode_LL_item * snf_opcode_get_base_sub_category()
Fetches the base opcode Sub-Category from the opcode's data structure.
SNF_opcode * snf_opcode_get_base(SNF_opcode_mmbr_t Command, SNF_opcode_mmbr_t Detail)
Fetches a fully structured OPcode with a base "Command".
SNF_opcode_LL_item * SNF_opcode_LL
Data structure where opcodes will be saved.
int snf_opcode_define_sub_category(SNF_opcode_mmbr_t Category, SNF_opcode_mmbr_t Code, const char *Definition)
Defines an opcode Sub-Category.
SNF_opcode_LL_item * snf_opcode_get_base_category()
Fetches the base opcode Category from the opcode's data structure.
int snf_opcode_init()
Initializes the SNF's opcodes.
SNF_opcode_LL_item * snf_opcode_get_detail(SNF_opcode_mmbr_t Category, SNF_opcode_mmbr_t SubCategory, SNF_opcode_mmbr_t Command, SNF_opcode_mmbr_t Detail)
SNF_opcode_LL_item * snf_opcode_get_base_command(SNF_opcode_mmbr_t Command)
Fetches a base opcode Command from the opcode's data structure.
int snf_opcode_compare(SNF_opcode *op1, SNF_opcode *op2)
Compares between two opcodes.
SNF_opcode * snf_opcode_get(SNF_opcode_mmbr_t Category, SNF_opcode_mmbr_t SubCategory, SNF_opcode_mmbr_t Command, SNF_opcode_mmbr_t Detail)
Fetches a fully structured OPcode.
This file Defines everything related to handling Requests.
The Structure for saving Requests.
Definition request.h:27
Structure used to save registred opcode members.
Definition opcode.h:60
SNF_opcode_LL_item * parent
Parent ( or higher in Rank ) opcode Member.
Definition opcode.h:72
char * Definition
opcode Member's definition
Definition opcode.h:64
SNF_opcode_LL_item * next
the next opcode member of the same Rank (and of same Parent if they have one).
Definition opcode.h:69
SNF_opcode_LL_item * sub
Child ( or lower in Rank ) opcode Member.
Definition opcode.h:75
SNF_opcode_mmbr_t OPmmbr
opcode Member value
Definition opcode.h:62
SNF_opcode's Structure if you wanna access it as a struct.
Definition opcode.h:31
SNF_opcode_mmbr_t SubCategory
opcode's Sub-Category
Definition opcode.h:35
SNF_opcode_mmbr_t Category
opcode's Category
Definition opcode.h:33
SNF_opcode_mmbr_t Detail
opcode's Detail
Definition opcode.h:39
SNF_opcode_mmbr_t Command
opcode's Command
Definition opcode.h:37
Structure for the opcode.
Definition opcode.h:28
SNF_opcode_mmbr_t opcode[4]
SNF_opcode's Structure if you wanna access as a table.
Definition opcode.h:47
struct SNF_opcode_t::SNF_opcode_struct strct