From owner-freebsd-emulation@FreeBSD.ORG Tue Jul 24 20:39:37 2007 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 449CE16A418 for ; Tue, 24 Jul 2007 20:39:37 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from ns1.jnielsen.net (ns1.jnielsen.net [69.55.238.237]) by mx1.freebsd.org (Postfix) with ESMTP id 2BDC913C480 for ; Tue, 24 Jul 2007 20:39:35 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from localhost (jn@ns1 [69.55.238.237]) (authenticated bits=0) by ns1.jnielsen.net (8.12.9p2/8.12.9) with ESMTP id l6OKdZpT041923 for ; Tue, 24 Jul 2007 16:39:35 -0400 (EDT) (envelope-from lists@jnielsen.net) From: John Nielsen To: freebsd-emulation@freebsd.org Date: Tue, 24 Jul 2007 16:39:05 -0400 User-Agent: KMail/1.9.7 References: <200707241545.59049.lists@jnielsen.net> In-Reply-To: <200707241545.59049.lists@jnielsen.net> X-Face: #X5#Y*q>F:]zT!DegL3z5Xo'^MN[$8k\[4^3rN~wm=s=Uw(sW}R?3b^*f1Wu*.<=?utf-8?q?of=5F4NrS=0A=09P*M/9CpxDo!D6?=)IY1w<9B1jB; tBQf[RU-R<,I)e"$q7N7 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707241639.05232.lists@jnielsen.net> X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on ns1.jnielsen.net X-Virus-Status: Clean Subject: Re: linux ioctls not implemented - advice? X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jul 2007 20:39:37 -0000 On Tuesday 24 July 2007 03:45:58 pm John Nielsen wrote: > I'm trying to get the latest Linux remote agent for Backup Exec to run on a > FreeBSD-amd64 machine. The exact version is RALUS-11d.7170.2, although I > suspect any 10d or 11d version would be the same. > > After trying a few things (including installing on a real Linux host) I was > able to identify and extract the files containing the two rpm's that are > actually installed. I ran those through rpm2cpio and got a simple directory > layout. I duplicated the directory structure and config file from the Linux > host and ran the main executable. (The init script tries (and fails, even > after I fixed all the hardcoded paths) to do some housekeeping, but none of > it is necessary for the thing to actually run.) > > The executable seems to run okay and the host even shows up as a Unix > target on the (Windows) Backup Exec server, but I'm unable to authenticate > or do any backups. Looking through the system messages I saw these: > > linux: pid 4080 (beremote): ioctl fd=6, cmd=0x8938 ('\M^I',56) is not > implemented > linux: pid 4080 (beremote): ioctl fd=6, cmd=0x8938 ('\M^I',56) is not > implemented > linux: pid 4080 (beremote): ioctl fd=6, cmd=0x8933 ('\M^I',51) is not > implemented > linux: pid 4080 (beremote): ioctl fd=6, cmd=0x8933 ('\M^I',51) is not > implemented > linux: pid 4080 (beremote): ioctl fd=6, cmd=0x8933 ('\M^I',51) is not > implemented > linux: pid 4080 (beremote): ioctl fd=6, cmd=0x8933 ('\M^I',51) is not > implemented > > Two attempts to use ioctl 0x8938 and four attempts to use ioctl 0x8933 > every time I start the executable (regardless of login attempts). > > The message is fairly explanatory; my question is what can I do about it? > Is there a canonical list of Linux ioctls anywhere that would tell me what > this binary is trying to do? From the behavior I'm seeing and from looking > at linux_ioctl.h I suspect that they belong in the "socket" category, but > that's as far as I've gotten. > > Thanks for any tips, etc. Digging a little deeper, it looks like 0x8933 translates to SIOCGIFINDEX. There is a ready-made (at least it looks that way to me) patch in kern/99068, which apparently has only not been committed because the debug output uses the wrong function. I'll play around with that and perhaps comment on the PR if I make any headway. The 0x8938 ioctl appears to translate to SIOCGIFCOUNT. Can anyone point me in the right direction for creating a linux_ifcount function for linux_ioctl.c? I have some C experience but little to no kernel experience. However the PR above and the existing code provide a pretty good template for me to follow. Would getting the value of net.link.generic.system.ifcount be an appropriate action? If so, what would that reference look like in C appropriate for linux_ioctl.c? Thanks! JN