Hello,
I actually managed to solve all previous problems.
Right now, I am stuck with this error :

Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/mininet/ryu/ryu/app/C1.py", line 226, in foo
    out = parser.OFPPacketOut(datapath=datapath, buffer_id=buffer_id,
NameError: global name 'datapath' is not defined

In my situation, I have no request, thereby I have no " datapath '

Do you know how to work around this ?
can I use dpid to get the datapath ?

Thanks a lot
A.Soliman





From: Soliman Awad Alshra´a Abdullah TU Ilmenau 
[mailto:abdullah.alsh...@tu-ilmenau.de]
Sent: Monday, May 7, 2018 1:11 PM
To: ryu-devel@lists.sourceforge.net
Subject: [Ryu-devel] forcing (Packet-In) to send instructions

Dears,

Can I force (Packet-In) to send instructions to a specific switch without any 
request from the switches ?.

For instance, I intend to create a component which sends a dictionary contains 
{Source, Destination, In_port, data path_id} or  assigning a value.
                 src = rdata[1] # 00:00:00:00:00:01
                 dst = rdata[2] # 00:00:00:00:00:04
                 dpid = 256
                 in_port = 1

                  #self.logger.info("packet in %s %s %s %s", dpid, src, dst, 
in_port)

                  # learn a mac address to avoid FLOOD next time.
                  self.mac_to_port[dpid][src] = in_port

but I got the next error

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/mininet/ryu/ryu/app/C1.py", line 199, in foo
    self.mac_to_port[dpid][src] = in_port
KeyError: 256


your help would be highly appreciated.

Best Regards
A. Soliman



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to