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

File containing the implementation of the mdns mapper utils. More...

#include "mdns_mapper.h"
#include "mdns_list.h"
#include "../utils/os.h"
Include dependency graph for mdns_mapper.c:

Functions

int put_mdns_info (hmap_mdns_conn **imap, uint8_t *ip, struct mdns_list_info *info)
 
int put_mdns_query_mapper (hmap_mdns_conn **imap, uint8_t *ip, struct mdns_query_entry *query)
 Inserts an mDNS query structure into the mdns mapper connection object. More...
 
int put_mdns_answer_mapper (hmap_mdns_conn **imap, uint8_t *ip, struct mdns_answer_entry *answer)
 Inserts an mDNS answer structure into the mdns mapper connection object. More...
 
void free_mdns_mapper (hmap_mdns_conn **imap)
 Frees the mDNS mapper connection object. More...
 
int check_mdns_mapper_req (hmap_mdns_conn **imap, uint8_t *ip, enum MDNS_REQUEST_TYPE request)
 Checks if mDNS mapper has an element with a given request type. More...
 

Detailed Description

File containing the implementation of the mdns mapper utils.

Author
Alexandru Mereacre
Date
2021

Function Documentation

◆ check_mdns_mapper_req()

int check_mdns_mapper_req ( hmap_mdns_conn **  imap,
uint8_t *  ip,
enum MDNS_REQUEST_TYPE  request 
)

Checks if mDNS mapper has an element with a given request type.

Parameters
imapmDNS mapper object
ipThe IP
requestThe request type
Returns
1 request present, 0 otherwise and -1 on failure

◆ free_mdns_mapper()

void free_mdns_mapper ( hmap_mdns_conn **  imap)

Frees the mDNS mapper connection object.

Parameters
imapmDNS mapper connection object

◆ put_mdns_answer_mapper()

int put_mdns_answer_mapper ( hmap_mdns_conn **  imap,
uint8_t *  ip,
struct mdns_answer_entry query 
)

Inserts an mDNS answer structure into the mdns mapper connection object.

Parameters
imapmDNS mapper object
ipThe IP
querymDNS answer structure
Returns
0 on success, -1 on failure

◆ put_mdns_info()

int put_mdns_info ( hmap_mdns_conn **  imap,
uint8_t *  ip,
struct mdns_list_info info 
)

◆ put_mdns_query_mapper()

int put_mdns_query_mapper ( hmap_mdns_conn **  imap,
uint8_t *  ip,
struct mdns_query_entry query 
)

Inserts an mDNS query structure into the mdns mapper connection object.

Parameters
imapmDNS mapper object
ipThe IP
querymDNS query structure
Returns
0 on success, -1 on failure