The Libreswan IKE daemon has been ported to work on CYGWIN32.

It presently has no kernel component, so it is useful only to those who want
to do some kind of testing using IKE using a Windows 2000/XP platform.

It assumed that a CYGWIN32 compiler environment exists.

The code cross compiles, and has passed approximately 90% of our test
cases as of this time.

The major change is that the IKE daemon ("pluto") normally discovers
it's list of interfaces and local IP addresses automatically. That code
does not port well, so for the moment, we require manual configuration
in ipsec.conf. See the "ipsec.win2k.conf" file in the
programs/_confread/ipsec.win2k.conf in the source tree.

You may need to do:
    mount -f -u -b "C:/cygwin/local" "/usr/local"

to mark the /usr/local area as executable for cygwin.

You need to install GNU AWK, GNU SED, to run.

You will need a program, "logger" installed into /bin:

bash-3.00$ cat /bin/logger
#!/bin/sh

while [ $# -gt 0 ]
do
        opt=$1; shift;
        case $opt in
        -s) ;;
        -p) shift;;
        -t) shift;;
        esac
done

if [ $# -gt 0 ]
then
        echo "$@"
else
        cat -
fi
exit 0

bash-3.00$ chmod +x /bin/logger

To start up libreswan, you can do:

bash-3.00% ipsec setup start

note that "ipsec setup stop" does not quite function as yet. The "ps"
program does not quite behave.

To BUILD
========

Extract the tar.gz file in some place that is convenient.

Type "make programs"
Type "make install"

You will need appropriate tools installed on cygwin:

Package              Version            Status
bash                 3.0-11             OK
binutils             20050610-1         OK
bison                20030307-1         OK
bzip2                1.0.3-1            OK
crypt                1.1-1              OK
findutils            20041227-1         OK
flex                 2.5.4a-3           OK
gawk                 3.1.5-1            OK
gcc                  3.4.4-1            OK
gcc-core             3.4.4-1            OK
gcc-g++              3.4.4-1            OK
gdb                  20041228-3         OK
gmp                  4.1.4-2            OK
grep                 2.5.1a-2           OK
groff                1.18.1-2           OK
gzip                 1.3.5-1            OK
make                 3.80-1             OK
man                  1.5p-1             OK
minires              1.00-1             OK
minires-devel        1.00-1             OK
sed                  4.1.4-1            OK
sharutils            4.3.80-1           OK
swig                 1.3.24-1           OK
tar                  1.13.25-7          OK
tcltk                20030901-1         OK
zip                  2.3-6              OK
zlib                 1.2.2-2            OK


TESTING
=======

To run the tests:
   0) add the following IP aliases:
	  128.95.7.1
	  128.95.7.2
	  128.95.7.3
	  128.95.7.4

      (On Linux we added 127... but Windows won't let us do that)
      You will only to do this once.

   1) start up a cygwin bash shell
      set MYBOX to source tree
   	cd /0g/sandboxes/win2k
	MYBOX=`pwd` export MYBOX

   2) sh $MYBOX/testing/pluto/pluto-unit-01/pluto_unit_tests.sh

