15#define NULLREQUEST "000000000000000"
17#define SNF_REQUEST_MAXSIZE 4096
Main Header FileThis File Calls for all the header files exisitng in this library,...
This file Defines everything related to handling Clients.
This file Defines everything related to networking.
This file Defines everything related to Opcodes ( Short for OP**eartion**Codes )
#define SNF_opcode_mmbr_t
Defines SNF_opcode_mmbr_t 's size.
Definition opcode.h:14
void snf_request_send_invalid(SNF_CLT *Client, SNF_RQST *Original)
Sends a invalidation Response request to the client.
SNF_RQST * snf_request_genu_base(SNF_RQST *Original, SNF_opcode_mmbr_t Command)
Generates a response request using undetailed base OPCode.
void snf_request_send_confirm(SNF_CLT *Client, SNF_RQST *Original)
Sends a confirmation Response request to the client.
SNF_RQST * snf_request_gen_response(SNF_RQST *Original, SNF_opcode *OPCODE, SNF_RQST_ARG *Args)
Generates a new response request.
void snf_request_send_reject(SNF_CLT *Client, SNF_RQST *Original)
Sends a rejection Response request to the client.
SNF_RQST * snf_request_gen_base(SNF_RQST *Original, SNF_opcode_mmbr_t Command, SNF_opcode_mmbr_t Detail)
Generates a response request using base OPCode.
void snf_request_send(SNF_CLT *Client, SNF_RQST *Request)
Send a request to a Client.
void snf_request_free(SNF_RQST *Request)
Frees a SNF_RQST *.
void snf_request_args_free(SNF_RQST_ARG *arg)
Frees all instance of SNF_RQST_ARG that were linked together using SNF_RQST_ARG::next.
SNF_RQST * snf_request_gen_wUID(const char UID[16])
Generates a new empty request that has an UID.
int snf_request_get_nargs(SNF_RQST *args)
Gets the amount of arguments a request has.
SNF_RQST * snf_request_gen_server_OPCODE(SNF_opcode *OPCODE)
Generates a server request.
SNF_RQST * snf_request_fetch(SNF_CLT *Client)
Fetches the request from the incoming Client.
void snf_request_arg_insert(SNF_RQST *Request, SNF_RQST_ARG *arg)
Inserts an arguments to the end of Request's SNF_RQST_ARG List.
SNF_RQST * snf_request_gen()
Generates a new empty request.
void snf_request_arg_free(SNF_RQST_ARG *arg)
Frees an instance of SNF_RQST_ARG.
SNF_RQST_ARG * snf_request_arg_gen(const char *arg)
Generates a new Argumment.
The structure for each saved client.
Definition clt.h:24
SNF_RQST_ARG * next
The next argument.
Definition request.h:52
char * arg
The Argument's Content.
Definition request.h:50
The Structure for saving Requests.
Definition request.h:27
SNF_RQST_ARG * args
Defines the arguments inside the Request.
Definition request.h:42
SNF_opcode * OPCODE
Defines The OPCODE of the request.
Definition request.h:40
char UID[16]
Defines the UID Saved.
Definition request.h:38
Structure for the opcode.
Definition opcode.h:28