Solstice X.25 9.2 Developer's Guide

8.11 getxhostbyaddr--Get X.25 Host Name by Address

Synopsis
#include <netx25/x25_proto.h>
 #include <netx25/xnetdb.h>

    struct xhostent *getxhostbyaddr(
      char *addr,
      int len, int type
  );
Description

getxhostbyaddr searches the xhosts file for an entry with a matching X.25 host address. By default, this file is located in the /etc/SUNWconn/x25 directory. It returns a pointer to a xhostent structure containing information on the entry.

Arguments

The parameters are:

Table 8-12 getxhostbyaddr parameters

Parameter 

Description 

addr

A pointer to an xaddrf structure containing the address of the host whose entry you want.

len

The length in bytes of addr.

type

The address type required. This is always CCITT_X25.

Return Value

getxhostbyaddr returns a pointer to static storage. You must copy the value in order to keep and reuse it. A return value of 0 indicates the address supplied is either invalid or unknown.