.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" References consulted: .\" Linux libc source code .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 21:48:06 1993 by Rik Faith (faith@cs.unc.edu) .\" .\" Tłumaczenie wersji man-pages 1.50 - czerwiec 2002 PTM .\" Andrzej Krzysztofowicz .\" .TH GETNETENT 3 1993-05-15 "BSD" "Podręcznik programisty Linuksa" .SH NAZWA getnetent, getnetbyname, getnetbyaddr, setnetent, endnetent \- odczytanie wpisu dotyczącego sieci .SH SKŁADNIA .nf .B #include .sp .B struct netent *getnetent(void); .sp .BI "struct netent *getnetbyname(const char *" name ); .sp .BI "struct netent *getnetbyaddr(long " net ", int " type ); .sp .BI "void setnetent(int " stayopen ); .sp .B void endnetent(void); .fi .SH OPIS \fI Uwaga! To tłumaczenie może być nieaktualne!\fP .PP Funkcja \fBgetnetent()\fP odczytuje następną linię z pliku \fI/etc/networks\fP i zwraca strukturę \fInetent\fP zawierającą pola otrzymane w wyniku rozłożenia linii. Plik \fI/etc/networks\fP jest otwierany, jeśli jest to potrzebne. .PP Funkcja \fBgetnetbyname()\fP zwraca strukturę \fInetent\fP zawierającą wartości z tej linii pliku \fI/etc/networks\fP, która odpowiada sieci \fIname\fP. .PP Funkcja \fBgetnetbyaddr()\fP zwraca strukturę \fInetent\fP zawierającą wartości z linii odpowiadającej sieci typu \fItype\fP o numerze \fInet\fP. .PP Funkcja \fBsetnetent()\fP otwiera plik \fI/etc/networks\fP i ustawia wskaźnik pliku na jego początku. Jeśli \fIstayopen\fP będzie prawdziwe (1), to plik nie będzie zamykany pomiędzy wywołaniami \fBgetnetbyname()\fP i \fBgetnetbyaddr()\fP. .PP Funkcja \fBendservent()\fP zamyka \fI/etc/networks\fP. .PP Struktura \fInetent\fP jest zdefiniowana w \fI\fP następująco: .sp .RS .nf .ne 6 .ta 8n 16n 34n struct netent { char *n_name; /* oficjalna nazwa sieci */ char **n_aliases; /* lista aliasów */ int n_addrtype; /* rodzaj adresu sieci */ unsigned long int n_net; /* numer sieci */ } .ta .fi .RE .PP Polami struktury \fInetent\fP są: .TP .I n_name Oficjalna nazwa sieci. .TP .I n_aliases Zakończona zerem lista alternatywnych nazw tej sieci. .TP .I n_addrtype Rodzaj numeru sieci; zawsze AF_INET. .TP .I n_net Numer sieci w porządku bajtów hosta. .SH "WARTOŚĆ ZWRACANA" Funkcje \fBgetnetent()\fP, \fBgetnetbyname()\fP i \fBgetnetbyaddr()\fP zwracają strukturę \fInetent\fP, lub wskaźnik NULL gdy wystąpi błąd lub napotkany zostanie koniec pliku. .SH PLIKI .TP .I /etc/networks plik bazy danych z sieciami .SH "ZGODNE Z" BSD 4.3 .SH "ZOBACZ TAKŻE" .BR getprotoent (3), .BR getservent (3), .BR networks (5) .br RFC 1101 .SH "INFORMACJE O TŁUMACZENIU" Powyższe tłumaczenie pochodzi z nieistniejącego już Projektu Tłumaczenia Manuali i \fImoże nie być aktualne\fR. W razie zauważenia różnic między powyższym opisem a rzeczywistym zachowaniem opisywanego programu lub funkcji, prosimy o zapoznanie się z oryginalną (angielską) wersją strony podręcznika za pomocą polecenia: .IP man \-\-locale=C 3 getnetent .PP Prosimy o pomoc w aktualizacji stron man \- więcej informacji można znaleźć pod adresem http://sourceforge.net/projects/manpages\-pl/.