EDGESEC  0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
command_mapper.h
Go to the documentation of this file.
1 
11 #ifndef COMMAND_MAPPER_H
12 #define COMMAND_MAPPER_H
13 
14 #include <stdbool.h>
15 #include <inttypes.h>
16 #include <utarray.h>
17 #include <uthash.h>
18 
19 #include "../utils/allocs.h"
20 #include "../utils/hashmap.h"
21 #include "../utils/os.h"
22 
27 typedef struct hashmap_command_conn {
28  uint32_t key;
29  int value;
30  UT_hash_handle hh;
32 
39 
47 int put_command_mapper(hmap_command_conn **hmap, const char *command);
48 
56 int check_command_mapper(hmap_command_conn *const *hmap, const char *command);
57 #endif
struct hashmap_command_conn hmap_command_conn
Command mapper connection structure.
void free_command_mapper(hmap_command_conn **hmap)
Frees the command mapper connection object.
Definition: command_mapper.c:17
int check_command_mapper(hmap_command_conn *const *hmap, const char *command)
Check if a command is in the command mapper connection object.
Definition: command_mapper.c:62
int put_command_mapper(hmap_command_conn **hmap, const char *command)
Insert a command into the command mapper connection object.
Definition: command_mapper.c:26
Command mapper connection structure.
Definition: command_mapper.h:27
UT_hash_handle hh
Definition: command_mapper.h:30
int value
Definition: command_mapper.h:29
uint32_t key
Definition: command_mapper.h:28