Group: Windows Sockets 2 (Winsock) - Library: ws2_32
Winsock: how to retrieve the protocol information corresponding to a protocol number
struct PROTOENT FAR * getprotobynumber(
int number
);
DECLARE INTEGER getprotobynumber IN ws2_32;
INTEGER number
number [in] Protocol number, in host byte order.
If no error occurs, getprotobynumber returns a pointer to the protoent structure. Otherwise, it returns a NULL pointer and a specific error number can be retrieved by calling WSAGetLastError.