date and time created 91/03/06 18:09:53 by bostic
[unix-history] / usr / src / lib / libc / net / getservent.3
index ab00e32..c6ca8f7 100644 (file)
@@ -1,13 +1,15 @@
-.\" Copyright (c) 1983 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
+.\" Copyright (c) 1983 The Regents of the University of California.
+.\" All rights reserved.
 .\"
 .\"
-.\"    @(#)getservent.3        5.1 (Berkeley) %G%
+.\" %sccs.include.redist.man%
 .\"
 .\"
-.TH GETSERVENT 3N "9 February 1983"
+.\"    @(#)getservent.3        6.5 (Berkeley) %G%
+.\"
+.TH GETSERVENT 3 ""
 .UC 5
 .SH NAME
 .UC 5
 .SH NAME
-getservent, getservbyport, getservbyname, setservent, endservent \- get service entry
+getservent, getservbyport, getservbyname, setservent,
+endservent \- get service entry
 .SH SYNOPSIS
 .nf
 .ft B
 .SH SYNOPSIS
 .nf
 .ft B
@@ -47,7 +49,7 @@ fields of a line in the network services data base,
 struct servent {
        char    *s_name;        /* official name of service */
        char    **s_aliases;    /* alias list */
 struct servent {
        char    *s_name;        /* official name of service */
        char    **s_aliases;    /* alias list */
-       long    s_port;         /* port service resides at */
+       int     s_port;         /* port service resides at */
        char    *s_proto;       /* protocol to use */
 };
 .ft R
        char    *s_proto;       /* protocol to use */
 };
 .ft R
@@ -79,9 +81,8 @@ opens and rewinds the file.  If the
 .I stayopen
 flag is non-zero,
 the net data base will not be closed after each call to 
 .I stayopen
 flag is non-zero,
 the net data base will not be closed after each call to 
-.I getservent
-(either directly, or indirectly through one of
-the other \*(lqgetserv\*(rq calls).
+.I getservbyname
+or .IR getservbyport .
 .PP
 .I Endservent
 closes the file.
 .PP
 .I Endservent
 closes the file.
@@ -99,7 +100,7 @@ searches must also match the protocol.
 .SH FILES
 /etc/services
 .SH "SEE ALSO"
 .SH FILES
 /etc/services
 .SH "SEE ALSO"
-getprotoent(3N), services(5)
+getprotoent(3), services(5)
 .SH DIAGNOSTICS
 Null pointer
 (0) returned on EOF or error.
 .SH DIAGNOSTICS
 Null pointer
 (0) returned on EOF or error.