[pox-dev] Pox CLI namespace

William Emmanuel S. Yu wyu at ateneo.edu
Thu Oct 4 00:48:09 PDT 2012


Ah I want to share the namespace so best I use the core.Interactive.variables mechanism. So best I wrap my firewall table and helper functions in an object. Then I instanciate it in the of.firewall module then add it to core.Interactive.variables. I guess that should work?
------Original Message------
From: pox-Murphy McCauley
To: aaa-William Yu
Cc: pox-dev
Subject: Re: [pox-dev] Pox CLI namespace
Sent: Oct 4, 2012 3:43 PM

Well, you can always "import" your module.
Additionally, the POX core object is available as "core", so if you put your component there, you can easily get it.
You can also add whatever variables you want by adding them to core.Interactive.variables.  Check the launch() function of arp_responder for an example.

-- Murphy

On Oct 4, 2012, at 12:39 AM, William Emmanuel S. Yu wrote:

> I ran pox with a CLI using "./pox.py py" and the appropriate module. When I am in the commandline problem I don't get the namespace of my module. I want to be able to run functions in this command line that I defined in my module.
> 
> For example, I created a ShowTable() in my module of.firewall. I want to be able to run that function in the CLI.
> 
> I am actually writing a "inefficient" firewall with functions used to modify my firewall permissions table.
> 
> Thank you!
> "Sent on the move."



"Sent on the move."


More information about the pox-dev mailing list