4 /* do we really need all these?? */
7 static const unsigned char protos[][8] = {
28 void endprotoent(void)
33 void setprotoent(int stayopen)
38 struct protoent *getprotoent(void)
40 static struct protoent p;
41 static const char *aliases;
42 if (!protos[idx][1]) return NULL;
43 p.p_proto = protos[idx][0];
44 p.p_name = (char *)protos[idx++]+1;
45 p.p_aliases = (char **)&aliases;
49 struct protoent *getprotobyname(const char *name)
54 while (p && strcmp(name, p->p_name));
58 struct protoent *getprotobynumber(int num)
63 while (p && p->p_proto != num);