comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Questions about Gnat.sockets and raw socket
Date: Thu, 23 Apr 2015 18:14:42 +0200
Date: 2015-04-23T18:14:42+02:00	[thread overview]
Message-ID: <1l50bxzn1tp14.13g3kefwttwjn.dlg@40tude.net> (raw)
In-Reply-To: 40bfd1ec-3a28-4fc8-b43f-29c2d01bcf50@googlegroups.com

On Thu, 23 Apr 2015 08:41:50 -0700 (PDT), loïc maury wrote:

> Le jeudi 23 avril 2015 14:52:45 UTC+2, loïc maury a écrit :
>> Le jeudi 23 avril 2015 14:19:04 UTC+2, Dmitry A. Kazakov a écrit :
>>> On Thu, 23 Apr 2015 02:21:00 -0700 (PDT), loďc maury wrote:
>>> 
>>> > For a personal project, I want to create a packet analyzer.
>>> > Can I use Gnat.socket, for raw socket programming ? it is not clear
>>> > for me, and unfortunately I didn't found any answers in the ada groups.
>>> > 
>>> > I will use it under Windows.
>>> 
>>> The short answer is no, it would not go.
>>> 
>>> Windows does not support raw sockets (naturally GNAT.Sockets does not do
>>> either). Under Windows you will need a so-called NDIS driver to handle
>>> packets away of the network stack, and Ada bindings to.
>>> 
>>> I can recommend an inexpensive NDIS driver we are successfully using under
>>> Windows:
>>> 
>>>    http://www.rawether.net
>>> 
>>> We also have Windows bindings to it, but they are proprietary.
>>> 
>>> P.S. Under Linux you would use raw sockets. GNAT.Sockets does not support
>>> them, but it is relatively simple to adapt.
>>> 
>> Maybe NDIS open source project exist, I will try to find one.
>> 
> Maybe I found a solution, with Winpcap, I can create a binding for this
> library.

Winpcap is not free, only its run-time is. But you will also need the SDK,
which is five times as expensive as rawether, last time we checked.

If you have much spare time and a MSDN subscription (1K per annual) you can
take a sample NDIS from Windows DDK and use it as a starting point. 

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

  reply	other threads:[~2015-04-23 16:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-23  9:21 Questions about Gnat.sockets and raw socket loïc maury
2015-04-23 12:19 ` Dmitry A. Kazakov
2015-04-23 12:52   ` loïc maury
2015-04-23 15:41     ` loïc maury
2015-04-23 16:14       ` Dmitry A. Kazakov [this message]
2015-04-23 17:32         ` Qun-Ying
2015-04-28 10:21 ` loïc maury
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox