[Click] A question about how to use to click to realize packet forwarding

Harald Schioeberg harald at net.t-labs.tu-berlin.de
Thu Nov 25 11:05:23 EST 2010


> Thanks, is there any example to show how to use these handlers?
> Furthermore, how let each node know the new routing table from the
> central controller?

Check the ControlSocket Element documentation.

assuming userlevel: 
Step A) Use a ControlSocket Element in the config
Step B) give the element a name: e.g. 
  " ... -> my_table::RadixIPLookup -> ..."
Step B) from central host: 
telnet node:ctlsock
  write my_table.set 0.0.0.0 1.1.1.1 1

sets a default route via 1.1.1.1 using output 1 of the routetable
element.

If using kernel, you cannot directly use a network port, instead you
must go through files in the proc-filesystem.

I have attached a ruby-class, that parses the text protocol and talks to
control-sockets (i.e. userlevel) 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: click_user_socket.rb
Type: application/x-ruby
Size: 2910 bytes
Desc: not available
Url : http://amsterdam.lcs.mit.edu/pipermail/click/attachments/20101125/8aebe5bd/attachment.bin 


More information about the click mailing list