Go to the source code of this file.
|
static TIME tree_evaluate_recurse | PROTO ((int *, unsigned char **, int *, struct tree *)) |
|
static TIME do_host_lookup | PROTO ((int *, unsigned char **, int *, struct dns_host_entry *)) |
|
static void do_data_copy | PROTO ((int *, unsigned char **, int *, unsigned char *, int)) |
|
pair | cons (caddr_t car, pair cdr) |
|
struct tree_cache * | tree_cache (struct tree *tree) |
|
struct tree * | tree_host_lookup (char *name) |
|
struct dns_host_entry * | enter_dns_host (char *name) |
|
struct tree * | tree_const (unsigned char *data, int len) |
|
struct tree * | tree_concat (struct tree *left, struct tree *right) |
|
struct tree * | tree_limit (struct tree *tree, int limit) |
|
int | tree_evaluate (struct tree_cache *tree_cache) |
|
static TIME | tree_evaluate_recurse (int *bufix, unsigned char **bufp, int *bufcount, struct tree *tree) |
|
static TIME | do_host_lookup (int *bufix, unsigned char **bufp, int *bufcount, struct dns_host_entry *dns) |
|
static void | do_data_copy (int *bufix, unsigned char **bufp, int *bufcount, unsigned char *data, int len) |
|
◆ cons()
◆ do_data_copy()
static void do_data_copy |
( |
int * |
bufix, |
|
|
unsigned char ** |
bufp, |
|
|
int * |
bufcount, |
|
|
unsigned char * |
data, |
|
|
int |
len |
|
) |
| |
|
static |
◆ do_host_lookup()
static TIME do_host_lookup |
( |
int * |
bufix, |
|
|
unsigned char ** |
bufp, |
|
|
int * |
bufcount, |
|
|
struct dns_host_entry * |
dns |
|
) |
| |
|
static |
Definition at line 284 of file tree.c.
295 debug (
"time: now = %d dns = %d %d diff = %d",
300 if (cur_time <= dns ->
timeout) {
302 debug (
"easy copy: %x %d %x",
303 dns ->
data, dns -> data_len,
304 dns ->
data ? *(
int *)(dns ->
data) : 0);
307 dns ->
data, dns -> data_len);
325 warn (
"%s: temporary name server failure",
332 warn (
"%s: no A record associated with address",
342 debug (
"Lookup succeeded; first address is %x",
352 if (dns -> buf_len <
i) {
354 (
unsigned char *)
dmalloc (new_len,
"do_host_lookup");
357 new_len = dns -> buf_len;
358 if (!dns -> buf_len) {
366 dns -> buf_len = new_len;
377 debug (
"dns -> data: %x h -> h_addr_list [0]: %x",
380 dns -> data_len = new_len;
387 debug (
"hard copy: %x %d %x",
388 dns ->
data, dns -> data_len, *(
int *)(dns ->
data));
GLenum GLuint GLenum GLsizei const GLchar * buf
void dfree(void *ptr, char *name)
GLbitfield GLuint64 timeout
GLfloat GLfloat GLfloat GLfloat h
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static void do_data_copy(int *bufix, unsigned char **bufp, int *bufcount, unsigned char *data, int len)
PHOSTENT WSAAPI gethostbyname(IN const char FAR *name)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
#define memcpy(s1, s2, n)
void * dmalloc(int size, char *name)
Referenced by tree_evaluate_recurse().
◆ enter_dns_host()
struct dns_host_entry* enter_dns_host |
( |
char * |
name | ) |
|
Definition at line 96 of file tree.c.
99 struct dns_host_entry *dh;
101 if (!(dh = (
struct dns_host_entry *)
dmalloc 102 (
sizeof (
struct dns_host_entry),
"enter_dns_host"))
105 error (
"Can't allocate space for new host.");
107 dh ->
data = (
unsigned char *)0;
ACPI_SIZE strlen(const char *String)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
char * strcpy(char *DstString, const char *SrcString)
void * dmalloc(int size, char *name)
Referenced by tree_host_lookup().
◆ PROTO() [1/3]
◆ PROTO() [2/3]
◆ PROTO() [3/3]
◆ tree_cache()
Definition at line 69 of file tree.c.
74 tc = new_tree_cache (
"tree_cache");
77 tc ->
value = (
unsigned char *)0;
◆ tree_concat()
Definition at line 129 of file tree.c.
148 error (
"No memory to concatenate constants.");
163 if (!(
nt = new_tree (
"tree_concat")))
164 error (
"No memory for data tree concatenation node.");
165 nt ->
op = TREE_CONCAT;
GLenum GLuint GLenum GLsizei const GLchar * buf
void dfree(void *ptr, char *name)
tree * free_tree(tree *t)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
#define memcpy(s1, s2, n)
void * dmalloc(int size, char *name)
◆ tree_const()
Definition at line 114 of file tree.c.
119 if (!(
nt = new_tree (
"tree_const"))
120 || !(
nt ->
data.const_val.data =
121 (
unsigned char *)
dmalloc (
len,
"tree_const")))
122 error (
"No memory for constant data tree node.");
123 nt ->
op = TREE_CONST;
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
#define memcpy(s1, s2, n)
void * dmalloc(int size, char *name)
◆ tree_evaluate()
Definition at line 194 of file tree.c.
218 if (!(bp = (
unsigned char *)
dmalloc (bufix,
"tree_evaluate")))
void dfree(void *ptr, char *name)
static TIME tree_evaluate_recurse(int *bufix, unsigned char **bufp, int *bufcount, struct tree *tree)
GLsizei const GLfloat * value
void * dmalloc(int size, char *name)
◆ tree_evaluate_recurse()
Definition at line 240 of file tree.c.
259 case TREE_HOST_LOOKUP:
278 warn (
"Bad node id in tree: %d.");
static void do_data_copy(int *bufix, unsigned char **bufp, int *bufcount, unsigned char *data, int len)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
static TIME tree_evaluate_recurse(int *bufix, unsigned char **bufp, int *bufcount, struct tree *tree)
static TIME do_host_lookup(int *bufix, unsigned char **bufp, int *bufcount, struct dns_host_entry *dns)
Referenced by tree_evaluate().
◆ tree_host_lookup()
Definition at line 84 of file tree.c.
88 nt = new_tree (
"tree_host_lookup");
90 error (
"No memory for host lookup tree node.");
91 nt ->
op = TREE_HOST_LOOKUP;
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
struct dns_host_entry * enter_dns_host(char *name)
◆ tree_limit()
Definition at line 171 of file tree.c.
178 if (
tree ->
op == TREE_CONST) {
185 rv = new_tree (
"tree_limit");
187 return (
struct tree *)0;
188 rv ->
op = TREE_LIMIT;
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
◆ copyright
Initial value:=
"$Id: tree.c,v 1.10 1997/05/09 08:14:57 mellon Exp $ Copyright (c) 1995, 1996, 1997 The Internet Software Consortium. All rights reserved.\n"
Definition at line 44 of file tree.c.