]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Fix inconsistencies between signed and unsigned character declarations. Account...
authorTed Lemon <source@isc.org>
Thu, 25 Jun 1998 21:11:35 +0000 (21:11 +0000)
committerTed Lemon <source@isc.org>
Thu, 25 Jun 1998 21:11:35 +0000 (21:11 +0000)
16 files changed:
client/clparse.c
common/convert.c
common/dispatch.c
common/hash.c
common/icmp.c
common/memory.c
common/options.c
common/parse.c
common/print.c
common/socket.c
common/tables.c
includes/dhcpd.h
includes/hash.h
relay/dhcrelay.c
server/confpars.c
server/dhcp.c

index 74f72e5568d5a81931768792c44a11e02c5275bc..37fafd378f97c71eab0d90e26fcceacffbb0abd9 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: clparse.c,v 1.13 1997/10/27 20:13:21 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: clparse.c,v 1.13.2.1 1998/06/25 21:11:27 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -771,8 +771,9 @@ struct option *parse_option_decl (cfile, options)
 
                /* Look up the option name hash table for the specified
                   vendor. */
-               universe = (struct universe *)hash_lookup (&universe_hash,
-                                                          vendor, 0);
+               universe = ((struct universe *)
+                           hash_lookup (&universe_hash,
+                                        (unsigned char *)vendor, 0));
                /* If it's not there, we can't parse the rest of the
                   declaration. */
                if (!universe) {
@@ -788,7 +789,8 @@ struct option *parse_option_decl (cfile, options)
        }
 
        /* Look up the actual option info... */
