EDGESEC  0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
mdns_decoder.h
Go to the documentation of this file.
1 
11 #ifndef MDNS_DECODER_H
12 #define MDNS_DECODER_H
13 
14 #include <utarray.h>
15 #include "../../../utils/net.h"
16 #include "../../../utils/os.h"
17 
18 #include "packet_decoder.h"
19 
21  uint16_t qtype;
23 };
24 
26  uint32_t ttl;
27  uint16_t rrtype;
29  uint8_t ip[IP_ALEN];
30 };
31 
44 int decode_mdns_queries(uint8_t *payload, size_t len, size_t *first,
45  uint16_t nqueries, UT_array *queries);
46 
59 int decode_mdns_answers(uint8_t *payload, size_t len, size_t *first,
60  uint16_t nanswers, UT_array *answers);
61 
69 int decode_mdns_header(uint8_t *packet, struct mdns_header *out);
70 
77 bool decode_mdns_packet(struct capture_packet *cpac);
78 #endif
int decode_mdns_answers(uint8_t *payload, size_t len, size_t *first, uint16_t nanswers, UT_array *answers)
Decodes the mdns answers.
Definition: mdns_decoder.c:152
int decode_mdns_queries(uint8_t *payload, size_t len, size_t *first, uint16_t nqueries, UT_array *queries)
Decodes the mdns queries.
Definition: mdns_decoder.c:122
bool decode_mdns_packet(struct capture_packet *cpac)
Decode mdns packet.
Definition: mdns_decoder.c:203
int decode_mdns_header(uint8_t *packet, struct mdns_header *out)
Decodes the mdns header.
Definition: mdns_decoder.c:190
#define IP_ALEN
Definition: net.h:24
#define MAX_WEB_PATH_LEN
Definition: os.h:30
File containing the definition of the packet decoder utilities.
Capture structure definition.
Definition: packet_decoder.h:306
Definition: mdns_decoder.h:25
uint16_t rrtype
Definition: mdns_decoder.h:27
char rrname[MAX_WEB_PATH_LEN]
Definition: mdns_decoder.h:28
uint8_t ip[IP_ALEN]
Definition: mdns_decoder.h:29
uint32_t ttl
Definition: mdns_decoder.h:26
mDNS header definition
Definition: packet_decoder.h:243
Definition: mdns_decoder.h:20
char qname[MAX_WEB_PATH_LEN]
Definition: mdns_decoder.h:22
uint16_t qtype
Definition: mdns_decoder.h:21