4 /* do we really need all these?? */
7 static const unsigned char protos[][8] = {
26 void endprotoent(void)
31 void setprotoent(int stayopen)
36 struct protoent *getprotoent(void)
38 static struct protoent p;
39 static const char *aliases;
40 if (!protos[idx][1]) return NULL;
41 p.p_proto = protos[idx][0];
42 p.p_name = (char *)protos[idx++]+1;
43 p.p_aliases = (char **)&aliases;
47 struct protoent *getprotobyname(const char *name)
52 while (p && strcmp(name, p->p_name));
56 struct protoent *getprotobynumber(int num)
61 while (p && p->p_proto != num);