First commit

This commit is contained in:
2026-09-06 17:43:06 +03:00
commit 0fe9114117
10 changed files with 278 additions and 0 deletions

12
common/Practical.c Normal file
View 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;
}