Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src hide shouldn't-be-exported symbols from the outside.
details: https://anonhg.NetBSD.org/src/rev/b07ad571a4d5
branches: trunk
changeset: 483590:b07ad571a4d5
user: itojun <itojun%NetBSD.org@localhost>
date: Mon Mar 13 21:23:55 2000 +0000
description:
hide shouldn't-be-exported symbols from the outside.
don't compile pfkey*, since we expect tons of changes in the near future.
bump shlib major (due to less exported APIs than before - am I correct here?).
diffstat:
distrib/sets/lists/base/shl.elf | 4 +-
distrib/sets/lists/base/shl.mi | 4 +-
lib/libipsec/Makefile | 9 +-
lib/libipsec/ipsec_dump_policy.c | 26 +++---
lib/libipsec/ipsec_strerror.c | 14 ++--
lib/libipsec/ipsec_strerror.h | 6 +-
lib/libipsec/pfkey.c | 136 +++++++++++++++++++-------------------
lib/libipsec/policy_parse.y | 48 ++++++------
lib/libipsec/policy_token.l | 10 +-
lib/libipsec/shlib_version | 4 +-
10 files changed, 132 insertions(+), 129 deletions(-)
diffs (truncated from 1015 to 300 lines):
diff -r 3b4639d349b4 -r b07ad571a4d5 distrib/sets/lists/base/shl.elf
--- a/distrib/sets/lists/base/shl.elf Mon Mar 13 21:17:32 2000 +0000
+++ b/distrib/sets/lists/base/shl.elf Mon Mar 13 21:23:55 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: shl.elf,v 1.16 2000/02/20 07:02:48 mycroft Exp $
+# $NetBSD: shl.elf,v 1.17 2000/03/13 21:23:58 itojun Exp $
./usr/lib/libamu.so.1
./usr/lib/libbz2.so.0
./usr/lib/libc.so.12
@@ -7,7 +7,7 @@
./usr/lib/libedit.so.2
./usr/lib/libg2c.so.0
./usr/lib/libgnumalloc.so.0
-./usr/lib/libipsec.so.1
+./usr/lib/libipsec.so.2
./usr/lib/libkvm.so.5
./usr/lib/libm.so.0
./usr/lib/libmenu.so.0
diff -r 3b4639d349b4 -r b07ad571a4d5 distrib/sets/lists/base/shl.mi
--- a/distrib/sets/lists/base/shl.mi Mon Mar 13 21:17:32 2000 +0000
+++ b/distrib/sets/lists/base/shl.mi Mon Mar 13 21:23:55 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.57 2000/03/09 23:32:03 cjs Exp $
+# $NetBSD: shl.mi,v 1.58 2000/03/13 21:23:58 itojun Exp $
./usr/lib/libamu.so.1.1
./usr/lib/libbz2.so.0.0
./usr/lib/libc.so.12.58
@@ -7,7 +7,7 @@
./usr/lib/libedit.so.2.3
./usr/lib/libg2c.so.0.0
./usr/lib/libgnumalloc.so.0.0
-./usr/lib/libipsec.so.1.0
+./usr/lib/libipsec.so.2.0
./usr/lib/libkvm.so.5.0
./usr/lib/libm.so.0.1
./usr/lib/libmenu.so.0.1
diff -r 3b4639d349b4 -r b07ad571a4d5 lib/libipsec/Makefile
--- a/lib/libipsec/Makefile Mon Mar 13 21:17:32 2000 +0000
+++ b/lib/libipsec/Makefile Mon Mar 13 21:23:55 2000 +0000
@@ -1,18 +1,19 @@
-# $NetBSD: Makefile,v 1.3 2000/01/31 14:15:30 itojun Exp $
+# $NetBSD: Makefile,v 1.4 2000/03/13 21:23:55 itojun Exp $
LIB= ipsec
CFLAGS+=-g
CPPFLAGS+=-DIPSEC_DEBUG -DIPSEC -DINET6 -I. -DYY_NO_UNPUT
-.PATH: ${.CURDIR}/../../sys/netkey
-SRCS= pfkey.c pfkey_dump.c
SRCS+= ipsec_strerror.c policy_parse.y policy_token.l
SRCS+= ipsec_get_policylen.c ipsec_dump_policy.c
-SRCS+= key_debug.c
LPREFIX+=__libyy
YPREFIX+=__libyy
YHEADER=1
+#.PATH: ${.CURDIR}/../../sys/netkey
+#SRCS+= pfkey.c pfkey_dump.c
+#SRCS+= key_debug.c
+
#LFLAGS+= -olex.yy.c
MAN= ipsec_set_policy.3 ipsec_strerror.3
diff -r 3b4639d349b4 -r b07ad571a4d5 lib/libipsec/ipsec_dump_policy.c
--- a/lib/libipsec/ipsec_dump_policy.c Mon Mar 13 21:17:32 2000 +0000
+++ b/lib/libipsec/ipsec_dump_policy.c Mon Mar 13 21:23:55 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsec_dump_policy.c,v 1.1 2000/02/01 03:08:36 itojun Exp $ */
+/* $NetBSD: ipsec_dump_policy.c,v 1.2 2000/03/13 21:23:55 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
@@ -79,7 +79,7 @@
if (policy == NULL)
return NULL;
if (xpl->sadb_x_policy_exttype != SADB_X_EXT_POLICY) {
- ipsec_errcode = EIPSEC_INVAL_EXTTYPE;
+ __ipsec_errcode = EIPSEC_INVAL_EXTTYPE;
return NULL;
}
@@ -93,7 +93,7 @@
case IPSEC_DIR_OUTBOUND:
break;
default:
- ipsec_errcode = EIPSEC_INVAL_DIR;
+ __ipsec_errcode = EIPSEC_INVAL_DIR;
return NULL;
}
@@ -105,7 +105,7 @@
case IPSEC_POLICY_ENTRUST:
break;
default:
- ipsec_errcode = EIPSEC_INVAL_POLICY;
+ __ipsec_errcode = EIPSEC_INVAL_POLICY;
return NULL;
}
@@ -115,7 +115,7 @@
+ 1; /* NUL */
if ((buf = malloc(buflen)) == NULL) {
- ipsec_errcode = EIPSEC_NO_BUFS;
+ __ipsec_errcode = EIPSEC_NO_BUFS;
return NULL;
}
strcpy(buf, ipsp_dir_strs[xpl->sadb_x_policy_dir]);
@@ -123,7 +123,7 @@
strcat(buf, ipsp_policy_strs[xpl->sadb_x_policy_type]);
if (xpl->sadb_x_policy_type != IPSEC_POLICY_IPSEC) {
- ipsec_errcode = EIPSEC_NO_ERROR;
+ __ipsec_errcode = EIPSEC_NO_ERROR;
return buf;
}
@@ -142,13 +142,13 @@
/* validity check */
if (xtlen < 0) {
- ipsec_errcode = EIPSEC_INVAL_SADBMSG;
+ __ipsec_errcode = EIPSEC_INVAL_SADBMSG;
free(buf);
return NULL;
}
if ((buf = realloc(buf, buflen)) == NULL) {
- ipsec_errcode = EIPSEC_NO_BUFS;
+ __ipsec_errcode = EIPSEC_NO_BUFS;
return NULL;
}
@@ -169,7 +169,7 @@
strcat(buf, "ipcomp");
break;
default:
- ipsec_errcode = EIPSEC_INVAL_PROTO;
+ __ipsec_errcode = EIPSEC_INVAL_PROTO;
free(buf);
return NULL;
}
@@ -187,7 +187,7 @@
strcat(buf, "tunnel");
break;
default:
- ipsec_errcode = EIPSEC_INVAL_MODE;
+ __ipsec_errcode = EIPSEC_INVAL_MODE;
free(buf);
return NULL;
}
@@ -197,7 +197,7 @@
if (xisr->sadb_x_ipsecrequest_len > sizeof(*xisr)) {
error = set_addresses(buf, (caddr_t)(xisr + 1));
if (error) {
- ipsec_errcode = EIPSEC_INVAL_MODE;
+ __ipsec_errcode = EIPSEC_INVAL_MODE;
free(buf);
return NULL;
}
@@ -217,7 +217,7 @@
strcat(buf, "/unique");
break;
default:
- ipsec_errcode = EIPSEC_INVAL_LEVEL;
+ __ipsec_errcode = EIPSEC_INVAL_LEVEL;
free(buf);
return NULL;
}
@@ -239,7 +239,7 @@
+ xisr->sadb_x_ipsecrequest_len);
}
- ipsec_errcode = EIPSEC_NO_ERROR;
+ __ipsec_errcode = EIPSEC_NO_ERROR;
return buf;
}
diff -r 3b4639d349b4 -r b07ad571a4d5 lib/libipsec/ipsec_strerror.c
--- a/lib/libipsec/ipsec_strerror.c Mon Mar 13 21:17:32 2000 +0000
+++ b/lib/libipsec/ipsec_strerror.c Mon Mar 13 21:23:55 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsec_strerror.c,v 1.4 2000/01/31 14:15:31 itojun Exp $ */
+/* $NetBSD: ipsec_strerror.c,v 1.5 2000/03/13 21:23:55 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
@@ -37,7 +37,7 @@
#include "ipsec_strerror.h"
-int ipsec_errcode;
+int __ipsec_errcode;
static char *ipsec_errlist[] = {
"Success", /*EIPSEC_NO_ERROR*/
@@ -72,15 +72,15 @@
char *ipsec_strerror(void)
{
- if (ipsec_errcode < 0 || ipsec_errcode > EIPSEC_MAX)
- ipsec_errcode = EIPSEC_MAX;
+ if (__ipsec_errcode < 0 || __ipsec_errcode > EIPSEC_MAX)
+ __ipsec_errcode = EIPSEC_MAX;
- return ipsec_errlist[ipsec_errcode];
+ return ipsec_errlist[__ipsec_errcode];
}
-void ipsec_set_strerror(char *str)
+void __ipsec_set_strerror(char *str)
{
- ipsec_errcode = EIPSEC_SYSTEM_ERROR;
+ __ipsec_errcode = EIPSEC_SYSTEM_ERROR;
ipsec_errlist[EIPSEC_SYSTEM_ERROR] = str;
return;
diff -r 3b4639d349b4 -r b07ad571a4d5 lib/libipsec/ipsec_strerror.h
--- a/lib/libipsec/ipsec_strerror.h Mon Mar 13 21:17:32 2000 +0000
+++ b/lib/libipsec/ipsec_strerror.h Mon Mar 13 21:23:55 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsec_strerror.h,v 1.4 2000/01/31 14:15:31 itojun Exp $ */
+/* $NetBSD: ipsec_strerror.h,v 1.5 2000/03/13 21:23:56 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
@@ -29,8 +29,8 @@
* SUCH DAMAGE.
*/
-extern int ipsec_errcode;
-extern void ipsec_set_strerror __P((char *));
+extern int __ipsec_errcode;
+extern void __ipsec_set_strerror __P((char *));
#define EIPSEC_NO_ERROR 0 /*success*/
#define EIPSEC_NOT_SUPPORTED 1 /*not supported*/
diff -r 3b4639d349b4 -r b07ad571a4d5 lib/libipsec/pfkey.c
--- a/lib/libipsec/pfkey.c Mon Mar 13 21:17:32 2000 +0000
+++ b/lib/libipsec/pfkey.c Mon Mar 13 21:23:55 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pfkey.c,v 1.8 2000/02/08 13:17:52 itojun Exp $ */
+/* $NetBSD: pfkey.c,v 1.9 2000/03/13 21:23:56 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
@@ -94,7 +94,7 @@
/* validity check */
if (ipsec_supported == NULL) {
- ipsec_errcode = EIPSEC_DO_GET_SUPP_LIST;
+ __ipsec_errcode = EIPSEC_DO_GET_SUPP_LIST;
return -1;
}
switch (supported) {
@@ -102,7 +102,7 @@
case SADB_EXT_SUPPORTED_ENCRYPT:
break;
default:
- ipsec_errcode = EIPSEC_INVAL_ARGUMENT;
+ __ipsec_errcode = EIPSEC_INVAL_ARGUMENT;
return -1;
}
@@ -133,18 +133,18 @@
}
}
- ipsec_errcode = EIPSEC_NOT_SUPPORTED;
+ __ipsec_errcode = EIPSEC_NOT_SUPPORTED;
return -1;
/* NOTREACHED */
found:
if (keylen < alg->sadb_alg_minbits
|| keylen > alg->sadb_alg_maxbits) {
- ipsec_errcode = EIPSEC_INVAL_KEYLEN;
+ __ipsec_errcode = EIPSEC_INVAL_KEYLEN;
return -1;
}
- ipsec_errcode = EIPSEC_NO_ERROR;
+ __ipsec_errcode = EIPSEC_NO_ERROR;
return 0;
}
@@ -161,7 +161,7 @@
pfkey_set_softrate(type, rate)
u_int type, rate;
{
- ipsec_errcode = EIPSEC_NO_ERROR;
+ __ipsec_errcode = EIPSEC_NO_ERROR;
if (rate > 100 || rate == 0)
rate = 100;
@@ -181,7 +181,7 @@
return 0;
}
- ipsec_errcode = EIPSEC_INVAL_ARGUMENT;
Home |
Main Index |
Thread Index |
Old Index