forked from pflarr/dns_parse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rtypes.h
35 lines (25 loc) · 796 Bytes
/
rtypes.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef __RTYPES_H__
#define __RTYPES_H__
#include <pcap.h>
#include <stdint.h>
typedef char * rr_data_parser(const uint8_t*, uint32_t, uint32_t,
uint16_t, uint32_t);
typedef struct {
uint16_t cls;
uint16_t rtype;
rr_data_parser * parser;
const char * name;
const char * doc;
unsigned long long count;
} rr_parser_container;
rr_parser_container * find_parser(uint16_t, uint16_t);
char * read_dns_name(uint8_t *, uint32_t, uint32_t);
rr_data_parser opts;
rr_data_parser escape;
// Add them to the list of data parsers in rtypes.c.
extern rr_parser_container rr_parsers[];
// This is for handling rr's with errors or an unhandled rtype.
rr_parser_container default_rr_parser;
void print_parsers();
void print_parser_usage();
#endif