File: inet.3

package info (click to toggle)
manpages-es 1.24a-6
  • links: PTS
  • area: main
  • in suites: potato
  • size: 4,256 kB
  • ctags: 7
  • sloc: makefile: 66; sh: 62
file content (121 lines) | stat: -rw-r--r-- 5,086 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
.\" Hey Emacs! This file is -*- nroff -*- source.
.\"
.\" 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
.\"     libc.info (from glibc distribution)
.\" Modified Sat Jul 24 19:12:00 1993 by Rik Faith <faith@cs.unc.edu>
.\" Modified Sun Sep  3 20:29:36 1995 by Jim Van Zandt <jrv@vanzandt.mv.com>
.\" Changed network into host byte order (for inet_network),
.\"     Andreas Jaeger <aj@arthur.rhein-neckar.de>, 980130.
.\"
.\" Translated into Spanish Thu Mar 26 14:02:26 CET 1998 by
.\" 	Gerardo Aburruzaga Garca <gerardo.aburruzaga@uca.es>
.\" Translation revised Mon Aug 17 1998 by Juan Piernas <piernas@ditec.um.es>
.\" Translation revised Sun Apr  4 1999 by Juan Piernas <piernas@ditec.um.es>
.\"
.TH INET 3  "3 Septiembre  1995" "BSD" "Manual del Programador de Linux"
.SH NOMBRE
inet_aton, inet_addr, inet_network, inet_ntoa, inet_makeaddr, inet_lnaof, 
inet_netof \- Rutinas de manipulacin de direcciones de Internet
.SH SINOPSIS
.nf
.B #include <sys/socket.h>
.B #include <netinet/in.h>
.B #include <arpa/inet.h>
.sp
.BI "int inet_aton(const char *" cp ", struct in_addr *" inp ");"
.sp
.BI "unsigned long int inet_addr(const char *" cp );
.sp
.BI "unsigned long int inet_network(const char *" cp );
.sp
.BI "char *inet_ntoa(struct in_addr " in );
.sp
.BI "struct in_addr inet_makeaddr(int " net ", int " host );
.sp
.BI "unsigned long int inet_lnaof(struct in_addr " in );
.sp
.BI "unsigned long int inet_netof(struct in_addr " in );
.fi
.SH DESCRIPCIN
\fBinet_aton()\fP convierte la direccin de Internet \fIcp\fP desde la
notacin estndar de nmeros y puntos a la representacin binaria, y
la guarda en la estructura a la que apunte \fIinp\fP. \fBinet_aton\fP devuelve
no-cero si la direccin es vlida, cero si no.
.PP
La funcin \fBinet_addr()\fP convierte la direccin de Internet
\fIcp\fP desde la notacin de nmeros y puntos a la de datos binarios
en orden de bytes del ordenador local. Si la entrada no es vlida, devuelve
INADDR_NONE (usualmente \-1). sta es una interfaz \fIobsoleta\fP
a \fBinet_aton\fP, descrita anteriormente; es obsoleta porque \-1 es una
direccin vlida (255.255.255.255), e \fBinet_aton\fP porporciona una manera
ms clara para indicar que ha ocurrido un error.
.PP
La funcin \fBinet_network()\fP extrae el nmero de red en orden de
bytes de red desde la direccin \fIcp\fP a la notacin de nmeros y
puntos. Si la entrada es invlida, devuelve \-1.
.PP
La funcin \fBinet_ntoa()\fP convierte la direccin de Internet
\fIin\fP dada en orden de bytes de red a una cadena de caracteres en
la notacin estndar de nmeros y puntos. La cadena se devuelve en un
bfer reservado estticamente, que ser sobreescrito en siguientes llamadas.
.PP
La funcin \fBinet_makeaddr()\fP construye una direccin de Internet
en orden de bytes de red combinando el nmero de red \fInet\fP
con la direccin local \fIhost\fP en la red \fInet\fP, ambas en orden
de bytes de ordenador local.
.PP
La funcin \fBinet_lnaof()\fP devuelve la parte del ordenador local de
la direccin de  Internet \fIin\fP.  La direccin de ordenador local
se devuelve en orden de bytes de ordenador local.
.PP
La funcin \fBinet_netof()\fP devuelve la parte de nmero de red de la
direccin de Internet \fIin\fP.  El nmero de red se devuelve en orden
de bytes de ordenador local.
.PP
La estructura \fIin_addr\fP, empleada en \fBinet_ntoa()\fP,
\fBinet_makeaddr()\fP, \fBinet_lnoaf()\fP e \fBinet_netof()\fP
se define en \fInetinet/in.h\fP como:
.sp
.RS
.nf
.ne 7
.ta 8n 16n
struct in_addr {
	unsigned long int s_addr;
}
.ta
.fi
.RE
.PP
Observe que en el i80x86 el orden de bytes de ordenador es: primero el
Byte Menos Significativo (LSB), mientras que el orden de bytes de red
es, como se usa en la Internet, el Byte Ms Significativo (MSB) primero.
.SH "CONFORME A"
BSD 4.3
.SH "VASE TAMBIN"
.BR gethostbyname "(3), " getnetent "(3), " hosts "(5), " networks (5)