head	1.4;
access;
symbols
	RELEASE_6_1_0:1.3
	RELEASE_5_5_0:1.3
	RELEASE_6_0_0:1.3
	RELEASE_5_4_0:1.3
	RELEASE_4_11_0:1.3
	RELEASE_5_3_0:1.3
	RELEASE_4_10_0:1.3
	RELEASE_5_2_1:1.3
	RELEASE_5_2_0:1.3
	RELEASE_4_9_0:1.3
	RELEASE_5_1_0:1.3
	RELEASE_4_8_0:1.3
	RELEASE_5_0_0:1.3
	RELEASE_4_7_0:1.3
	RELEASE_4_6_2:1.3
	RELEASE_4_6_1:1.3
	RELEASE_4_6_0:1.3
	RELEASE_5_0_DP1:1.3
	RELEASE_4_5_0:1.3
	RELEASE_4_4_0:1.3
	RELEASE_4_3_0:1.3
	RELEASE_4_2_0:1.3
	RELEASE_4_1_1:1.3
	RELEASE_4_1_0:1.3
	RELEASE_3_5_0:1.3
	RELEASE_4_0_0:1.3
	RELEASE_3_4_0:1.2
	RELEASE_3_3_0:1.2
	RELEASE_3_2_0:1.2
	RELEASE_3_1_0:1.1.1.1
	RELEASE_2_2_8:1.1.1.1
	RELEASE_3_0_0:1.1.1.1
	RELEASE_2_2_7:1.1.1.1
	RELEASE_2_2_6:1.1.1.1
	ARCHIE_1:1.1.1.1
	WHISTLE_ARCHIE:1.1.1;
locks; strict;
comment	@# @;


1.4
date	2006.04.06.13.54.44;	author archie;	state dead;
branches;
next	1.3;

1.3
date	2000.01.26.01.55.16;	author archie;	state Exp;
branches;
next	1.2;

1.2
date	99.03.10.22.27.53;	author archie;	state Exp;
branches;
next	1.1;

1.1
date	98.01.09.23.23.53;	author julian;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	98.01.09.23.23.53;	author julian;	state Exp;
branches;
next	;


desc
@@


1.4
log
@Remove the skip port. Created before there was an IPSec implementation on
FreeBSD, it is now extremely obsolete. In any case it doesn't compile. Earlier
version of this port can still be used on older versions of FreeBSD of course.
@
text
@diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/freebsd/skip_wrapper.c work.new/skip/freebsd/skip_wrapper.c
--- skipsrc-1.0.orig/skip/freebsd/skip_wrapper.c	Fri Oct 25 13:12:43 1996
+++ work.new/skip/freebsd/skip_wrapper.c	Tue Jan 25 16:22:40 2000
@@@@ -66,55 +66,113 @@@@
 #include <skip_es.h>
 #include <skip_if.h>
 
+#define SKIP_CDEV_MAJOR 142
+#define SKIP_NUM_MINOR	16
+static struct cdevsw skip_cdevsw = {
+	/* open */	skip_ifopen,
+	/* close */	skip_ifclose,
+	/* read */	skip_ifread,
+	/* write */	skip_ifwrite,
+	/* ioctl */	skip_ifioctl,
+#if __FreeBSD_version < 400011
+	/* stop */	nullstop,
+	/* reset */	noreset,
+	/* devtotty */	nodevtotty,
+#endif
+	/* poll */	skip_ifpoll,
+	/* mmap */	nommap,
+	/* strategy */	nostrategy,
+	/* name */	"skip",
+#if __FreeBSD_version < 400011
+	/* maj */	NULL
+#else
+	/* maj */	SKIP_CDEV_MAJOR,
+	/* dump */	nodump,
+	/* psize */	nopsize,
+	/* flags */	0,
+	/* bmaj */	-1
+#endif
+};
 
-/*
- * SunOS 4.1.x loadable driver wrapper for the SKIP module
- */
-extern char		skip_module_name[];
+#if __FreeBSD_version < 400011
+static struct cdevsw	*old_dev;
+static u_long		skip_major;
+static dev_t		dev;
+#else
+static u_long		skip_major = SKIP_CDEV_MAJOR;
+static dev_t		devs[SKIP_NUM_MINOR];
+#endif
 
 /*
- * Module linkage information for the kernel.
+ * Handle loading and unloading of the SKIP module.
  */
