/*
- * Copyright (C) 2006, 2007 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2006, 2007, 2009 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
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: gsstest.c,v 1.6 2007/06/19 23:47:00 tbox Exp $ */
+/* $Id: gsstest.c,v 1.8 2009/09/02 23:48:01 tbox Exp $ */
#include <config.h>
end:
if (query)
dns_message_destroy(&query);
-
+
if (reqev->request)
dns_request_destroy(&reqev->request);
event = isc_event_allocate(mctx, (void *)1, 1, console, NULL,
sizeof(*event));
isc_task_send(task, &event);
- return;
+ return;
}
char output[10 * 1024];
static char host[256];
-
+
isc_event_free(&event);
printf("Query => ");
isc_buffer_init(&buf, host, strlen(host));
isc_buffer_add(&buf, strlen(host));
result = dns_name_fromtext(dns_fixedname_name(&queryname), &buf,
- dns_rootname, ISC_FALSE, NULL);
+ dns_rootname, 0, NULL);
CHECK("dns_name_fromtext", result);
result = dns_message_create(mctx, DNS_MESSAGE_INTENTRENDER, &message);
dns_request_destroy(&reqev->request);
isc_event_free(&event);
-
+
event = isc_event_allocate(mctx, (void *)1, 1, console, NULL,
sizeof(*event));
isc_task_send(task, &event);
sprintf(contextname, "gsstest.context.%d.", (int)time(NULL));
printf("Initctx - context name we're using: %s\n", contextname);
-
+
printf("Negotiating GSSAPI context: ");
printf(gssid);
printf("\n");
/*
* Setup a GSSAPI context with the server
- */
+ */
dns_fixedname_init(&servername);
isc_buffer_init(&buf, contextname, strlen(contextname));
isc_buffer_add(&buf, strlen(contextname));
result = dns_name_fromtext(dns_fixedname_name(&servername), &buf,
- dns_rootname, ISC_FALSE, NULL);
+ dns_rootname, 0, NULL);
CHECK("dns_name_fromtext", result);
- /* Make name happen */
+ /* Make name happen */
dns_fixedname_init(&gssname);
isc_buffer_init(&buf, gssid, strlen(gssid));
isc_buffer_add(&buf, strlen(gssid));
result = dns_name_fromtext(dns_fixedname_name(&gssname), &buf,
- dns_rootname, ISC_FALSE, NULL);
+ dns_rootname, 0, NULL);
CHECK("dns_name_fromtext", result);
query = NULL;
isc_sockaddr_fromin(&address, &inaddr, PORT);
return;
}
-
+
};
}
UNUSED(argv);
UNUSED(argc);
-
+
RUNCHECK(isc_app_start());
dns_result_register();
&sock));
setup();
-
+
RUNCHECK(isc_app_onrun(mctx, task, console, NULL));
(void)isc_app_run();
dns_requestmgr_shutdown(requestmgr);
dns_requestmgr_detach(&requestmgr);
-
+
dns_dispatch_detach(&dispatchv4);
dns_dispatchmgr_destroy(&dispatchmgr);
-
+
isc_timermgr_destroy(&timermgr);
isc_task_detach(&task);