#ifndef lint
static char copyright[] =
-"$Id: options.c,v 1.21 1997/02/19 10:52:14 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: options.c,v 1.22 1997/02/22 08:32:04 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#define DHCP_OPTION_DATA
/* Format the specified option so that a human can easily read it. */
-char *pretty_print_option (code, data, len)
+char *pretty_print_option (code, data, len, emit_commas)
unsigned char code;
unsigned char *data;
int len;
+ int emit_commas;
{
static char optbuf [32768]; /* XXX */
int hunksize = 0;
for (j = 0; j < numelem; j++) {
switch (fmtbuf [j]) {
case 't':
+ *op++ = '"';
strcpy (op, dp);
+ op += strlen (dp);
+ *op++ = '"';
+ *op = 0;
break;
case 'I':
foo.s_addr = htonl (getULong (dp));
*op++ = ' ';
}
if (i + 1 < numhunk) {
- *op++ = ',';
+ if (emit_commas)
+ *op++ = ',';
*op++ = ' ';
}
#ifndef lint
static char copyright[] =
-"$Id: print.c,v 1.11 1996/08/27 09:53:30 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: print.c,v 1.12 1997/02/22 08:32:05 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
dhcp_options [i].name,
pretty_print_option
(i, tp -> options [i].data,
- tp -> options [i].len));
+ tp -> options [i].len, 1));
}
}
debug ("");
}
}
}
-
#ifndef lint
static char copyright[] =
-"$Id: options.c,v 1.21 1997/02/19 10:52:14 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: options.c,v 1.22 1997/02/22 08:32:04 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#define DHCP_OPTION_DATA
/* Format the specified option so that a human can easily read it. */
-char *pretty_print_option (code, data, len)
+char *pretty_print_option (code, data, len, emit_commas)
unsigned char code;
unsigned char *data;
int len;
+ int emit_commas;
{
static char optbuf [32768]; /* XXX */
int hunksize = 0;
for (j = 0; j < numelem; j++) {
switch (fmtbuf [j]) {
case 't':
+ *op++ = '"';
strcpy (op, dp);
+ op += strlen (dp);
+ *op++ = '"';
+ *op = 0;
break;
case 'I':
foo.s_addr = htonl (getULong (dp));
*op++ = ' ';
}
if (i + 1 < numhunk) {
- *op++ = ',';
+ if (emit_commas)
+ *op++ = ',';
*op++ = ' ';
}
#ifndef lint
static char copyright[] =
-"$Id: print.c,v 1.11 1996/08/27 09:53:30 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: print.c,v 1.12 1997/02/22 08:32:05 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
dhcp_options [i].name,
pretty_print_option
(i, tp -> options [i].data,
- tp -> options [i].len));
+ tp -> options [i].len, 1));
}
}
debug ("");
}
}
}
-