[erlang-questions] IP packet manipulation within Erlang

Toby Thain toby@REDACTED
Fri Jan 8 16:32:17 CET 2010


On 7-Jan-10, at 6:11 PM, Chandru wrote:

> Hi Trevor,
>
> 2010/1/7 Trevor Woollacott <trevorw@REDACTED>
>
>> 2010/1/7 Martti Kuparinen <martti.kuparinen@REDACTED>
>>>
>>>  Hi,
>>>>
>>>> How suitable is Erlang for a small project where I'd like to
>>>>
>>>> - grab all incoming IP packets
>>>> - perform some IP header manipulation
>>>> - send out the modified packets
>>>>
>>>> I attempted this a few years ago. I tried to write a linked in  
>>>> driver
>>> which
>>> got packets from libipq [1]. That was painful. So I dumped the  
>>> idea of
>>> using
>>> erlang at all, and did it all in C which was pretty  
>>> straightforward and
>>> worked quite well. I didn't put any large load on it, but it was  
>>> enough
>>> for
>>> what I was doing at the time.
>>>
>>> cheers
>>> Chandru
>>>
>>> [1] http://en.wikipedia.org/wiki/Libipq
>>>
>>>
>> Hi Chandru
>>
>> Do you mind elaborating on the issues that you experienced when  
>> writing the
>> linked in driver using libipq?
>>
>
> Sorry Trevor, I tried hard to recollect, but I can't remember. I do  
> remember
> giving up using Erlang in frustration, and writing it in C, much to my
> annoyance because I could've done some really complex processing  
> with the
> packet stream if I could get them into Erlang.

Are you saying the complex processing would have been simpler in Erlang?

What specifically was impossible in C?

--Toby

>
> Chandru



More information about the erlang-questions mailing list