home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
ircd4652.zip
/
ircd-df-4.6.5-os2
/
include
/
res.h
< prev
next >
Wrap
C/C++ Source or Header
|
1997-12-28
|
1KB
|
73 lines
/*
* irc2.7.2/ircd/res.h (C)opyright 1992 Darren Reed.
*/
#ifndef __res_include__
#define __res_include__
#define RES_INITLIST 1
#define RES_CALLINIT 2
#define RES_INITSOCK 4
#define RES_INITDEBG 8
#define RES_INITCACH 16
#define MAXPACKET 1024
#define MAXALIASES 35
#define MAXADDRS 35
#define AR_TTL 600 /* TTL in seconds for dns cache entries */
struct hent {
char *h_name; /* official name of host */
char *h_aliases[MAXALIASES]; /* alias list */
int h_addrtype; /* host address type */
int h_length; /* length of address */
/* list of addresses from name server */
struct in_addr h_addr_list[MAXADDRS];
#define h_addr h_addr_list[0] /* address, for backward compatiblity */
};
typedef struct reslist {
int id;
int sent; /* number of requests sent */
int srch;
time_t ttl;
char type;
char retries; /* retry counter */
char sends; /* number of sends (>1 means resent) */
char resend; /* send flag. 0 == dont resend */
time_t sentat;
time_t timeout;
struct in_addr addr;
char *name;
struct reslist *next;
Link cinfo;
#ifndef _WIN32
struct hent he;
#else
struct hostent *he;
char locked;
#endif
} ResRQ;
typedef struct cache {
time_t expireat;
time_t ttl;
#ifndef _WIN32
struct hostent he;
#else
struct hostent *he;
#endif
struct cache *hname_next, *hnum_next, *list_next;
} aCache;
typedef struct cachetable {
aCache *num_list;
aCache *name_list;
} CacheTable;
#define ARES_CACSIZE 101
#define MAXCACHED 81
#endif /* __res_include__ */