-       option = (struct option *)hash_lookup (universe -> hash, val, 0);
+       option = (struct option *)hash_lookup (universe -> hash,
+                                              (unsigned char *)val, 0);
 
        /* If we didn't get an option structure, it's an undefined option. */
        if (!option) {
index 9b5fcd7a261df435a4bfff5c0d9ccc38979e64cd..42f488b308e88ce97e88e42ef3f535ce1dbbf7d6 100644 (file)
@@ -43,7 +43,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: convert.c,v 1.4 1997/05/09 07:58:33 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: convert.c,v 1.4.2.1 1998/06/25 21:11:28 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -102,7 +102,7 @@ void putLong (obuf, val)
 
 void putUShort (obuf, val)
        unsigned char *obuf;
-       u_int16_t val;
+       unsigned int val;
 {
        u_int16_t tmp = htons (val);
        memcpy (obuf, &tmp, sizeof tmp);
@@ -110,7 +110,7 @@ void putUShort (obuf, val)
 
 void putShort (obuf, val)
        unsigned char *obuf;
-       int16_t val;
+       int val;
 {
        int16_t tmp = htons (val);
        memcpy (obuf, &tmp, sizeof tmp);
index e3f651e89ce9276ed4f21c06f72c4048ee5c8a87..92fd579b70abbc163bcaf2c6912b085c4bfe9953 100644 (file)
@@ -3,7 +3,7 @@
    Network input dispatcher... */
 
 /*
- * Copyright (c) 1995, 1996 The Internet Software Consortium.
+ * Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: dispatch.c,v 1.47.2.1 1998/06/25 05:45:10 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: dispatch.c,v 1.47.2.2 1998/06/25 21:11:28 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -54,7 +54,7 @@ struct timeout *timeouts;
 static struct timeout *free_timeouts;
 static int interfaces_invalidated;
 void (*bootp_packet_handler) PROTO ((struct interface_info *,
-                                    struct dhcp_packet *, int, unsigned short,
+                                    struct dhcp_packet *, int, unsigned int,
                                     struct iaddr, struct hardware *));
 
 static void got_one PROTO ((struct protocol *));
index e8e93752008a77d6f19dd7e1be9dcd8891d88134..8d362cb12b98215205dee8fddd840096579e1eec 100644 (file)
@@ -3,7 +3,7 @@
    Routines for manipulating hash tables... */
 
 /*
- * Copyright (c) 1995, 1996 The Internet Software Consortium.
+ * Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
 
 #ifndef lint
 static char copyright[] =
-"$Id: hash.c,v 1.9 1996/09/09 07:04:45 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: hash.c,v 1.9.2.1 1998/06/25 21:11:29 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
 
-static INLINE int do_hash PROTO ((char *, int, int));
+static INLINE int do_hash PROTO ((unsigned char *, int, int));
 
 struct hash_table *new_hash ()
 {
@@ -60,12 +60,12 @@ struct hash_table *new_hash ()
 }
 
 static INLINE int do_hash (name, len, size)
-       char *name;
+       unsigned char *name;
        int len;
        int size;
 {
        register int accum = 0;
-       register unsigned char *s = (unsigned char *)name;
+       register unsigned char *s = name;
        int i = len;
        if (i) {
                while (i--) {
@@ -92,7 +92,7 @@ static INLINE int do_hash (name, len, size)
 void add_hash (table, name, len, pointer)
        struct hash_table *table;
        int len;
-       char *name;
+       unsigned char *name;
        unsigned char *pointer;
 {
        int hashno;
@@ -118,7 +118,7 @@ void add_hash (table, name, len, pointer)
 void delete_hash_entry (table, name, len)
        struct hash_table *table;
        int len;
-       char *name;
+       unsigned char *name;
 {
        int hashno;
        struct hash_bucket *bp, *pbp = (struct hash_bucket *)0;
@@ -131,7 +131,8 @@ void delete_hash_entry (table, name, len)
        /* Go through the list looking for an entry that matches;
           if we find it, delete it. */
        for (bp = table -> buckets [hashno]; bp; bp = bp -> next) {
-               if ((!bp -> len && !strcmp (bp -> name, name)) ||
+               if ((!bp -> len &&
+                    !strcmp ((char *)bp -> name, (char *)name)) ||
                    (bp -> len == len &&
                     !memcmp (bp -> name, name, len))) {
                        if (pbp) {
@@ -148,7 +149,7 @@ void delete_hash_entry (table, name, len)
 
 unsigned char *hash_lookup (table, name, len)
        struct hash_table *table;
-       char *name;
+       unsigned char *name;
        int len;
 {
        int hashno;
@@ -166,7 +167,7 @@ unsigned char *hash_lookup (table, name, len)
                }
        } else {
                for (bp = table -> buckets [hashno]; bp; bp = bp -> next)
-                       if (!strcmp (bp -> name, name))
+                       if (!strcmp ((char *)bp -> name, (char *)name))
                                return bp -> value;
        }
        return (unsigned char *)0;
index 59082842652fecd05968ee5443e1ed7221262dea..fb6cfad970df28cfaa41ceee4d4a726cbd0919ac 100644 (file)
@@ -1,10 +1,10 @@
-/* dhcp.c
+/* icmp.c
 
    ICMP Protocol engine - for sending out pings and receiving
    responses. */
 
 /*
- * Copyright (c) 1997 The Internet Software Consortium.
+ * Copyright (c) 1997, 1998 The Internet Software Consortium.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -43,7 +43,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: icmp.c,v 1.7 1997/06/04 20:59:40 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: icmp.c,v 1.7.2.1 1998/06/25 21:11:29 mellon Exp $ Copyright (c) 1997, 1998 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -86,7 +86,8 @@ void icmp_startup (routep, handler)
                        (char *)&state, sizeof state) < 0)
                error ("Unable to disable SO_DONTROUTE on ICMP socket: %m");
 
-       add_protocol ("icmp", icmp_protocol_fd, icmp_echoreply, handler);
+       add_protocol ("icmp", icmp_protocol_fd, icmp_echoreply,
+                     (void *)handler);
 }
 
 int icmp_echorequest (addr)
@@ -136,14 +137,14 @@ void icmp_echoreply (protocol)
 {
        struct icmp *icfrom;
        struct sockaddr_in from;
-       unsigned char icbuf [1500];
+       u_int8_t icbuf [1500];
        int status;
        int len;
        struct iaddr ia;
        void (*handler) PROTO ((struct iaddr, u_int8_t *, int));
 
        len = sizeof from;
-       status = recvfrom (protocol -> fd, icbuf, sizeof icbuf, 0,
+       status = recvfrom (protocol -> fd, (char *)icbuf, sizeof icbuf, 0,
                          (struct sockaddr *)&from, &len);
        if (status < 0) {
                warn ("icmp_echoreply: %m");
@@ -165,7 +166,9 @@ void icmp_echoreply (protocol)
 
        /* If we were given a second-stage handler, call it. */
        if (protocol -> local) {
-               handler = protocol -> local;
+               handler = ((void (*) PROTO ((struct iaddr,
+                                           u_int8_t *, int)))
+                          protocol -> local);
                memcpy (ia.iabuf, &from.sin_addr, sizeof from.sin_addr);
                ia.len = sizeof from.sin_addr;
 
index ddb6c4d8ee13cd991c2983af25a36d380d6ceb6e..59cbe5dafc01b1f6ce8adcd4d9ecc1a95422768b 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: memory.c,v 1.35.2.1 1998/06/25 05:47:29 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: memory.c,v 1.35.2.2 1998/06/25 21:11:30 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -838,16 +838,18 @@ struct class *add_class (type, name)
 
        if (type)
                add_hash (user_class_hash,
-                         tname, strlen (tname), (unsigned char *)class);
+                         (unsigned char *)tname, strlen (tname),
+                         (unsigned char *)class);
        else
                add_hash (vendor_class_hash,
-                         tname, strlen (tname), (unsigned char *)class);
+                         (unsigned char *)tname, strlen (tname),
+                         (unsigned char *)class);
        return class;
 }
 
 struct class *find_class (type, name, len)
        int type;
-       char *name;
+       unsigned char *name;
        int len;
 {
        struct class *class =
index 601facce395a3de055e2318d4920623673793e05..9d6b7f46ab4630ab0f880462d19bdcb7811ee6c2 100644 (file)
@@ -3,7 +3,7 @@
    DHCP options parsing and reassembly. */
 
 /*
- * Copyright (c) 1995, 1996 The Internet Software Consortium.
+ * Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: options.c,v 1.26.2.2 1998/06/25 05:49:39 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: options.c,v 1.26.2.3 1998/06/25 21:11:30 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #define DHCP_OPTION_DATA
@@ -72,10 +72,12 @@ void parse_options (packet)
            && packet -> options [DHO_DHCP_OPTION_OVERLOAD].data) {
                if (packet -> options [DHO_DHCP_OPTION_OVERLOAD].data [0] & 1)
                        parse_option_buffer (packet,
+                                            (unsigned char *)
                                             packet -> raw -> file,
                                             sizeof packet -> raw -> file);
                if (packet -> options [DHO_DHCP_OPTION_OVERLOAD].data [0] & 2)
                        parse_option_buffer (packet,
+                                            (unsigned char *)
                                             packet -> raw -> sname,
                                             sizeof packet -> raw -> sname);
        }
@@ -516,8 +518,8 @@ char *pretty_print_option (code, data, len, emit_commas, emit_quotes)
                              case 't':
                                if (emit_quotes)
                                        *op++ = '"';
-                               strcpy (op, dp);
-                               op += strlen (dp);
+                               strcpy (op, (char *)dp);
+                               op += strlen ((char *)dp);
                                if (emit_quotes)
                                        *op++ = '"';
                                *op = 0;
@@ -575,7 +577,7 @@ void do_packet (interface, packet, len, from_port, from, hfrom)
        struct interface_info *interface;
        struct dhcp_packet *packet;
        int len;
-       unsigned short from_port;
+       unsigned int from_port;
        struct iaddr from;
        struct hardware *hfrom;
 {
index ffc1d49d0855a21bcb6f92d2a7a592b71e845d89..97bfa877b17e4ccb26f4d2748d3dbfd9ca0fec5e 100644 (file)
@@ -3,7 +3,7 @@
    Common parser code for dhcpd and dhclient. */
 
 /*
- * Copyright (c) 1995, 1996, 1997 The Internet Software Consortium.
+ * Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: parse.c,v 1.2 1997/05/09 08:08:53 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: parse.c,v 1.2.2.1 1998/06/25 21:11:31 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -297,7 +297,8 @@ unsigned char *parse_numeric_aggregate (cfile, buf,
 {
        char *val;
        int token;
-       unsigned char *bufp = buf, *s, *t;
+       unsigned char *bufp = buf, *s;
+       char *t;
        int count = 0;
        pair c = (pair)0;
 
@@ -343,7 +344,7 @@ unsigned char *parse_numeric_aggregate (cfile, buf,
                        convert_num (s, val, base, size);
                        s += size / 8;
                } else {
-                       t = (unsigned char *)malloc (strlen (val) + 1);
+                       t = (char *)malloc (strlen (val) + 1);
                        if (!t)
                                error ("no temp space for number.");
                        strcpy (t, val);
index 8b5aefd5544faae4e19625933651ff26114cb596..ed51b15841b13c0675b2c6a9b55edc6b913546c5 100644 (file)
@@ -3,7 +3,7 @@
    Turn data structures into printable text. */
 
 /*
- * Copyright (c) 1995, 1996 The Internet Software Consortium.
+ * Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: print.c,v 1.16 1997/11/29 07:52:10 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: print.c,v 1.16.2.1 1998/06/25 21:11:31 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -178,7 +178,7 @@ void hash_dump (table)
                        if (bp -> len)
                                dump_raw (bp -> name, bp -> len);
                        else
-                               note (bp -> name);
+                               note ((char *)bp -> name);
                }
        }
 }
index af216d6f567c30dd5cb71a8de75c88c65ccc908c..b317ff2ba255d50132c9d9c7225b8234e29b4aa6 100644 (file)
@@ -50,7 +50,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: socket.c,v 1.26.2.1 1998/05/18 05:45:49 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: socket.c,v 1.26.2.2 1998/06/25 21:11:32 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -224,7 +224,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
        int retry = 0;
        do {
 #endif
-               result = recvfrom (interface -> rfdesc, buf, len, 0,
+               result = recvfrom (interface -> rfdesc, (char *)buf, len, 0,
                                   (struct sockaddr *)from, &flen);
 #ifdef IGNORE_HOSTUNREACH
        } while (result < 0 &&
index 81669c84e59de22ae822ed6c881e9a85ddd5c9eb..bdbba1b78d1415ddeabff11684d9d478d3fdd205 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: tables.c,v 1.13 1997/05/09 08:13:38 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: tables.c,v 1.13.2.1 1998/06/25 21:11:32 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -681,10 +681,12 @@ void initialize_universes()
                error ("Can't allocate dhcp option hash table.");
        for (i = 0; i < 256; i++) {
                dhcp_universe.options [i] = &dhcp_options [i];
-               add_hash (dhcp_universe.hash, dhcp_options [i].name, 0,
+               add_hash (dhcp_universe.hash,
+                         (unsigned char *)dhcp_options [i].name, 0,
                          (unsigned char *)&dhcp_options [i]);
        }
        universe_hash.hash_count = DEFAULT_HASH_SIZE;
-       add_hash (&universe_hash, dhcp_universe.name, 0,
+       add_hash (&universe_hash,
+                 (unsigned char *)dhcp_universe.name, 0,
                  (unsigned char *)&dhcp_universe);
 }
index e1836730959bc74279041946f6246b72b24ade1e..84ff419bb6be5843031376679881c5f13cca86ac 100644 (file)
@@ -3,7 +3,7 @@
    Definitions for dhcpd... */
 
 /*
- * Copyright (c) 1995, 1996, 1997 The Internet Software Consortium.
+ * Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -460,7 +460,7 @@ char *pretty_print_option PROTO ((unsigned int,
                                  unsigned char *, int, int, int));
 void do_packet PROTO ((struct interface_info *,
                       struct dhcp_packet *, int,
-                      unsigned short, struct iaddr, struct hardware *));
+                      unsigned int, struct iaddr, struct hardware *));
 
 /* errwarn.c */
 extern int warnings_occurred;
@@ -553,7 +553,7 @@ void dhcprelease PROTO ((struct packet *));
 void dhcpdecline PROTO ((struct packet *));
 void dhcpinform PROTO ((struct packet *));
 void nak_lease PROTO ((struct packet *, struct iaddr *cip));
-void ack_lease PROTO ((struct packet *, struct lease *, unsigned char, TIME));
+void ack_lease PROTO ((struct packet *, struct lease *, unsigned int, TIME));
 void dhcp_reply PROTO ((struct lease *));
 struct lease *find_lease PROTO ((struct packet *,
                                 struct shared_network *, int *));
@@ -590,7 +590,7 @@ void uid_hash_delete PROTO ((struct lease *));
 void hw_hash_add PROTO ((struct lease *));
 void hw_hash_delete PROTO ((struct lease *));
 struct class *add_class PROTO ((int, char *));
-struct class *find_class PROTO ((int, char *, int));
+struct class *find_class PROTO ((int, unsigned char *, int));
 struct group *clone_group PROTO ((struct group *, char *));
 void write_leases PROTO ((void));
 void dump_subnets PROTO ((void));
@@ -735,7 +735,7 @@ extern struct protocol *protocols;
 extern int quiet_interface_discovery;
 extern void (*bootp_packet_handler) PROTO ((struct interface_info *,
                                            struct dhcp_packet *, int,
-                                           unsigned short,
+                                           unsigned int,
                                            struct iaddr, struct hardware *));
 extern struct timeout *timeouts;
 void discover_interfaces PROTO ((int));
@@ -754,9 +754,10 @@ void remove_protocol PROTO ((struct protocol *));
 
 /* hash.c */
 struct hash_table *new_hash PROTO ((void));
-void add_hash PROTO ((struct hash_table *, char *, int, unsigned char *));
-void delete_hash_entry PROTO ((struct hash_table *, char *, int));
-unsigned char *hash_lookup PROTO ((struct hash_table *, char *, int));
+void add_hash PROTO ((struct hash_table *, unsigned char *,
+                     int, unsigned char *));
+void delete_hash_entry PROTO ((struct hash_table *, unsigned char *, int));
+unsigned char *hash_lookup PROTO ((struct hash_table *, unsigned char *, int));
 
 /* tables.c */
 extern struct option dhcp_options [256];
@@ -774,8 +775,8 @@ u_int16_t getUShort PROTO ((unsigned char *));
 int16_t getShort PROTO ((unsigned char *));
 void putULong PROTO ((unsigned char *, u_int32_t));
 void putLong PROTO ((unsigned char *, int32_t));
-void putUShort PROTO ((unsigned char *, u_int16_t));
-void putShort PROTO ((unsigned char *, int16_t));
+void putUShort PROTO ((unsigned char *, unsigned int));
+void putShort PROTO ((unsigned char *, int));
 
 /* inet.c */
 struct iaddr subnet_number PROTO ((struct iaddr, struct iaddr));
@@ -914,7 +915,7 @@ void parse_reject_statement PROTO ((FILE *, struct client_config *));
 
 /* dhcrelay.c */
 void relay PROTO ((struct interface_info *, struct dhcp_packet *, int,
-                  unsigned short, struct iaddr, struct hardware *));
+                  unsigned int, struct iaddr, struct hardware *));
 
 /* icmp.c */
 void icmp_startup PROTO ((int, void (*) PROTO ((struct iaddr,
index d30072b3c128e47efefb98017d78a898cc24be94..1bebb3140f8087a036208252ca74b2415d2f5aa5 100644 (file)
@@ -3,7 +3,8 @@
    Definitions for hashing... */
 
 /*
- * Copyright (c) 1995 The Internet Software Consortium.  All rights reserved.
+ * Copyright (c) 1995, 1996 The Internet Software Consortium.
+ * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -43,7 +44,7 @@
 
 struct hash_bucket {
        struct hash_bucket *next;
-       char *name;
+       unsigned char *name;
        int len;
        unsigned char *value;
 };
index 1631211a6cdd8bef11d69299b33efa0ffd8413d6..77c186ea2713a698590f4189b44c47767e271ba0 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: dhcrelay.c,v 1.9.2.3 1998/06/25 18:34:47 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: dhcrelay.c,v 1.9.2.4 1998/06/25 21:11:34 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -233,7 +233,7 @@ void relay (ip, packet, length, from_port, from, hfrom)
        struct interface_info *ip;
        struct dhcp_packet *packet;
        int length;
-       u_int16_t from_port;
+       unsigned int from_port;
        struct iaddr from;
        struct hardware *hfrom;
 {
index b8487c16fb420545d5ee522320574f64dd2480c4..7dbd8ba901af8d105340a153833715eaaaeb65a8 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: confpars.c,v 1.45 1997/10/27 20:22:40 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: confpars.c,v 1.45.2.1 1998/06/25 21:11:34 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -890,8 +890,9 @@ void parse_option_param (cfile, group)
 
                /* Look up the option name hash table for the specified
                   vendor. */
-               universe = (struct universe *)hash_lookup (&universe_hash,
-                                                          vendor, 0);
+               universe = ((struct universe *)
+                           hash_lookup (&universe_hash,
+                                        (unsigned char *)vendor, 0));
                /* If it's not there, we can't parse the rest of the
                   declaration. */
                if (!universe) {
@@ -907,7 +908,8 @@ void parse_option_param (cfile, group)
        }
 
        /* Look up the actual option info... */
-       option = (struct option *)hash_lookup (universe -> hash, val, 0);
+       option = (struct option *)hash_lookup (universe -> hash,
+                                              (unsigned char *)val, 0);
 
        /* If we didn't get an option structure, it's an undefined option. */
        if (!option) {
@@ -958,7 +960,8 @@ void parse_option_param (cfile, group)
                                        token = next_token (&val, cfile);
                                        tree = tree_concat
                                                (tree,
-                                                tree_const (val,
+                                                tree_const ((unsigned char *)
+                                                            val,
                                                             strlen (val)));
                                } else {
                                        parse_warn ("expecting string %s.",
@@ -977,9 +980,10 @@ void parse_option_param (cfile, group)
                                                skip_to_semi (cfile);
                                        return;
                                }
-                               tree = tree_concat (tree,
-                                                   tree_const (val,
-                                                               strlen (val)));
+                               tree = tree_concat
+                                       (tree,
+                                        tree_const ((unsigned char *)val,
+                                                    strlen (val)));
                                break;
 
                              case 'I': /* IP address or hostname. */
index e1c26127242f4b0a6a352bc5f8a28d73fe586e59..94c31c5fbcaa2c954468414376d54677d4d2881b 100644 (file)
@@ -3,7 +3,7 @@
    DHCP Protocol engine. */
 
 /*
- * Copyright (c) 1995, 1996, 1997 The Internet Software Consortium.
+ * Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
 
 #ifndef lint
 static char copyright[] =
-"$Id: dhcp.c,v 1.57.2.1 1998/05/18 05:28:06 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: dhcp.c,v 1.57.2.2 1998/06/25 21:11:35 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
 
 int outstanding_pings;
 
-static unsigned char dhcp_message [256];
+static char dhcp_message [256];
 
 void dhcp (packet)
        struct packet *packet;
@@ -427,9 +427,9 @@ void nak_lease (packet, cip)
 
        /* Set DHCP_MESSAGE to whatever the message is */
        options [DHO_DHCP_MESSAGE] = &dhcpmsg_tree;
-       options [DHO_DHCP_MESSAGE] -> value = dhcp_message;
-       options [DHO_DHCP_MESSAGE] -> len = strlen (dhcp_message);
-       options [DHO_DHCP_MESSAGE] -> buf_size = strlen (dhcp_message);
+       options [DHO_DHCP_MESSAGE] -> value = (unsigned char *)dhcp_message;
+       options [DHO_DHCP_MESSAGE] -> len =
+               options [DHO_DHCP_MESSAGE] -> buf_size = strlen (dhcp_message);
        options [DHO_DHCP_MESSAGE] -> timeout = 0xFFFFFFFF;
        options [DHO_DHCP_MESSAGE] -> tree = (struct tree *)0;
 
@@ -521,7 +521,7 @@ void nak_lease (packet, cip)
 void ack_lease (packet, lease, offer, when)
        struct packet *packet;
        struct lease *lease;
-       unsigned char offer;
+       unsigned int offer;
        TIME when;
 {
        struct lease lt;