EDGESEC  0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
Functions
command_mapper.c File Reference

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

#include <stdbool.h>
#include <inttypes.h>
#include "../utils/hash.h"
#include "command_mapper.h"
Include dependency graph for command_mapper.c:

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 implementation of the command mapper.

Author
Alexandru Mereacre
Date
2021

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