# removes the comment characters from the appropriate set of
# assignments, and writes the output to Makefile.
-## AIX 4.1.5.0
+## AIX 4.3
##--aix--
#CF = cf/aix.h
#CC=cc -Daix
#ifndef lint
static char copyright[] =
-"$Id: dns.c,v 1.14 2000/01/26 14:55:34 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dns.c,v 1.15 2000/02/01 03:19:38 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
u_int16_t class;
TIME ttl;
u_int16_t rdlength;
- int len, status;
+ socklen_t len;
+ int status;
int i;
struct dns_query *query;
#ifndef lint
static char copyright[] =
-"$Id: icmp.c,v 1.17 2000/01/26 14:55:34 mellon Exp $ Copyright (c) 1997, 1998 The Internet Software Consortium. All rights reserved.\n";
+"$Id: icmp.c,v 1.18 2000/02/01 03:19:38 mellon Exp $ Copyright (c) 1997, 1998 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
struct sockaddr_in from;
unsigned char icbuf [1500];
int status;
- int len, hlen;
+ socklen_t len;
+ int hlen;
struct iaddr ia;
struct icmp_state *state;
/* Find the IP header length... */
ip = (struct ip *)icbuf;
- hlen = ip -> ip_hl << 2;
+ hlen = IP_HL (ip) << 2;
/* Short packet? */
if (status < hlen + (sizeof *icfrom)) {
#ifndef lint
static char copyright[] =
-"$Id: packet.c,v 1.30 2000/01/29 05:47:50 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: packet.c,v 1.31 2000/02/01 03:19:39 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
struct udphdr udp;
/* Fill out the IP header */
- ip.ip_v = 4;
- ip.ip_hl = 5;
+ IP_V_SET (&ip, 4);
+ IP_HL_SET (&ip, 20);
ip.ip_tos = IPTOS_LOWDELAY;
ip.ip_len = htons(sizeof(ip) + sizeof(udp) + len);
ip.ip_id = 0;
#ifndef lint
static char copyright[] =
-"$Id: parse.c,v 1.60 2000/01/26 14:55:34 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: parse.c,v 1.61 2000/02/01 03:19:39 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
return key_id -> len ? 1 : 0;
}
-int parse_warn (ANSI_DECL (struct parse *)cfile,
- ANSI_DECL (const char *) fmt, VA_DOTDOTDOT)
- KandR (struct parse *cfile;)
- KandR (char *fmt;)
- va_dcl
+int parse_warn (struct parse *cfile, const char *fmt, ...)
{
va_list list;
static char spaces [] = " ";
cfile -> tlname, cfile -> lexline, mbuf);
#endif
- VA_start (list, fmt);
+ va_start (list, fmt);
vsnprintf (mbuf, sizeof mbuf, fbuf, list);
va_end (list);
#ifndef lint
static char copyright[] =
-"$Id: socket.c,v 1.43 2000/01/02 22:21:23 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: socket.c,v 1.44 2000/02/01 03:19:39 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
struct sockaddr_in *from;
struct hardware *hfrom;
{
- int flen = sizeof *from;
+ socklen_t flen = sizeof *from;
int result;
#ifdef IGNORE_HOSTUNREACH
{
char buf [1540];
struct sockaddr_in from;
- int flen = sizeof from;
+ socklen_t flen = sizeof from;
int status;
struct interface_info *interface;
makedepend $(INCLUDES) $(PREDEFINES) $(SRCS)
clean:
- -rm -f $(OBJ) test.o test
+ -rm -f $(OBJ) test.o test cltest.o cltest
realclean: clean
-rm -f libdhcpctl.a *~ $(CATMANPAGES) $(SEDMANPAGES)
#define _PATH_DHCRELAY_PID "/etc/dhcrelay.pid"
#endif
-#include <varargs.h>
-#define VA_DOTDOTDOT va_alist
+#include <stdarg.h>
+#define VA_DOTDOTDOT ...
#define VA_start(list, last) va_start (list)
+#define va_dcl
#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
#define NO_SNPRINTF
*/
#ifndef __CYGWIN32__
+#define _POSIX_PII_SOCKET
#include <sys/types.h>
#include <netinet/in.h>
#include <sys/socket.h>
const char *, struct expression *, int, int));
int parse_allow_deny PROTO ((struct option_cache **, struct parse *, int));
int parse_auth_key PROTO ((struct data_string *, struct parse *));
-int parse_warn PROTO ((struct parse *, const char *, ...))
+int parse_warn (struct parse *, const char *, ...)
__attribute__((__format__(__printf__,2,3)));
/* tree.c */
int write_host PROTO ((struct host_decl *));
int write_group PROTO ((struct group_object *));
int db_printable PROTO ((const char *));
-int db_printable_len PROTO ((const char *, unsigned));
+int db_printable_len PROTO ((const unsigned char *, unsigned));
int write_billing_class PROTO ((struct class *));
int commit_leases PROTO ((void));
void db_startup PROTO ((int));
* against negative integers quite easily, and fail in subtle ways.
*/
struct ip {
-#if BYTE_ORDER == LITTLE_ENDIAN
- u_int8_t ip_hl:4, /* header length */
- ip_v:4; /* version */
-#endif
-#if BYTE_ORDER == BIG_ENDIAN
- u_int8_t ip_v:4, /* version */
- ip_hl:4; /* header length */
-#endif
+ u_int8_t ip_fvhl; /* header length, version */
u_int8_t ip_tos; /* type of service */
int16_t ip_len; /* total length */
u_int16_t ip_id; /* identification */
struct in_addr ip_src, ip_dst; /* source and dest address */
};
+#define IP_V(iph) ((iph)->ip_fvhl >> 4)
+#define IP_HL(iph) ((iph)->ip_fvhl & 0x0F)
+#define IP_V_SET(iph,x) ((iph)->ip_fvhl = ((iph)->ip_fvhl & 0x0F) | ((x) << 4))
+#define IP_HL_SET(iph,x) ((iph)->ip_fvhl = \
+ ((iph)->ip_fvhl & 0xF0) | ((x) >> 2))
+
#define IP_MAXPACKET 65535 /* maximum packet size */
/*
u_int8_t ipt_code; /* IPOPT_TS */
u_int8_t ipt_len; /* size of structure (variable) */
u_int8_t ipt_ptr; /* index of current entry */
-#if BYTE_ORDER == LITTLE_ENDIAN
- u_int8_t ipt_flg:4, /* flags, see below */
- ipt_oflw:4; /* overflow counter */
-#endif
-#if BYTE_ORDER == BIG_ENDIAN
- u_int8_t ipt_oflw:4, /* overflow counter */
- ipt_flg:4; /* flags, see below */
-#endif
+ u_int8_t ipt_flg_oflw; /* flags, see below, overflow counter */
union ipt_timestamp {
u_int32_t ipt_time[1];
struct ipt_ta {
#define __OMAPIP_OMAPIP_P_H__
#ifndef __CYGWIN32__
+#define _POSIX_PII_SOCKET
#include <sys/types.h>
#include <netinet/in.h>
#include <sys/socket.h>
isc_result_t status;
omapi_connection_object_t *obj;
int flag;
+ socklen_t sl;
obj = (omapi_connection_object_t *)dmalloc (sizeof *obj, MDL);
if (!obj)
/* I don't know why this would fail, so I'm tempted not to test
the return value. */
- hix = sizeof (obj -> local_addr);
+ sl = sizeof (obj -> local_addr);
if (getsockname (obj -> socket,
((struct sockaddr *)
- &obj -> local_addr), &hix) < 0) {
+ &obj -> local_addr), &sl) < 0) {
}
if (fcntl (obj -> socket, F_SETFL, O_NONBLOCK) < 0) {
#ifndef lint
static char copyright[] =
-"$Id: errwarn.c,v 1.2 2000/01/26 14:56:05 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: errwarn.c,v 1.3 2000/02/01 03:19:52 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include <omapip/omapip_p.h>
/* Log an error message, then exit... */
-void log_fatal (ANSI_DECL(const char *) fmt, VA_DOTDOTDOT)
- KandR (char *fmt;)
- va_dcl
+void log_fatal (const char * fmt, ... )
{
va_list list;
do_percentm (fbuf, fmt);
- VA_start (list, fmt);
+ va_start (list, fmt);
vsnprintf (mbuf, sizeof mbuf, fbuf, list);
va_end (list);
/* Log an error message... */
-int log_error (ANSI_DECL (const char *) fmt, VA_DOTDOTDOT)
- KandR (char *fmt;)
- va_dcl
+int log_error (const char * fmt, ...)
{
va_list list;
do_percentm (fbuf, fmt);
- VA_start (list, fmt);
+ va_start (list, fmt);
vsnprintf (mbuf, sizeof mbuf, fbuf, list);
va_end (list);
/* Log a note... */
-int log_info (ANSI_DECL (const char *) fmt, VA_DOTDOTDOT)
- KandR (char *fmt;)
- va_dcl
+int log_info (const char *fmt, ...)
{
va_list list;
do_percentm (fbuf, fmt);
- VA_start (list, fmt);
+ va_start (list, fmt);
vsnprintf (mbuf, sizeof mbuf, fbuf, list);
va_end (list);
/* Log a debug message... */
-int log_debug (ANSI_DECL (const char *) fmt, VA_DOTDOTDOT)
- KandR (char *fmt;)
- va_dcl
+int log_debug (const char *fmt, ...)
{
va_list list;
do_percentm (fbuf, fmt);
- VA_start (list, fmt);
+ va_start (list, fmt);
vsnprintf (mbuf, sizeof mbuf, fbuf, list);
va_end (list);
isc_result_t omapi_accept (omapi_object_t *h)
{
isc_result_t status;
- int len;
+ socklen_t len;
omapi_connection_object_t *obj;
omapi_listener_object_t *listener;
#ifndef lint
static char copyright[] =
-"$Id: confpars.c,v 1.99 2000/01/31 23:41:56 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: confpars.c,v 1.100 2000/02/01 03:19:56 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
"option space definitions %s",
"may not be scoped.");
skip_to_semi (cfile);
- free_option (option, MDL);
break;
}
parse_option_space_decl (cfile);
(&binding -> value.buffer,
binding -> value.len + 1, MDL)))
log_fatal ("No memory for binding.");
- strcpy (binding -> value.buffer -> data, val);
+ strcpy ((char *)
+ binding -> value.buffer -> data, val);
binding -> value.data =
binding -> value.buffer -> data;
binding -> value.terminated = 1;
} else {
- s = (parse_numeric_aggregate
- (cfile, (unsigned char *)0,
- &binding -> value.len, ':', 16, 8));
+ s = ((char *)
+ (parse_numeric_aggregate
+ (cfile, (unsigned char *)0,
+ &binding -> value.len, ':', 16, 8)));
if (!s)
return (struct lease *)0;
if (binding -> value.len) {
#ifndef lint
static char copyright[] =
-"$Id: db.c,v 1.42 2000/01/26 14:56:18 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: db.c,v 1.43 2000/02/01 03:19:56 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
}
if (lease -> uid_len) {
int i;
- if (db_printable_len ((const char *)lease -> uid,
+ if (db_printable_len (lease -> uid,
lease -> uid_len)) {
fprintf (db_file, "\n uid \"%*s\";",
lease -> uid_len, lease -> uid);
if (host -> client_identifier.len) {
int i;
errno = 0;
- if (db_printable_len ((const char *)
- host -> client_identifier.data,
+ if (db_printable_len (host -> client_identifier.data,
host -> client_identifier.len)) {
fprintf (db_file, "\n uid \"%*s\";",
host -> client_identifier.len,
}
int db_printable_len (s, len)
- const char *s;
+ const unsigned char *s;
unsigned len;
{
int i;