.TH setprotoent() "" "" "Sockets Function (libsocket)"
.PC "Open the protocols file"
.PP
.B "#include <netdb.h>"
\fBint setprotoent(\fIstayopen\^\fB)\fR
\fBint \fIstayopen\^\fB;\fR
.PP
Function
.B setprotoent()
opens or rewinds file
.BR /etc/protocols ,
which describes all protocols recognized on your local network.
If flag
.I stayopen
is set to a non-zero value,
.B /etc/protocols
is not closed after each call to
.B getprotobyaddr()
or
.BR getprotobyname() .
.SH "See Also"
.Xr "getprotobyaddr()," getprobna
.Xr "getprotobyname()," getprobnu
.Xr "getprotoent()," getprotoe
.Xr "endprotoent()," endprotoe
.Xr "libsocket," libsocket
.Xr "netdb.h" netdb.h
