Routingtabels

Klacke <>
Wed May 24 16:37:00 CEST 2000


On Wed, May 24, 2000 at 03:52:28PM +0200, Ingela Anderton wrote:
> 
> Hello!
> 
> I am trying to figure out if you can implement a ruoting table in
> Erlang that is efficient enough or if you have to use c? Someone in the 
> project that I currently work in made a version using ets-tables and
> looking backwards starting with the mask 255.255.255.255 and then
> trying 255.255.255.254, 255.255.255.252 etc. until they
> find a entry and then they know that they have the longest prefix
> match. As far as I understand it would be a better idea to use some
> kind of tree-based algorithm. Would it be possible to do this
> efficiently in Erlang?
> 


I'd say that a real routing table looking for longest prefix
just screams for a linked in driver. Typically routing tables
can grow pretty large as well. There's also a wealth of really good
c-implementations of routing-table search out there.

But it's indeed possible to implement as a tree in erlang. It all depends
on the speed requirements as well as the number of entries you
expect to get into your routing tables. 


/klacke


-- 
Claes Wikstrom                          <>
Bluetail AB                             http://www.bluetail.com





More information about the erlang-questions mailing list