First commit
This commit is contained in:
12
common/Practical.c
Normal file
12
common/Practical.c
Normal file
@@ -0,0 +1,12 @@
|
||||
#include <netdb.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "Practical.h"
|
||||
|
||||
int proto_get_num(const char *name) {
|
||||
struct protoent *protoent = getprotobyname(name);
|
||||
if (protoent == NULL) {
|
||||
DieWithSystemMessage("getprotobyname");
|
||||
}
|
||||
return protoent->p_proto;
|
||||
}
|
||||
Reference in New Issue
Block a user