Group: Windows Sockets 2 (Winsock) - Library: iphlpapi
Winsock: how to retrieve the protocol information corresponding to a protocol name
struct PROTOENT FAR * getprotobyname(
const char FAR *name
);
DECLARE INTEGER getprotobyname IN ws2_32;
STRING name
name [in] Pointer to a null-terminated protocol name.
If no error occurs, getprotobyname returns a pointer to the protoent. Otherwise, it returns a NULL pointer and a specific error number can be retrieved by calling WSAGetLastError.