SYNOPSIS
#include <netdb.h>
void
struct protoent *getprotobyname(const char *name);
struct protoent *getprotobynumber(int proto);
struct protoent *getprotoent(void);
void setprotoent(int stayopen);
DESCRIPTION
The
- p_name
-
Official name of the protocol.
- p_aliases
-
A null-terminated array of alternate names.
- p_proto
-
The protocol number.
The
The
The
The
The
PARAMETERS
- name
-
Is the protocol name for the protocol whose entry is to be returned.
- proto
-
Is the protocol number for the protocol whose entry is to be returned.
- stayopen
-
When non-zero, the connection to the database is not closed after each call to
getprotoent() .
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 Windows NT/2000/XP/2003/Vista/7/2008, the protocols file (often truncated to
protocol)
is in the drivers/etc directory under the Windows NT/2000/XP/2003/Vista/7/2008 system directory.
The
AVAILABILITY
MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Functions:
_NutQueryWinNetFileDir() ,endhostent() ,endnetent() ,endservent() ,gethostbyaddr() ,gethostbyname() ,gethostent() ,getnetbyaddr() ,getnetbyname() ,getnetent() ,getservbyname() ,getservbyport() ,getservent() ,sethostent() ,setnetent() ,setservent()
MKS Toolkit 9.3 Documentation Build 6.