2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-30 22:05:23 +00:00

Merge changes between 3.0rc7 and 3.0rc8pl2.

This commit is contained in:
Ted Lemon
2001-06-27 00:31:20 +00:00
parent 07b958004f
commit d758ad8cac
99 changed files with 5909 additions and 2698 deletions

View File

@@ -3,7 +3,7 @@
Definitions for the object management API protocol memory allocation... */
/*
* Copyright (c) 1996-1999 Internet Software Consortium.
* Copyright (c) 1996-2001 Internet Software Consortium.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -46,7 +46,8 @@ isc_result_t omapi_buffer_reference (omapi_buffer_t **,
omapi_buffer_t *, const char *, int);
isc_result_t omapi_buffer_dereference (omapi_buffer_t **, const char *, int);
#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL)
#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL) || \
defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
#define DMDOFFSET (sizeof (struct dmalloc_preamble))
#define DMLFSIZE 16
#define DMUFSIZE 16
@@ -78,24 +79,23 @@ struct rc_history_entry {
int refcnt;
};
#define rc_register(x, l, r, y, z) do { \
#define rc_register(x, l, r, y, z, d) do { \
rc_history [rc_history_index].file = (x); \
rc_history [rc_history_index].line = (l); \
rc_history [rc_history_index].reference = (r); \
rc_history [rc_history_index].addr = (y); \
rc_history [rc_history_index].refcnt = (z); \
if (++rc_history_index == RC_HISTORY_MAX) \
rc_history_index = 0; \
++rc_history_count; \
rc_history_next (d); \
} while (0)
#define rc_register_mdl(r, y, z) \
rc_register (__FILE__, __LINE__, r, y, z)
#define rc_register_mdl(r, y, z, d) \
rc_register (__FILE__, __LINE__, r, y, z, d)
#else
#define rc_register(file, line, reference, addr, refcnt)
#define rc_register_mdl(reference, addr, refcnt)
#define rc_register(file, line, reference, addr, refcnt, d)
#define rc_register_mdl(reference, addr, refcnt, d)
#endif
#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL)
#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL) || \
defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
extern struct dmalloc_preamble *dmalloc_list;
extern unsigned long dmalloc_outstanding;
extern unsigned long dmalloc_longterm;

View File

@@ -123,11 +123,13 @@ int name##_hash_foreach (struct hash_table *table, \
}
void relinquish_hash_bucket_hunks (void);
struct hash_table *new_hash_table (int, const char *, int);
void free_hash_table (struct hash_table *, const char *, int);
struct hash_bucket *new_hash_bucket (const char *, int);
void free_hash_bucket (struct hash_bucket *, const char *, int);
struct hash_table *new_hash (hash_reference, hash_dereference, int);
struct hash_table *new_hash (hash_reference, hash_dereference, int,
const char *, int);
void add_hash (struct hash_table *,
const unsigned char *, unsigned, hashed_object_t *,
const char *, int);

View File

@@ -43,7 +43,7 @@
#ifndef _OMAPIP_H_
#define _OMAPIP_H_
#include <isc/result.h>
#include <isc-dhcp/result.h>
typedef unsigned int omapi_handle_t;
@@ -215,6 +215,12 @@ isc_result_t name##_array_allocate (omapi_array_t **p, \
file, line)); \
} \
\
isc_result_t name##_array_free (omapi_array_t **p, \
const char *file, int line) \
{ \
return omapi_array_free (p, file, line); \
} \
\
isc_result_t name##_array_extend (omapi_array_t *pptr, stype *ptr, int *index,\
const char *file, int line) \
{ \
@@ -235,6 +241,7 @@ isc_result_t name##_array_lookup (stype **ptr, omapi_array_t *pptr, \
#define OMAPI_ARRAY_TYPE_DECL(name, stype) \
isc_result_t name##_array_allocate (omapi_array_t **, const char *, int); \
isc_result_t name##_array_free (omapi_array_t **, const char *, int); \
isc_result_t name##_array_extend (omapi_array_t *, stype *, int *, \
const char *, int); \
isc_result_t name##_array_set (omapi_array_t *, \
@@ -247,6 +254,7 @@ isc_result_t name##_array_lookup (stype **, \
int omapi_array_foreach_index; \
stype *var = (stype *)0; \
for (omapi_array_foreach_index = 0; \
array && \
omapi_array_foreach_index < (array) -> count; \
omapi_array_foreach_index++) { \
if ((array) -> data [omapi_array_foreach_index]) { \
@@ -395,6 +403,9 @@ isc_result_t omapi_io_stuff_values (omapi_object_t *,
omapi_object_t *);
isc_result_t omapi_waiter_signal_handler (omapi_object_t *,
const char *, va_list);
isc_result_t omapi_io_state_foreach (isc_result_t (*func) (omapi_object_t *,
void *),
void *p);
isc_result_t omapi_generic_new (omapi_object_t **, const char *, int);
isc_result_t omapi_generic_set_value (omapi_object_t *, omapi_object_t *,
@@ -409,6 +420,7 @@ isc_result_t omapi_generic_signal_handler (omapi_object_t *,
isc_result_t omapi_generic_stuff_values (omapi_object_t *,
omapi_object_t *,
omapi_object_t *);
isc_result_t omapi_generic_clear_flags (omapi_object_t *);
isc_result_t omapi_message_new (omapi_object_t **, const char *, int);
isc_result_t omapi_message_set_value (omapi_object_t *, omapi_object_t *,
@@ -456,6 +468,7 @@ extern omapi_object_type_t *omapi_type_auth_key;
extern omapi_object_type_t *omapi_object_types;
void omapi_type_relinquish (void);
isc_result_t omapi_init (void);
isc_result_t omapi_object_type_register (omapi_object_type_t **,
const char *,
@@ -545,7 +558,8 @@ isc_result_t omapi_handle_td_lookup (omapi_object_t **, omapi_typed_data_t *);
void * dmalloc (unsigned, const char *, int);
void dfree (void *, const char *, int);
#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL)
#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL) || \
defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
void dmalloc_reuse (void *, const char *, int, int);
void dmalloc_dump_outstanding (void);
#else
@@ -553,8 +567,10 @@ void dmalloc_dump_outstanding (void);
#endif
#define MDL __FILE__, __LINE__
#if defined (DEBUG_RC_HISTORY)
void dump_rc_history (void);
void dump_rc_history (void *);
void rc_history_next (int);
#endif
void omapi_print_dmalloc_usage_by_caller (void);
isc_result_t omapi_object_allocate (omapi_object_t **,
omapi_object_type_t *,
size_t, const char *, int);
@@ -592,6 +608,7 @@ isc_result_t omapi_addr_list_dereference (omapi_addr_list_t **,
isc_result_t omapi_array_allocate (omapi_array_t **, omapi_array_ref_t,
omapi_array_deref_t, const char *, int);
isc_result_t omapi_array_free (omapi_array_t **, const char *, int);
isc_result_t omapi_array_extend (omapi_array_t *, char *, int *,
const char *, int);
isc_result_t omapi_array_set (omapi_array_t *, void *, int, const char *, int);

View File

@@ -69,8 +69,8 @@
#include "cdefs.h"
#include "osdep.h"
#include <isc/dst.h>
#include <isc/result.h>
#include <isc-dhcp/dst.h>
#include <isc-dhcp/result.h>
#include <omapip/convert.h>
#include <omapip/hash.h>
@@ -120,6 +120,7 @@ typedef struct __omapi_message_object {
struct __omapi_message_object *next, *prev;
omapi_object_t *object;
omapi_object_t *notify_object;
struct __omapi_protocol_object *protocol_object;
u_int32_t authlen;
omapi_typed_data_t *authenticator;
u_int32_t authid;
@@ -136,7 +137,7 @@ typedef struct __omapi_remote_auth {
omapi_object_t *a;
} omapi_remote_auth_t;
typedef struct {
typedef struct __omapi_protocol_object {
OMAPI_OBJECT_PREAMBLE;
u_int32_t header_size;
u_int32_t protocol_version;
@@ -216,6 +217,7 @@ typedef struct __omapi_io_object {
typedef struct __omapi_generic_object {
OMAPI_OBJECT_PREAMBLE;
omapi_value_t **values;
u_int8_t *changed;
int nvalues, va_max;
} omapi_generic_object_t;
@@ -294,4 +296,7 @@ void do_percentm (char *obuf, const char *ibuf);
isc_result_t uerr2isc (int);
isc_result_t ns_rcode_to_isc (int);
extern omapi_message_object_t *omapi_registered_messages;
#endif /* __OMAPIP_OMAPIP_P_H__ */

View File

@@ -96,6 +96,7 @@ typedef struct {
u_int16_t port;
} trace_addr_t;
void trace_free_all (void);
int trace_playback (void);
int trace_record (void);
isc_result_t trace_init (void (*set_time) (u_int32_t), const char *, int);