trema/trema — pull request #147 by nickkaranatsios (2011-11-15 08:20:12+00:00)
Title: routing-switch

Takamiya-san

Except documentation and rspec files and maybe more refactoring here is the first version
of routing-switch.

To run:
./trema run "ruby/trema/routing-switch.rb --idle-timeout 60" -c ruby/trema/routing-switch.conf
or without any options
./trema run "ruby/trema/routing-switch.rb" -c ruby/trema/routing-switch.conf
or you can omit the quotes.
./trema run ruby/trema/routing-switch.rb -c ruby/trema/routing-switch.conf

To test:
1) ./trema send_packets --s host1 -d host2
2) ./trema show_stats --rx host2
ip_dst,tp_dst,ip_src,tp_src,n_pkts,n_octets
192.168.0.2,1,192.168.0.1,1,1,50

The first packet is flooded and reaches host2, mac address is learned.

3) ./trema send_packets --s host2 -d host1

./trema show_stats --rx host1
ip_dst,tp_dst,ip_src,tp_src,n_pkts,n_octets
192.168.0.1,1,192.168.0.2,1,1,50

It's behavior should be the same as the its counterpart c version if not please report to me.
The build should not break I completed successfully cruise.rb.

Kind regards

Nick