From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p14AZRJi018067 for ; Fri, 4 Feb 2011 11:35:27 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: At8CAF5lS01KfVIqkGdsb2JhbACXDo4XCBUBAQEBCQkMBxEEIKAwigeCF4QxL4hZAQEDBYVVBIR4hm+ILTo X-IronPort-AV: E=Sophos;i="4.60,425,1291590000"; d="scan'208";a="99233967" Received: from mail-ww0-f42.google.com ([74.125.82.42]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 04 Feb 2011 11:35:22 +0100 Received: by wwi17 with SMTP id 17so168885wwi.3 for ; Fri, 04 Feb 2011 02:35:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=EnmUVM/5dEgw/TDy+pOTz8DM/b4uq7aKachmoOYrVhs=; b=YJld8mubXL2zNbHd+57VvQ/NcOJTXQMBDYk7h6NNnLbAu09UcBHKS8eqzxPhcy/C28 7pUPmY54TP7rQuipeetTb/Wm+CM6Dn8MXS4Gs1UtkWqRH62bFBBj1sT4tKjcfKYEw9OZ SKvI4DxfyP1BGsHD5u9GOU5o51zzFpxfw1IYo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=VTfs0iwv1/yvgoYtJauG6VvOJ7LAbtuXa+RwC/iVIdYBciH15ALnAEdw4LIITR2RfG mjKSn7bQjczpAnrjEwGbH5lD7wb7ryLkdAuIyi1alNqdmnGE50byljNKi2ugat1pldeS iDZFFvrT0mcGcax4VnRpEYIdco5gAZrqePBBU= MIME-Version: 1.0 Received: by 10.216.55.145 with SMTP id k17mr509447wec.48.1296815718818; Fri, 04 Feb 2011 02:35:18 -0800 (PST) Received: by 10.216.177.5 with HTTP; Fri, 4 Feb 2011 02:35:18 -0800 (PST) Date: Fri, 4 Feb 2011 19:35:18 +0900 Message-ID: From: =?ISO-8859-1?Q?Jehan_Pag=E8s?= To: caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 Subject: [Caml-list] ODNS 0.2: DNS library for Objective Caml Hi all, I just wanted to announce the first official release of ODNS (version 0.2), a GPLv2 library written in Objective Caml, entirely natively (this is not a binding to a C library, or anything. Actually there is no dependency at all in the library as only the Standard lib is used) whose goal is to query DNS servers in programs. It is detailed, documented and available for download here: http://odns.tuxfamily.org/ Full API is here: http://odns.tuxfamily.org/doc/dns/html/ For history note: I could not find any of such library evolved enough (that does not mean there is not, I just did not find it), but I found some beginning of such in an old 2002 email, and the previous authors accepted to release me the piece of code in GPLv2, so I worked from this version (which I labeled 0.1 but this original version should really not be used) and I thank them as it was a good base. It probably won't evolve much in features now as long as I don't need them (I "may" need DNSSEC in some time in the future, so there is a possibility I implement that when necessary, but not now. Also I accept any good patch of course and I can discuss with and help people who want to write these patches) but I will keep it up to date for any possible bug fix as I developed this for another bigger project where I needed in particular SRV record support. This is just to say that this will remain maintained so you can use it safely. And don't hesitate to drop any bug report. The current features are pretty much the usual features of all resolvers, with a use as easy as (for instance with SRV): let q = Dns.query in q#add_query ~qtype:"SRV" ~qname="_xmpp-client._tcp.xmpp.org"; q#action; (* Do something with q#answers which are all the resource records in answer section, q#authorities are records in Authority section and q#additionals for Additional section! *) Of course with a bunch of more powerful configuration methods if defaults don't suit you (change the timeout, retry number, use specific name servers instead of the one your system is set with, etc.). But especially I also added some extremely useful helper functions. Indeed raw use of a resolver is nice because this is generic (so you can just do any kind of query), but there is usually a lot more processing to do after (reordering answers, removing some, making new queries as a result of the answers of a previous one, and so on. Semantic use of record's fields in other words). For instance: Dns_helper.srv_lookup ~query:"_xmpp-client._tcp.xmpp.org" -> directly returns a list of IPs to be tried (already in the right order) for the Jabber service of xmpp.org. All processing has already been done (if you know SRV records, you know there are many stuffs to do afterwards, and several queries to run as well, while all you want in the end is a list of IPs). So a lot of processing in a single function. I hope some people out there like it! :-) Bye. Jehan