From: Oliver Bandel <oliver@first.in-berlin.de>
To: caml-list@inria.fr
Subject: Re: [Caml-list] RAW-sockets
Date: Thu, 18 May 2006 23:14:48 +0200 [thread overview]
Message-ID: <20060518211448.GA22098@first.in-berlin.de> (raw)
In-Reply-To: <Pine.LNX.4.62.0605181027060.414@camaross.cs.unm.edu>
On Thu, May 18, 2006 at 10:36:25AM -0600, William D. Neumann wrote:
> On Thu, 18 May 2006, Oliver Bandel wrote:
>
> >>how to use Eaw sockets from OCaml?
> >>
> >>As in raw sockets I have to create the IP-header by myself
> >>I'm wondering how.
> >>
> >>IP normally uses 32Bit words, and the parts of it are not
> >>necessarily byte or nibble oriented.
> >>So I have to be able to set some bits directly.
> >>But the OCaml int's is not complete 32 Bits.
> >[...]
> >
> >I have not found in the Unix-module an option for the sockets,
> >that is eaquivalent to the IP_HDRINCL option, as described
> >by Stevens in the Networking Programming Vol. I.
> >
> >Isn't it possible in OCaml to create own IP-headers?
> >So, do I have to go back to C to e.g. write ICMP packets?
>
> No. Just create a string in OCaml and use that. Here's a (possibly
> awful) hunk of code I wrote for creating ICMP packets. Take a look at it
> and see how I did things.
[...]
OK, thanks for that impression...
...but soooo much code for this?
Seems that it's easier to do it in C. :(
I will look at your code in more detail later,
but at first look, it was a little shock. :(
Maybe you have implemented more functionality than I need
and so what I was looking for is some lines of code only.
But nevertheless it's god to have his, so I can reason
about how to do some ICMP-based stuff.
Best Regards,
Oliver
next prev parent reply other threads:[~2006-05-18 21:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-18 15:27 RAW-sockets Oliver Bandel
2006-05-18 15:50 ` [Caml-list] RAW-sockets Oliver Bandel
2006-05-18 16:08 ` Oliver Bandel
[not found] ` <Pine.LNX.4.62.0605181027060.414@camaross.cs.unm.edu>
2006-05-18 21:14 ` Oliver Bandel [this message]
2006-05-19 6:14 ` Oliver Bandel
2006-05-19 14:51 ` William D. Neumann
[not found] ` <ad8cfe7e0605181709y6de7fd24w7e7d51a0cfa8212c@mail.gmail.com>
2006-05-19 6:12 ` Oliver Bandel
[not found] ` <ad8cfe7e0605182316l85124c9s5dd588aa89f9c285@mail.gmail.com>
2006-05-19 6:24 ` Oliver Bandel
[not found] ` <ad8cfe7e0605182327p3a0d16c4ub43326343347c60c@mail.gmail.com>
2006-05-20 20:57 ` Oliver Bandel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060518211448.GA22098@first.in-berlin.de \
--to=oliver@first.in-berlin.de \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox