dnet_addr(3dn)
NAME
dnet_addr − convert an ASCII node address to binary
SYNTAX
#include <netdnet/dn.h>
struct dn_naddr *dnet_addr (cp)
char *cp;
ARGUMENTS
Input Argument
cp Character pointer to the ASCII node address string. A DECnet node address is specified as a.n, where a is the area number and n is the node number.
A DECnet node address includes an area number, which identifies a node’s area in a multiarea network and a node number, which uniquely identifies a DECnet node. In a multiple area network, the a argument is the area number for that node. For a node in a single area network, the a argument defaults to 1.
Return Argument
dn_naddr
specifies the node address structure. The following data fields are filled in by this subroutine:
a_len Specifies the length of the returned node address.
a_add Specifies the node address.
DESCRIPTION
The dnet_addr subroutine converts an ASCII node address string to binary and returns a pointer to a dn_naddr structure, which contains the node address and the length of the returned node address. This information is required for the sockaddr_dn data structure.
RETURN VALUE
If the call succeeds, a pointer to a dn_naddr structure is returned. If an error occurs, a value of 0 is returned.
RESTRICTIONS
If you plan to call this function again before you finish using the data, you must copy the data into a local structure.