From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 14 03:58:44 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46BDF106568B for ; Fri, 14 Aug 2009 03:58:44 +0000 (UTC) (envelope-from bertwiley@gmail.com) Received: from mail-gx0-f227.google.com (mail-gx0-f227.google.com [209.85.217.227]) by mx1.freebsd.org (Postfix) with ESMTP id 04DD28FC41 for ; Fri, 14 Aug 2009 03:58:43 +0000 (UTC) Received: by gxk27 with SMTP id 27so1577283gxk.12 for ; Thu, 13 Aug 2009 20:58:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=MguD6btSHJDTi5Pt+JWAdAl9DfR1onVd8qo+D+Obtt0=; b=UJVoFOtrxas5pHuKKZ8C6OhBUd4xgVymxXTfCxxBxNI3r1ddn3WLuHHt1xT7asFJ6B Nkqom4k1ur5lSaYsojDNEgMtnjG5cOgpUQfJDKL/vLhpUj1L5peEs7zah9OdVEx6AUHX 2bpjwYB1CZ0OPyEPtDMfd2cv+Q27ZdGJ5vUVk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=XyMQPO5d/+PdAcNJUEyQ8SJ5oRUOqkWfEVaigykmBPXDjMkM/DX3VK/rrM+HuBpkVP vWc7COvACHZCpXkzCTnk73UsNOaNUa9Yd2CkgMt6LthCKmrrZB+MBeVyOgXi1Ckh0/3u dICkJe/cPP+0wQj2q74rb3Aoi9D6N/HDI2Q90= MIME-Version: 1.0 Received: by 10.90.71.15 with SMTP id t15mr871281aga.10.1250220559741; Thu, 13 Aug 2009 20:29:19 -0700 (PDT) Date: Thu, 13 Aug 2009 23:29:19 -0400 Message-ID: <9527461a0908132029xb2c6149r9f51c775d22ae670@mail.gmail.com> From: bert wiley To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Need help trying to to use the ntohl() call with in_addr X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2009 03:58:44 -0000 Hi everyone Im new to list and this question may be out of place. This is my first post. Im new to freebsd and trying to understand how to create a jail from some system calls. I followed the jail subsystem description from the handbook and im having a problem or may be using the call incorrectly. But here is what im trying to do. int main() { struct in_addr ipaddr; struct jail myjail; char path[PATH_MAX]; realpath("/tmp", path); myjail.version = 1; myjail.path = path; myjail.hostname = "testjail"; const char *ip; ip = "192.168.1.142"; inet_aton(ip, &ipaddr); myjail.ip4 = ntohl(ipaddr.s_addr); // I get and error here, invalid conversion from _uint32_t' to in_addr* myjail.ip4 = ipaddr.s_addr; // and and error here, invlid conversion from in_addr_t to in_addr* } I know that there is more that needs to be done but this just a test stub as im trying to work thru the calls and understand whats going on. Any would be appreciated thanks.