00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef _EGG_MOD_DNS_DNS_H
00038 #define _EGG_MOD_DNS_DNS_H
00039
00040 struct resolve {
00041 struct resolve *next;
00042 struct resolve *previous;
00043 struct resolve *nextid;
00044 struct resolve *previousid;
00045 struct resolve *nextip;
00046 struct resolve *previousip;
00047 struct resolve *nexthost;
00048 struct resolve *previoushost;
00049 time_t expiretime;
00050 char *hostn;
00051 IP ip;
00052 u_16bit_t id;
00053 u_8bit_t state;
00054 u_8bit_t sends;
00055 };
00056
00057 enum resolve_states {
00058 STATE_FINISHED,
00059 STATE_FAILED,
00060 STATE_PTRREQ,
00061 STATE_AREQ
00062 };
00063
00064 #define IS_PTR(x) (x->state == STATE_PTRREQ)
00065 #define IS_A(x) (x->state == STATE_AREQ)
00066
00067 #ifdef DEBUG_DNS
00068 # define ddebug0 debug0
00069 # define ddebug1 debug1
00070 # define ddebug2 debug2
00071 # define ddebug3 debug3
00072 # define ddebug4 debug4
00073 #else
00074 # define ddebug0(x)
00075 # define ddebug1(x, x1)
00076 # define ddebug2(x, x1, x2)
00077 # define ddebug3(x, x1, x2, x3)
00078 # define ddebug4(x, x1, x2, x3, x4)
00079 #endif
00080
00081 #endif