| 1 | $Id$ |
|---|
| 2 | This document attempts to explain how to get tcpreplay compiled and running |
|---|
| 3 | under Windows. Please note that this document is a work in progress and |
|---|
| 4 | Windows support in general considered EXPERIMENTAL right now. |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | Background: |
|---|
| 8 | |
|---|
| 9 | Tcpreplay is not a native Win32 application right now. Hence it requires |
|---|
| 10 | Cygwin. (http://www.cygwin.com). Cygwin creates a Linux-like environment |
|---|
| 11 | on your Windows system which allows Linux/UNIX programs to run after a |
|---|
| 12 | recompile. |
|---|
| 13 | |
|---|
| 14 | Tcpreplay supports numerous API's for sending packets depending on the |
|---|
| 15 | operating system. Under Windows, the only supported method of sending |
|---|
| 16 | packets is with WinPcap 4.0. (http://www.winpcap.org) Please be sure to |
|---|
| 17 | install both the WinPcap driver AND the developer pack. |
|---|
| 18 | |
|---|
| 19 | Right now, I've only done testing under Windows XP. My guess is that 2000 |
|---|
| 20 | and 2003 should have no problems. Since WinPcap and Cygwin are EOL'ing |
|---|
| 21 | support for Win98/ME, I doubt that they'll ever be supported. Not sure |
|---|
| 22 | the story on Vista, but I assume WinPcap & Cygwin will support them sooner |
|---|
| 23 | or later if not already. Would love to hear if anyone has any luck one |
|---|
| 24 | way or another. |
|---|
| 25 | |
|---|
| 26 | What you will need: |
|---|
| 27 | |
|---|
| 28 | - Cygwin environment |
|---|
| 29 | - GCC compiler and system header files |
|---|
| 30 | - WinPcap 4.0 DLL |
|---|
| 31 | - WinPcap 4.0 Developer Pack aka WpdPack (headers, etc) |
|---|
| 32 | |
|---|
| 33 | Additional requirements if building from SVN: |
|---|
| 34 | - GNU build chain tools (Autoconf, Automake, Autoheader) |
|---|
| 35 | - GNU Autogen |
|---|
| 36 | |
|---|
| 37 | ******************************* IMPORTANT ****************************** |
|---|
| 38 | Note 1: |
|---|
| 39 | People have reported problems with WpdPack (the developer pack for |
|---|
| 40 | Winpcap) being installed outside of the Cygwin root directory. Hence, I |
|---|
| 41 | strongly recommend you install it under the Cygwin root as /WpdPack. |
|---|
| 42 | |
|---|
| 43 | Note 2: |
|---|
| 44 | There's a big problem with the Cygwin Guile package which breaks |
|---|
| 45 | GNU Autogen which tcpreplay depends on when building from Subversion. |
|---|
| 46 | |
|---|
| 47 | What this means is that to build from Subversion you must do the following: |
|---|
| 48 | - Download GNU Guile from http://www.gnu.org/software/guile/guile.html |
|---|
| 49 | |
|---|
| 50 | - Extract the tarball and do the following: |
|---|
| 51 | libtoolize --copy --force |
|---|
| 52 | ./configure |
|---|
| 53 | make |
|---|
| 54 | make install |
|---|
| 55 | |
|---|
| 56 | This will install guile in /usr/local. |
|---|
| 57 | |
|---|
| 58 | The other problem is that guile-config returns the linker flags in the wrong |
|---|
| 59 | order. To fix this, rename /usr/local/bin/guile-config to |
|---|
| 60 | /usr/local/bin/guile-config.original and create a new shell script in it's |
|---|
| 61 | place: |
|---|
| 62 | |
|---|
| 63 | ---- BEGIN SHELL SCRIPT ---- |
|---|
| 64 | #!/bin/bash |
|---|
| 65 | # Replacement /usr/local/bin/guile-config script |
|---|
| 66 | if test -z "$1" ; then |
|---|
| 67 | guile-config.original |
|---|
| 68 | elif test "$1" == "link"; then |
|---|
| 69 | echo "-L/usr/local/lib -lguile -lltdl -lgmp -lcrypt -lm -lltdl" |
|---|
| 70 | else |
|---|
| 71 | guile-config.original $1 |
|---|
| 72 | fi |
|---|
| 73 | ---- END SHELL SCRIPT ---- |
|---|
| 74 | |
|---|
| 75 | ******************************* IMPORTANT ****************************** |
|---|
| 76 | |
|---|
| 77 | Directions: |
|---|
| 78 | - Install all the requirements |
|---|
| 79 | |
|---|
| 80 | - Enter into the Cygwin environment by clicking on the Cygwin icon |
|---|
| 81 | |
|---|
| 82 | - If you checked out the code from SVN, see Note 2 above and then run |
|---|
| 83 | the autogen.sh bootstrapper: |
|---|
| 84 | ./autogen.sh |
|---|
| 85 | |
|---|
| 86 | - Configure tcpreplay: |
|---|
| 87 | ./configure --enable-debug |
|---|
| 88 | |
|---|
| 89 | - Build tcpreplay: |
|---|
| 90 | make |
|---|
| 91 | |
|---|
| 92 | - Install: |
|---|
| 93 | make install |
|---|
| 94 | |
|---|
| 95 | - Try it out! |
|---|
| 96 | |
|---|
| 97 | |
|---|
| 98 | |
|---|