-extern int		nulldev();
-
-struct cfdriver skipcd=
-        { NULL, "skip", NULL, NULL, DV_DULL, 0 };
-
-struct cdevsw skipdevsw = {
-        skip_ifopen, skip_ifclose, skip_ifread, skip_ifwrite, skip_ifioctl,
-	NULL, NULL, NULL, skip_ifselect, NULL, NULL 
-};
-
-MOD_DEV("skipmod", LM_DT_CHAR, -1, (void *)&skipdevsw)
-
-extern int		skip_init(), skip_uninit();
-
-/*ARGSUSED*/
-int
-skipmod_load(struct lkm_table *lkmtp, int cmd)
+static int
+skip_mod_event(module_t mod, int event, void *data)
 {
-
-	int rc;
-	rc = skip_init();
-	if (rc != 0) {
-		return (rc);
+	int error = 0;
+#if __FreeBSD_version >= 400011
+	int minor;
+#endif
+
+	switch (event) {
+	case MOD_LOAD:
+
+		/* Add character device */
+#if __FreeBSD_version < 400011
+		dev = (dev_t)-1;
+		if ((error = cdevsw_add(&dev, &skip_cdevsw, &old_dev)) != 0) {
+			log(LOG_ERR, "skip: can't add device\n");
+			break;
+		}
+		skip_major = major(dev);
+#else
+		devs[0] = make_dev(&skip_cdevsw, 0,
+		    UID_ROOT, GID_WHEEL, 0644, "skip_key");
+		for (minor = 1; minor < SKIP_NUM_MINOR; minor++) {
+			devs[minor] = make_dev(&skip_cdevsw, minor,
+			    UID_ROOT, GID_WHEEL, 0644, "skip%d", minor);
+		}
+#endif
+
+		/* Initialize SKIP itself */
+		if ((error = skip_init()) != 0) {
+			/* XXX should remove char device */
+			log(LOG_ERR, "skip: init failed\n");
+			break;
+		}
+		log(LOG_INFO, "skip: device major=%lu, driver loaded\n",
+			skip_major);
+		break;
+
+	case MOD_UNLOAD:
+
+		/* Uninitialize SKIP */
+		if ((error = skip_uninit()) != 0) {
+			log(LOG_INFO, "skip: uninit failed\n");
+			break;
+		}
+
+		/* Replace original device driver (if any) */
+#if __FreeBSD_version < 400011
+		dev = makedev(skip_major, 0);
+		(void) cdevsw_add(&dev, old_dev, NULL);
+#else
+		for (minor = 0; minor < SKIP_NUM_MINOR; minor++)
+			destroy_dev(devs[minor]);
+#endif
+		break;
+
+	default:
+		error = EOPNOTSUPP;
+		break;
 	}
-	uprintf("skip: driver loaded\n");
-	return (0);
+	return(error);
 }
 
-skipmod_unload(struct lkm_table *lkmtp, int cmd)
-{
-	
-	int rc;
-	rc = skip_uninit();
-	if (rc == 0) {
-		uprintf("skip: driver unloaded\n");
-	}
-	return (rc);
-}
+static moduledata_t skip_mod = {
+	"skip",
+	skip_mod_event,
+	NULL
+};
+DECLARE_MODULE(skip, skip_mod, SI_SUB_PROTO_END, SI_ORDER_MIDDLE);
 
-xxxinit(struct lkm_table *lkmtp, int cmd, int ver)
-{
-	DISPATCH(lkmtp, cmd, ver, skipmod_load, skipmod_unload, nosys);
-}
@


1.3
log
@Bash this port until it compiles under -current again.
@
text
@@


1.2
log
@Build SKIP port as a KLD instead of an LKM.
@
text
@d1 34
a34 6
diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/keymgrd/skip_log.C work.new/skip/keymgrd/skip_log.C
--- skipsrc-1.0.orig/skip/keymgrd/skip_log.C	Fri Oct 25 13:12:50 1996
+++ work.new/skip/keymgrd/skip_log.C	Mon Mar  8 21:33:38 1999
@@@@ -60,7 +60,7 @@@@
 	strcpy(outbuf,buf);
 }
d36 12
a47 2
-FILE *skip_log_fp = NULL;
+int skip_log_syslog = 0;
d49 23
a71 1
 void skip_log(int severity, char *control,...)
d73 83
a155 3
@@@@ -71,15 +71,15 @@@@
 	get_time(buf);
 	va_start(va,control);
d157 4
a160 23
-	if (skip_log_fp)
-		out = skip_log_fp;
-	else if (severity == SKIP_NOTICE) 
-		out=stdout;
-	else
-		out=stderr;
-
-	fprintf(out,"%s",buf);
-	vfprintf(out, control,va);
-	fprintf(out,"\n");
-	fflush(out);
+	if (skip_log_syslog) {
+	  vsyslog(severity, control, va);
+	} else {
+		out = (severity == SKIP_NOTICE) ? stdout : stderr;
+		fprintf(out, "%s",buf);
+		vfprintf(out, control, va);
+		fprintf(out, "\n");
+		fflush(out);
+	}
+	va_end(va);
 }
+
@


1.1
log
@Initial revision
@
text
@d1 39
a39 21
diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/man/skip_certd.1m skipsrc-1.0/skip/man/skip_certd.1m
--- skipsrc-1.0.orig/skip/man/skip_certd.1m	Fri Oct 25 13:12:56 1996
+++ skipsrc-1.0/skip/man/skip_certd.1m	Wed Nov 26 20:04:40 1997
@@@@ -14,15 +14,10 @@@@
 .SH FILES
 .br
 /tmp/skip_certd.log
-.SS Solaris 1.x systems:
 .P
-/etc/skip/certs.dir
+@@@@PREFIX@@@@/etc/skip/certs.dir
 .br
-/etc/skip/certs.pag
+@@@@PREFIX@@@@/etc/skip/certs.pag
 .P
-.SS Solaris 2.x systems:
-.P
-/etc/opt/SUNWicg/skip/certs.dir
-/etc/opt/SUNWicg/skip/certs.pag
 .SH SEE ALSO
 caping(1)
@


1.1.1.1
log
@Add a package for the SKIP package from Sun Microsystems,
for making secure pipes across the internet (etc.)
@
text
@@
