From owner-freebsd-net@FreeBSD.ORG Sun Feb 17 09:35:49 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6C7C14C8 for ; Sun, 17 Feb 2013 09:35:49 +0000 (UTC) (envelope-from s.khanchi@gmail.com) Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) by mx1.freebsd.org (Postfix) with ESMTP id 0625AF35 for ; Sun, 17 Feb 2013 09:35:48 +0000 (UTC) Received: by mail-wi0-f180.google.com with SMTP id hi8so2514374wib.13 for ; Sun, 17 Feb 2013 01:35:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=DN+CoZV2hm8lPfgartKgDhJORJ5E23fOped51f9FqBc=; b=YZedDKosO1AlWxThsrEvPQJI4Y/AeC85oFdUJm/HDstMqiaDrU0MhxPNnulyD1OOEE fSqIqoNi/cz1dgleZTjwsecAKbRaoYPrEo19QjmkjPPAluO64NxVVhNxLPVkSjVFzSMj 34eKtMln8PuAjtAPo3S+GiyDlPDk9Ldjj25Gq/r91XTXoBM+lyYJ5i4SaHCuk8yICBWa YM7gONokkMvPGMJjnOSZ7/EeJnRkrzdkZCfebDBUYM2MP5aDuqTVPPbiZDltVDLcNsEv bW9jwLnzkKNSwkgGq7IM6qemjaBkLhv7aGZfKVljPPdk2q20zpLVs30TZ75LURxJcGSD yQtA== X-Received: by 10.180.87.170 with SMTP id az10mr12607477wib.3.1361093742202; Sun, 17 Feb 2013 01:35:42 -0800 (PST) MIME-Version: 1.0 Sender: s.khanchi@gmail.com Received: by 10.194.23.199 with HTTP; Sun, 17 Feb 2013 01:35:22 -0800 (PST) In-Reply-To: <20130217082407.GE2598@kib.kiev.ua> References: <20130217082407.GE2598@kib.kiev.ua> From: h bagade Date: Sun, 17 Feb 2013 13:05:22 +0330 X-Google-Sender-Auth: rv-5NZgm1bXSHhvcGL_b3d6P-p4 Message-ID: Subject: Re: failed to use getifaddrs on geli code To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-net@freebsd.org, Kevin Oberman X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2013 09:35:49 -0000 On Sun, Feb 17, 2013 at 11:54 AM, Konstantin Belousov wrote: > On Sun, Feb 17, 2013 at 11:49:10AM +0330, h bagade wrote: > > On Sat, Feb 16, 2013 at 10:23 PM, Kevin Oberman > wrote: > > > > > On Sat, Feb 16, 2013 at 5:40 AM, h bagade wrote: > > > > Hi all, > > > > > > > > I need to change the geli code and I want to use "getifaddrs" > function > > > > inside the code. I make and make install the code and it wasn't any > > > problem > > > > at all, but when I want to load the geom_eli.ko module, an error > > > occurred: > > > > kldload: can't load /boot/kernel/geom_eli.ko: Exec format error > > > > > > > > and in /var/log/messages, it stated: > > > > link_elf_obj: symbol getifaddrs undefined > > > > > > > > how can I solve this problem? > > > > Any hints or comments are really appreciated > > > > > > One possibility is that your sources from which you built the modified > > > geom_eli module are not the same as were used to build the kernel you > > > are running. > > > -- > > > R. Kevin Oberman, Network Engineer > > > E-mail: kob6558@gmail.com > > > > > > > I've build the kernel once again with the modified geli code and the > error > > still exists! > > getifaddrs(3) is usermode interface, exported from libc. You cannot > use it from the kernel. > Thank you alot for your precise answer. So does anybody know which method I could replace to get out network interfaces properties?