.\" RCSid: $Header: /rcs/vcom/sbeux/man/getxhostbyaddr.3n,v 1.0 91/02/14 10:01:08 root Rel $
.\" 
.\"----------------------------------------------------------------------------
.\" getxhostbyaddr.3n -
.\" 
.\" Copyrighted as an unpublished work.
.\" (c) Copyright 1991 SBE, Inc. and by other vendors under license agreements.
.\" All Rights Reserved.
.\"----------------------------------------------------------------------------
.\" RCS info:
.\" RCS revision: $Revision: 1.0 $
.\" Last changed on $Date: 91/02/14 10:01:08 $
.\" Changed by $Author: root $
.\"----------------------------------------------------------------------------
.\" $Log:	getxhostbyaddr.3n,v $
.\"Revision 1.0  91/02/14  10:01:08  root
.\"Initial revision
.\"
.\"----------------------------------------------------------------------------
.\" 
.TH GETXHOSTBYADDR 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
getxhostbyaddr \- get X.25 host entry
.SH SYNOPSIS
.LP
.nf
.ft B
#include <sys/snet/x25_proto.h>
#include <xnetdb.h>
.fi
.ft R
.LP
.nf
.ft B
struct hostent * getxhostbyaddr(addr, length, type)
struct ext_addr * addr;
int length;
int type;
.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
.LP
Given a pointer to an extended X.25 host address,
.IR addr ","
its
.I length
in bytes, and its
.IR type ","
.B getxhostbyaddr
returns a pointer to an object
with 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
If the X.25 address supplied matches with an address in the /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 getxhostbyname "(3),"
.BR getxhostent "(3),"
.BR setxhostnet "(3),"
.BR xhosts "(5)"
.SH NOTES
The only currently-supported value for
.I type
is
.BR CCITTX25 "."
