#include <netx25/x25_proto.h>
#include <netx25/xnetdb.h>
struct xhostent *getxhostbyaddr(
char *addr,
int len, int type
);
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.
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. |
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.