.\" RCSid: $Header: /export/sw/rcs/vcom5.0/sbeux/man/getxhostbyname.3n,v 1.0 92/08/20 11:25:20 root Exp $
.\" 
.\"----------------------------------------------------------------------------
.\" getxhostbyname.3n -
.\" 
.\" Copyrighted as an unpublished work.
.\" (c) Copyright 1992 SBE, Inc. and by other vendors under license agreements.
.\" All Rights Reserved.
.\"----------------------------------------------------------------------------
.\" RCS info:
.\" RCS revision: $Revision: 1.0 $
.\" Last changed on $Date: 92/08/20 11:25:20 $
.\" Changed by $Author: root $
.\"----------------------------------------------------------------------------
.\" $Log:	getxhostbyname.3n,v $
Revision 1.0  92/08/20  11:25:20  root
Initial revision

.\"----------------------------------------------------------------------------
.\" 
.TH GETXHOSTBYNAME 3N "14 February 1991" "SBE Inc."
.ta 4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104
.SH NAME
getxhostbyname \- get X.25 host entry
.SH SYNOPSIS
.LP
.nf
.na
.ft B
#include <sys/snet/x25_proto.h>
#include <xnetdb.h>
.fi
.ad
.ft R
.LP
.nf
.na
.ft B
struct hostent * getxhostbyname(nam)
char *nam;
.ad
.fi
.ft R
.SH AVAILABILITY
The routine is part of the X.25 Network Library.
This library is available with the SBE X.25 software package
for the VCOM family of synchronous communications controllers.
.SH DESCRIPTION
Given a pointer to a name string containing an X.25
host name, 
.B getxhostbyname
returns a pointer to an object having the following structure 
.RS
.LP
.nf
.na
.ft B
struct hostent {
	char	*h_name;
	char	**h_aliases;
	int	h_addrtype;
	int	h_length;
	char	*h_addr;
	}
.ad
.fi
.ft R
.RE
.LP
The members of this structure are:
.TP 12
.B h_name
name of the X.25 host.
.TP
.B h_aliases
a zero-terminated array of alternative
names for the X.25 host.
.TP
.B h_addrtype
the type of the address being returned.
.TP
.B h_length
the length, in bytes, of the address
.BR h_addr "."
.TP
.B h_addr
a pointer to the network address for the X.25 host.
.SH RETURN VALUES:
.LP
If the X.25 host name supplied matches with a name in the
.B /etc/xhosts
database, a pointer to the
.B hostent
structure is returned.
If no match is found, a NULL pointer is returned.
.SH FILES
.B /etc/xhosts
.SH SEE ALSO
.BR endxhostent "(3),"
.BR getxhostent "(3),"
.BR setxhostent "(3),"
.BR getxhostbyaddr "(3),"
.BR xhosts "(5),"
