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

File containing the definition of mdns list utils. More...

#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <string.h>
#include <list.h>
Include dependency graph for mdns_list.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mdns_list_info
 MDNS info list. More...
 
struct  mdns_list
 MDNS info list. More...
 

Enumerations

enum  MDNS_REQUEST_TYPE { MDNS_REQUEST_NONE = 0 , MDNS_REQUEST_QUERY , MDNS_REQUEST_ANSWER }
 

Functions

struct mdns_listinit_mdns_list (void)
 Initialises an empty mdns list. More...
 
int push_mdns_list (struct mdns_list *mlist, struct mdns_list_info *info)
 Pushes an mdns info entry in the mdns list. More...
 
void free_mdns_list_el (struct mdns_list *el)
 Delete a mdns list entry. More...
 
void free_mdns_list (struct mdns_list *mlist)
 Frees the mdns list. More...
 
int check_mdns_list_req (struct mdns_list *mlist, enum MDNS_REQUEST_TYPE request)
 Checks if MDNS list has an element with a given request type. More...
 

Detailed Description

File containing the definition of mdns list utils.

Author
Alexandru Mereacre
Date
2021

Enumeration Type Documentation

◆ MDNS_REQUEST_TYPE

Enumerator
MDNS_REQUEST_NONE 
MDNS_REQUEST_QUERY 
MDNS_REQUEST_ANSWER 

Function Documentation

◆ check_mdns_list_req()

int check_mdns_list_req ( struct mdns_list mlist,
enum MDNS_REQUEST_TYPE  request 
)

Checks if MDNS list has an element with a given request type.

Parameters
mlistThe pointer to the mdns list
requestThe request type
Returns
1 request present, 0 otherwise and -1 on failure

◆ free_mdns_list()

void free_mdns_list ( struct mdns_list mlist)

Frees the mdns list.

Parameters
mlistThe pointer to the mdns list

◆ free_mdns_list_el()

void free_mdns_list_el ( struct mdns_list el)

Delete a mdns list entry.

Parameters
elThe mdns list entry

◆ init_mdns_list()

struct mdns_list* init_mdns_list ( void  )

Initialises an empty mdns list.

Returns
struct mdns_list* Returned initialised empty mdns list

◆ push_mdns_list()

int push_mdns_list ( struct mdns_list mlist,
struct mdns_list_info info 
)

Pushes an mdns info entry in the mdns list.

Parameters
mlistThe mdns list
infoThe mdns info structure
Returns
0 on success, -1 on failure