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

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

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "mdns_list.h"
#include "../utils/allocs.h"
#include "../utils/os.h"
Include dependency graph for mdns_list.c:

Functions

struct mdns_listinit_mdns_list (void)
 Initialises an empty 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 push_mdns_list (struct mdns_list *mlist, struct mdns_list_info *info)
 Pushes an mdns info entry in 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 implementation of mdns list utils.

Author
Alexandru Mereacre
Date
2021

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