1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date. The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein. The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" References consulted:
24 .\" Linux libc source code
25 .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
27 .\" Modified Sat Jul 24 19:19:11 1993 by Rik Faith (faith@cs.unc.edu)
28 .\" Modified Wed Oct 18 20:23:54 1995 by Martin Schulze <joey@infodrom.north.de>
29 .\" Modified Mon Apr 22 01:50:54 1996 by Martin Schulze <joey@infodrom.north.de>
30 .\" Translated to German Fri Nov 1 1996 by Patrick Rother <krd@gulu.net>
32 .TH GETSERVENT 3 "1. November 1996" "BSD" "Bibliotheksfunktionen"
34 getservent, getservbyname, getservbyport, setservent, endservent \-
35 hole Dienstdateieintrag
40 .B struct servent *getservent(void);
42 .BI "struct servent *getservbyname(const char *" name ", const char *" proto );
44 .BI "struct servent *getservbyport(int " port ", const char *" proto );
46 .BI "void setservent(int " stayopen );
48 .B void endservent(void);
53 liest die nächste Zeile der Datei
55 und gibt eine Struktur
57 zurück, die die Felder der Zeile enthält. Die Datei
59 wird geöffnet, falls nötig.
65 zurück für die Zeile aus
69 entspricht, der Protokoll
77 zurück für die Zeile, die dem Port
79 angegeben in Netzwerk-Byte-Ordnung, entspricht, der Protokoll
87 und setzt den Dateizeigen auf den Anfang. Wenn
89 wahr (1) ist, dann wird die Datei nicht geschlossen zwischen Aufrugen von
90 .BR getservbyname() " und " getservbyport() .
98 .IR servent " ist in " <netdb.h>
106 char *s_name; /* offizieller Dienstname */
107 char **s_aliases; /* Aliasliste */
108 int s_port; /* Portnummer */
109 char *s_proto; /* zu benutzendes Protokoll */
115 Die Einträge der Struktur
120 Der offizielle Name der Dienstes.
123 Eine mit Null beendete Liste von alternativen Namen für den Dienst.
126 Die Portnummer angegeben in Netzwerk-Byte-Ordnung.
129 Der Name des Protokolles, das mit diesem Dienst zu benutzen ist.
132 .BR getservent() ", " getservbyname() " und " getservbyport()
135 zurück oder einen NULL-Zeiger wenn ein Fehler auftritt bzw. das Ende
136 der Liste erreicht ist.