4 /* do we really need all these?? */
7 static const unsigned char protos[][8] = {
22 void endprotoent(void)
27 void setprotoent(int stayopen)
32 struct protoent *getprotoent(void)
34 static struct protoent p;
35 static const char *aliases;
36 if (!protos[idx][1]) return NULL;
37 p.p_proto = protos[idx][0];
38 p.p_name = (char *)protos[idx++]+1;
39 p.p_aliases = (char **)&aliases;
43 struct protoent *getprotobyname(const char *name)
48 while (p && strcmp(name, p->p_name));
52 struct protoent *getprotobynumber(int num)
57 while (p && p->p_proto != num);