Hi, Nicholas
Do you mean that you would like to get source/dest mac from the packet
"via REST API" ?
If so, ryu.app.ofctl_rest does not provide such a feature.
In general terms, you can get source/dest mac of the packet by receiving
Packet-In from switches.
Packet-In contains a ethernet frame, so you can get source/dest mac by
decoding it.
Here is a sample application:
https://github.com/osrg/ryu/blob/master/ryu/app/simple_switch_13.py
In switch_features_handler(), the app install flows to let switches send
Packet-In.
In _packet_in_handler(), it decodes ethernet frames for receiving Packet-In,
and get source/dest mac from it.
I think it is good to do this tutorial, too.
https://osrg.github.io/ryu-book/en/html/switching_hub.html
You can learn how the sample app works from this.
Thanks,
Fujimoto
On 2017年08月02日 15:37, Nicholas Brasini wrote:
Thank you for reply! I would like to know what host is the sender of
packet and what is the destination.
For example:
I launch h1 ping h2 (I have only switch, s1).
I would like to have:
-source: 00:00:00:00:00:01 (h1)
-dest: 00:00:00:00:00:02 (h2)
I don't care ports. Is there possibility to obtain those data?
Thanks
Inviato da iPhone
Il giorno 02/ago/2017, alle ore 03:06, "Fujimoto Satoshi"
<satoshi.fujimo...@gmail.com <mailto:satoshi.fujimo...@gmail.com>> ha
scritto:
Hi, Nicholas
What you want to know is the meanings of these field in 'Add a flow
entry' API, right?
http://ryu.readthedocs.io/en/latest/app/ofctl_rest.html#add-a-flow-entry
'in_port' is used in 'match' field. It specifies an incoming port.
If 'in_port' is specified to 2, the flow matches the packet which
comes from port 2.
And 'OUTPUT' action is simply to send a packet from specific port.
If 'OUTPUT: 2' is specified in 'action' field, the matched packet
will be sent from port 2.
These are defined in 'A.2.3.7 Flow Match Fields' and 'A.2.5 Action
Structures' in OpenFlow Spec:
https://www.opennetworking.org/images/stories/downloads/sdn-resources/onf-specifications/openflow/openflow-spec-v1.3.1.pdf
Sorry, I could not make clear what "host destination" and "host
sender" are referring to.
Did you see these word in Ryu documentation or any other document?
Thanks,
Fujimoto
On 2017年08月01日 18:01, Nicholas Brasini wrote:
Hi guys! I don't understand what means the field 'actions: OUTPUT'
and 'in_port' in REST Ryu. I would like to know what is the host
destination and the host sender. Thank a lot!
Nicholas
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites,Slashdot.org <http://Slashdot.org>!http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel
------------------------------------------------------------------------------
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
------------------------------------------------------------------------------
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