[pox-dev] how to specify wildcards in ofp_match.from_packet()?
William Emmanuel Yu
wyu at ateneo.edu
Mon Sep 24 01:51:13 PDT 2012
Hello all,
I am trying to optimize the flows created in the of_tutorial example.
Here is some code for a learning switch.
port = self.mac_to_port[str(packet.dst)]
msg = of.ofp_flow_mod()
msg.match = of.ofp_match.from_packet(packet)
msg.idle_timeout = 10
msg.hard_timeout = 30
msg.actions.append(of.ofp_action_output(port = port))
msg.buffer_id = packet_in.buffer_id
self.connection.send(msg)
I want to be able to do something like this.
msg.match = of.ofp_match.from_packet(packet,
wildcards = OFPFW_DL_DST)
The wildcard OFPFW_DL_DST only matches the destination ethernet address.
This way the flow is more generic so any packet to that particular
destination ethernet address in the switch does not generate a PacketIn.
Currently, the ofp_match.from_packet() function does not accept
wildcards. As a matter of fact, I can't seem to find the appropriate
function that allows us to define wildcards. Additionally, wildcards
such as OFPFW_DL_DST or OFPFW_ALL are not global and accessible in my
code.
I not sure if this is the best way to do this but I bumped into the idea
while looking at the OF 1.0 specification. Any suggestions?
--
-------------------------------------------------------
William Emmanuel S. Yu, Ph.D. (杨怀义)
Department of Information Systems and Computer Science
Ateneo de Manila University
email : wyu at ateneo dot edu
blog : http://hip2b2.yutivo.org/
web : http://CNG.ateneo.edu/cng/wyu/
phone : +63(2)4266001 loc. 4186
GPG : http://CNG.ateneo.net/cng/wyu/wyy.pgp
Confidentiality Issue: This message is intended only for the use of the
addressee and may contain information that is privileged and
confidential. If you are not the intended recipient, you are hereby
notified that any use or dissemination of this communication is strictly
prohibited. If you have received this communication in error, please
notify us immediately by reply and delete this message from your system.
More information about the pox-dev
mailing list