From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id A7D5C7FA13 for ; Wed, 9 Jul 2014 19:35:38 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of vb@luminar.eu.org) identity=pra; client-ip=94.23.24.152; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="vb@luminar.eu.org"; x-sender="vb@luminar.eu.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of vb@luminar.eu.org designates 94.23.24.152 as permitted sender) identity=mailfrom; client-ip=94.23.24.152; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="vb@luminar.eu.org"; x-sender="vb@luminar.eu.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of postmaster@luminar.eu.org designates 94.23.24.152 as permitted sender) identity=helo; client-ip=94.23.24.152; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="vb@luminar.eu.org"; x-sender="postmaster@luminar.eu.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgkFACh8vVNeFxiY/2dsb2JhbABZgmokUoNJvDCIUhZ1hC1VNgIFFgsCCwMCAQIBWAgBAYg/AwmfOI8jmheBLI1UX4JhgUwFnD6SRINFgW4 X-IPAS-Result: AgkFACh8vVNeFxiY/2dsb2JhbABZgmokUoNJvDCIUhZ1hC1VNgIFFgsCCwMCAQIBWAgBAYg/AwmfOI8jmheBLI1UX4JhgUwFnD6SRINFgW4 X-IronPort-AV: E=Sophos;i="5.01,632,1400018400"; d="scan'208";a="84369957" Received: from luminar.eu.org ([94.23.24.152]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 09 Jul 2014 19:35:38 +0200 Received: from [IPv6:2a01:e35:2e2c:85e0:585:11eb:9d25:106] (unknown [IPv6:2a01:e35:2e2c:85e0:585:11eb:9d25:106]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by luminar.eu.org (Postfix) with ESMTPSA id E557461632 for ; Wed, 9 Jul 2014 19:35:36 +0200 (CEST) Message-ID: <53BD7D68.1090409@luminar.eu.org> Date: Wed, 09 Jul 2014 19:35:36 +0200 From: "Vincent B." User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: caml-list@inria.fr X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: [Caml-list] IPv6 zone-id 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