Return-Path: X-Original-To: apmail-directory-users-archive@www.apache.org Delivered-To: apmail-directory-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 897A918341 for ; Tue, 15 Dec 2015 16:29:45 +0000 (UTC) Received: (qmail 19930 invoked by uid 500); 15 Dec 2015 16:29:45 -0000 Delivered-To: apmail-directory-users-archive@directory.apache.org Received: (qmail 19876 invoked by uid 500); 15 Dec 2015 16:29:45 -0000 Mailing-List: contact users-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@directory.apache.org Delivered-To: mailing list users@directory.apache.org Received: (qmail 19863 invoked by uid 99); 15 Dec 2015 16:29:45 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Dec 2015 16:29:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id E8D10C0481 for ; Tue, 15 Dec 2015 16:29:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.121 X-Spam-Level: X-Spam-Status: No, score=-0.121 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id p150xvxFdTfI for ; Tue, 15 Dec 2015 16:29:43 +0000 (UTC) Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id B2ABC429C7 for ; Tue, 15 Dec 2015 16:29:43 +0000 (UTC) Received: by mail-pa0-f45.google.com with SMTP id ur14so7294630pab.0 for ; Tue, 15 Dec 2015 08:29:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=sA0tAk1KWFS6NcXdxOf/rwaBbqqk+0Ftdlp3QYe9HTU=; b=0Dj9yQYDvxOYZzqlyNjHWKa8t63+vOT4fZYOeQ9QFQDL1szG7V6vGrdUAMa+vItoO7 +IobAd8PNSiwvB1WWzQ6lj9Ld+Q0+fdls4fQBlyOLLtK08Uw4tdVCY1uCh4M3OWIgYP9 IuJDFVnMuzo/hRC28xU3OU7FTHKJkSmY2aGb3dRjZgYWC7a22llS8JDKmGZSEYPOdIzh BQbA2YNbSS03PqGoXUkP6E1fECexCsv9cCXqyLEOnGm2p+KKdta4JgyMM9/Vfkn/DomQ Z8VOrOwDYA4gxPpvif8Rpy7oI7lpH1SVH/Zril5KWrITfd9ih/5UQtnrvgRLnY0rFM3t KesQ== X-Received: by 10.66.253.135 with SMTP id aa7mr15969725pad.36.1450196983012; Tue, 15 Dec 2015 08:29:43 -0800 (PST) Received: from [192.168.1.204] (LMontsouris-656-1-281-47.w80-12.abo.wanadoo.fr. [80.12.92.47]) by smtp.googlemail.com with ESMTPSA id k85sm3279640pfb.59.2015.12.15.08.29.41 for (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Dec 2015 08:29:41 -0800 (PST) Subject: Re: DHCPOption problem To: users@directory.apache.org References: From: =?UTF-8?Q?Emmanuel_L=c3=a9charny?= Message-ID: <56703FF0.3060309@gmail.com> Date: Tue, 15 Dec 2015 17:29:36 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Le 15/12/15 16:40, Sherman Lilly a écrit : > I am trying to Apache Directory server for a DHCP backend. I have got a lot > of it working but I have hit wall and need help. I am trying to add an > attribute the "dhcpOption". When I try to add it, it ask for a binary value > but I don't how to add it. Let us say that I am trying to add "dhcpOption" > with a value of "broadcast 10.50.255.255". That is a string and will not > work. After lots of research apparently the value needed for that attribute > has to an encoded value of the string. How do I make this encoded value? It depends on the tool you are using. Basically, if you are using Java, you need to get the UTF-8 form for the String you want to inject into the server. That's done with : "Your data".getBytes( StandardCharsets.UTF_8 ); You can also use the Apache LDAP API org.apache.directory.api.util.Strings method : public static byte[] getBytesUtf8( String string )