Re: [Chicken-users] raw packet interface

2011-03-10 Thread Nicolas Pelletier
Hello,

On Thu, Mar 10, 2011 at 23:09, Christiano F. Haesbaert
 wrote:
>
> 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.

For anything at or above the network layer, this seems to be a good
solution, thank you. For the link layer, I'll just use BPF ;-)

Best regards,

-- 
Nicolas

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] raw packet interface

2011-03-10 Thread Christiano F. Haesbaert
On 10 March 2011 05:19, Nicolas Pelletier
 wrote:
> Hello,
>
> On Thu, Mar 10, 2011 at 13:52, Stephen Eilert  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.

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] raw packet interface

2011-03-10 Thread Nicolas Pelletier
Hello,

On Thu, Mar 10, 2011 at 13:52, Stephen Eilert  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?)

Regards,

-- 
Nicolas

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] raw packet interface

2011-03-09 Thread Stephen Eilert

On Mar 9, 2011, at 10:29 PM, Nicolas Pelletier wrote:

> Hello Chickenistas,
> 
> As part of testing a network appliance (router/firewall etc...), I'd
> like to be able to read and write arbitrary data to the network. So
> I'm wondering if somebody has already some tools to interface to
> low-level networking services, such as BPF, libpcap... I am trying to
> find error cases in the handling of incoming packets in the appliance;
> I do not need throughput performance nor very precise timings. I am
> running under FreeBSD 8.1. I'd be grateful for any advice.

I am not aware anyone doing raw packet access in Scheme. 

Do you think that bindings for libpcap would be enough for your purposes?


-- Stephen

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] raw packet interface

2011-03-09 Thread Nicolas Pelletier
Hello Chickenistas,

As part of testing a network appliance (router/firewall etc...), I'd
like to be able to read and write arbitrary data to the network. So
I'm wondering if somebody has already some tools to interface to
low-level networking services, such as BPF, libpcap... I am trying to
find error cases in the handling of incoming packets in the appliance;
I do not need throughput performance nor very precise timings. I am
running under FreeBSD 8.1. I'd be grateful for any advice.

Thanks in advance,

-- 
Nicolas

___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users