SYNOPSIS
#include <netdb.h>
void
struct servent *getservbyname(const char *name, const char *proto);
struct servent *getservbyport(int port, const char *proto);
struct servent *getservent(void);
void setservent(int stayopen);
DESCRIPTION
The
- s_name
-
Official name of the protocol.
- s_aliases
-
A null-terminated array of alternate names.
- s_port
-
The port number at which the service resides, in network byte order.
- s_proto
-
The name of the protocol to use when contacting the service.
The
The
The
The
The
PARAMETERS
- name
-
Is the service name for the service whose entry is to be returned.
- proto
-
Is the protocol name for the service whose entry is to be returned. If this is a null pointer, then any protocol is matched.
- port
-
Is the port number for the service whose entry is to be returned. This must be in network byte order.
- stayopen
-
When non-zero, the connection to the database is not closed after each call to
getservent() .
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.
MULTITHREAD SAFETY LEVEL
PORTING ISSUES
On 8.1/2012R2/10/2016/2019/11/2022, the services file is in the drivers/etc
directory under the 8.1/2012R2/10/2016/2019/11/2022 system directory.
The
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() ,endnetent() ,endprotoent() ,gethostbyaddr() ,gethostbyname() ,gethostent() ,getnetbyaddr() ,getnetbyname() ,getnetent() ,getprotobyname() ,getprotobynumber() ,getprotoent() ,htons() ,ntohs() ,sethostent() ,setnetent() ,setprotoent()
PTC MKS Toolkit 10.4 Documentation Build 39.