/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
/*
*/
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <unistd.h>
#include <netdb.h>
#include <libintl.h>
#include <xti.h>
#include <assert.h>
#include <sys/byteorder.h>
#include "charsets.h"
#include "private.h"
void
{
int i;
printf("ai==NULL\n");
return;
}
printf("ai[%d]: af=%d, len=%d", i,
if (ai->ai_canonname) {
printf("ai[%d]: cname=\"%s\"\n",
i, ai->ai_canonname);
}
}
}
void
{
const char *ip;
switch (af) {
case AF_NETBIOS: /* see nbns_rq.c */
case AF_INET:
break;
case AF_INET6:
break;
default:
ip = "?";
break;
}
}
/*
* Returns an EAI_xxx error number like getaddrinfo(3)
*/
int
{
char *srvaddr_str;
return (EAI_NONAME);
}
/*
* If the user specified an address, use it,
* and don't do NetBIOS lookup.
*/
if (ctx->ct_srvaddr_s) {
} else
/*
* Default the server name we'll use in the
* protocol (i.e. NTLM, tree connect).
*/
sizeof (ctx->ct_srvname));
/*
* Try to lookup the host address using the
* normal name-to-IP address mechanisms.
* If that fails, we MAY try NetBIOS.
*/
if (gaierr == 0) {
return (0);
}
/*
* If regular IP name lookup failed, try NetBIOS,
* but only if given a valid NetBIOS name and if
* NetBIOS name lookup is enabled.
*/
if (gaierr2 == 0) {
if (res->ai_canonname)
sizeof (ctx->ct_srvname));
return (0);
}
}
/*
* Return the original error from getaddrinfo
*/
if (smb_verbose) {
"getaddrinfo: %s: %s"), 0,
}
return (gaierr);
}