}
}
-void
+void
fatal(const char *format, ...) {
va_list args;
va_end(args);
fprintf(stderr, "\n");
exit(1);
-}
+}
static void
hex_dump(const char *msg, void *data, unsigned int length) {
- unsigned int len;
+ unsigned int len;
unsigned char *base;
isc_boolean_t first = ISC_TRUE;
base = data;
- printf("DUMP of %d bytes: %s\n\t", length, msg);
- for (len = 0; len < length; len++) {
- if (len % 16 == 0 && !first)
+ printf("DUMP of %d bytes: %s\n\t", length, msg);
+ for (len = 0; len < length; len++) {
+ if (len % 16 == 0 && !first)
printf("\n\t");
- printf("%02x ", base[len]);
+ printf("%02x ", base[len]);
first = ISC_FALSE;
- }
- printf("\n");
+ }
+ printf("\n");
}
static void
static void
hex_dump(const char *msg, void *data, unsigned int length) {
- unsigned int len;
+ unsigned int len;
unsigned char *base;
isc_boolean_t first = ISC_TRUE;
base = data;
- printf("DUMP of %d bytes: %s\n\t", length, msg);
- for (len = 0; len < length; len++) {
- if (len % 16 == 0 && !first)
+ printf("DUMP of %d bytes: %s\n\t", length, msg);
+ for (len = 0; len < length; len++) {
+ if (len % 16 == 0 && !first)
printf("\n\t");
- printf("%02x ", base[len]);
+ printf("%02x ", base[len]);
first = ISC_FALSE;
- }
- printf("\n");
+ }
+ printf("\n");
}
static void
-# Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
+# Copyright (C) 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
/*
- * Copyright (C) 2014, 2015 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2014, 2015, 2015 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
unsigned char *p = b;
while (p < bp) {
unsigned int len;
-
+
if (p + 2 > bp) {
printf("premature end of packet\n");
exit(1);
* XXXMLG
* Changing this here is a hack, and should not be done in
* reasonable application code, ever.
- */
+ */
message->from_to_wire = DNS_MESSAGE_INTENTRENDER;
- for (i = 0; i < DNS_SECTION_MAX; i++)
+ for (i = 0; i < DNS_SECTION_MAX; i++)
message->counts[i] = 0; /* Another hack XXX */
result = dns_compress_init(&cctx, -1, mctx);
/*
- * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2015 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
/*
- * Copyright (C) 2013-2015 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2013, 2014.2015, 2015 Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
#define ALIST_TAG "*alist*"
#define MAX_INDENT 64
-static char spaces[MAX_INDENT + 1] =
+static char spaces[MAX_INDENT + 1] =
" ";
isccc_sexpr_t *
WORD wVersionRequested;
WSADATA wsaData;
int err;
-
+
wVersionRequested = MAKEWORD(2, 0);
-
+
err = WSAStartup( wVersionRequested, &wsaData );
if (err != 0) {
fprintf(stderr, "WSAStartup() failed: %d\n", err);