[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] raw packet interface
From: |
Christiano F. Haesbaert |
Subject: |
Re: [Chicken-users] raw packet interface |
Date: |
Thu, 10 Mar 2011 11:09:49 -0300 |
On 10 March 2011 05:19, Nicolas Pelletier
<address@hidden> wrote:
> Hello,
>
> On Thu, Mar 10, 2011 at 13:52, Stephen Eilert <address@hidden> wrote:
>>
>> Do you think that bindings for libpcap would be enough for your purposes?
>
> I'll need filtering capabilities like those of libpcap (or BPF).
> However, libpcap does not seem (to my knowledge) to be able to send
> packets. Since I intend to play tricks with the link layer, I think
> I'll need to use BPF. Every OS seems to have its own prefered way of
> filtering and sending raw frames, so maybe there's not much hope for
> portability.
>
> (I do not need portability; but if I can have it for a moderate price,
> why not do it?)
>
Using raw socket is quite portable, you'll probably need something
like filtering with pcap, and then using the raw socket to send your
stuff.
Be aware that there might be a "huge" delay between libpcap and the
actual packet processing, ~1sec.