#include #include #include "Practical.h" int proto_get_num(const char *name) { struct protoent *protoent = getprotobyname(name); if (protoent == NULL) { DieWithSystemMessage("getprotobyname"); } return protoent->p_proto; }