
Introduction
============

 The examples in this directory illustrate how to forward packets between
 network ports.


trivial_bridge.py
=================

 This example simply connects ports together in pairs.  Each command line
 argument is a pair of interfaces that are connected together with a
 uni-directional channel.  You can connect two interfaces together with a
 bi-directional channel like this:

   ./trivial_bridge.py eth1:eth2 eth2:eth1


bpf_firewall.py
===============

 This example implements a very simple firewall.  It forwards packets from
 one network interface to another, discarding packets that match a filter
 specified with BPF syntax.

 The following example forwards packets from eth1 to eth2, blocking TCP
 packets to/from port 80.

   ./bpf_firewall.py eth1 eth2 "tcp port 80"


reflect.py
==========

 This example shows how packets can be modified before they are forwarded.
 It uses the 'reflect' node from the 'extensions_api' sample to swap the
 MAC addresses of received packets, and sends them back out of the
 interface they were received on.

 SolarCapture needs to know where to find the 'reflect' node, so you need
 to set the SC_NODE_PATH environment variable.  Don't forget to build the
 'reflect' node first!

   export SC_NODE_PATH=$(cd ../extensions_api/ && /bin/pwd)
   ./reflect.py eth2
