summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorsuz <suz@FreeBSD.org>2002-04-19 04:46:24 +0000
committersuz <suz@FreeBSD.org>2002-04-19 04:46:24 +0000
commit553226e8e16639b00d61d81e0125330dbfb7eed8 (patch)
tree100274bd96d0c95cafbe1a4a5961b54fc403fd47 /lib
parentae841d33c320c4185ecaa0e982c744039b1ba10f (diff)
downloadFreeBSD-src-553226e8e16639b00d61d81e0125330dbfb7eed8.zip
FreeBSD-src-553226e8e16639b00d61d81e0125330dbfb7eed8.tar.gz
just merged cosmetic changes from KAME to ease sync between KAME and FreeBSD.
(based on freebsd4-snap-20020128) Reviewed by: ume MFC after: 1 week
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/net/getaddrinfo.33
-rw-r--r--lib/libc/net/ifname.c2
-rw-r--r--lib/libc/net/inet_addr.c2
-rw-r--r--lib/libc/net/inet_pton.c2
-rw-r--r--lib/libc/net/rthdr.c22
-rw-r--r--lib/libc/net/vars.c2
-rw-r--r--lib/libipsec/ipsec_set_policy.34
-rw-r--r--lib/libipsec/ipsec_strerror.35
8 files changed, 29 insertions, 13 deletions
diff --git a/lib/libc/net/getaddrinfo.3 b/lib/libc/net/getaddrinfo.3
index 9c56af4..9ef8898 100644
--- a/lib/libc/net/getaddrinfo.3
+++ b/lib/libc/net/getaddrinfo.3
@@ -1,5 +1,5 @@
.\" $FreeBSD$
-.\" $KAME: getaddrinfo.3,v 1.22 2000/08/09 21:16:17 itojun Exp $
+.\" $KAME: getaddrinfo.3,v 1.31 2001/08/05 18:19:38 itojun Exp $
.\"
.\" Copyright (c) 1983, 1987, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -573,6 +573,7 @@ indicate an unknown error.
.Xr getnameinfo 3 ,
.Xr getservbyname 3 ,
.Xr hosts 5 ,
+.Xr resolv.conf 5 ,
.Xr services 5 ,
.Xr hostname 7 ,
.Xr named 8
diff --git a/lib/libc/net/ifname.c b/lib/libc/net/ifname.c
index d383038..e6e5a77 100644
--- a/lib/libc/net/ifname.c
+++ b/lib/libc/net/ifname.c
@@ -1,3 +1,5 @@
+/* $KAME: ifname.c,v 1.4 2001/08/20 02:32:40 itojun Exp $ */
+
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.
diff --git a/lib/libc/net/inet_addr.c b/lib/libc/net/inet_addr.c
index b305524..eb97f84 100644
--- a/lib/libc/net/inet_addr.c
+++ b/lib/libc/net/inet_addr.c
@@ -1,3 +1,5 @@
+/* $KAME: inet_addr.c,v 1.5 2001/08/20 02:32:40 itojun Exp $ */
+
/*
* ++Copyright++ 1983, 1990, 1993
* -
diff --git a/lib/libc/net/inet_pton.c b/lib/libc/net/inet_pton.c
index d4cb90b..05bb1f4 100644
--- a/lib/libc/net/inet_pton.c
+++ b/lib/libc/net/inet_pton.c
@@ -1,3 +1,5 @@
+/* $KAME: inet_pton.c,v 1.5 2001/08/20 02:32:40 itojun Exp $ */
+
/* Copyright (c) 1996 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
diff --git a/lib/libc/net/rthdr.c b/lib/libc/net/rthdr.c
index da906b2..abfe34a 100644
--- a/lib/libc/net/rthdr.c
+++ b/lib/libc/net/rthdr.c
@@ -1,3 +1,5 @@
+/* $KAME: rthdr.c,v 1.8 2001/08/20 02:32:40 itojun Exp $ */
+
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.
@@ -226,9 +228,9 @@ inet6_rthdr_segments(cmsg)
}
struct in6_addr *
-inet6_rthdr_getaddr(cmsg, index)
+inet6_rthdr_getaddr(cmsg, idx)
struct cmsghdr *cmsg;
- int index;
+ int idx;
{
struct ip6_rthdr *rthdr;
@@ -248,13 +250,13 @@ inet6_rthdr_getaddr(cmsg, index)
return NULL;
}
naddr = (rt0->ip6r0_len * 8) / sizeof(struct in6_addr);
- if (index <= 0 || naddr < index) {
+ if (idx <= 0 || naddr < idx) {
#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_getaddr: invalid index(%d)\n", index);
+ fprintf(stderr, "inet6_rthdr_getaddr: invalid idx(%d)\n", idx);
#endif
return NULL;
}
- return &rt0->ip6r0_addr[index - 1];
+ return &rt0->ip6r0_addr[idx - 1];
}
default:
@@ -267,9 +269,9 @@ inet6_rthdr_getaddr(cmsg, index)
}
int
-inet6_rthdr_getflags(cmsg, index)
+inet6_rthdr_getflags(cmsg, idx)
const struct cmsghdr *cmsg;
- int index;
+ int idx;
{
struct ip6_rthdr *rthdr;
@@ -289,13 +291,13 @@ inet6_rthdr_getflags(cmsg, index)
return -1;
}
naddr = (rt0->ip6r0_len * 8) / sizeof(struct in6_addr);
- if (index < 0 || naddr < index) {
+ if (idx < 0 || naddr < idx) {
#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_getflags: invalid index(%d)\n", index);
+ fprintf(stderr, "inet6_rthdr_getflags: invalid idx(%d)\n", idx);
#endif
return -1;
}
- if (rt0->ip6r0_slmap[index / 8] & (0x80 >> (index % 8)))
+ if (rt0->ip6r0_slmap[idx / 8] & (0x80 >> (idx % 8)))
return IPV6_RTHDR_STRICT;
else
return IPV6_RTHDR_LOOSE;
diff --git a/lib/libc/net/vars.c b/lib/libc/net/vars.c
index 72b47c8..42ee205 100644
--- a/lib/libc/net/vars.c
+++ b/lib/libc/net/vars.c
@@ -1,3 +1,5 @@
+/* $KAME: vars.c,v 1.2 2001/08/20 02:32:41 itojun Exp $ */
+
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.
diff --git a/lib/libipsec/ipsec_set_policy.3 b/lib/libipsec/ipsec_set_policy.3
index cc7424e..c41a113 100644
--- a/lib/libipsec/ipsec_set_policy.3
+++ b/lib/libipsec/ipsec_set_policy.3
@@ -1,4 +1,4 @@
-.\" $KAME: ipsec_set_policy.3,v 1.14 2001/04/06 07:00:46 itojun Exp $
+.\" $KAME: ipsec_set_policy.3,v 1.15 2001/08/17 07:21:36 itojun Exp $
.\" $FreeBSD$
.\"
.\" Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
@@ -62,6 +62,8 @@ of
.Fa policy .
.Fn ipsec_set_policy
will return the buffer of IPsec policy specification structure.
+The buffer is dynamically allocated, and must be freed by the caller by calling
+.Xr free 3 .
.Pp
You may want the length of the generated buffer such when calling
.Xr setsockopt 2 .
diff --git a/lib/libipsec/ipsec_strerror.3 b/lib/libipsec/ipsec_strerror.3
index e4bde7d..77f228f 100644
--- a/lib/libipsec/ipsec_strerror.3
+++ b/lib/libipsec/ipsec_strerror.3
@@ -1,4 +1,4 @@
-.\" $KAME: ipsec_strerror.3,v 1.8 2000/11/20 00:35:14 sakane Exp $
+.\" $KAME: ipsec_strerror.3,v 1.9 2001/08/17 07:21:36 itojun Exp $
.\" $FreeBSD$
.\"
.\" Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
@@ -80,3 +80,6 @@ first appeared in WIDE/KAME IPv6 protocol stack kit.
.Sh BUGS
.Fn ipsec_strerror
will return its result which may be overwritten by subsequent calls.
+.Pp
+.Va ipsec_errcode
+is not thread safe.
OpenPOWER on IntegriCloud