---
name: "dnet_htoa"
section: "3"
platform: "linux"
package: "libdnet-dev"
version: "2.65+b1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/dnet_htoa"
---

# dnet\_htoa(3)

DECnet address to host name translation

## NAME

dnet\_htoa - DECnet address to host name translation

## SYNOPSIS

**#include \<netdnet/dn.h\>**\
 **#include \<netdnet/dnetdb.h\>**\

**char \*dnet\_htoa (struct dn\_naddr \*addr)**

## DESCRIPTION

**dnet\_htoa** searches the decnet hosts file for  **addr** and returns the DECnet node name.\
 If no entry is found, returns the ascii DECnet address in the format **area.node** (1.1, 1.2, etc)

## EXAMPLE

```
#include <netdnet/dn.h>
#include <netdnet/dnetdb.h>
#include <sys/socket.h>
main(void)
{
    struct dn_naddr		binaddr;
    binaddr.a_len 	= 2;
    binaddr.a_addr[0] 	= 0x02;
    binaddr.a_addr[1] 	= 0x04;
    printf ("DECnet node name is %s",dnet_htoa(binaddr));
}
```

## SEE ALSO

[**dnet\_addr**(3)](/dnet_addr/3.md), [**dnet\_ntoa**(3)](/dnet_ntoa/3.md), [**dnet\_conn**(3)](/dnet_conn/3.md), [**getnodeadd**(3)](/getnodeadd/3.md), [**getnodebyname**(3)](/getnodebyname/3.md), [**getnodebyaddr**(3)](/getnodebyaddr/3.md), [**setnodeent**(3)](/setnodeent/3.md)
