1*7898Ssam /* getproto.c 4.1 82/08/25 */ 2*7898Ssam 3*7898Ssam #include <netdb.h> 4*7898Ssam 5*7898Ssam struct protoent * 6*7898Ssam getproto(proto) 7*7898Ssam register int proto; 8*7898Ssam { 9*7898Ssam register struct protoent *p; 10*7898Ssam 11*7898Ssam setprotoent(0); 12*7898Ssam while (p = getprotoent()) 13*7898Ssam if (p->p_proto == proto) 14*7898Ssam break; 15*7898Ssam endprotoent(); 16*7898Ssam return (p); 17*7898Ssam } 18