nmeta module¶
This is the main module of the nmeta suite running on top of Ryu SDN controller to provide network identity and flow (traffic classification) metadata . Do not use this code for production deployments - it is proof of concept code and carries no warrantee whatsoever. You have been warned.
-
class
nmeta.
NMeta
(*args, **kwargs)¶ Bases:
ryu.base.app_manager.RyuApp
,baseclass.BaseClass
This is the main class used to run nmeta
-
OFP_VERSIONS
= [1, 4]¶
-
_CONTEXTS
= {'wsgi': <class 'ryu.app.wsgi.WSGIApplication'>}¶
-
_add_flow
(ev, in_port, out_port, out_queue)¶ Add a flow entry to a switch Prefer to do fine-grained match where possible
-
_port_status_handler
(ev)¶ Switch Port Status event
-
desc_stats_reply_handler
(ev)¶ Receive a reply from a switch to a description statistics request
-
error_msg_handler
(ev)¶ A switch has sent us an error event
-
flow_removed_handler
(ev)¶ A switch has sent an event to us because it has removed a flow from a flow table
-
packet_in
(ev)¶ This method is called for every Packet-In event from a Switch. We receive a copy of the Packet-In event, pass it to the traffic classification area for analysis, work out the forwarding, update flow metadata, then add a flow entry to the switch (when appropriate) to suppress receiving further packets on this flow. Finally, we send the packet out the switch port(s) via a Packet-Out message, with appropriate QoS queue set.
-
switch_connection_handler
(ev)¶ A switch has connected to the SDN controller. We need to do some tasks to set the switch up properly such as setting it’s config for fragment handling and table miss packet length and requesting the switch description
-
-
nmeta.
ipv4_text_to_int
(ip_text)¶ Takes an IP address string and translates it to an unsigned integer