~ubuntu-branches/ubuntu/hardy/openswan/hardy-updates

« back to all changes in this revision

Viewing changes to lib/liblwres/man/lwres_getnameinfo.3

  • Committer: Bazaar Package Importer
  • Author(s): Rene Mayrhofer
  • Date: 2005-01-27 16:10:11 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050127161011-idgybmyz3vwhpfiq
Tags: 2.3.0-2
Urgency HIGH due to security issue and problems with build-deps in sarge.
* Fix the security issue. Please see
  http://www.idefense.com/application/poi/display?id=190&
      type=vulnerabilities&flashstatus=false
  for more details. Thanks to Martin Schulze for informing me about
  this issue.
  Closes: #292458: Openswan XAUTH/PAM Buffer Overflow Vulnerability
* Added a Build-Dependency to lynx.
  Closes: #291143: openswan: FTBFS: Missing build dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.\"
2
 
.\" Copyright (C) 2000, 2001  Internet Software Consortium.
3
 
.\"
4
 
.\" Permission to use, copy, modify, and distribute this software for any
5
 
.\" purpose with or without fee is hereby granted, provided that the above
6
 
.\" copyright notice and this permission notice appear in all copies.
7
 
.\"
8
 
.\" THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
9
 
.\" DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
10
 
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
11
 
.\" INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
12
 
.\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
13
 
.\" FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
14
 
.\" NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
15
 
.\" WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16
 
.\"
17
 
.TH "LWRES_GETNAMEINFO" "3" "Jun 30, 2000" "BIND9" ""
18
 
.SH NAME
19
 
lwres_getnameinfo \- lightweight resolver socket address structure to hostname and service name
20
 
.SH SYNOPSIS
21
 
\fB#include <lwres/netdb.h>
22
 
.sp
23
 
.na
24
 
int
25
 
lwres_getnameinfo(const struct sockaddr *sa, size_t salen, char *host, size_t hostlen, char *serv, size_t servlen, int flags);
26
 
.ad
27
 
\fR.SH "DESCRIPTION"
28
 
.PP
29
 
This function is equivalent to the \fBgetnameinfo\fR(3) function defined in RFC2133.
30
 
\fBlwres_getnameinfo()\fR returns the hostname for the
31
 
\fBstruct sockaddr\fR \fIsa\fR which is
32
 
\fIsalen\fR bytes long. The hostname is of length
33
 
\fIhostlen\fR and is returned via
34
 
\fI*host.\fR The maximum length of the hostname is
35
 
1025 bytes: NI_MAXHOST.
36
 
.PP
37
 
The name of the service associated with the port number in
38
 
\fIsa\fR is returned in \fI*serv.\fR
39
 
It is \fIservlen\fR bytes long. The maximum length
40
 
of the service name is NI_MAXSERV - 32 bytes.
41
 
.PP
42
 
The \fIflags\fR argument sets the following
43
 
bits:
44
 
.TP
45
 
\fBNI_NOFQDN\fR
46
 
A fully qualified domain name is not required for local hosts.
47
 
The local part of the fully qualified domain name is returned instead.
48
 
.TP
49
 
\fBNI_NUMERICHOST\fR
50
 
Return the address in numeric form, as if calling inet_ntop(),
51
 
instead of a host name.
52
 
.TP
53
 
\fBNI_NAMEREQD\fR
54
 
A name is required. If the hostname cannot be found in the DNS and
55
 
this flag is set, a non-zero error code is returned.
56
 
If the hostname is not found and the flag is not set, the 
57
 
address is returned in numeric form.
58
 
.TP
59
 
\fBNI_NUMERICSERV\fR
60
 
The service name is returned as a digit string representing the port number.
61
 
.TP
62
 
\fBNI_DGRAM\fR
63
 
Specifies that the service being looked up is a datagram
64
 
service, and causes getservbyport() to be called with a second
65
 
argument of "udp" instead of its default of "tcp". This is required
66
 
for the few ports (512-514) that have different services for UDP and
67
 
TCP.
68
 
.SH "RETURN VALUES"
69
 
.PP
70
 
\fBlwres_getnameinfo()\fR
71
 
returns 0 on success or a non-zero error code if an error occurs.
72
 
.SH "SEE ALSO"
73
 
.PP
74
 
\fBRFC2133\fR,
75
 
\fBgetservbyport\fR(3),
76
 
\fBlwres\fR(3),
77
 
\fBlwres_getnameinfo\fR(3),
78
 
\fBlwres_getnamebyaddr\fR(3).
79
 
\fBlwres_net_ntop\fR(3).
80
 
.SH "BUGS"
81
 
.PP
82
 
RFC2133 fails to define what the nonzero return values of
83
 
\fBgetnameinfo\fR(3)
84
 
are.