EDGESEC  0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
mdns_mapper.h
Go to the documentation of this file.
1 
11 #ifndef MDNS_MAPPER_H
12 #define MDNS_MAPPER_H
13 
14 #include <utarray.h>
15 #include <uthash.h>
16 
17 #include "mdns_list.h"
18 
19 #include "../capture/middlewares/header_middleware/mdns_decoder.h"
20 #include "../utils/os.h"
21 
26 typedef struct hashmap_mdns_conn {
27  uint8_t key[IP_ALEN];
28  struct mdns_list *value;
29  UT_hash_handle hh;
31 
40 int put_mdns_query_mapper(hmap_mdns_conn **imap, uint8_t *ip,
41  struct mdns_query_entry *query);
42 
52 int put_mdns_answer_mapper(hmap_mdns_conn **imap, uint8_t *ip,
53  struct mdns_answer_entry *query);
54 
60 void free_mdns_mapper(hmap_mdns_conn **imap);
61 
70 int check_mdns_mapper_req(hmap_mdns_conn **imap, uint8_t *ip,
71  enum MDNS_REQUEST_TYPE request);
72 #endif
File containing the definition of mdns list utils.
MDNS_REQUEST_TYPE
Definition: mdns_list.h:21
struct hashmap_mdns_conn hmap_mdns_conn
MDNS connection structure.
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.
Definition: mdns_mapper.c:85
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.
Definition: mdns_mapper.c:54
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.
Definition: mdns_mapper.c:127
void free_mdns_mapper(hmap_mdns_conn **imap)
Frees the mDNS mapper connection object.
Definition: mdns_mapper.c:117
#define IP_ALEN
Definition: net.h:24
MDNS connection structure.
Definition: mdns_mapper.h:26
UT_hash_handle hh
Definition: mdns_mapper.h:29
struct mdns_list * value
Definition: mdns_mapper.h:28
uint8_t key[IP_ALEN]
Definition: mdns_mapper.h:27
Definition: mdns_decoder.h:25
MDNS info list.
Definition: mdns_list.h:43
Definition: mdns_decoder.h:20