aboutsummaryrefslogtreecommitdiff
path: root/manual
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-07-28 22:35:20 +0000
committerUlrich Drepper <drepper@redhat.com>1997-07-28 22:35:20 +0000
commit3996f34b46043ed8ea8fdc6f44377d969d64396b (patch)
tree563f433dab9b5299d81ced72885bf1e8c29b9159 /manual
parent0a54e4010fe0085cd36deaff9442a7e88de3270d (diff)
downloadglibc-3996f34b46043ed8ea8fdc6f44377d969d64396b.zip
glibc-3996f34b46043ed8ea8fdc6f44377d969d64396b.tar.gz
glibc-3996f34b46043ed8ea8fdc6f44377d969d64396b.tar.bz2
1997-07-28 23:35 Ulrich Drepper <drepper@cygnus.com> * csu/gmon-start.c (__gmon_start__): Call __monstartup not monstartup. * gmon/gmon.c: Rename moncontrol to __moncontrol and monstartup to __monstartup. * gmon/sys/gmon.h: Fix prototypes. * gmon/sys/gmon_out.h: Pretty print. * gmon/bb_exit_func.c (__bb_exit_func): Use memcpy instead of bcopy. * gmon/gmon.c (__monstartup): Likewise. (write_hist): Remove dependency on 32 int. (_mcleanup): Don't call perror, use fprintf. * elf/dl-load.c: Fix handling of current directory in search path. * elf/Makefile (dl-routines): Add dl-profile. * elf/dl-profile.c: New file. * elf/dl-runtime.c (fixup): Add new parameter with address to store relocation result in to elf_machine_relplt. (profile_fixup): New function. * elf/do-rel.h (elf_dynamic_do_rel): Add new parameter with address to store relocation result in to elf_machine_relplt. * elf/dl-support.c: Define _dl_profile and _dl_profile_map. * elf/dynamic-link.h (ELF_DYNAMIC_RELOCATE): Add new parameter and call elf_machine_runtime_setup with extra argument. * elf/dl-reloc.c (_dl_relocate_object): Add new argument to ELF_DYNAMIC_RELOCATE. * elf/link.h: Add prototypes for new functions and variables. * elf/rtld.c: Parse LD_PROFILE and LD_PROFILE_OUTPUT environment variables and call _dl_start_profile if necessary. * include/sys/gmon_out.h: New file. * sysdeps/alpha/dl-machine.h (elf_machine_runtime_setup): Add new parameter to enable profiling. (elf_machine_rela): Add new parameter to specify place to store result in. * sysdeps/m68k/dl-machine.h: Likewise. * sysdeps/mips/dl-machine.h: Likewise. * sysdeps/mips/mips64/dl-machine.h: Likewise. * sysdeps/powerpc/dl-machine.h: Likewise. * sysdeps/sparc/dl-machine.h: Likewise. * sysdeps/sparc64/dl-machine.h: Likewise. * sysdeps/i386/dl-machine.h: Likewise. (elf_machine_runtime_setup): Setup got[2] to _dl_runtime_resolve if we do profiling. (ELF_MACHINE_RUNTIME_TRAMPOLINE): Add code for _dl_runtime_profile. * nis/nss_compat/compat-grp.c (internal_setgrent): Set FD_CLOEXEC for stream on input file. * nis/nss_compat/compat-pwd.c (internal_setpwent): Likewise. * nis/nss_compat/compat-spwd.c (internal_setspent): Likewise. * nss/nss_db/db-XXX.c (internal_setent): Likewise. * nss/nss_db/db-alias.c (internal_setent): Likewise. * nss/nss_db/db-netgrp.c (internal_setent): Likewise. * nss/nss_files/files-XXX.c (internal_setent): Likewise. * nss/nss_files/files-alias.c (internal_setent): Likewise. * nss/nss_files/files-netgrp.c (internal_setent): Likewise. * string/string.h: Pretty print. * sysdeps/i386/fpu/bits/mathinline.h: Major update by John Bowman. Add float and long double versions. 1997-07-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * elf/rtld.c (print_unresolved): Replace empty object name by main program name. 1997-07-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/generic/htons.c (htons): Renamed from __htons. 1997-07-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/m68k/bits/byteswap.h: New file. 1997-07-27 23:50 Philip Blundell <Philip.Blundell@pobox.com> * inet/netinet/icmp6.h: Update for new drafts of POSIX.1g and IPv6 advanced API. * inet/netinet/in.h: Likewise. * inet/netinet/ip6.h: Likewise. * sysdeps/unix/sysv/linux/bits/socket.h: Likewise. * posix/sys/types.h: Add socklen_t. * manual/socket.texi: Document some more IPv6 things. * manual/libc.texinfo: Likewise. 1997-07-26 Andreas Jaeger <aj@arthur.rhein-neckar.de> * libc.map: Define missing symbol. 1997-07-27 14:31 Thorsten Kukuk <kukuk@vt.uni-paderborn.de> * nis/Makefile: Add nis_findserv. * nis/lckcache.c: Fix typo. * nis/nis_call.c: Fix problems with multihomed servers. * nis/nis_findserv.c: New file. * nis/nis_intern.h: Add more prototypes. * nis/nis_lookup.c (nis_lookup): Don't try the next server if network is unreachable. * nis/nis_table.c (nis_list): Likewise. * nis/nis_ping.c (nis_ping): Use MASTER_ONLY, don't call abort() in error case. * nis/nis_util.c (__nis_finddirectory): Give the right error code back. * nis/ypclnt.c: Make sure, that all sockets are closed.
Diffstat (limited to 'manual')
-rw-r--r--manual/libc.texinfo2
-rw-r--r--manual/socket.texi134
-rw-r--r--manual/texinfo.tex17
3 files changed, 126 insertions, 27 deletions
diff --git a/manual/libc.texinfo b/manual/libc.texinfo
index 7d81247..2d79d96 100644
--- a/manual/libc.texinfo
+++ b/manual/libc.texinfo
@@ -514,7 +514,7 @@ Socket Addresses
Internet Domain
-* Internet Address Format:: How socket addresses are specified in the
+* Internet Address Formats:: How socket addresses are specified in the
Internet namespace.
* Host Addresses:: All about host addresses of Internet hosts.
* Protocols Database:: Referring to protocols by name.
diff --git a/manual/socket.texi b/manual/socket.texi
index c122106..6efc54d 100644
--- a/manual/socket.texi
+++ b/manual/socket.texi
@@ -323,7 +323,13 @@ This is a synonym for @code{AF_FILE}, for compatibility.
@vindex AF_INET
This designates the address format that goes with the Internet
namespace. (@code{PF_INET} is the name of that namespace.)
-@xref{Internet Address Format}.
+@xref{Internet Address Formats}.
+
+@comment sys/socket.h
+@comment IPv6 Basic API
+@item AF_INET6
+This is similar to @code{AF_INET}, but refers to the IPv6 protocol.
+(@code{PF_INET6} is the name of the corresponding namespace.)
@comment sys/socket.h
@comment BSD
@@ -566,7 +572,7 @@ A socket address for the Internet namespace includes the following components:
@item
The address of the machine you want to connect to. Internet addresses
can be specified in several ways; these are discussed in @ref{Internet
-Address Format}, @ref{Host Addresses}, and @ref{Host Names}.
+Address Formats}, @ref{Host Addresses}, and @ref{Host Names}.
@item
A port number for that machine. @xref{Ports}.
@@ -577,7 +583,7 @@ canonical format called @dfn{network byte order}. @xref{Byte Order},
for information about this.
@menu
-* Internet Address Format:: How socket addresses are specified in the
+* Internet Address Formats:: How socket addresses are specified in the
Internet namespace.
* Host Addresses:: All about host addresses of internet host.
* Protocols Database:: Referring to protocols by name.
@@ -589,16 +595,17 @@ for information about this.
* Inet Example:: Putting it all together.
@end menu
-@node Internet Address Format
-@subsection Internet Socket Address Format
+@node Internet Address Formats
+@subsection Internet Socket Address Formats
-In the Internet namespace, a socket address consists of a host address
+In the Internet namespace, for both IPv4 (@code{AF_INET}) and IPv6
+(@code{AF_INET6}), a socket address consists of a host address
and a port on that host. In addition, the protocol you choose serves
effectively as a part of the address because local port numbers are
meaningful only within a particular protocol.
-The data type for representing socket addresses in the Internet namespace
-is defined in the header file @file{netinet/in.h}.
+The data types for representing socket addresses in the Internet namespace
+are defined in the header file @file{netinet/in.h}.
@pindex netinet/in.h
@comment netinet/in.h
@@ -627,13 +634,39 @@ When you call @code{bind} or @code{getsockname}, you should specify
@code{sizeof (struct sockaddr_in)} as the @var{length} parameter if
you are using an Internet namespace socket address.
+@deftp {Data Type} {struct sockaddr_in6}
+This is the data type used to represent socket addresses in the IPv6
+namespace. It has the following members:
+
+@table @code
+@item short int sin6_family
+This identifies the address family or format of the socket address.
+You should store the value of @code{AF_INET6} in this member.
+@xref{Socket Addresses}.
+
+@item struct in6_addr sin6_addr
+This is the IPv6 address of the host machine. @xref{Host
+Addresses}, and @ref{Host Names}, for how to get a value to store
+here.
+
+@item uint32_t sin6_flowinfo
+This is a currently unimplemented field.
+
+@item uint16_t sin6_port
+This is the port number. @xref{Ports}.
+
+@end table
+@end deftp
+
@node Host Addresses
@subsection Host Addresses
Each computer on the Internet has one or more @dfn{Internet addresses},
numbers which identify that computer among all those on the Internet.
-Users typically write numeric host addresses as sequences of four
-numbers, separated by periods, as in @samp{128.52.46.32}.
+Users typically write IPv4 numeric host addresses as sequences of four
+numbers, separated by periods, as in @samp{128.52.46.32}, and IPv6
+numeric host addresses as sequences of up to eight numbers seperated by
+colons, as in @samp{5f03:1200:836f:c100::1}.
Each computer also has one or more @dfn{host names}, which are strings
of words separated by periods, as in @samp{churchy.gnu.ai.mit.edu}.
@@ -660,6 +693,9 @@ Each computer on the Internet has one or more Internet addresses,
numbers which identify that computer among all those on the Internet.
@end ifinfo
+@c I think this whole section could possibly be removed. It is slightly
+@c misleading these days.
+
@cindex network number
@cindex local network address number
An Internet host address is a number containing four bytes of data.
@@ -779,6 +815,31 @@ This constant is the address you use to send a broadcast message.
This constant is returned by some functions to indicate an error.
@end deftypevr
+@comment netinet/in.h
+@comment IPv6 basic API
+@deftp {Data Type} {struct in6_addr}
+This data type is used to store an IPv6 address. It stores 128 bits of
+data, which can be accessed (via a union) in a variety of ways.
+@end deftp
+
+@comment netinet/in.h
+@comment IPv6 basic API
+@deftypevr Constant {struct in6_addr} in6addr_loopback.
+This constant is the IPv6 address @samp{::1}, the loopback address. See
+above for a description of what this means. The macro
+@code{IN6ADDR_LOOPBACK_INIT} is provided to allow you to initialise your
+own variables to this value.
+@end deftypevr
+
+@comment netinet/in.h
+@comment IPv6 basic API
+@deftypevr Constant {struct in6_addr} in6addr_any
+This constant is the IPv6 address @samp{::}, the unspecified address. See
+above for a description of what this means. The macro
+@code{IN6ADDR_ANY_INIT} is provided to allow you to initialise your
+own variables to this value.
+@end deftypevr
+
@node Host Address Functions
@subsubsection Host Address Functions
@@ -854,6 +915,30 @@ This function returns the network number part of the Internet host
address @var{addr}.
@end deftypefun
+@comment arpa/inet.h
+@comment IPv6 basic API
+@deftypefun int inet_pton (int @var{af}, const char *@var{cp}, void
+*@var{buf})
+This function converts an Internet address (either IPv4 or IPv6) from
+presentation (textual) to network (binary) format. @var{af} should be
+either @code{AF_INET} or @code{AF_INET6}, as appropriate for the type of
+address being converted. @var{cp} is a pointer to the input string, and
+@var{buf} is a pointer to a buffer for the result. It is the caller's
+responsibility to make sure the buffer is large enough.
+@end deftypefun
+
+@comment arpa/inet.h
+@comment IPv6 basic API
+@deftypefun char *inet_ntop(int @var{af}, const void *@var{cp}, char
+*@var{buf}, size_t @var{len})
+This function converts an Internet address (either IPv4 or IPv6) from
+network (binary) to presentation (textual) form. @var{af} should be
+either @code{AF_INET} or @code{AF_INET6}, as appropriate. @var{cp} is a
+pointer to the address to be converted. @var{buf} should be a pointer
+to a buffer to hold the result, and @var{len} is the length of this
+buffer. The return value from the function will be this buffer address.
+@end deftypefun
+
@node Host Names
@subsubsection Host Names
@cindex hosts database
@@ -891,11 +976,12 @@ These are alternative names for the host, represented as a null-terminated
vector of strings.
@item int h_addrtype
-This is the host address type; in practice, its value is always
-@code{AF_INET}. In principle other kinds of addresses could be
-represented in the data base as well as Internet addresses; if this were
-done, you might find a value in this field other than @code{AF_INET}.
-@xref{Socket Addresses}.
+This is the host address type; in practice, its value is always either
+@code{AF_INET} or @code{AF_INET6}, with the latter being used for IPv6
+hosts. In principle other kinds of addresses could be represented in
+the data base as well as Internet addresses; if this were done, you
+might find a value in this field other than @code{AF_INET} or
+@code{AF_INET6}. @xref{Socket Addresses}.
@item int h_length
This is the length, in bytes, of each address.
@@ -917,10 +1003,12 @@ implicit assumption that you can convert this to a @code{struct in_addr} or
an @code{unsigned long int}. Host addresses in a @code{struct hostent}
structure are always given in network byte order; see @ref{Byte Order}.
-You can use @code{gethostbyname} or @code{gethostbyaddr} to search the
-hosts database for information about a particular host. The information
-is returned in a statically-allocated structure; you must copy the
-information if you need to save it across calls.
+You can use @code{gethostbyname}, @code{gethostbyname2} or
+@code{gethostbyaddr} to search the hosts database for information about
+a particular host. The information is returned in a
+statically-allocated structure; you must copy the information if you
+need to save it across calls. You can also use @code{getaddrinfo} and
+@code{getnameinfo} to obtain this information.
@comment netdb.h
@comment BSD
@@ -930,6 +1018,14 @@ named @var{name}. If the lookup fails, it returns a null pointer.
@end deftypefun
@comment netdb.h
+@comment IPv6 Basic API
+@deftypefun {struct hostent *} gethostbyname2 (const char *@var{name}, int @var{af})
+The @code{gethostbyname2} function is like @code{gethostbyname}, but
+allows the caller to specify the desired address family (e.g.@:
+@code{AF_INET} or @code{AF_INET6}) for the result.
+@end deftypefun
+
+@comment netdb.h
@comment BSD
@deftypefun {struct hostent *} gethostbyaddr (const char *@var{addr}, int @var{length}, int @var{format})
The @code{gethostbyaddr} function returns information about the host
diff --git a/manual/texinfo.tex b/manual/texinfo.tex
index fd306fa..813d3c2 100644
--- a/manual/texinfo.tex
+++ b/manual/texinfo.tex
@@ -1,5 +1,5 @@
%% TeX macros to handle Texinfo files.
-%% $Id: texinfo.tex,v 2.210 1997/07/15 19:22:46 drepper Exp $
+%% $Id: texinfo.tex,v 2.211 1997/07/28 21:55:24 drepper Exp $
% Copyright (C) 1985, 86, 88, 90, 91, 92, 93,
% 94, 95, 96, 97 Free Software Foundation, Inc.
@@ -36,7 +36,7 @@
% This automatically updates the version number based on RCS.
\def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}}
-\deftexinfoversion$Revision: 2.210 $
+\deftexinfoversion$Revision: 2.211 $
\message{Loading texinfo package [Version \texinfoversion]:}
% If in a .fmt file, print the version number
@@ -1406,14 +1406,12 @@ where each line of input produces a line of output.}
\else{\tclose{\kbdfont\look}}\fi
\else{\tclose{\kbdfont\look}}\fi}
-% @url, @email. Quotes do not seem necessary.
-\let\url=\code % perhaps include a hypertex \special eventually
-% rms does not like the angle brackets --karl, 17may97.
-%\def\email#1{$\langle${\tt #1}$\rangle$}
-\let\email=\code
+% @url. Quotes do not seem necessary, so use \code.
+\let\url=\code
% @uref (abbreviation for `urlref') takes an optional second argument
% specifying the text to display. First (mandatory) arg is the url.
+% Perhaps eventually put in a hypertex \special here.
%
\def\uref#1{\urefxxx #1,,\finish}
\def\urefxxx#1,#2,#3\finish{%
@@ -1425,6 +1423,11 @@ where each line of input produces a line of output.}
\fi
}
+% rms does not like the angle brackets --karl, 17may97.
+% So now @email is just like @uref.
+%\def\email#1{$\langle${\tt #1}$\rangle$}
+\let\email=\uref
+
% Check if we are currently using a typewriter font. Since all the
% Computer Modern typewriter fonts have zero interword stretch (and
% shrink), and it is reasonable to expect all typewriter fonts to have