Classes | |
struct | struct_command |
Functions | |
int | get_command_nr (const char *command_string) |
Translate command from text string (going thruechar device) to \ number representation. | |
int | parse_message (char *message, int message_len, struct_command *command) |
Parse message to command structure. |
This file contents declaration of functions and definitions of constants and structures which are used in mysql fs deamon code.
int get_command_nr | ( | const char * | command_string | ) | [inline] |
Translate command from text string (going thruechar device) to \ number representation.
command_string | Pointer to command string. |
Definition at line 36 of file parser.c.
References ADD_BLOCK, ADD_BLOCK_NR, CLEAR_FILE, CLEAR_FILE_NR, CMD_ER, CMD_ER_NR, CMD_OK, CMD_OK_NR, CREATE, CREATE_NR, GET_BLOCK, GET_BLOCK_NR, LOOKUP, LOOKUP_NR, MKDIR, MKDIR_NR, MOVE_FILE, MOVE_FILE_NR, READ_DIR, READ_DIR_NR, READ_INODE, READ_INODE_NR, REMOVE_DIR, REMOVE_DIR_NR, REMOVE_FILE, REMOVE_FILE_NR, RENAME_DIR, RENAME_DIR_NR, RENAME_FILE, RENAME_FILE_NR, REPLACE_BLOCK, REPLACE_BLOCK_NR, TEST, TEST_NR, TRUNCATE_FILE, TRUNCATE_FILE_NR, and UNKNOWN_COMMAND_NR.
Referenced by parse_message().
int parse_message | ( | char * | message, | |
int | message_len, | |||
struct_command * | command | |||
) |
Parse message to command structure.
This function parse message from fs kernel and put it to command structure. Be sure, all array in the command structure are big enought
message | Pure message from fs kernel. | |
message_len | Length of the message. | |
command | Structure to be filled by this function. |
Definition at line 134 of file parser.c.
References struct_command::command, struct_command::command_nr, struct_command::data, struct_command::data_len, EPROTOKOL_VERSION_ERROR, FSD_VERSION, get_command_nr(), MAX_BLOCK_LENGTH, MAX_COMMAND_LENGTH, MAX_PARAM_LENGTH, MAX_SIZE_LENGTH, MAX_VERSION_LENGTH, OK, struct_command::param, PDEBUG, and struct_command::version.