linux ioctls not implemented - advice?

John Nielsen lists at jnielsen.net
Tue Jul 24 20:39:37 UTC 2007


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


More information about the freebsd-emulation mailing list