SYNOPSIS
#include <netdb.h>
void
struct netent *getnetbyaddr(in_addr_t net, int type);
struct netent *getnetbyname(const char *name);
struct netent *getnetent(void);
void setnetent(int stayopen);
DESCRIPTION
The
- n_name
-
Official name of the network.
- n_aliases
-
A null-terminated array of alternate names.
- n_addrtype
-
The type of address being returned.
- n_net
-
The network number, in host byte order.
The
The
The
The
The
PARAMETERS
- addr
-
Points to the binary-format (that is, not null-terminated) address in host byte order.
- type
-
Is the type (address family) of the address.
- name
-
Is the network name for the network whose address is to be returned.
- stayopen
-
When non-zero, the connection to the database is not closed after each call to
getnetbyaddr() ,getnetbyname() , orgetnetent() .
RETURN VALUES
If successful,
The pointer that is returned points to a structure that is allocated by the NuTCRACKER Platform. The application must never attempt to modify this structure or to free any of its components. Furthermore, only one copy of this structure is allocated per thread; therefore, the application should copy any information it needs before issuing any other socket calls.
CONFORMANCE
UNIX 98, with exceptions
MULTITHREAD SAFETY LEVEL
PORTING ISSUES
On 8.1/2012R2/10/2016/2019/11/2022, the networks file is in the drivers/etc
directory under the 8.1/2012R2/10/2016/2019/11/2022 system directory.
The
The entries in the networks file on Windows may have extra 0 octets appended to them, to work around a problem with the Windows networking implementation. This issue is documented in article [Q131717] in the Microsoft Knowledge Base.
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Functions:
_NutQueryWinNetFileDir() ,endhostent() ,endprotoent() ,endservent() ,gethostbyaddr() ,gethostbyname() ,gethostent() ,getprotobyname() ,getprotobynumber() ,getprotoent() ,getservbyname() ,getservbyport() ,getservent() ,htonl() ,inet_network() ,inet_ntoa() ,ntohl() ,sethostent() ,setprotoent() ,setservent()
PTC MKS Toolkit 10.4 Documentation Build 39.