Readme file for raw recv/xmit tool	           ZG/MJ/KJC (readme.txt - 01/29/09)
----------------------------------             Updated 02/10/11 by KJC

This is the readme.txt file for the raw recv/xmit toolkit. The raw recv/xmit
tool uses WinPcap 4.02 interface [1]. This product includes software developed
by the Politecnico di Torino, and its contributors.

The following files constitute this toolkit:

  \Include - - - - - - - - Folder with Pcap header files
  \Lib - - - - - - - - - - Folder with Pcap libraries
  bridge.c - - - - - - - - One-way bridge in a PC
  demo.c - - - - - - - - - Demo program for raw functions
  interfaces.c - - - - - - Program to list the interfaces of a PC
  rawstuff.c - - - - - - - Functions for raw init, send, recv, and close
  readme.txt - - - - - - - This file
  WinPcap_4_0_2.exe  - - - Winpcap libraries

CONFIGURATION:

In order to compile and run demo.c, the minGW gcc compiler is needed.  This
program has not been tested using BCC or another compiler. Besides that,
libraries from WinPcap are needed. To configure those files, do the following:

Step 1: Run and install the WinPcap_4_0_2.exe file, which contains the WinPcap
        libraries. If you have a new version (greater than 4.0.2) do not
        install. Cold boot the PC.

Step 2: Compile and run interfaces.c as directed in the header of the program

Step 3: Run executable of interfaces.c to list the interfaces to see the
        indexes the demo.c program should use to refer to the interfaces

Step 4: Compile and run demo.c as directed in the header of the program
        (and see also below).

EXECUTION INSTRUCTIONS:

First execute interfaces.exe. Typical output is:

  ----------------- Begin of program -------------------------
  Available devices (Interface #. Name (Description))

  1. rpcap://\Device\NPF_GenericDialupAdapter (Network adapter 'Adapter for
  generic dialup and   VPN capture' on local host)

  2. rpcap://\Device\NPF_{A5D31E6D-DDF3-4B35-AC85-39279DF56400} (Network
  adapter 'Intel(R)   PRO/100 VE Network Connection (Microsoft's Packet
  Scheduler) ' on local host)

  ---------------------- End of program ----------------------

Change the #define INTER_RXTX in demo.c to the appropriate interface
number. Then build and execute demo.exe.  Typical output is:

  Initializing all devices ...
  -> Opening rpcap://\Device\NPF_GenericDialupAdapter
  -> Opening rpcap://\Device\NPF_{A5D31E6D-DDF3-4B35-AC85-39279DF56400}
  -> Opening rpcap://\Device\NPF_{108995FD-5606-444E-9DA6-E9B3396202F2}
  Sending through 2...
  Receiving from 2 ...
  Received packet (first 20 bytes of 1514) = 0101030507AA112233445566000
  1020304050607
  Closing all the adapters ...

See header of demo.c and rawstuff.c for more environment details.

REFERENCES:

[1] "WinPcap: the Free Packet Capture Architecture for Windows", July 2001.
    URL: http://www.winpcap.org/default.htm.

NOTES:

A flag called PCAP_OPENFLAG_NOCAPTURE_LOCAL can be used to open an interface
with the option of dropping the packets sent by itself. This is useful for a
two-way bridge (the bridge.c code is one-way only)

---
