yossarian
yossarian

Reputation: 145

Environment for quickly developing routing protocol prototype

I am doing research on routing protocols. Currently I perform simulations written in Python of a new protocol. The next step would be to build a real prototype which can really run on top of a Linux-based operating system (as a routing daemon such as ospfd).

What would be a well-suited programming environment/language to quickly build a prototype of a routing protocol? Anyone having experience with building distributed protocol prototypes?

I would like to focus as much as possible on high-level protocol logic instead of on low-level machine-related instructions. I am willing to learn new languages (such as Erlang or Haskell), in case they are better adapted for such a task. Alternatively, I have read about the twisted framework available in Python (which would probably allow to re-use some code), but it is unclear to me if this only would help me in case I write client/server-based protocols.

Does anyone know about an elegant tutorial or example implementation of a (distributed) protocol implementation?

Upvotes: 2

Views: 1616

Answers (3)

Peer Stritzinger
Peer Stritzinger

Reputation: 8372

Erlang is very well suited for just a logical prototype without concrete implementation as well as implementing real world capable implementations of the protocols.

You don't need any other framework, just Erlang and OTP which comes with it is enough.

Even if you have to work down to packet level Erlang helps you with its binary patterns which are gread for working with protocol packets.

Even if you want high performance you can move the most time critical stuff into whats called "Ports" in Erlang implementing it in C or another low level language.

Upvotes: 1

nmichaels
nmichaels

Reputation: 50941

If you're primarily interested in how your protocol will interact with itself, and don't want to think about implementation details like what packets look like, you might have great luck with Erlang. Sending arbitrary messages across a (real or imaginary) network is an essential feature of the language. So if you really only want to work at the information level, it's got good support for it.

What I have in mind with Erlang would get you something even less useful for production, but probably in considerably less time than Scapy.

Since nodes can be hosts with IP addresses and messages can contain pretty much anything, simulating a protocol with Erlang would be pretty simple. This will get you started learning the language, if you're interested.

Upvotes: 3

nmichaels
nmichaels

Reputation: 50941

Scapy would be a good tool for this. You can create packets at a high level and it's got good support for adding protocols. You wouldn't want to use it as a production implementation, but it'd make a great prototyping platform.

It's written in Python, for what that's worth.

Upvotes: 1

Related Questions