EDGESEC  0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
Data Structures | Typedefs | Functions
command_mapper.h File Reference

File containing the definition of the command mapper. More...

#include <stdbool.h>
#include <inttypes.h>
#include <utarray.h>
#include <uthash.h>
#include "../utils/allocs.h"
#include "../utils/hashmap.h"
#include "../utils/os.h"
Include dependency graph for command_mapper.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  hashmap_command_conn
 Command mapper connection structure. More...
 

Typedefs

typedef struct hashmap_command_conn hmap_command_conn
 Command mapper connection structure. More...
 

Functions

void free_command_mapper (hmap_command_conn **hmap)
 Frees the command mapper connection object. More...
 
int put_command_mapper (hmap_command_conn **hmap, const char *command)
 Insert a command into the command mapper connection object. More...
 
int check_command_mapper (hmap_command_conn *const *hmap, const char *command)
 Check if a command is in the command mapper connection object. More...
 

Detailed Description

File containing the definition of the command mapper.

Author
Alexandru Mereacre
Date
2021

Typedef Documentation

◆ hmap_command_conn

Command mapper connection structure.

Function Documentation

◆ check_command_mapper()

int check_command_mapper ( hmap_command_conn *const *  hmap,
const char *  command 
)

Check if a command is in the command mapper connection object.

Parameters
[in]hmapCommand mapper object
commandThe command string
Returns
1 if command is in hmap, 0 otherwise, -1 on failure

◆ free_command_mapper()

void free_command_mapper ( hmap_command_conn **  hmap)

Frees the command mapper connection object.

Parameters
hmapCommand mapper connection object

◆ put_command_mapper()

int put_command_mapper ( hmap_command_conn **  hmap,
const char *  command 
)

Insert a command into the command mapper connection object.

Parameters
[in,out]hmapCommand mapper object
commandThe command string
Returns
0 on success, -1 on failure