gxbn_test.c revision 499b34cea04a46823d003d4c0520c8b03e8513cb
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Copyright (C) 2000, 2001 Internet Software Consortium.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Permission to use, copy, modify, and distribute this software for any
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * purpose with or without fee is hereby granted, provided that the above
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * copyright notice and this permission notice appear in all copies.
4e142a5bccd2944174ad9ae58d86cf03e170054dBob Halley * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
28a8f5b0de57d269cf2845c69cb6abe18cbd3b3aMark Andrews * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
ab023a65562e62b85a824509d829b6fad87e00b1Rob Austein * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid Lawrence * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
4e142a5bccd2944174ad9ae58d86cf03e170054dBob Halley * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
4e142a5bccd2944174ad9ae58d86cf03e170054dBob Halley * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
f1788d67add6bf3d301e91b3f54fa3c90a87328eBrian Wellington * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
4e142a5bccd2944174ad9ae58d86cf03e170054dBob Halley/* $Id: gxbn_test.c,v 1.10 2001/01/09 21:41:06 bwelling Exp $ */
c1ee8bb4ba3e9ab1463403ed685729631de406b1Mark Andrewsprint_he(struct hostent *he, int error, const char *fun, const char *name) {
4e142a5bccd2944174ad9ae58d86cf03e170054dBob Halley while (*c != NULL) {
4e142a5bccd2944174ad9ae58d86cf03e170054dBob Halley while (*c != NULL) {
4e142a5bccd2944174ad9ae58d86cf03e170054dBob Halley inet_ntop(he->h_addrtype, *c, buf, sizeof (buf));
4e142a5bccd2944174ad9ae58d86cf03e170054dBob Halley printf("%s(%s): error = %d (%s)\n", fun, name, error,
6e49e91bd08778d7eae45a2229dcf41ed97cc636David Lawrence print_he(he, h_errno, "gethostbyname", argv[1]);
4e142a5bccd2944174ad9ae58d86cf03e170054dBob Halley he = getipnodebyname(argv[1], AF_INET6, AI_DEFAULT|AI_ALL,