Collaboration diagram for Keystroke Module:
![]() |
Functions | |
static bs_status | bsmod_keystroke_init (void) |
static void | remove_temp_file (void) |
static bs_status | bsmod_keystroke_cleanup (void) |
static bs_service_response * | create_status_response (const bs_service_request *request, bs_status status, char *message) |
static bs_service_response * | make_answer (const bs_service_request *request) |
static void | wait_for_answer (void) |
static bs_status | bsmod_keystroke_handle_service (const bs_service_request *request, bs_service_response **response, void *extra) |
Variables | |
bs_module | bsmod_symtable |
static FILE * | companion |
static apr_pool_t * | mempool |
bs_module | bsmod_symtable |
static bs_status bsmod_keystroke_cleanup | ( | void | ) | [static] |
Cleanup the keystroke module by destroying its memory pool
Definition at line 107 of file bsmod_keystroke.c.
static bs_status bsmod_keystroke_handle_service | ( | const bs_service_request * | request, | |
bs_service_response ** | response, | |||
void * | extra | |||
) | [static] |
Service handling routine. Since the keystroke module doesn't offer any services, it will return BS_NO_SERVICE on all occasions.
Definition at line 191 of file bsmod_keystroke.c.
References BS_NO_SERVICE, BS_OK, companion, bs_part_instance::data, bs_service_request::input, make_answer(), bs_service_request::operation, bs_message_instance::parts, remove_temp_file(), streq(), and wait_for_answer().
Here is the call graph for this function:
static bs_status bsmod_keystroke_init | ( | void | ) | [static] |
static bs_service_response* create_status_response | ( | const bs_service_request * | request, | |
bs_status | status, | |||
char * | message | |||
) | [static] |
Create a correct service response message for all the operations in the module.
request | The original request issued | |
status | The status code part of the message | |
message | The message part of the return message |
Definition at line 123 of file bsmod_keystroke.c.
References data, mempool, new_bs_data_type(), new_bs_message_instance(), new_bs_part_instance(), new_bs_service_response(), bs_service_request::operation, bs_message_instance::parts, bs_service_request::port, bs_service_request::service, and bs_service_request::uuid.
Here is the call graph for this function:
static bs_service_response* make_answer | ( | const bs_service_request * | request | ) | [static] |
Reads the produced answer file and creates an appropriate status response. Aftwerwards, the answer file is deleted.
Definition at line 160 of file bsmod_keystroke.c.
References BS_OK, create_status_response(), len(), mempool, read_file_into_buf(), remove_temp_file(), and runtestsuite::rv.
Here is the call graph for this function:
static void remove_temp_file | ( | void | ) | [static] |
The companion java program leaves a temporary file called answer.tmp. Because this file is overwritten each time a request is made, it should be deleted before making the request.
Definition at line 98 of file bsmod_keystroke.c.
static void wait_for_answer | ( | void | ) | [static] |
Keep waiting until the temporary file shows up.
Definition at line 179 of file bsmod_keystroke.c.
Initial value:
{ 0, 0, 0, 1, "keystroke module", "M.A.Hartman", "apr 10, 2007", "(c) 2007, M.A.Hartman. See distributed LICENSE file for more information.", "A keystroking biometrics module. It implements some basic keystroking " "methods based mostly on text-dependent input, such as passwords.", bsmod_keystroke_init, bsmod_keystroke_cleanup, bsmod_keystroke_handle_service, NULL, "bsmod_keystroke.wsdl" }
Definition at line 245 of file bsmod_keystroke.c.
The symbol table of the keystroke module.
Definition at line 59 of file bsmod_keystroke.c.
FILE* companion [static] |
Pipe to the companion program for writing commands.
Definition at line 64 of file bsmod_keystroke.c.
apr_pool_t* mempool [static] |
Private memory pool used by the module.
Definition at line 69 of file bsmod_keystroke.c.