RSIP

Jose Vasconcellos jvasco at bellatlantic.net
Mon Feb 25 15:45:10 EST 2002


Hello,

I'm working on an RSIP implementation and we are going to use click
to handle the low-level packet forwarding. For more details see:
http://openresources.info.ucl.ac.be/rsip/rsaip/

To implement RSIP i had to create a new click element called
RSIPPortMap. It classifies packets based on port range. RSIPPortMap
looks up the destination port and sets the destination annotation to
the tunnel address corresponding to the port. RSIPPortMap uses a linear
structure for storing information. So searching is linear based on the
table size.

It takes two parameters: the offset of the port location and the
number of output ports. Packets that don't match any port range always
go to port 0. Here's an example:

  ... -> map;
  map :: RSIPPortMap(22, 2);
  map[0] -> EtherEncap(...) -> ToLinux;
  map[1] -> IPEncap(4, InternalIF, 0.0.0.0)
         -> ... -> ToDevice();

The application communicates with this element via three files:

/proc/click/map/tables (read-only):
Outputs a human-readable version of the current port map table.

/proc/click/map/add (write-only):
Adds a port range to the table.
Format should be PORT ADDR OUTPUTPORT.

/proc/click/map/remove (write-only):
Removes a port range from the table. Format should be PORT ADDR.

I also had to change the implementation of IPEncap element. If the
destination address is 0.0.0.0 and there's is an address annotation
it will use it instead.

On the click side there are still more things to do:
- Need to implement the remove logic.
- Need to handle ICMP messages. I'm thinking of modifying the
existing elements.
- Currently click doesn't support GRE tunnels. I saw on the click
mailing list that someone may be working on this.

Attached is a sample script. Any and all feedback is appreciated.

Regards,

Jose Vasconcellos



-------------- next part --------------
A non-text attachment was scrubbed...
Name: rsip.click
Type: text/x-c++
Size: 2806 bytes
Desc: not available
Url : https://amsterdam.lcs.mit.edu/pipermail/click/attachments/20020225/ed6b65c5/rsip.bin


More information about the click mailing list