* Copyright (c) 1983 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
static char sccsid
[] = "@(#)getservbyport.c 5.1 (Berkeley) %G%";
getservbyport(port
, proto
)
register struct servent
*p
;
while (p
= getservent()) {
if (proto
== 0 || strcmp(p
->s_proto
, proto
) == 0)