#ifndef lint
static char copyright[] =
-"$Id: comapi.c,v 1.1 2000/05/16 23:12:09 mellon Exp $ Copyright (c) 1999-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: comapi.c,v 1.2 2000/05/17 16:03:59 mellon Exp $ Copyright (c) 1999-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
group = (struct group_object *)0;
if (group_name_hash &&
group_hash_lookup (&group, group_name_hash,
+ (const char *)
tv -> value -> u.buffer.value,
tv -> value -> u.buffer.len, MDL)) {
omapi_value_dereference (&tv, MDL);
#ifndef lint
static char copyright[] =
-"$Id: discover.c,v 1.27 2000/05/16 23:02:12 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: discover.c,v 1.28 2000/05/17 16:04:00 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
interface_dereference (&tmp, MDL);
tmp = interfaces;
- if (interface_discovery_hook)
- (*interface_discovery_hook (tmp);
+ if (dhcp_interface_discovery_hook)
+ (*dhcp_interface_discovery_hook) (tmp);
}
fclose (proc_dev);
#ifndef lint
static char copyright[] =
-"$Id: options.c,v 1.59 2000/05/16 23:02:27 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: options.c,v 1.60 2000/05/17 16:04:02 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#define DHCP_OPTION_DATA
u = (struct universe *)0;
universe_hash_lookup (&u, universe_hash,
- name -> data, name -> len, MDL);
+ (const char *)name -> data, name -> len, MDL);
if (!u) {
log_error ("unknown option space %s.", name -> data);
return 0;
#ifndef lint
static char copyright[] =
-"$Id: parse.c,v 1.73 2000/05/16 23:02:28 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: parse.c,v 1.74 2000/05/17 16:04:03 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
}
option -> universe -> options [option -> code] = option;
option_hash_add (option -> universe -> hash,
- (const unsigned char *)option -> name,
+ (const char *)option -> name,
0, option, MDL);
return 1;
}
#ifndef lint
static char copyright[] =
-"$Id: tree.c,v 1.81 2000/03/18 03:32:53 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: tree.c,v 1.82 2000/05/17 16:04:04 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
const char *file;
int line;
{
- struct binding_scope *bp;
-
if (!ptr || !*ptr) {
log_error ("%s(%d): null pointer", file, line);
#if defined (POINTER_DEBUG)
const char *file;
int line;
{
- struct fundef *bp;
+ struct fundef *bp = *ptr;
struct string_list *sp, *next;
if (!ptr) {
OMAPI_OBJECT_ALLOC_DECL (lease, struct lease, dhcp_type_lease)
OMAPI_OBJECT_ALLOC_DECL (class, struct class, dhcp_type_class)
OMAPI_OBJECT_ALLOC_DECL (pool, struct pool, dhcp_type_pool)
-OMAPI_OBJECT_ALLOC_DECL (host, struct host_decl, dhcp_type_host);
+OMAPI_OBJECT_ALLOC_DECL (host, struct host_decl, dhcp_type_host)
/* alloc.c */
OMAPI_OBJECT_ALLOC_DECL (subnet, struct subnet, dhcp_type_subnet)
void remove_protocol PROTO ((struct protocol *));
OMAPI_OBJECT_ALLOC_DECL (interface,
- struct interface_info, dhcp_type_interface);
+ struct interface_info, dhcp_type_interface)
/* hash.c */
struct hash_table *new_hash PROTO ((hash_reference, hash_dereference, int));
unsigned, const char *, int));
int hash_lookup PROTO ((hashed_object_t **, struct hash_table *,
const unsigned char *, unsigned, const char *, int));
-int casecmp (const void *s, const void *t, unsigned len);
+int casecmp (const void *s, const void *t, unsigned long len);
HASH_FUNCTIONS_DECL (group, const char *, struct group_object)
HASH_FUNCTIONS_DECL (universe, const char *, struct universe)
HASH_FUNCTIONS_DECL (option, const char *, struct option)
int dhcp_failover_state_match (dhcp_failover_state_t *, u_int8_t *, unsigned);
const char *dhcp_failover_reject_reason_print (int);
const char *dhcp_failover_state_name_print (enum failover_state);
-failover_option_t *dhcp_failover_option_printf PROTO ((unsigned, char *,
- unsigned *,
- unsigned,
- const char *, ...));
+failover_option_t *dhcp_failover_option_printf (unsigned, char *,
+ unsigned *,
+ unsigned,
+ const char *, ...);
failover_option_t *dhcp_failover_make_option PROTO ((unsigned, char *,
unsigned *,
unsigned, ...));
-isc_result_t dhcp_failover_put_message PROTO ((dhcp_failover_link_t *,
- omapi_object_t *,
- int, ...));
+isc_result_t dhcp_failover_put_message (dhcp_failover_link_t *,
+ omapi_object_t *, int, ...);
isc_result_t dhcp_failover_send_connect PROTO ((omapi_object_t *));
isc_result_t dhcp_failover_send_connectack PROTO ((omapi_object_t *, int));
isc_result_t dhcp_failover_send_disconnect PROTO ((omapi_object_t *,
hashed_object_t *value;
};
-typedef int (*hash_comparator_t)(const void *, const void *, size_t);
+typedef int (*hash_comparator_t)(const void *, const void *, unsigned long);
struct hash_table {
unsigned hash_count;
if (c -> state == omapi_connection_connecting) {
sl = sizeof error;
if (getsockopt (c -> socket, SOL_SOCKET, SO_ERROR,
- &error, &sl) < 0) {
+ (char *)&error, &sl) < 0) {
omapi_disconnect (h, 1);
return ISC_R_SUCCESS;
}
if (po -> type != omapi_type_protocol ||
!po -> outer || po -> outer -> type != omapi_type_connection ||
- m -> type != omapi_type_message)
+ mo -> type != omapi_type_message)
return ISC_R_INVALIDARG;
- if (om && om -> type != omapi_type_message)
+ if (omo && omo -> type != omapi_type_message)
return ISC_R_INVALIDARG;
p = (omapi_protocol_object_t *)po;
c = (omapi_object_t *)(po -> outer);
#include <stdlib.h>
#include <stdarg.h>
#include <isc/result.h>
+#include <sys/time.h>
#include <omapip/omapip.h>
int main (int argc, char **argv)
#ifndef lint
static char copyright[] =
-"$Id: confpars.c,v 1.110 2000/05/16 23:03:37 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: confpars.c,v 1.111 2000/05/17 16:04:23 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
char *name;
u_int32_t split;
u_int8_t hba [32];
- int hba_len = sizeof hba;
+ unsigned hba_len = sizeof hba;
int i;
struct expression *expr;
isc_result_t status;
#ifndef lint
static char copyright[] =
-"$Id: dhcp.c,v 1.149 2000/05/16 23:03:42 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dhcp.c,v 1.150 2000/05/17 16:04:25 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
struct universe *u = (struct universe *)0;
if (!universe_hash_lookup (&u, universe_hash,
- d1.data, d1.len, MDL)) {
+ (const char *)d1.data, d1.len,
+ MDL)) {
log_error ("unknown option space %s.", d1.data);
option_state_dereference (&options, MDL);
if (subnet)
struct universe *u = (struct universe *)0;
if (!universe_hash_lookup (&u, universe_hash,
- d1.data, d1.len, MDL)) {
+ (const char *)d1.data, d1.len,
+ MDL)) {
log_error ("unknown option space %s.", d1.data);
return;
}
#ifndef lint
static char copyright[] =
-"$Id: failover.c,v 1.14 2000/05/16 23:03:45 mellon Exp $ Copyright (c) 1999-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: failover.c,v 1.15 2000/05/17 16:04:26 mellon Exp $ Copyright (c) 1999-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
} else if (link -> imsg -> type == FTM_POOLREQ) {
dhcp_failover_pool_rebalance (state);
} else if (link -> imsg -> type == FTM_POOLRESP) {
- log_info ("pool response: %d leases",
+ log_info ("pool response: %ld leases",
+ (unsigned long)
link -> imsg -> addresses_transferred);
}
}
case FT_UNDEF:
default:
+ break;
}
failover_print (obuf, obufix, obufmax, ")");