Skip to content

Instantly share code, notes, and snippets.

@oraccha
Created September 22, 2011 06:59
Show Gist options
  • Save oraccha/1234219 to your computer and use it in GitHub Desktop.
Save oraccha/1234219 to your computer and use it in GitHub Desktop.
trema: pass --unixctl option to ovs-openflowd
diff --git a/ruby/trema/open-vswitch.rb b/ruby/trema/open-vswitch.rb
index 37341e0..ed0a2ca 100644
--- a/ruby/trema/open-vswitch.rb
+++ b/ruby/trema/open-vswitch.rb
@@ -195,6 +195,7 @@ module Trema
"--verbose=ANY:console:err",
"--log-file=#{ log_file }",
"--datapath-id=#{ dpid_long }",
+ "--unixctl=#{ unixctl }",
] + ports_option
end
@@ -233,6 +234,18 @@ module Trema
def log_file
"#{ Trema.tmp }/log/openflowd.#{ @name }.log"
end
+
+
+ #
+ # The path of control socket
+ #
+ # @return [String]
+ #
+ # @api private
+ #
+ def unixctl
+ "#{ Trema.tmp }/ovs-openflowd.#{ $$ }.ctl"
+ end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment