control WANproxy through python openflow controller.

Boxiang Pan aquarypbx at
Tue Feb 19 00:47:20 PST 2013

Hi, Juli,

We really appreciate your quick reply. Yes, it will be very helpful for us
if you could provide sample code for creating a proxy instance with C++,
and the interface code where we may use python to call.  I don't really
understand what you mean by "simple binary protocol over TCP, inject
configuration over TCP", do you mean sending the conf files over TCP to
WANProxy instances?

For now, I think starting wanproxy from python is enough for us, we don't
need to worry about control at this time.

*Details about our code flow:*

So we have a open flow controller that runs on a VM and rest of the
networks can be tenants (or clients). Clients establish a tcp connection
and send a service request via configuration file over TCP to the
controller describing the type of functionality they want to avail (in our
case its WANProxy) and also will tell a network path (or a set of switches)
over which client wants the reservations to be made. This request is
handled by an allocator which takes all the parameters from config file,
passes the control to a module(we have to implement this) which will need
to communicate with WANProxy (already installed on the switches in network
path) and make the necessary reservations. Once this set up is done, we
will repeatedly send same large file to measure the performance of WANProxy.

What interface code do you think might be necessary?

Thank you very much.

On Sun, Feb 17, 2013 at 4:56 PM, Juli Mallett <juli at>wrote:

> Boxiang,
> Very excited to hear about your project.
> Really, if you're willing to write some bindings for the C++ code,
> it's probably better to entirely do without the configuration system
> if you're at all interested in scripting WANProxy.
> You would want to look at the ProxyListener and SSHProxyListener
> classes right now; creating one of those is what creates a proxy
> instance, and then you need only call 'event_main()' to get things off
> and running.  I can provide sample code for creating a proxy instance
> (SSH or otherwise) with C++ code instead of a config file if that
> would be helpful for you.
> The drawback to that is that if I change anything in WANProxy, there's
> a possibility that your bindings would need updated.  I could also
> provide a simple binary protocol over TCP for creating proxy
> instances, or even set up a listener that allows one to inject
> configuration over TCP.
> Control is a trickier question.  Right now there's little in the way
> of statistics and reporting; you can't even easily get a list of
> current connections being proxied.  What kinds of control do you need?
>  It may be that I can point you to something that's working right now,
> or it may be that I need to add some code to provide an interface for
> your project.
> Thanks,
> Juli.
> On Sun, Feb 17, 2013 at 1:00 PM, Boxiang Pan <bopan at> wrote:
> > Hi,
> >
> > We are a group of graduate students from UCSD, and we are working on a
> class
> > project using WANProxy. Our goal is to be able to start and control
> WANProxy
> > from an openflow based controller written in python. We already have the
> > openflow controller in python, and we would like to let it "talk" to
> > WANProxy. So instead of directly type "wanproxy -c client.conf" in the
> > terminal, we hope to type in a command in the openflow controller, and
> then
> > let it start/control the WANProxy. We'd appreciate it very much if you
> could
> > give us some guideline on how to integrate WANProxy with openflow
> > controller, specifically which parts of the code in WANProxy are the
> > interface/API that we should study? And what is the best tool to wrap
> > WANProxy into python?
> >
> > Thank you for your help and suggestions.
> >
> > --
> >
> > Boxiang Pan
> >
> --
> Boxiang Pan
> Department of Electrical and Computer Engineering
> University of California, San Diego
> Tel: 858-999-7655
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the wanproxy mailing list