Events are generally just passed a single event object.  If you look in core.py 
and util.py, you'll see that register_packet_in() wraps your handler in a 
handler of its own made by gen_packet_in_cb().  As I mentioned, this wrapper 
returns CONTINUE if your own handler doesn't return anything.  The OTHER thing 
it does is to unpack the single event object argument into separate arguments 
before calling your handler.

So long story short, your handler should look something like:

def Host_auth_handler (event):
  print event.datapath_id, event.port, event.reason

The full list of fields for the event can be seen in the event converter in 
nox/netapps/authenticator/auth.i 

-- Murphy

On Apr 28, 2011, at 10:23 AM, karim torkmen wrote:

> The problem is that I am expecting the event handler to have the following 9 
> entries:
> Host_auth_event(datapath_id_,  port_,dladdr_,  nwaddr_, ihostname_, 
> host_netid_, idle_timeout_, hard_timeout_,  reason_);
> 
> Can you please tell me what should I do exactly to have those entries to my 
> handler like for example the case of register_packet_in which passes for 
> example dpid etc. to the handler
> Thanks a lot.
> 
> On 04/28/2011 06:59 PM, Murphy McCauley wrote:
>>  some of the really common events have helpers to register your handlers 
>> (e.g., register_for_packet_in()) which wrap the function you give them.  The 
>> wrappers return CONTINUE if you do
> 

_______________________________________________
nox-dev mailing list
[email protected]
http://noxrepo.org/mailman/listinfo/nox-dev

Reply via email to