00001 /* 00002 * dns.h 00003 * stuff used by dns.c 00004 * 00005 * $Id: dns.h,v 1.16 2011/02/13 14:19:33 simple Exp $ 00006 */ 00007 /* 00008 * Written by Fabian Knittel <fknittel@gmx.de> 00009 * 00010 * Copyright (C) 1999 - 2011 Eggheads Development Team 00011 * 00012 * This program is free software; you can redistribute it and/or 00013 * modify it under the terms of the GNU General Public License 00014 * as published by the Free Software Foundation; either version 2 00015 * of the License, or (at your option) any later version. 00016 * 00017 * This program is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 * GNU General Public License for more details. 00021 * 00022 * You should have received a copy of the GNU General Public License 00023 * along with this program; if not, write to the Free Software 00024 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00025 */ 00026 00027 #ifndef _EGG_DNS_H 00028 #define _EGG_DNS_H 00029 00030 typedef struct { 00031 char *name; 00032 int (*expmem) (void *); 00033 void (*event) (IP, char *, int, void *); 00034 } devent_type; 00035 00036 typedef struct { 00037 char *proc; /* Tcl proc */ 00038 char *paras; /* Additional parameters */ 00039 } devent_tclinfo_t; 00040 00041 typedef struct devent_str { 00042 struct devent_str *next; /* Pointer to next dns_event */ 00043 devent_type *type; 00044 u_8bit_t lookup; /* RES_IPBYHOST or RES_HOSTBYIP */ 00045 union { 00046 IP ip_addr; /* IP address */ 00047 char *hostname; /* Hostname */ 00048 } res_data; 00049 void *other; /* Data specific to the event type */ 00050 } devent_t; 00051 00052 #endif /* _EGG_DNS_H */