1 /*
2  * lookup.h -- header of host lookup engine
3  * Part of the tcpick project
4  *
5  * Author: Francesco Stablum <duskdruid @ despammed.com>
6  *
7  * Copyright (C) 2003, 2004  Francesco Stablum
8  * Licensed under the GPL
9  *
10  */
11 
12 /*
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License as
15  * published by the Free Software Foundation; either version 2 of the
16  * License, or (at you option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful, but
19  * WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21  * See the GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software
25  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111,
26  * USA.
27  */
28 
29 
30 struct _l_node /* the node/leaf of the tree */
31 {
32 	/* tree stuff */
33 	struct _l_node * parent;
34 	struct _l_node * left;
35 	char left_h;
36 	struct _l_node * right;
37 	char right_h;
38 
39 	/* data */
40 	char * name;
41 	struct in_addr ip;
42 };
43 
44 char *
45 lookup(struct in_addr ia);
46 
47 char *
48 getportname(u_int16_t port);
49 
50 struct _l_node *
51 _l_alloc(struct in_addr, char *);
52 
53 char *
54 _l_get(struct in_addr);
55 
56