5 /* do we really need all these?? */
8 static const unsigned char protos[][6] = {
21 void endprotoent(void)
26 void setprotoent(int stayopen)
31 struct protoent *getprotoent(void)
33 static struct protoent p;
34 static const char *aliases;
35 if (!protos[idx][1]) return NULL;
36 p.p_proto = protos[idx][0];
37 p.p_name = (char *)protos[idx++]+1;
38 p.p_aliases = (char **)&aliases;
42 struct protoent *getprotobyname(const char *name)
47 while (p && strcmp(name, p->p_name));
51 struct protoent *getprotobynumber(int num)
56 while (p && p->p_proto != num);