head	1.5;
access;
symbols
	RELEASE_6_1_0:1.4
	RELEASE_5_5_0:1.4
	RELEASE_6_0_0:1.4
	RELEASE_5_4_0:1.4
	RELEASE_4_11_0:1.4
	RELEASE_5_3_0:1.4
	RELEASE_4_10_0:1.4
	RELEASE_5_2_1:1.4
	RELEASE_5_2_0:1.4
	RELEASE_4_9_0:1.4
	RELEASE_5_1_0:1.4
	RELEASE_4_8_0:1.4
	RELEASE_5_0_0:1.4
	RELEASE_4_7_0:1.4
	RELEASE_4_6_2:1.4
	RELEASE_4_6_1:1.4
	RELEASE_4_6_0:1.4
	RELEASE_5_0_DP1:1.4
	RELEASE_4_5_0:1.4
	RELEASE_4_4_0:1.4
	RELEASE_4_3_0:1.4
	RELEASE_4_2_0:1.4
	RELEASE_4_1_1:1.4
	RELEASE_4_1_0:1.4
	RELEASE_3_5_0:1.4
	RELEASE_4_0_0:1.4
	RELEASE_3_4_0:1.3
	RELEASE_3_3_0:1.3
	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.5
date	2006.04.06.13.54.44;	author archie;	state dead;
branches;
next	1.4;

1.4
date	2000.01.26.01.55.13;	author archie;	state Exp;
branches;
next	1.3;

1.3
date	99.05.16.23.09.06;	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.51;	author julian;	state Exp;
branches
	1.1.1.1;
next	;

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


desc
@@


