Re: [nox-dev] question integrating another app in pyswitch

2011-03-28 Thread Murphy McCauley
It's not allowed, but it shouldn't be a problem. Only one callback will be called at a time, so you may not need any sort of lock at all. If you do need something (because the data structure is in some limbo state between callbacks), you can just use a variable as a flag. -- Murphy On Mar 28

Re: [nox-dev] packet_in_event

2011-03-28 Thread Ali Al-Shabibi
Hi! > > *My first question is that when a packet_in_event is received by the > controller, the 'inport' parameter designs the port of controller that > received the packet from the switch or the port of the switch that received > the packet. > The inport parameter designates the port on which

[nox-dev] packet_in_event

2011-03-28 Thread karim torkmen
Hi all, I have some problem to understand some conditions in the nox example 'pyswitch'. *My first question is that when a packet_in_event is received by the controller, the 'inport' parameter designs the port of controller that received the packet from the switch or the port of the switch th

Re: [nox-dev] some confusions about the inport parameter

2011-03-28 Thread karim torkmen
Thanks Kyriakos :) In fact, my confusion came from the fact that the inport is got from registering to the packet_in event. So when you register you get the inport, however this inport is used for two different cases. So, in the case where the inport is got from registering to the packet_in eve

Re: [nox-dev] question integrating another app in pyswitch

2011-03-28 Thread Vishal
Thanks Murphy. I add a timer based call back mechanism, as you suggested, to schedule sending data on socket. Just wanted to confirm one more thing: Is creating my own lock using thread.allocate_lock() allowed or not ? Since, you mentioned thread is not allowed. I have a data structure which is

Re: [nox-dev] some confusions about the inport parameter

2011-03-28 Thread Kyriakos Zarifis
Hi Karim, 'inport' actually refers to a different thing in each case: * send_openflow(dpid, bufid, buf, openflow.OFPP_FLOOD, inport) > send_openflow is used to inject a packet in the network, and send it out the 'dpids's port(s) described the 4th parameter. The switch should treat the packet as

Re: [nox-dev] links capacities tracking

2011-03-28 Thread Kyriakos Zarifis
Hi Harry, if you use the destiny branch, the GUI there offers some relevant functionality. The main idea is that the 'monitoring' component periodically polls statistics from switches, including traffic sent/received. One of the things it does is that it tries to estimate the current utilization b

[nox-dev] some confusions about the inport parameter

2011-03-28 Thread karim torkmen
Hi, I am a little bit confused about the inport parameter in : * send_openflow(dpid, bufid, buf, openflow.OFPP_FLOOD, inport) And in: * install_datapath_flow(dpid, flow, 5, 0, actions, bufid, openflow.OFP_DEFAULT_PRIORITY, inport, packet) Do they design the port of communication between the co

[nox-dev] links capacities tracking

2011-03-28 Thread Harry
Hi all, Do you have any idea how can I track the capacity of a link in mininet and the total traffic passing through that link? Thanks in advance! ___ nox-dev mailing list nox-dev@noxrepo.org http://noxrepo.org/mailman/listinfo/nox-dev

Re: [nox-dev] question integrating another app in pyswitch

2011-03-28 Thread Murphy McCauley
Using threads from within Python in NOX is basically out. You have a number of other options. If you just want to do something every second, maybe you can get away with using your socket code and just scheduling a timer callback (pyswitch does this to expire entries). You will have to be some

[nox-dev] question integrating another app in pyswitch

2011-03-28 Thread Vishal
Hi All, in the "install" function of pyswitch - I am starting a thread [thread.start_new_thread ()], which makes a socket connection to another server and sends some data every 1 second. I am observing that the thread is started but cannot send the data every 1 second... it is not scheduled for 5

Re: [nox-dev] some explanations about the pyswitch code

2011-03-28 Thread Murphy McCauley
Hi. Hopefully I can shed some light... 1: The least significant bit in the most significant byte of an ethernet address indicates whether it's a multicast address. If it is, we don't attempt to learn it. 2: dst isn't a string. According to something like line 62, dst is… dst = inst.st[dpid

[nox-dev] some explanations about the pyswitch code

2011-03-28 Thread karim torkmen
Hi all, I am starting with openFlow and nox. As starting example I am trying to understand the pyswitch code. However, there are some lines of code that are not very clear to me. Those lines are : 1- if ord(srcaddr[0]) & 1: what is really meant by this condition ? 2- dst[0] != inport: why shou