summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>1997-07-01 22:29:12 +0000
committerNiels Provos <provos@cvs.openbsd.org>1997-07-01 22:29:12 +0000
commite56fa95377ad9864e7967d80061ed0acca4bdab5 (patch)
tree65be9318fe40c77e46898f325feb79de281f81b0
parent18a904b90d6444023822e9ecc0a78982bb55a545 (diff)
remove obsolete sources
-rw-r--r--sbin/ipsec/delspi/Makefile5
-rw-r--r--sbin/ipsec/delspi/delspi.c94
-rw-r--r--sbin/ipsec/pfr/Makefile5
-rw-r--r--sbin/ipsec/pfr/pfr.c85
-rw-r--r--sbin/ipsec/sah/Makefile5
-rw-r--r--sbin/ipsec/sah/sah.c111
-rw-r--r--sbin/ipsec/sahhmac/Makefile5
-rw-r--r--sbin/ipsec/sahhmac/sahhmac.c110
-rw-r--r--sbin/ipsec/sesp/Makefile5
-rw-r--r--sbin/ipsec/sesp/sesp.c117
-rw-r--r--sbin/ipsec/sesp3md5/Makefile5
-rw-r--r--sbin/ipsec/sesp3md5/sesp3md5.c117
-rw-r--r--sbin/ipsec/sgrp/Makefile5
-rw-r--r--sbin/ipsec/sgrp/sgrp.c105
-rw-r--r--sbin/ipsec/shahmac/Makefile5
-rw-r--r--sbin/ipsec/shahmac/shahmac.c109
-rw-r--r--sbin/ipsec/si4/Makefile5
-rw-r--r--sbin/ipsec/si4/si4.c92
18 files changed, 0 insertions, 985 deletions
diff --git a/sbin/ipsec/delspi/Makefile b/sbin/ipsec/delspi/Makefile
deleted file mode 100644
index 35b1928cd0e..00000000000
--- a/sbin/ipsec/delspi/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# $OpenBSD: Makefile,v 1.1 1997/02/21 23:17:23 niklas Exp $
-
-PROG= delspi
-
-.include <bsd.prog.mk>
diff --git a/sbin/ipsec/delspi/delspi.c b/sbin/ipsec/delspi/delspi.c
deleted file mode 100644
index 133d3efdc5a..00000000000
--- a/sbin/ipsec/delspi/delspi.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * The author of this code is John Ioannidis, ji@tla.org,
- * (except when noted otherwise).
- *
- * This code was written for BSD/OS in Athens, Greece, in November 1995.
- *
- * Ported to OpenBSD and NetBSD, with additional transforms, in December 1996,
- * by Angelos D. Keromytis, kermit@forthnet.gr.
- *
- * Copyright (C) 1995, 1996, 1997 by John Ioannidis and Angelos D. Keromytis.
- *
- * Permission to use, copy, and modify this software without fee
- * is hereby granted, provided that this entire notice is included in
- * all copies of any software which is or includes a copy or
- * modification of this software.
- *
- * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTY. IN PARTICULAR, NEITHER AUTHOR MAKES ANY
- * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
- * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
- * PURPOSE.
- */
-
-#include <sys/param.h>
-#include <sys/file.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <sys/mbuf.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/route.h>
-#include <net/if_dl.h>
-#include <netinet/in.h>
-#include <netns/ns.h>
-#include <netiso/iso.h>
-#include <netccitt/x25.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-
-#include <errno.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <paths.h>
-#include "net/encap.h"
-#include "netinet/ip_ipsp.h"
-
-#define IFT_ENC 0x37
-
-
-char buf[1024];
-
-main(argc, argv)
-int argc;
-char **argv;
-{
- int sd, len, i, chain;
-
- struct encap_msghdr *em;
- struct sockaddr_encap *dst, *msk, *gw;
- struct sockaddr_dl *dl;
- u_char *opts;
-
- if (argc != 5)
- fprintf(stderr, "usage: %s dst spi chaindelete alg\n", argv[0]), exit(1);
- sd = socket(AF_ENCAP, SOCK_RAW, AF_UNSPEC);
- if (sd < 0)
- perror("socket"), exit(1);
-
- chain = atoi(argv[3]);
- em = (struct encap_msghdr *)&buf[0];
-
- if (chain)
- em->em_msglen = EMT_DELSPI_FLEN;
- else
- em->em_msglen = EMT_DELSPICHAIN_FLEN;
- em->em_version = 0;
- if (chain)
- em->em_type = EMT_DELSPICHAIN;
- else
- em->em_type = EMT_DELSPI;
- em->em_spi = htonl(strtoul(argv[2], NULL, 16));
- em->em_if = 1;
- em->em_dst.s_addr = inet_addr(argv[1]);
- em->em_alg = atoi(argv[4]); /* sanity checking in the kernel */
-
- if (write(sd, buf, em->em_msglen) != em->em_msglen)
- perror("write");
-}
-
-
diff --git a/sbin/ipsec/pfr/Makefile b/sbin/ipsec/pfr/Makefile
deleted file mode 100644
index 5acb79a73ca..00000000000
--- a/sbin/ipsec/pfr/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# $OpenBSD: Makefile,v 1.1 1997/02/21 23:17:26 niklas Exp $
-
-PROG= pfr
-
-.include <bsd.prog.mk>
diff --git a/sbin/ipsec/pfr/pfr.c b/sbin/ipsec/pfr/pfr.c
deleted file mode 100644
index c8e5bbae692..00000000000
--- a/sbin/ipsec/pfr/pfr.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * The author of this code is John Ioannidis, ji@tla.org,
- * (except when noted otherwise).
- *
- * This code was written for BSD/OS in Athens, Greece, in November 1995.
- *
- * Ported to OpenBSD and NetBSD, with additional transforms, in December 1996,
- * by Angelos D. Keromytis, kermit@forthnet.gr.
- *
- * Copyright (C) 1995, 1996, 1997 by John Ioannidis and Angelos D. Keromytis.
- *
- * Permission to use, copy, and modify this software without fee
- * is hereby granted, provided that this entire notice is included in
- * all copies of any software which is or includes a copy or
- * modification of this software.
- *
- * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTY. IN PARTICULAR, NEITHER AUTHOR MAKES ANY
- * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
- * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
- * PURPOSE.
- */
-
-#include <sys/param.h>
-#include <sys/file.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <sys/mbuf.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/route.h>
-#include <net/if_dl.h>
-#include <netinet/in.h>
-#include <netns/ns.h>
-#include <netiso/iso.h>
-#include <netccitt/x25.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-
-#include <errno.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <paths.h>
-#include "net/encap.h"
-
-
-#define IFT_ENC 0x37
-
-
-char buf[1024];
-
-main(argc, argv)
-int argc;
-char **argv;
-{
- int sd;
-
- struct encap_msghdr *em;
-
- struct sockaddr_encap *dst, *msk, *gw;
- struct sockaddr_dl *dl;
- u_char *opts;
-
- if (argc != 3)
- fprintf(stderr, "usage: %s if# ipaddr\n", argv[0]), exit(1);
-
- sd = socket(AF_ENCAP, SOCK_RAW, AF_UNSPEC);
- if (sd < 0)
- perror("socket"), exit(1);
-
- em = (struct encap_msghdr *)&buf[0];
-
- em->em_msglen = EMT_IFADDR_LEN;
- em->em_version = 0;
- em->em_type = EMT_IFADDR;
- em->em_ifa.s_addr = inet_addr(argv[2]);
- em->em_ifn = atoi(argv[1]);
-
- if (write(sd, buf, EMT_IFADDR_LEN) != EMT_IFADDR_LEN)
- perror("write");
-}
diff --git a/sbin/ipsec/sah/Makefile b/sbin/ipsec/sah/Makefile
deleted file mode 100644
index c2465967fb8..00000000000
--- a/sbin/ipsec/sah/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# $OpenBSD: Makefile,v 1.1 1997/02/21 23:17:35 niklas Exp $
-
-PROG= sah
-
-.include <bsd.prog.mk>
diff --git a/sbin/ipsec/sah/sah.c b/sbin/ipsec/sah/sah.c
deleted file mode 100644
index d7ef6dbdc6d..00000000000
--- a/sbin/ipsec/sah/sah.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * The author of this code is John Ioannidis, ji@tla.org,
- * (except when noted otherwise).
- *
- * This code was written for BSD/OS in Athens, Greece, in November 1995.
- *
- * Ported to OpenBSD and NetBSD, with additional transforms, in December 1996,
- * by Angelos D. Keromytis, kermit@forthnet.gr.
- *
- * Copyright (C) 1995, 1996, 1997 by John Ioannidis and Angelos D. Keromytis.
- *
- * Permission to use, copy, and modify this software without fee
- * is hereby granted, provided that this entire notice is included in
- * all copies of any software which is or includes a copy or
- * modification of this software.
- *
- * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTY. IN PARTICULAR, NEITHER AUTHOR MAKES ANY
- * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
- * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
- * PURPOSE.
- */
-
-#include <sys/param.h>
-#include <sys/file.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <sys/mbuf.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/route.h>
-#include <net/if_dl.h>
-#include <netinet/in.h>
-#include <netns/ns.h>
-#include <netiso/iso.h>
-#include <netccitt/x25.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-
-#include <errno.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <paths.h>
-#include "net/encap.h"
-#include "netinet/ip_ipsp.h"
-#include "netinet/ip_ah.h"
-
-
-#define IFT_ENC 0x37
-
-
-char buf[1024];
-
-int x2i(char *s)
-{
- char ss[3];
- ss[0] = s[0];
- ss[1] = s[1];
- ss[2] = 0;
-
- return strtoul(ss, NULL, 16);
-}
-
-
-main(argc, argv)
-int argc;
-char **argv;
-{
- int sd, len, klen, i;
-
- struct encap_msghdr *em;
- struct ahmd5_xdata *xd;
- struct sockaddr_encap *dst, *msk, *gw;
- struct sockaddr_dl *dl;
- u_char *opts;
-
- if (argc != 4)
- fprintf(stderr, "usage: %s dst spi key\n", argv[0]), exit(1);
- sd = socket(AF_ENCAP, SOCK_RAW, AF_UNSPEC);
- if (sd < 0)
- perror("socket"), exit(1);
-
- klen = strlen(argv[3])/2;
-
- em = (struct encap_msghdr *)&buf[0];
-
- em->em_msglen = EMT_SETSPI_FLEN + 4 + klen;
- em->em_version = 0;
- em->em_type = EMT_SETSPI;
- em->em_spi = htonl(strtoul(argv[2], NULL, 16));
- em->em_if = 1;
- em->em_dst.s_addr = inet_addr(argv[1]);
- em->em_alg = XF_AHMD5;
- xd = (struct ahmd5_xdata *)(em->em_dat);
-
- xd->amx_klen = klen;
- xd->amx_alen = 16;
-
-
- for (i = 0; i < klen; i++ )
- xd->amx_key[i] = x2i(&(argv[3][2*i]));
-
- if (write(sd, buf, em->em_msglen) != em->em_msglen)
- perror("write");
-}
-
-
diff --git a/sbin/ipsec/sahhmac/Makefile b/sbin/ipsec/sahhmac/Makefile
deleted file mode 100644
index a2b0b37dd5c..00000000000
--- a/sbin/ipsec/sahhmac/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# $OpenBSD: Makefile,v 1.1 1997/02/21 23:17:37 niklas Exp $
-
-PROG= sahhmac
-
-.include <bsd.prog.mk>
diff --git a/sbin/ipsec/sahhmac/sahhmac.c b/sbin/ipsec/sahhmac/sahhmac.c
deleted file mode 100644
index 391eefccbe6..00000000000
--- a/sbin/ipsec/sahhmac/sahhmac.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * The author of this code is John Ioannidis, ji@tla.org,
- * (except when noted otherwise).
- *
- * This code was written for BSD/OS in Athens, Greece, in November 1995.
- *
- * Ported to OpenBSD and NetBSD, with additional transforms, in December 1996,
- * by Angelos D. Keromytis, kermit@forthnet.gr.
- *
- * Copyright (C) 1995, 1996, 1997 by John Ioannidis and Angelos D. Keromytis.
- *
- * Permission to use, copy, and modify this software without fee
- * is hereby granted, provided that this entire notice is included in
- * all copies of any software which is or includes a copy or
- * modification of this software.
- *
- * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTY. IN PARTICULAR, NEITHER AUTHOR MAKES ANY
- * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
- * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
- * PURPOSE.
- */
-
-#include <sys/param.h>
-#include <sys/file.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <sys/mbuf.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/route.h>
-#include <net/if_dl.h>
-#include <netinet/in.h>
-#include <netns/ns.h>
-#include <netiso/iso.h>
-#include <netccitt/x25.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-
-#include <errno.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <paths.h>
-#include "net/encap.h"
-#include "netinet/ip_ipsp.h"
-#include "netinet/ip_ah.h"
-
-
-#define IFT_ENC 0x37
-
-
-char buf[1024];
-
-int x2i(char *s)
-{
- char ss[3];
- ss[0] = s[0];
- ss[1] = s[1];
- ss[2] = 0;
-
- return strtoul(ss, NULL, 16);
-}
-
-
-main(argc, argv)
-int argc;
-char **argv;
-{
- int sd, len, klen, i;
-
- struct encap_msghdr *em;
- struct ahhmacmd5_xencap *xd;
- struct sockaddr_encap *dst, *msk, *gw;
- struct sockaddr_dl *dl;
- u_char *opts;
-
- if (argc != 4)
- fprintf(stderr, "usage: %s dst spi key\n", argv[0]), exit(1);
- sd = socket(AF_ENCAP, SOCK_RAW, AF_UNSPEC);
- if (sd < 0)
- perror("socket"), exit(1);
-
- klen = strlen(argv[3])/2;
-
- em = (struct encap_msghdr *)&buf[0];
-
- em->em_msglen = EMT_SETSPI_FLEN + 4 + AHHMACMD5_KMAX;
- em->em_version = 0;
- em->em_type = EMT_SETSPI;
- em->em_spi = htonl(strtoul(argv[2], NULL, 16));
- em->em_if = 1;
- em->em_dst.s_addr = inet_addr(argv[1]);
- em->em_alg = XF_AHHMACMD5;
- xd = (struct ahhmacmd5_xencap *)(em->em_dat);
-
- xd->amx_alen = 16;
- xd->amx_rpl = 1;
- xd->amx_wnd = 32;
-
- bzero(xd->amx_key, AHHMACMD5_KMAX);
- for (i = 0; i < klen; i++ )
- xd->amx_key[i] = x2i(&(argv[3][2*i]));
-
- if (write(sd, buf, em->em_msglen) != em->em_msglen)
- perror("write");
-}
diff --git a/sbin/ipsec/sesp/Makefile b/sbin/ipsec/sesp/Makefile
deleted file mode 100644
index 733b389ec57..00000000000
--- a/sbin/ipsec/sesp/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# $OpenBSD: Makefile,v 1.1 1997/02/21 23:17:39 niklas Exp $
-
-PROG= sesp
-
-.include <bsd.prog.mk>
diff --git a/sbin/ipsec/sesp/sesp.c b/sbin/ipsec/sesp/sesp.c
deleted file mode 100644
index 2adff69fff7..00000000000
--- a/sbin/ipsec/sesp/sesp.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * The author of this code is John Ioannidis, ji@tla.org,
- * (except when noted otherwise).
- *
- * This code was written for BSD/OS in Athens, Greece, in November 1995.
- *
- * Ported to OpenBSD and NetBSD, with additional transforms, in December 1996,
- * by Angelos D. Keromytis, kermit@forthnet.gr.
- *
- * Copyright (C) 1995, 1996, 1997 by John Ioannidis and Angelos D. Keromytis.
- *
- * Permission to use, copy, and modify this software without fee
- * is hereby granted, provided that this entire notice is included in
- * all copies of any software which is or includes a copy or
- * modification of this software.
- *
- * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTY. IN PARTICULAR, NEITHER AUTHOR MAKES ANY
- * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
- * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
- * PURPOSE.
- */
-
-#include <sys/param.h>
-#include <sys/file.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <sys/mbuf.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/route.h>
-#include <net/if_dl.h>
-#include <netinet/in.h>
-#include <netns/ns.h>
-#include <netiso/iso.h>
-#include <netccitt/x25.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-
-#include <errno.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <paths.h>
-#include "net/encap.h"
-#include "netinet/ip_ipsp.h"
-#include "netinet/ip_esp.h"
-
-
-#define IFT_ENC 0x37
-
-
-char buf[1024];
-
-int x2i(char *s)
-{
- char ss[3];
- ss[0] = s[0];
- ss[1] = s[1];
- ss[2] = 0;
-
- return strtoul(ss, NULL, 16);
-}
-
-
-main(argc, argv)
-int argc;
-char **argv;
-{
- int sd, len, i;
-
- struct encap_msghdr *em;
- struct espdes_xdata *xd;
- struct sockaddr_encap *dst, *msk, *gw;
- struct sockaddr_dl *dl;
- u_char *opts;
-
- if (argc != 5)
- fprintf(stderr, "usage: %s dst spi iv key\n", argv[0]), exit(1);
- sd = socket(AF_ENCAP, SOCK_RAW, AF_UNSPEC);
- if (sd < 0)
- perror("socket"), exit(1);
-
- em = (struct encap_msghdr *)&buf[0];
-
- em->em_msglen = EMT_SETSPI_FLEN + ESP_ULENGTH;
- em->em_version = 0;
- em->em_type = EMT_SETSPI;
- em->em_spi = htonl(strtoul(argv[2], NULL, 16));
- em->em_if = 1;
- em->em_dst.s_addr = inet_addr(argv[1]);
- em->em_alg = XF_ESPDES;
- xd = (struct espdes_xdata *)(em->em_dat);
-
- xd->edx_ivlen = 4;
-
-#if 0
-#define max(_a,_b) (((_a)>(_b))?(_a):(_b))
-
- memcpy(&(xd->edx_iv[0]), argv[3], max(strlen(argv[3]), 8));
- memcpy(&(xd->edx_iv[8]), argv[4], max(strlen(argv[4]), 8));
-#endif
-
- for (i = 0; i < 4; i++)
- xd->edx_iv[i] = x2i(&(argv[3][2*i]));
-
- for (i = 0; i < 8; i++)
- xd->edx_iv[i+8] = x2i(&(argv[4][2*i]));
-
- if (write(sd, buf, em->em_msglen) != em->em_msglen)
- perror("write");
-}
-
-
diff --git a/sbin/ipsec/sesp3md5/Makefile b/sbin/ipsec/sesp3md5/Makefile
deleted file mode 100644
index 8c563648aaa..00000000000
--- a/sbin/ipsec/sesp3md5/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# $OpenBSD: Makefile,v 1.1 1997/02/21 23:17:42 niklas Exp $
-
-PROG= sesp3md5
-
-.include <bsd.prog.mk>
diff --git a/sbin/ipsec/sesp3md5/sesp3md5.c b/sbin/ipsec/sesp3md5/sesp3md5.c
deleted file mode 100644
index 61eac67d3e8..00000000000
--- a/sbin/ipsec/sesp3md5/sesp3md5.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * The author of this code is John Ioannidis, ji@tla.org,
- * (except when noted otherwise).
- *
- * This code was written for BSD/OS in Athens, Greece, in November 1995.
- *
- * Ported to OpenBSD and NetBSD, with additional transforms, in December 1996,
- * by Angelos D. Keromytis, kermit@forthnet.gr.
- *
- * Copyright (C) 1995, 1996, 1997 by John Ioannidis and Angelos D. Keromytis.
- *
- * Permission to use, copy, and modify this software without fee
- * is hereby granted, provided that this entire notice is included in
- * all copies of any software which is or includes a copy or
- * modification of this software.
- *
- * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTY. IN PARTICULAR, NEITHER AUTHOR MAKES ANY
- * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
- * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
- * PURPOSE.
- */
-
-#include <sys/param.h>
-#include <sys/file.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <sys/mbuf.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/route.h>
-#include <net/if_dl.h>
-#include <netinet/in.h>
-#include <netns/ns.h>
-#include <netiso/iso.h>
-#include <netccitt/x25.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-
-#include <errno.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <paths.h>
-#include "net/encap.h"
-#include "netinet/ip_ipsp.h"
-#include "netinet/ip_esp.h"
-
-
-#define IFT_ENC 0x37
-
-
-char buf[1024];
-
-int x2i(char *s)
-{
- char ss[3];
- ss[0] = s[0];
- ss[1] = s[1];
- ss[2] = 0;
-
- return strtoul(ss, NULL, 16);
-}
-
-
-main(argc, argv)
-int argc;
-char **argv;
-{
- int sd, len, i;
-
- struct encap_msghdr *em;
- struct esp3desmd5_xencap *xd;
- struct sockaddr_encap *dst, *msk, *gw;
- struct sockaddr_dl *dl;
- u_char *opts;
-
- if (argc != 5)
- fprintf(stderr, "usage: %s dst spi iv key\n", argv[0]), exit(1);
- sd = socket(AF_ENCAP, SOCK_RAW, AF_UNSPEC);
- if (sd < 0)
- perror("socket"), exit(1);
-
- em = (struct encap_msghdr *)&buf[0];
-
- em->em_msglen = EMT_SETSPI_FLEN + ESP3DESMD5_ULENGTH;
- em->em_version = 0;
- em->em_type = EMT_SETSPI;
- em->em_spi = htonl(strtoul(argv[2], NULL, 16));
- em->em_if = 1;
- em->em_dst.s_addr = inet_addr(argv[1]);
- em->em_alg = XF_ESP3DESMD5;
- xd = (struct esp3desmd5_xencap *)(em->em_dat);
-
- xd->edx_ivlen = 0;
- xd->edx_initiator = 1;
- xd->edx_wnd = 32;
- xd->edx_keylen = 8;
-
-#if 0
-#define max(_a,_b) (((_a)>(_b))?(_a):(_b))
-
- memcpy(&(xd->edx_iv[0]), argv[3], max(strlen(argv[3]), 8));
- memcpy(&(xd->edx_iv[8]), argv[4], max(strlen(argv[4]), 8));
-#endif
-
- for (i = 0; i < 8; i++)
- xd->edx_key[i] = x2i(&(argv[4][2*i]));
-
- if (write(sd, buf, em->em_msglen) != em->em_msglen)
- perror("write");
-}
-
-
diff --git a/sbin/ipsec/sgrp/Makefile b/sbin/ipsec/sgrp/Makefile
deleted file mode 100644
index 326ead5e3bf..00000000000
--- a/sbin/ipsec/sgrp/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# $OpenBSD: Makefile,v 1.1 1997/02/21 23:17:48 niklas Exp $
-
-PROG= sgrp
-
-.include <bsd.prog.mk>
diff --git a/sbin/ipsec/sgrp/sgrp.c b/sbin/ipsec/sgrp/sgrp.c
deleted file mode 100644
index 848680ca507..00000000000
--- a/sbin/ipsec/sgrp/sgrp.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * The author of this code is John Ioannidis, ji@tla.org,
- * (except when noted otherwise).
- *
- * This code was written for BSD/OS in Athens, Greece, in November 1995.
- *
- * Ported to OpenBSD and NetBSD, with additional transforms, in December 1996,
- * by Angelos D. Keromytis, kermit@forthnet.gr.
- *
- * Copyright (C) 1995, 1996, 1997 by John Ioannidis and Angelos D. Keromytis.
- *
- * Permission to use, copy, and modify this software without fee
- * is hereby granted, provided that this entire notice is included in
- * all copies of any software which is or includes a copy or
- * modification of this software.
- *
- * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTY. IN PARTICULAR, NEITHER AUTHOR MAKES ANY
- * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
- * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
- * PURPOSE.
- */
-
-#include <sys/param.h>
-#include <sys/file.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <sys/mbuf.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/route.h>
-#include <net/if_dl.h>
-#include <netinet/in.h>
-#include <netns/ns.h>
-#include <netiso/iso.h>
-#include <netccitt/x25.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-
-#include <errno.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <paths.h>
-#include "net/encap.h"
-#include "netinet/ip_ipsp.h"
-
-
-#define IFT_ENC 0x37
-
-
-char buf[1024];
-
-main(argc, argv)
-int argc;
-char **argv;
-{
- int sd, len, nspis;
-
- struct encap_msghdr *em;
- struct espdes_xdata *xd;
- struct sockaddr_encap *dst, *msk, *gw;
- struct sockaddr_dl *dl;
- u_char *opts;
-
- if ((argc < 3) || (argc > 9) || ((argc % 2) != 1))
- fprintf(stderr, "usage: %s dst1 spi1 [ dst2 spi2 [ dst3 spi3 [ dst4 spi4 ] ] ] \n", argv[0]), exit(1);
- nspis = argc / 2;
-
- sd = socket(AF_ENCAP, SOCK_RAW, AF_UNSPEC);
- if (sd < 0)
- perror("socket"), exit(1);
-
- em = (struct encap_msghdr *)&buf[0];
-
- em->em_msglen = 4 + nspis * 12;
- em->em_version = 0;
- em->em_type = EMT_GRPSPIS;
-
- switch (nspis)
- {
- case 4:
- em->em_rel[3].emr_spi = htonl(strtoul(argv[8], NULL, 16));
- em->em_rel[3].emr_dst.s_addr = inet_addr(argv[7]);
- case 3:
- em->em_rel[2].emr_spi = htonl(strtoul(argv[6], NULL, 16));
- em->em_rel[2].emr_dst.s_addr = inet_addr(argv[5]);
- case 2:
- em->em_rel[1].emr_spi = htonl(strtoul(argv[4], NULL, 16));
- em->em_rel[1].emr_dst.s_addr = inet_addr(argv[3]);
- case 1:
- em->em_rel[0].emr_spi = htonl(strtoul(argv[2], NULL, 16));
- em->em_rel[0].emr_dst.s_addr = inet_addr(argv[1]);
- break;
- }
-
-
- if (write(sd, buf, em->em_msglen) != em->em_msglen)
- perror("write");
-}
-
-
diff --git a/sbin/ipsec/shahmac/Makefile b/sbin/ipsec/shahmac/Makefile
deleted file mode 100644
index e6735e96558..00000000000
--- a/sbin/ipsec/shahmac/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# $OpenBSD: Makefile,v 1.1 1997/02/21 23:17:51 niklas Exp $
-
-PROG= shahmac
-
-.include <bsd.prog.mk>
diff --git a/sbin/ipsec/shahmac/shahmac.c b/sbin/ipsec/shahmac/shahmac.c
deleted file mode 100644
index 1dbec2ccd35..00000000000
--- a/sbin/ipsec/shahmac/shahmac.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * The author of this code is John Ioannidis, ji@tla.org,
- * (except when noted otherwise).
- *
- * This code was written for BSD/OS in Athens, Greece, in November 1995.
- *
- * Ported to OpenBSD and NetBSD, with additional transforms, in December 1996,
- * by Angelos D. Keromytis, kermit@forthnet.gr.
- *
- * Copyright (C) 1995, 1996, 1997 by John Ioannidis and Angelos D. Keromytis.
- *
- * Permission to use, copy, and modify this software without fee
- * is hereby granted, provided that this entire notice is included in
- * all copies of any software which is or includes a copy or
- * modification of this software.
- *
- * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTY. IN PARTICULAR, NEITHER AUTHOR MAKES ANY
- * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
- * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
- * PURPOSE.
- */
-
-#include <sys/param.h>
-#include <sys/file.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <sys/mbuf.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/route.h>
-#include <net/if_dl.h>
-#include <netinet/in.h>
-#include <netns/ns.h>
-#include <netiso/iso.h>
-#include <netccitt/x25.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-
-#include <errno.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <paths.h>
-#include "net/encap.h"
-#include "netinet/ip_ipsp.h"
-#include "netinet/ip_ah.h"
-
-
-#define IFT_ENC 0x37
-
-
-char buf[1024];
-
-int x2i(char *s)
-{
- char ss[3];
- ss[0] = s[0];
- ss[1] = s[1];
- ss[2] = 0;
-
- return strtoul(ss, NULL, 16);
-}
-
-
-main(argc, argv)
-int argc;
-char **argv;
-{
- int sd, len, klen, i;
-
- struct encap_msghdr *em;
- struct ahhmacsha1_xencap *xd;
- struct sockaddr_encap *dst, *msk, *gw;
- struct sockaddr_dl *dl;
- u_char *opts;
-
- if (argc != 4)
- fprintf(stderr, "usage: %s dst spi key\n", argv[0]), exit(1);
- sd = socket(AF_ENCAP, SOCK_RAW, AF_UNSPEC);
- if (sd < 0)
- perror("socket"), exit(1);
-
- klen = strlen(argv[3])/2;
-
- em = (struct encap_msghdr *)&buf[0];
-
- em->em_msglen = EMT_SETSPI_FLEN + 4 + AHHMACSHA1_KMAX;
- em->em_version = 0;
- em->em_type = EMT_SETSPI;
- em->em_spi = htonl(strtoul(argv[2], NULL, 16));
- em->em_if = 1;
- em->em_dst.s_addr = inet_addr(argv[1]);
- em->em_alg = XF_AHHMACSHA1;
- xd = (struct ahhmacsha1_xencap *)(em->em_dat);
-
- xd->amx_alen = 20;
- xd->amx_wnd = 32;
-
- bzero(xd->amx_key, AHHMACSHA1_KMAX);
- for (i = 0; i < klen; i++ )
- xd->amx_key[i] = x2i(&(argv[3][2*i]));
-
- if (write(sd, buf, em->em_msglen) != em->em_msglen)
- perror("write");
-}
diff --git a/sbin/ipsec/si4/Makefile b/sbin/ipsec/si4/Makefile
deleted file mode 100644
index 739b693d1aa..00000000000
--- a/sbin/ipsec/si4/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# $OpenBSD: Makefile,v 1.1 1997/02/21 23:17:54 niklas Exp $
-
-PROG= si4
-
-.include <bsd.prog.mk>
diff --git a/sbin/ipsec/si4/si4.c b/sbin/ipsec/si4/si4.c
deleted file mode 100644
index 0b8f1ba30fa..00000000000
--- a/sbin/ipsec/si4/si4.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * The author of this code is John Ioannidis, ji@tla.org,
- * (except when noted otherwise).
- *
- * This code was written for BSD/OS in Athens, Greece, in November 1995.
- *
- * Ported to OpenBSD and NetBSD, with additional transforms, in December 1996,
- * by Angelos D. Keromytis, kermit@forthnet.gr.
- *
- * Copyright (C) 1995, 1996, 1997 by John Ioannidis and Angelos D. Keromytis.
- *
- * Permission to use, copy, and modify this software without fee
- * is hereby granted, provided that this entire notice is included in
- * all copies of any software which is or includes a copy or
- * modification of this software.
- *
- * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTY. IN PARTICULAR, NEITHER AUTHOR MAKES ANY
- * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
- * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
- * PURPOSE.
- */
-
-#include <sys/param.h>
-#include <sys/file.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <sys/mbuf.h>
-#include <sys/sysctl.h>
-
-#include <net/if.h>
-#include <net/route.h>
-#include <net/if_dl.h>
-#include <netinet/in.h>
-#include <netns/ns.h>
-#include <netiso/iso.h>
-#include <netccitt/x25.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-
-#include <errno.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-#include <paths.h>
-#include "net/encap.h"
-#include "netinet/ip_ipsp.h"
-#include "netinet/ip_ip4.h"
-
-#define IFT_ENC 0x37
-
-
-char buf[1024];
-
-main(argc, argv)
-int argc;
-char **argv;
-{
- int sd, len;
-
- struct encap_msghdr *em;
- struct ip4_xencap *xd;
-
- struct sockaddr_encap *dst, *msk, *gw;
- struct sockaddr_dl *dl;
- u_char *opts;
-
- if (argc != 4)
- fprintf(stderr, "usage: %s dst spi ttl\n", argv[0]), exit(1);
- sd = socket(AF_ENCAP, SOCK_RAW, AF_UNSPEC);
- if (sd < 0)
- perror("socket"), exit(1);
-
- em = (struct encap_msghdr *)&buf[0];
-
- em->em_msglen = EMT_SETSPI_FLEN + sizeof(struct ip4_xencap);
- em->em_version = 0;
- em->em_type = EMT_SETSPI;
- em->em_spi = htonl(strtoul(argv[2], NULL, 16));
- em->em_if = 1;
- em->em_dst.s_addr = inet_addr(argv[1]);
- em->em_alg = XF_IP4;
- xd = (struct ip4_xencap *)em->em_dat;
- xd->ip4_ttl = atoi(argv[3]);
-
- if (write(sd, buf, EMT_SETSPI_FLEN + sizeof(struct ip4_xencap)) != EMT_SETSPI_FLEN + sizeof(struct ip4_xencap))
- perror("write");
-}
-
-