README.md in trema-0.4.2 vs README.md in trema-0.4.3
- old
+ new
@@ -29,11 +29,11 @@
* Ruby 1.8.7 or higher
* RubyGems 1.3.6 or higher
* Ubuntu 13.04, 12.10, 12.04, 11.10, and 10.04 (i386/amd64, Desktop Edition)
* Debian GNU/Linux 7.0 and 6.0 (i386/amd64)
-* Fedora 16 (i386/x86_64)
+* Fedora 16-19 (i386/x86_64)
It may also run on other GNU/Linux distributions but is not tested and
NOT SUPPORTED at this moment.
@@ -51,14 +51,14 @@
(In Ubuntu or Debian GNU/Linux)
$ sudo apt-get install gcc make ruby rubygems ruby-dev libpcap-dev libsqlite3-dev libglib2.0-dev
(In Ubuntu 10.04)
$ sudo apt-get install gcc make ruby rubygems ruby-dev libopenssl-ruby libpcap-dev libsqlite3-dev libglib2.0-dev
- $ sudo gem install rubygems-update --version 2.0.8
+ $ sudo gem install rubygems-update
$ sudo /var/lib/gems/1.8/bin/update_rubygems
- (In Fedora 16)
+ (In Fedora 16-19)
$ sudo yum install gcc make ruby rubygems ruby-devel libpcap-devel libsqlite3x-devel glib2-devel
2.Install Trema at the command prompt:
$ sudo gem install trema
@@ -92,16 +92,16 @@
class MyController < Controller
# handle Packet-In messages here.
def packet_in datapath_id, message
# ...
end
-
+
# handle Flow-Removed messages here.
def flow_removed datapath_id, message
# ...
end
-
+
# ...
end
```
* [switch_ready(datapath_id)](http://rubydoc.info/github/trema/trema/master/Trema/Controller:switch_ready)
@@ -129,11 +129,11 @@
def packet_in datapath_id, message
# ...
send_flow_mod_add( datapath_id, ... )
send_packet_out( datapath_id, ... )
end
-
+
# ...
end
```
* [send_flow_mod_add(datapath_id, options)](http://rubydoc.info/github/trema/trema/master/Trema/Controller:send_flow_mod_add)
@@ -150,15 +150,15 @@
class MyController < Controller
def switch_ready datapath_id
# send a FeaturesRequest message
send_message datapath_id, FeaturesRequest.new
end
-
+
def features_reply datapath_id, message
# ...
end
-
+
# ...
end
```
* [Trema::Hello](http://rubydoc.info/github/trema/trema/master/Trema/Hello)
@@ -192,11 +192,11 @@
send_flow_mod_add(
datapath_id,
:match => Match.new( :in_port => message.in_port, ...)
# ...
)
-
+
# ...
end
```
Also there is a utility method called
@@ -210,10 +210,10 @@
send_flow_mod_add(
datapath_id,
:match => ExactMatch.from( message )
# ...
)
-
+
# ...
end
```
### Actions