www.pudn.com > dynamics-windows-bin-0.8.4.zip > README.Windows


$Id: README.Windows,v 1.8 2001/10/19 17:37:38 jm Exp $

Dynamics - HUT Mobile IP
Dynamic and Hierarchical IP Tunneling System
Copyright (C) 1998-2001 Dynamics group (Björn Andersson, Dan Forsberg,
	Jari Hautio, Jouni Malinen, Kimmo Mustonen, Tom Weckström)



Notes on using Windows port of Dynamics Mobile Node
===================================================

Please note that this version of the Windows port is not thoroughly
tested and it may still have numerous errors. For example, the code
has support for only one network interface. In addition, only FA
decapsulation is supported in this version. The code should support
Windows 98, Windows ME, Windows NT, and Windows 2000. However, it has
been only briefly tested with Windows 98 and NT.  Registration and
data transmission has succeeded with Windows NT (sp5).

Dynamics MN for Windows requires Cygwin library (from
http://www.cygwin.com/) and WinPcap (from
http://netgroup-serv.polito.it/winpcap/). These must be installed
before MN binaries can be run or compiled.

WinPcap needs to be installed also on the host that is only running
(i.e., not compiling) the code, but full Cygwin installation is needed
only for compiling. However, couple of DLLs from Cygwin package
(cygwin1.dll, cygreadline5.dll, cygncurses5.dll) must be available
when running Dynamics MN on Windows. These are available as an extra
ZIP packet for easier installation.

dynmn_tool can be used to control Dynamics MN and to get information
about the current state of the MN daemon.


Native compiling
----------------

Mobile Node can be compiled natively using cygwin on Windows; see
http://www.cygwin.com/ for instructions on how to install cygwin.  You
will also need to install winpcap development package to compile
Dynamics. Please check below, how to compile a working winpcap library
for building Dynamics (default distribution seems to include extra
copy of getopt, which cannot be linked with cygwin).

Dynamics can be compiled with following commands:

cd dynamics-0.?.?
./configure --with-onlymn
make

If winpcap include file (pcap.h) and library (libwpcap.a) are not in
default location, you will need to tell the paths to configure script
with --with-winpcap-includes and --with-winpcap-libraries arguments,
e.g., with folloging command:

./configure --with-onlymn \
	--with-winpcap-includes=/usr/local/winpcap/include \
	--with-winpcap-libraries=/usr/local/winpcap/lib


Cross-compiling
---------------

Mobile Node for Windows can be compiled with a cross-compiler. You
need to have installed cross-compiler for cygwin32 target. Dynamics
can be compiled with, e.g., following commands running on Linux:

cd dynamics-0.?.?
./configure --host=i686-pc-linux-gnu --target=i386-pc-cygwin32 --with-onlymn
make

Depending on your cross-compiler configuration, you may need to
specify the location of 'gcc', 'ar', and 'ranlib' by changing the
'configure' execution:

cd dynamics-0.?.?
RANLIB=/usr/local/i386-pc-cygwin32/bin/i386-pc-cygwin32-ranlib \
AR=/usr/local/i386-pc-cygwin32/bin/i386-pc-cygwin32-ar \
CC=gcc-win ./configure --host=i686-pc-linux-gnu --target=i386-pc-cygwin32 \
	--with-onlymn
make



Building working WinPcap
------------------------

Default distribution of WinPcap (at least v2.2) seems to include extra
copy of getopt, which cannot be linked with cygwin. This needs to be
removed before Dynamics MN can be linked. Following steps can be used
to build a working version of the library.

Fetch winpcap source code from
http://netgroup-serv.polito.it/winpcap/install/bin/WPcapSrc.zip
and unzip that file:

unzip WPcapSrc.zip
cd winpcap/packetNtx/DLL/Project
	(or ../Packet9x/..)
make
	(this will build Packet.a that is needed later)
cd ../../../wpcap/PRJ

Remove getopt related items from GNUmakefile and WPCAP.DEF. Following
diffs include the lines that need to be removed:

--- GNUmakefile.ORIG	Sun Sep 30 13:22:28 2001
+++ GNUmakefile	Sun Sep 30 13:23:12 2001
@@ -42,7 +42,6 @@
 	../libpcap/Win32/Src/getaddrinfo.o \ 
 	../libpcap/Win32/Src/getnetbynm.o \ 
 	../libpcap/Win32/Src/getnetent.o \ 
-	../libpcap/Win32/Src/getopt.o \ 
 	../libpcap/Win32/Src/getservent.o \ 
 	../libpcap/grammar.o \ 
 	../libpcap/inet.o \ 

--- WPCAP.DEF.ORIG	Sun Sep 30 13:22:23 2001
+++ WPCAP.DEF	Sun Sep 30 13:23:26 2001
@@ -42,7 +42,3 @@
 		endservent 
 		getservent 
 		eproto_db 
-		optind 
-		optarg 
-		getopt 
-		opterr 

If you built 9x version of Packet.a, you will also need to set SYSTYPE
to "9x" in GNUmakefile (i.e., comment NT and uncomment 9x).

Build winpcap library with modified files:

make
(this build ../lib/libwpcap.a)


Install required files (set WPCAP to proper directory):

WPCAP=~/wpcap
mkdir -p $WPCAP/include/net $WPCAP/lib
cd ..
cp LIB/libwpcap.a $WPCAP/lib
cp libpcap/pcap.h $WPCAP/include
cp libpcap/bpf/net/bpf.h $WPCAP/include/net


After this you should have working WinPcap library and includes files
for Dynamics building. Remember to add following arguments for configure:
	--with-winpcap-includes=$WPCAP/include
	--with-winpcap-libraries=$WPCAP/lib