1.5
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/common/skip_ipsp.c work.new/skip/common/skip_ipsp.c
--- skipsrc-1.0.orig/skip/common/skip_ipsp.c	Fri Oct 25 13:12:40 1996
+++ work.new/skip/common/skip_ipsp.c	Tue Jan 25 09:57:16 2000
@@@@ -79,7 +79,7 @@@@
 skip_hdr_ipsp_decode(unsigned char *start, unsigned char *end, skip_hdr_t *hdr)
 {
 	register unsigned char	*p = start;
-	register 		i;
+	register int 		i;
 	register int 		Akp_len = 0;
 	register int	 	Ekp_len = 0;
 	unsigned char		version;
@


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


1.3
log
@Fix compilation problem caused by change in suser() calling convention.
@
text
@d1 12
a12 304
--- skipsrc.orig/skip/freebsd/skip_es.c	Fri Oct 25 13:12:42 1996
+++ work/skip/freebsd/skip_es.c	Sat May 15 17:05:09 1999
@@@@ -81,6 +81,11 @@@@
 static unsigned short	skip_pktid;
 static skip_softc_t	skip_softc[SKIP_MAX_OPENS];
 
+static struct callout_handle
+	skip_timeout_handle = CALLOUT_HANDLE_INITIALIZER(&skip_timeout_handle);
+
+MALLOC_DEFINE(M_SKIP, "skip", "SKIP control structures and buffers");
+
 /*
  * statistics
  */
@@@@ -116,11 +121,13 @@@@
 static int		skip_ifoutput(struct ifnet *, struct mbuf *,
 				struct sockaddr *, struct rtentry *rtp);
 static int		skip_ifinput(struct mbuf *, int);
-static void		skip_inittimers();
-static void		skip_uninittimers();
-static void		skip_timer();
+static void		skip_inittimers(void);
+static void		skip_uninittimers(void);
+static void		skip_timer(void *);
 static int		skip_add_interface(char *);
 static int		skip_del_interface(char *);
+static void		skip_ifwakeup(skip_softc_t *);
+static int		skip_bufextend(struct mbuf *, int);
 
 static void	     skip_encrypt_done(void *, struct mbuf *, struct mbuf *,
 				void *, skip_arg_t *);
@@@@ -136,14 +143,14 @@@@
 /*
  * From Crypt/MAC system...
  */
-extern int		skip_es_bypass_init();
-extern void		skip_es_bypass_uninit();
-extern void		skip_key_initstore();
-extern void		skip_key_uninitstore();
-extern void		skip_key_initcryptors();
-extern void		skip_key_uninitcryptors();
-extern void		skip_mac_init();
-extern void		skip_mac_uninit();
+extern int		skip_es_bypass_init(void);
+extern void		skip_es_bypass_uninit(void);
+extern void		skip_key_initstore(void);
+extern void		skip_key_uninitstore(void);
+extern void		skip_key_initcryptors(void);
+extern void		skip_key_uninitcryptors(void);
+extern void		skip_mac_init(void);
+extern void		skip_mac_uninit(void);
 extern int		skip_fmt_kmgr(union skip_messages *, skip_keycb_t *);
 
 extern struct cdevsw skipdevsw;
@@@@ -157,7 +164,7 @@@@
  * Returns: 0 on success, errno otherwise.
  */
 int
-skip_init()
+skip_init(void)
 {
 	register int		s, rc;
 	register struct protosw	*pr;
@@@@ -252,7 +259,10 @@@@
 		for (pr = inetdomain.dom_protosw;
 			pr < inetdomain.dom_protoswNPROTOSW; pr++) {
 
-			pr->pr_input = skip_ifinput;
+			if (pr->pr_protocol == IPPROTO_DIVERT)
+				continue;
+			pr->pr_input =
+				(void (*)(struct mbuf *, int)) skip_ifinput;
 		}
 		splx(s);
 	}
@@@@ -266,7 +276,7 @@@@
  * Returns: 0 on success, errno otherwise.
  */
 int
-skip_uninit()
+skip_uninit(void)
 {
 	register int		s;
 	if (skip_busy || skip_keys_stats.skip_encrypt_keys_active 
@@@@ -319,7 +329,11 @@@@
 						major(dev), flags);
 #endif
 
+#if __FreeBSD_version < 400005
 	if (suser(p->p_ucred, &p->p_acflag )) {
+#else
+	if (suser(p)) {
+#endif
 		return (EPERM);
 	}
 	if (minor(dev) >= SKIP_MAX_OPENS) {
@@@@ -422,27 +436,30 @@@@
  * Returns: 0 if no data available, 1 otherwise
  */
 int
-skip_ifselect(dev, rw, p)
+skip_ifpoll(dev, events, p)
 	dev_t		dev;
-	int		rw;
+	int		events;
 	struct proc 	*p;
 {
 	register skip_softc_t	*sp = &skip_softc[minor(dev)];
 	register int		s;
+	int revents = 0;
 
-	if (rw == FWRITE) {
-		return (1);
-	}
+	/* Check readable */
 	s = splimp();
-	if (sp->q.ifq_len > 0) {
-		splx(s);
-		return (1);
+	if (events & (POLLIN | POLLRDNORM)) {
+		if (sp->q.ifq_len > 0)
+			revents |= (events & (POLLIN | POLLRDNORM));
+		else
+			selrecord(p, &sp->sp_si);
 	}
 
-	selrecord(p, &sp->sp_si);
+	/* Always writable */
+	if (events & (POLLOUT | POLLWRNORM))
+		revents |= (events & (POLLOUT | POLLWRNORM));
 
 	splx(s);
-	return(0);
+	return(revents);
 }
 
 /* skip_ifread()
@@@@ -786,9 +803,9 @@@@
  * Returns: None
  */
 static void
-skip_inittimers()
+skip_inittimers(void)
 {
-	timeout(skip_timer, NULL, skip_key_tick * hz);
+	skip_timeout_handle = timeout(skip_timer, NULL, skip_key_tick * hz);
 }
  
 /* skip_uninittimers()
@@@@ -798,9 +815,10 @@@@
  * Returns: None
  */
 static void
-skip_uninittimers()
+skip_uninittimers(void)
 {
-	untimeout(skip_timer, NULL);
+	untimeout(skip_timer, NULL, skip_timeout_handle);
+	callout_handle_init(&skip_timeout_handle);
 }
  
 /* skip_timer()
@@@@ -812,14 +830,13 @@@@
  */
 /*ARGSUSED*/
 static void
-skip_timer(arg)
-	caddr_t		arg;
+skip_timer(void *arg)
 {
 	/*
 	 * run through the key store
 	 */
 	skip_key_iterate(skip_key_check, NULL);
-	timeout(skip_timer, NULL, skip_key_tick * hz);
+	skip_timeout_handle = timeout(skip_timer, NULL, skip_key_tick * hz);
 }
 
 #ifdef notdef
@@@@ -846,6 +863,7 @@@@
 }
 #endif
 
+#ifdef notdef
 void
 skip_dump_buf(char *what, unsigned char *p, int len) 
 {
@@@@ -857,7 +875,9 @@@@
 	}
 	printf("].\n");
 }
+#endif
 
+#ifdef notdef
 void
 skip_dump_ip(struct ip *ip)
 {
@@@@ -878,6 +898,7 @@@@
 			ip->ip_ttl, ip->ip_p, ntohs(ip->ip_sum));
 
 }
+#endif
 
 /*
  * SKIP Ioctl and Interface management routines
@@@@ -1107,7 +1128,7 @@@@
 int
 skip_ifioctl(dev, cmd, data, fflag, p)
 	dev_t		dev;
-	int		cmd;
+	u_long		cmd;
 	caddr_t		data;
 	int		fflag;
 	struct		proc *p;
@@@@ -1390,7 +1411,6 @@@@
 	skip_es_t		*skip_if;
 	int			iphlen, hdrlen = 0;
 	struct mbuf		*decryptbuf = NULL;
-	extern u_char		ip_protox[];
 	skip_param_t		params;
 	skip_hdr_t		skip_hdr;
 	skip_es_hash_t          *entry, **acl;
@@@@ -1718,7 +1738,7 @@@@
 		 */
 		decryptbuf->m_data += iphlen;
 	
-                SKIP_DEBUG2("skip_ifinput: decryptbuf m_len=%d m_data=%d\n",
+                SKIP_DEBUG2("skip_ifinput: decryptbuf m_len=%d m_data=%p\n",
                                         decryptbuf->m_len, decryptbuf->m_data);
 
 	} 
@@@@ -1745,7 +1765,7 @@@@
 	ip->ip_id = ntohs(ip->ip_id);
 	ip->ip_off = ntohs(ip->ip_off);
 pass:
-	m->m_flags &= ~ M_EOR;
+	m->m_flags &= ~ M_PROTO1;
 	(*inetsw_default[ip_protox[ip->ip_p]].pr_input)(m, hlen);
 	return (0);
 }
@@@@ -1910,6 +1930,13 @@@@
 		 */
                 IPADDRCOPY(&params.tunnel_addr, &newip->ip_dst);
 
+		/* 
+		 * insert different source address if specified 
+		 */
+
+		if(params.source != 0)
+			(&newip->ip_src)->s_addr = params.source;
+
 		encryptbuf->m_len += sizeof (struct ip);
 
 		/*
@@@@ -2005,7 +2032,7 @@@@
 			if (params.kp_alg) {
 				newip->ip_p = SKIP_NEXT_ESP;
 			} else {
-				newip->ip_p = IPPROTO_ENCAP;
+				newip->ip_p = IPPROTO_IPIP;
 			}
 		}
 		skip_if->stats.skip_if_raw_out++;
@@@@ -2028,6 +2055,13 @@@@
 		 * insert tunnel address as destination
 		 */
 		IPADDRCOPY(&params.tunnel_addr, &newip->ip_dst);
+
+		/* 
+		 * insert different source address if specified 
+		 */
+
+		if(params.source != 0) 
+			(&newip->ip_src)->s_addr = params.source;
 	}
 
 	if (params.s_nsid == 0) {
@@@@ -2097,7 +2131,7 @@@@
 	register skip_param_t   *params = &res->params;
 	register struct ip      *ip = mtod(original, struct ip *);
 	int                     rc, s, iphlen;
-	struct mbuf             *outbuf, *new_hdr;
+	struct mbuf             *outbuf;
 
 	SKIP_PRINT("skip_decrypt_done", params);
 
@@@@ -2125,7 +2159,7 @@@@
 	 */
 	outbuf = (res->modes & SKIP_CRYPT_ON) ? m : original;
 
-	if (res->proto != IPPROTO_ENCAP) {
+	if (res->proto != IPPROTO_IPIP) {
 		/*
 		 * transport mode, need to copy original IP header
 		 */
@@@@ -2195,7 +2229,7 @@@@
 	/*
 	 * tag the start of the header buffer so SKIP can recognise it
 	 */
-	outbuf->m_flags |= M_EOR | M_PKTHDR;
+	outbuf->m_flags |= M_PROTO1 | M_PKTHDR;
     
 	s = splimp();
 	if (IF_QFULL(&ipintrq)) {
@


1.2
log
@Build SKIP port as a KLD instead of an LKM.
@
text
@d1 2
a2 3
diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/freebsd/skip_es.c work.new/skip/freebsd/skip_es.c
--- skipsrc-1.0.orig/skip/freebsd/skip_es.c	Fri Oct 25 13:12:42 1996
+++ work.new/skip/freebsd/skip_es.c	Tue Mar  9 20:40:23 1999
d85 13
a97 1
@@@@ -422,27 +432,30 @@@@
d138 1
a138 1
@@@@ -786,9 +799,9 @@@@
d150 1
a150 1
@@@@ -798,9 +811,10 @@@@
d163 1
a163 1
@@@@ -812,14 +826,13 @@@@
d180 1
a180 1
@@@@ -846,6 +859,7 @@@@
d188 1
a188 1
@@@@ -857,7 +871,9 @@@@
d198 1
a198 1
@@@@ -878,6 +894,7 @@@@
d206 1
a206 1
@@@@ -1107,7 +1124,7 @@@@
d215 1
a215 1
@@@@ -1390,7 +1407,6 @@@@
d223 1
a223 1
@@@@ -1718,7 +1734,7 @@@@
d232 1
a232 1
@@@@ -1745,7 +1761,7 @@@@
d241 1
a241 1
@@@@ -1910,6 +1926,13 @@@@
d255 1
a255 1
@@@@ -2005,7 +2028,7 @@@@
d264 1
a264 1
@@@@ -2028,6 +2051,13 @@@@
d278 1
a278 1
@@@@ -2097,7 +2127,7 @@@@
d287 1
a287 1
@@@@ -2125,7 +2155,7 @@@@
d296 1
a296 1
@@@@ -2195,7 +2225,7 @@@@
@


1.1
log
@Initial revision
@
text
@d1 293
a293 11
diff -ur --unidirectional-new-file skipsrc-1.0.orig/skip/keymgrd/skip_keymgrsubr.C skipsrc-1.0/skip/keymgrd/skip_keymgrsubr.C
--- skipsrc-1.0.orig/skip/keymgrd/skip_keymgrsubr.C	Fri Oct 25 13:12:49 1996
+++ skipsrc-1.0/skip/keymgrd/skip_keymgrsubr.C	Tue Nov 25 19:30:19 1997
@@@@ -59,7 +59,6 @@@@
 #include "SkipCert.h"
 #include "X509skip.h"
 #include "HashCert.h"
-#include "malloc.h"
 #include "utils.h"
 #include "Sig.h"
 #include "skip_log.h"
@


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