4 /* do we really need all these?? */
7 static const unsigned char protos[][6] = {
20 void endprotoent(void)
25 void setprotoent(int stayopen)
30 struct protoent *getprotoent(void)
32 static struct protoent p;
33 static const char *aliases;
34 if (!protos[idx][1]) return NULL;
35 p.p_proto = protos[idx][0];
36 p.p_name = (char *)protos[idx++]+1;
37 p.p_aliases = (char **)&aliases;
41 struct protoent *getprotobyname(const char *name)
46 while (p && strcmp(name, p->p_name));
50 struct protoent *getprotobynumber(int num)
55 while (p && p->p_proto != num);