gcc warnings.
See RT ticket #17013 for more.
struct option *elapsed_option = NULL;
static struct dhc6_lease *dhc6_dup_lease(struct dhc6_lease *lease,
- char *file, int line);
-static struct dhc6_ia *dhc6_dup_ia(struct dhc6_ia *ia, char *file, int line);
+ const char *file, int line);
+static struct dhc6_ia *dhc6_dup_ia(struct dhc6_ia *ia,
+ const char *file, int line);
static struct dhc6_addr *dhc6_dup_addr(struct dhc6_addr *addr,
- char *file, int line);
-static void dhc6_ia_destroy(struct dhc6_ia *ia, char *file, int line);
+ const char *file, int line);
+static void dhc6_ia_destroy(struct dhc6_ia *ia, const char *file, int line);
static isc_result_t dhc6_parse_ia_na(struct dhc6_ia **pia,
struct packet *packet,
struct option_state *options);
static void make_client6_options(struct client_state *client,
struct option_state **op,
struct dhc6_lease *lease, u_int8_t message);
-static void script_write_params6(struct client_state *client, char *prefix,
+static void script_write_params6(struct client_state *client,
+ const char *prefix,
struct option_state *options);
/* The "best" default DUID, since we cannot predict any information
* address this "one daemon model."
*/
void
-form_duid(struct data_string *duid, char *file, int line)
+form_duid(struct data_string *duid, const char *file, int line)
{
struct interface_info *ip;
int len;
/* Create a complete copy of a DHCPv6 lease structure.
*/
static struct dhc6_lease *
-dhc6_dup_lease(struct dhc6_lease *lease, char *file, int line)
+dhc6_dup_lease(struct dhc6_lease *lease, const char *file, int line)
{
struct dhc6_lease *copy;
struct dhc6_ia **insert_ia, *ia;
/* Duplicate an IA structure.
*/
static struct dhc6_ia *
-dhc6_dup_ia(struct dhc6_ia *ia, char *file, int line)
+dhc6_dup_ia(struct dhc6_ia *ia, const char *file, int line)
{
struct dhc6_ia *copy;
struct dhc6_addr **insert_addr, *addr;
/* Duplicate an IAADDR structure.
*/
static struct dhc6_addr *
-dhc6_dup_addr(struct dhc6_addr *addr, char *file, int line)
+dhc6_dup_addr(struct dhc6_addr *addr, const char *file, int line)
{
struct dhc6_addr *copy;
/* Clean up a lease object and deallocate all its parts. */
void
-dhc6_lease_destroy(struct dhc6_lease *lease, char *file, int line)
+dhc6_lease_destroy(struct dhc6_lease *lease, const char *file, int line)
{
struct dhc6_ia *ia, *nia;
/* Traverse the addresses list, and destroy their contents. */
static void
-dhc6_ia_destroy(struct dhc6_ia *ia, char *file, int line)
+dhc6_ia_destroy(struct dhc6_ia *ia, const char *file, int line)
{
struct dhc6_addr *addr, *naddr;
if ((client->active_lease != NULL) &&
((old_ia = find_ia(client->active_lease->bindings,
- (char *)ia.data)) != NULL)) {
+ (char *)ia.buffer->data)) != NULL)) {
/* For each address in the old IA, request a binding. */
memset(&addr, 0, sizeof(addr));
for (old_addr = old_ia->addrs ; old_addr != NULL ;
struct client_state *client;
struct data_string ds;
struct option_cache *oc;
- struct dhc6_lease *lease;
int send_ret;
client = input;
* Check whether the server has sent a unicast option; if so, we can
* use the address it specified.
*/
- oc = lookup_option(&dhcpv6_universe, lease->options, D6O_UNICAST);
+ oc = lookup_option(&dhcpv6_universe,
+ client->active_lease->options, D6O_UNICAST);
if (oc && evaluate_option_cache(&ds, NULL, NULL, NULL,
- lease->options, NULL, &global_scope,
- oc, MDL)) {
+ client->active_lease->options,
+ NULL, &global_scope, oc, MDL)) {
if (ds.len < 16) {
log_error("Invalid unicast option length %d.", ds.len);
} else {
* to info level.
*/
static void
-status_log(int code, char *scope, const char *additional, int len)
+status_log(int code, const char *scope, const char *additional, int len)
{
- char *msg = NULL;
+ const char *msg = NULL;
switch(code) {
case STATUS_Success:
if (len > 0)
log_info("%s status code %s: %s", scope, msg,
- print_hex_1(len, (unsigned char *)additional, 50));
+ print_hex_1(len,
+ (const unsigned char *)additional, 50));
else
log_info("%s status code %s.", scope, msg);
}
*/
static isc_result_t
dhc6_check_status(isc_result_t rval, struct option_state *options,
- char *scope, unsigned *code)
+ const char *scope, unsigned *code)
{
struct data_string msg;
isc_result_t status;
* over-written by the later versions.
*/
static void
-dhc6_marshall_values(char *prefix, struct client_state *client,
+dhc6_marshall_values(const char *prefix, struct client_state *client,
struct dhc6_lease *lease, struct dhc6_ia *ia,
struct dhc6_addr *addr)
{
struct dhc6_ia *ia, *oldia;
struct dhc6_addr *addr, *oldaddr;
struct dhc6_lease *lease, *old;
- char *reason;
+ const char *reason;
TIME dns_update_offset = 1;
lease = client->active_lease;
void
unconfigure6(struct client_state *client, const char *reason)
{
- struct dhc6_lease *lease;
struct dhc6_ia *ia;
struct dhc6_addr *addr;
for (ia = client->active_lease->bindings ; ia != NULL ; ia = ia->next) {
for (addr = ia->addrs ; addr != NULL ; addr = addr->next) {
script_init(client, reason, NULL);
- dhc6_marshall_values("old_", client, lease, ia, addr);
+ dhc6_marshall_values("old_", client,
+ client->active_lease, ia, addr);
script_go(client);
if (client->config->do_forward_update)
* generic lines.
*/
static void
-script_write_params6(struct client_state *client, char *prefix,
+script_write_params6(struct client_state *client, const char *prefix,
struct option_state *options)
{
struct envadd_state es;
/* Write an option cache to the lease store. */
static void
write_options(struct client_state *client, struct option_state *options,
- char *preamble)
+ const char *preamble)
{
int i;
for (i = 0; i < options->universe_count; i++) {
option_space_foreach(NULL, NULL, client, NULL, options,
- &global_scope, universes[i], preamble,
- write_lease_option);
+ &global_scope, universes[i],
+ (char *)preamble, write_lease_option);
}
}
{
foo -> cdr = free_pairs;
free_pairs = foo;
- dmalloc_reuse (free_pairs, (char *)0, 0, 0);
+ dmalloc_reuse (free_pairs, __FILE__, __LINE__, 0);
}
#if defined (DEBUG_MEMORY_LEAKAGE) || \
{
expr -> data.not = free_expressions;
free_expressions = expr;
- dmalloc_reuse (free_expressions, (char *)0, 0, 0);
+ dmalloc_reuse (free_expressions, __FILE__, __LINE__, 0);
}
#if defined (DEBUG_MEMORY_LEAKAGE) || \
}
packet -> raw = (struct dhcp_packet *)free_packets;
free_packets = packet;
- dmalloc_reuse (free_packets, (char *)0, 0, 0);
+ dmalloc_reuse (free_packets, __FILE__, __LINE__, 0);
return 1;
}
continue;
if (tmp -> rfdesc == -1)
continue;
- if (local_family == AF_INET) {
+#ifdef DHCPv6
+ if (local_family == AF_INET6) {
status = omapi_register_io_object((omapi_object_t *)tmp,
if_readsocket,
- 0, got_one, 0, 0);
-#ifdef DHCPv6
+ 0, got_one_v6, 0, 0);
} else {
+#else
+ {
+#endif /* DHCPv6 */
status = omapi_register_io_object((omapi_object_t *)tmp,
if_readsocket,
- 0, got_one_v6, 0, 0);
-#endif /* DHCPv6 */
+ 0, got_one, 0, 0);
}
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register I/O handle for %s: %s",
if (name [len - 1] != '.') {
tname = dmalloc ((unsigned)len + 2, MDL);
if (!tname)
- return ISC_R_NOMEMORY;;
+ return ISC_R_NOMEMORY;
strcpy (tname, name);
tname [len] = '.';
tname [len + 1] = 0;
void *void_oro) {
struct data_string *oro = (struct data_string *)void_oro;
- putUShort((unsigned char *)(oro->data + oro->len), oc->option->code);
+ putUShort(oro->buffer->data + oro->len, oc->option->code);
oro->len += 2;
}
while (o != NULL) {
if (o->universe == &dhcpv6_universe) {
unsigned char *tmp;
- tmp = (unsigned char *)server_oro->data;
+ tmp = server_oro->buffer->data;
putUShort(tmp + server_oro->len,
o->code);
server_oro->len += 2;
int status = 0;
universe_hash_lookup(&u, universe_hash,
- (char *)name->data, name->len, MDL);
+ (const char *)name->data, name->len, MDL);
if (u == NULL) {
log_error("option_space_encapsulate: option space %.*s does "
"not exist, but is configured.",
msg_type = packet[0];
if ((msg_type == DHCPV6_RELAY_FORW) ||
(msg_type == DHCPV6_RELAY_REPL)) {
- relay = (struct dhcpv6_relay_packet *)packet;
+ relay = (const struct dhcpv6_relay_packet *)packet;
decoded_packet->dhcpv6_msg_type = relay->msg_type;
/* relay-specific data */
return;
}
} else {
- msg = (struct dhcpv6_packet *)packet;
+ msg = (const struct dhcpv6_packet *)packet;
decoded_packet->dhcpv6_msg_type = msg->msg_type;
/* message-specific data */
* address family.
*/
memset(&name, 0, sizeof(name));
- if (family == AF_INET) {
- struct sockaddr_in *addr = (struct sockaddr_in *)&name;
- addr->sin_family = AF_INET;
- addr->sin_port = local_port;
- memcpy(&addr->sin_addr,
- &local_address,
- sizeof(addr->sin_addr));
- name_len = sizeof(*addr);
- domain = PF_INET;
#ifdef DHCPv6
- } else {
+ if (family == AF_INET6) {
struct sockaddr_in6 *addr = (struct sockaddr_in6 *)&name;
addr->sin6_family = AF_INET6;
addr->sin6_port = local_port;
sizeof(addr->sin6_addr));
name_len = sizeof(*addr);
domain = PF_INET6;
+ } else {
+#else
+ {
#endif /* DHCPv6 */
+ struct sockaddr_in *addr = (struct sockaddr_in *)&name;
+ addr->sin_family = AF_INET;
+ addr->sin_port = local_port;
+ memcpy(&addr->sin_addr,
+ &local_address,
+ sizeof(addr->sin_addr));
+ name_len = sizeof(*addr);
+ domain = PF_INET;
}
/* Make a socket... */
};
/* Some code refers to a different table. */
-char *dhcpv6_type_names[] = {
+const char *dhcpv6_type_names[] = {
NULL,
"Solicit",
"Advertise",
struct binding *binding;
struct binding_value *bv, *obv;
#ifdef HAVE_REGEX_H
- int reg_st, regflags = REG_EXTENDED | REG_NOSUB;
+ int regflags = REG_EXTENDED | REG_NOSUB;
regex_t re;
#endif
data_string_forget(&right, MDL);
regfree(&re);
- return reg_st;
+
+ /*
+ * If we have bleft and bright then we have a good
+ * syntax, otherwise not.
+ *
+ * XXX: we don't warn on invalid regular expression
+ * syntax, should we?
+ */
+ return bleft && bright;
#else
/* It shouldn't be possible to configure a regex operator
* when there's no support.
+# We want to turn on warnings if we are using gcc and the user did
+# not specify CFLAGS. The autoconf check for the C compiler sets the
+# CFLAGS if gcc is used, so we will save it before we run that check.
+SAVE_CFLAGS="$CFLAGS"
+
+# Now find our C compiler.
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
fi
+
+# If we have gcc, and AC_PROG_CC changed the flags, then we know the
+# user did not specify any flags. Add warnings in this case.
+if test "$GCC" = "yes"; then
+ if test "$CFLAGS" != "$SAVE_CFLAGS"; then
+ CFLAGS="$CFLAGS -Wall -Werror -fno-strict-aliasing"
+ fi
+fi
+
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+
#include <sys/types.h>
- #include <sys/socket.h>
+#include <sys/socket.h>
+
int
main ()
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+
#include <sys/types.h>
- #include <sys/socket.h>
+#include <sys/socket.h>
+
int
main ()
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+
#include <sys/types.h>
- #include <sys/socket.h>
+#include <sys/socket.h>
+
int
main ()
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+
#include <sys/types.h>
- #include <sys/socket.h>
+#include <sys/socket.h>
+
int
main ()
{ (exit 1); exit 1; }; }
fi
+
fi
# like AUTHORS, COPYING, and such
AM_INIT_AUTOMAKE([foreign])
+# We want to turn on warnings if we are using gcc and the user did
+# not specify CFLAGS. The autoconf check for the C compiler sets the
+# CFLAGS if gcc is used, so we will save it before we run that check.
+SAVE_CFLAGS="$CFLAGS"
+
+# Now find our C compiler.
AC_PROG_CC
+
+# If we have gcc, and AC_PROG_CC changed the flags, then we know the
+# user did not specify any flags. Add warnings in this case.
+if test "$GCC" = "yes"; then
+ if test "$CFLAGS" != "$SAVE_CFLAGS"; then
+ CFLAGS="$CFLAGS -Wall -Werror -fno-strict-aliasing"
+ fi
+fi
+
AC_PROG_RANLIB
AC_CONFIG_HEADERS([includes/config.h])
AC_CHECK_MEMBER(struct msghdr.msg_control,,
[AC_MSG_ERROR([Missing msg_control member in
msg_control structure.])],
- [#include <sys/types.h>
- #include <sys/socket.h>])],
- [#include <sys/types.h>
- #include <sys/socket.h>])
+ [
+#include <sys/types.h>
+#include <sys/socket.h>
+ ])
+ ],
+ [
+#include <sys/types.h>
+#include <sys/socket.h>
+ ])
AC_OUTPUT([
Makefile
isc_result_t status;
m = (dhcpctl_remote_object_t *)0;
- status = omapi_object_allocate ((omapi_object_t **)&m,
- dhcpctl_remote_type, 0, MDL);
+ status = omapi_object_allocate((omapi_object_t **)&m,
+ dhcpctl_remote_type, 0, MDL);
if (status != ISC_R_SUCCESS)
return status;
#ifndef LINT
-static const char rcsid[] = "$Header: /tmp/cvstest/DHCP/dst/dst_api.c,v 1.3 2007/07/13 06:43:42 shane Exp $";
+static const char rcsid[] = "$Header: /tmp/cvstest/DHCP/dst/dst_api.c,v 1.4 2007/08/22 13:41:37 shane Exp $";
#endif
/*
int cnt, alg, len, major, minor, file_major, file_minor;
int id;
char filename[PATH_MAX];
- u_char in_buff[RAW_KEY_SIZE], *p;
+ u_char in_buff[RAW_KEY_SIZE];
+ char *p;
FILE *fp;
if (name == NULL || pk_key == NULL) {
if (memcmp(in_buff, "Private-key-format: v", 20) != 0)
goto fail;
len = cnt;
- p = in_buff;
+ p = (char *)in_buff;
if (!dst_s_verify_str((const char **) &p, "Private-key-format: v")) {
EREPORT(("dst_s_read_private_key_file(): Not a Key file/Decrypt failed %s\n", name));
goto fail;
}
/* read in file format */
- sscanf((char *)p, "%d.%d", &file_major, &file_minor);
+ sscanf(p, "%d.%d", &file_major, &file_minor);
sscanf(KEY_FILE_FORMAT, "%d.%d", &major, &minor);
if (file_major < 1) {
EREPORT(("dst_s_read_private_key_file(): Unknown keyfile %d.%d version for %s\n",
if (!dst_s_verify_str((const char **) &p, "Algorithm: "))
goto fail;
- if (sscanf((char *)p, "%d", &alg) != 1)
+ if (sscanf(p, "%d", &alg) != 1)
goto fail;
while (*p++ != '\n') ; /* skip to end of line */
goto fail;
id = pk_key->dk_func->from_file_fmt(pk_key, (char *)p,
- (unsigned)(&in_buff[len] - p));
+ (unsigned)(&in_buff[len] - (u_char *)p));
if (id < 0)
goto fail;
#define DHCPV6_RELAY_FORW 12
#define DHCPV6_RELAY_REPL 13
-extern char *dhcpv6_type_names[];
+extern const char *dhcpv6_type_names[];
extern const int dhcpv6_type_name_max;
/* DUID type definitions (RFC3315 section 9).
void *data,
unsigned int data_len);
-int add_option(struct option_state *options,
- unsigned int option_num,
- void *data,
- unsigned int data_len);
-
/* dhcpd.c */
extern TIME cur_time;
-int ddns_update_style;
+extern int ddns_update_style;
extern const char *path_dhcpd_conf;
extern const char *path_dhcpd_db;
void lease_pinged PROTO ((struct iaddr, u_int8_t *, int));
void lease_ping_timeout PROTO ((void *));
int dhcpd_interface_setup_hook (struct interface_info *ip, struct iaddr *ia);
-enum dhcp_shutdown_state shutdown_state;
+extern enum dhcp_shutdown_state shutdown_state;
isc_result_t dhcp_io_shutdown (omapi_object_t *, void *);
isc_result_t dhcp_set_control_state (control_object_state_t oldstate,
control_object_state_t newstate);
struct option_state *options,
struct packet *packet);
-void get_server_source_address(struct in_addr *from,
- struct option_state *options,
- struct packet *packet);
-
/* dhcpv6.c */
isc_boolean_t server_duid_isset(void);
void copy_server_duid(struct data_string *ds, const char *file, int line);
void bootp PROTO ((struct packet *));
/* memory.c */
-int (*group_write_hook) (struct group_object *);
+extern int (*group_write_hook) (struct group_object *);
extern struct group *root_group;
extern group_hash_t *group_name_hash;
isc_result_t delete_group (struct group_object *, int);
int option_reference(struct option **dest, struct option *src,
const char * file, int line);
int option_dereference(struct option **dest, const char *file, int line);
-int group_allocate (struct group **, const char *, int);
-int group_reference (struct group **, struct group *, const char *, int);
-int group_dereference (struct group **, const char *, int);
struct universe *new_universe PROTO ((const char *, int));
void free_universe PROTO ((struct universe *, const char *, int));
void free_domain_search_list PROTO ((struct domain_search_list *,
extern int (*dhcp_interface_setup_hook) (struct interface_info *,
struct iaddr *);
extern int (*dhcp_interface_discovery_hook) (struct interface_info *);
-isc_result_t (*dhcp_interface_startup_hook) (struct interface_info *);
+extern isc_result_t (*dhcp_interface_startup_hook) (struct interface_info *);
extern void (*bootp_packet_handler) PROTO ((struct interface_info *,
struct dhcp_packet *, unsigned,
extern struct timeout *timeouts;
extern omapi_object_type_t *dhcp_type_interface;
#if defined (TRACING)
-trace_type_t *interface_trace;
-trace_type_t *inpacket_trace;
-trace_type_t *outpacket_trace;
+extern trace_type_t *interface_trace;
+extern trace_type_t *inpacket_trace;
+extern trace_type_t *outpacket_trace;
#endif
extern struct interface_info **interface_vector;
extern int interface_count;
extern int dhcp_option_default_priority_list [];
extern int dhcp_option_default_priority_list_count;
extern const char *hardware_types [256];
-int universe_count, universe_max;
-struct universe **universes;
+extern int universe_count, universe_max;
+extern struct universe **universes;
extern universe_hash_t *universe_hash;
void initialize_common_option_spaces PROTO ((void));
-struct universe *config_universe;
+extern struct universe *config_universe;
/* stables.c */
#if defined (FAILOVER_PROTOCOL)
void dhcpv6_client_assignments(void);
/* dhc6.c */
-void form_duid(struct data_string *duid, char *file, int line);
-void dhc6_lease_destroy(struct dhc6_lease *lease, char *file, int line);
+void form_duid(struct data_string *duid, const char *file, int line);
+void dhc6_lease_destroy(struct dhc6_lease *lease, const char *file, int line);
void start_init6(struct client_state *client);
void start_confirm6(struct client_state *client);
void start_release6(struct client_state *client);
void start_selecting6(struct client_state *client);
-isc_result_t write_client6_lease(struct client_state *client,
- struct dhc6_lease *lease,
- int rewrite, int sync);
void unconfigure6(struct client_state *client, const char *reason);
/* db.c */
/* resolv.c */
extern char path_resolv_conf [];
-struct name_server *name_servers;
-struct domain_search_list *domains;
+extern struct name_server *name_servers;
+extern struct domain_search_list *domains;
void read_resolv_conf PROTO ((TIME));
struct name_server *first_name_server PROTO ((void));
struct class known_class;
struct collection default_collection;
struct collection *collections;
-struct executable_statement *default_classification_rules;
+extern struct executable_statement *default_classification_rules;
void classification_setup PROTO ((void));
void classify_client PROTO ((struct packet *));
void *, int), void *, int);
/* comapi.c */
-extern omapi_object_type_t *dhcp_type_interface;
extern omapi_object_type_t *dhcp_type_group;
extern omapi_object_type_t *dhcp_type_shared_network;
extern omapi_object_type_t *dhcp_type_subnet;
omapi_object_t *);
isc_result_t dhcp_lease_remove (omapi_object_t *,
omapi_object_t *);
-isc_result_t dhcp_group_set_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *);
-isc_result_t dhcp_group_get_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **);
-isc_result_t dhcp_group_destroy (omapi_object_t *, const char *, int);
-isc_result_t dhcp_group_signal_handler (omapi_object_t *,
- const char *, va_list);
-isc_result_t dhcp_group_stuff_values (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-isc_result_t dhcp_group_lookup (omapi_object_t **,
- omapi_object_t *, omapi_object_t *);
-isc_result_t dhcp_group_create (omapi_object_t **,
- omapi_object_t *);
-isc_result_t dhcp_group_remove (omapi_object_t *,
- omapi_object_t *);
isc_result_t dhcp_host_set_value (omapi_object_t *, omapi_object_t *,
omapi_data_string_t *,
omapi_typed_data_t *);
omapi_object_t *);
isc_result_t dhcp_subclass_remove (omapi_object_t *,
omapi_object_t *);
-isc_result_t dhcp_shared_network_set_value (omapi_object_t *,
- omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *);
-isc_result_t dhcp_shared_network_get_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **);
-isc_result_t dhcp_shared_network_destroy (omapi_object_t *, const char *, int);
-isc_result_t dhcp_shared_network_signal_handler (omapi_object_t *,
- const char *, va_list);
-isc_result_t dhcp_shared_network_stuff_values (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-isc_result_t dhcp_shared_network_lookup (omapi_object_t **,
- omapi_object_t *, omapi_object_t *);
-isc_result_t dhcp_shared_network_create (omapi_object_t **,
- omapi_object_t *);
-isc_result_t dhcp_subnet_set_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_typed_data_t *);
-isc_result_t dhcp_subnet_get_value (omapi_object_t *, omapi_object_t *,
- omapi_data_string_t *,
- omapi_value_t **);
-isc_result_t dhcp_subnet_destroy (omapi_object_t *, const char *, int);
-isc_result_t dhcp_subnet_signal_handler (omapi_object_t *,
- const char *, va_list);
-isc_result_t dhcp_subnet_stuff_values (omapi_object_t *,
- omapi_object_t *,
- omapi_object_t *);
-isc_result_t dhcp_subnet_lookup (omapi_object_t **,
- omapi_object_t *, omapi_object_t *);
-isc_result_t dhcp_subnet_create (omapi_object_t **,
- omapi_object_t *);
isc_result_t dhcp_interface_set_value (omapi_object_t *,
omapi_object_t *,
omapi_data_string_t *,
* <info@isc.org>
* http://www.isc.org/
*/
+#ifndef MINIRES_H
+#define MINIRES_H
#include "cdefs.h"
#include "osdep.h"
void res_destroyservicelist (void);
void res_buildprotolist(void);
void res_destroyprotolist(void);
-int res_servicenumber(const char *);
-int res_protocolnumber(const char *);
const char *res_protocolname(int);
const char *res_servicename(u_int16_t, const char *);
u_int32_t ns_datetosecs (const char *cp, int *errp);
unsigned, ns_tcp_tsig_state *);
isc_result_t ns_sign_tcp (unsigned char *,
unsigned *, unsigned, int, ns_tcp_tsig_state *, int);
-int ns_name_pton (const char *, unsigned char *, size_t);
int ns_name_pack (const unsigned char *, unsigned char *,
unsigned, const unsigned char **, const unsigned char **);
-int ns_name_compress (const char *, unsigned char *,
- size_t, const unsigned char **, const unsigned char **);
int ns_name_skip (const unsigned char **, const unsigned char *);
int ns_subdomain (const char *, const char *);
unsigned char *ns_find_tsig (unsigned char *, unsigned char *);
#if defined (TRACING)
void trace_mr_statp_setup (res_state);
#endif
+
+#endif /* MINIRES_H */
*/
#ifndef lint
-static const char rcsid[] = "$Id: ns_verify.c,v 1.7 2005/03/17 20:15:18 dhankins Exp $";
+static const char rcsid[] = "$Id: ns_verify.c,v 1.8 2007/08/22 13:41:37 shane Exp $";
#endif
-#define time(x) trace_mr_time (x)
-
/* Import. */
#include <sys/types.h>
#include <unistd.h>
#include <time.h>
+#define time(x) trace_mr_time (x)
+
#include "minires/minires.h"
#include "arpa/nameser.h"
#include <isc-dhcp/dst.h>
return ISC_R_NOTFOUND;
}
-OMAPI_ARRAY_TYPE_DECL(omapi_object, omapi_object_t);
if (bind (obj -> socket, (struct sockaddr *)&local_sin,
sizeof local_sin) < 0) {
- omapi_object_dereference ((omapi_object_t **)
- &obj, MDL);
+ omapi_connection_object_t **objp = &obj;
+ omapi_object_t **o = (omapi_object_t **)objp;
+ omapi_object_dereference(o, MDL);
if (errno == EADDRINUSE)
return ISC_R_ADDRINUSE;
if (errno == EADDRNOTAVAIL)
int trace_mr_select (int, fd_set *, fd_set *, fd_set *, struct timeval *);
unsigned int trace_mr_res_randomid (unsigned int);
-extern time_t cur_time;
-
#if defined (TRACING)
void trace_mr_init ()
{
ia_na = NULL;
lease = NULL;
+ /*
+ * Silence compiler warnings.
+ */
+ valid_lifetime = 0;
+ preferred_lifetime = 0;
+
/*
* Set up reply.
*/
struct packet *packet,
const struct data_string *client_id,
const struct data_string *server_id,
- char *packet_type,
+ const char *packet_type,
void (*ia_na_match)(),
void (*ia_na_nomatch)()) {
struct option_state *opt_state;