caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Vincent B." <vb@luminar.eu.org>
To: caml-list@inria.fr
Subject: [Caml-list] IPv6 zone-id
Date: Wed, 09 Jul 2014 19:35:36 +0200	[thread overview]
Message-ID: <53BD7D68.1090409@luminar.eu.org> (raw)

Hi,

The Unix module does not make possible to use IPv6 link-local
addresses.

This is due to the fact that the "sockaddr" type in Unix is not as
complete as its C counterpart, especially it lacks zone-id information
that is required to use such addresses.

Since I needed such features, I started writing a library
(http://github.com/vbmithr/ocaml-sockopt), unfortunately, given that
every networking piece of code written in OCaml use the primitives of
the Unix module, I would have to patch all networking code I want to
use which is not very convenient.

So I'm in the process of writing a patch for OCaml and I'm taking the
approach of extending the sockaddr type like this:

type sockaddr_raw (* a real struct sockaddr *)

type sockaddr =
  ADDR_UNIX of string
| ADDR_INET of inet_addr * int
| ADDR_RAW of sockaddr_raw

And then upgrading all the Unix code that uses type sockaddr.

This approach seems to me the most conservative towards existing
code. Should I continue in this direction or this design is not the
optimal one ?

Cheers,

Vincent

             reply	other threads:[~2014-07-09 17:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-09 17:35 Vincent B. [this message]
2014-07-11  8:03 ` Raphaël Proust
2014-07-11 14:13   ` Vincent B.
2014-07-11 19:25     ` Vincent B.
2014-07-16 16:04       ` Francis Dupont
2014-07-17  9:48         ` Vincent B.
2014-07-17 10:51           ` David Allsopp

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=53BD7D68.1090409@luminar.eu.org \
    --to=vb@luminar.eu.org \
    --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;
as well as URLs for NNTP newsgroup(s).