-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtriez_netfpga.h
70 lines (57 loc) · 1.96 KB
/
triez_netfpga.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
* * FILE NAME: triez_netfpga.h
* * HEADER FILE FOR triez_netfpga.c
* * CREATED BY: RICK W. WALLEN
* * DATE CREATED: SEPTEMBER.29.2014
* * DATE LAST MOD: SEPTEMBER.29.2014
* * ___________
* * | |
* * [[|___________|]]
* * \___________/
* * __|[ ]||||[ ]|__
* * \_| # |||| # |_/
* * ___ ===Jeep=== ___
* * |\/\| '' '' |\/\|
* * |/\/| |/\/|
* * |_\_| |_\_|
* */
/**********************************************************************/
/*
* * MODIFIED LOG:
* * <date>-<description>
* * September.29.2014-Adapted from triez.h
* */
/**********************************************************************/
#ifndef _TRIEZ_NETFPGA_
#define _TRIEZ_NETFPGA_ 1
//#include <arpa/inet.h>
#include "dns_netfpga.h"
/* F(X) PROTOTYPES */
/* F(X) TO DAEMONIZE THE SERVER */
//int daemonInit(const char *pname, int facility);
/* F(X) TO CHECK DOMAIN NAME DOESN'T CONTAIN INVALID CHARACTERS */
uint16_t checkDN(char *domName);
//int checkDN(char *domName);
/* F(X) TO CREATE A RESOUCE RECORD */
RR *createResRec(char *rec, uint32_t *ttlMin, uint16_t *rclass);
/* F(X) TO CREATE A NODE IN TRIE */
Trie *createNode(char k, RR *v);
/* F(X) TO ADD TO TRIE */
void addTrie(Trie *root, char *name, RR *resrec);
/* F(X) TO SEARCH TRIE */
Trie *searchTrie(Trie *root, char *search, uint16_t qt, uint16_t qc);
/* F(X) TO PULL NAME FROM TRIE */
void findN(char *dest, Trie *start);
/* F(X) TO ADD TO TRIE */
void delTrie(Trie *root);
/* F(X) TO PULL DATA FROM NODE AND RETRIEVE KEY */
void putResRecStr(DnsHdrFlags *fl, DnsHeader *head, Trie *root, Trie *result, DnsQuery *qry, char *msg, int *offset, char *search);
/*F(X) TO MAKE DOMAIN NAME UPPER CASE FOR SEARCHING */
void uDN(char *dom);
/* F(X) TO TAKE IN STRING OF ZONE FILE NAME AND CREATE DB */
Trie *readZone(char *f );
/* F(X) TO REVERSE DOMAIN NAME */
int revDN(char *DN);
/* F(X) PROTOTYPES */
uint16_t chSup(DnsType clType, DnsClass clClass);
#endif //end if triez_netfpga.h