Subject: Re: fuword
To: Ross Harvey <>
From: Jan-Hinrich Fessel <>
List: port-alpha
Date: 03/11/1999 08:25:18
Content-Type: text/plain; charset=us-ascii

In message <>you write:
> I'm going to guess that if_spppsubr.c (what is that, anyway? synch ppp?)

At least, it should be ;-)

> is manually fetching an ioctl(2) parameter?  Such parameters are handled

Yes, it looks like that.  It's in a subroutine that handles 
        case SIOCGIFGENERIC:
        case SIOCSIFGENERIC: 
#if defined(__FreeBSD_version) && __FreeBSD_version >= 300003
sppp_params(struct sppp *sp, u_long cmd, void *data)
sppp_params(struct sppp *sp, int cmd, void *data)
        int subcmd;
        struct ifreq *ifr = (struct ifreq *)data;
        struct spppreq spr;
         * ifr->ifr_data is supposed to point to a struct spppreq.
         * Check the cmd word first before attempting to fetch all the
         * data.
        if ((subcmd = fuword(ifr->ifr_data)) == -1)
                return EFAULT;

        if (copyin((caddr_t)ifr->ifr_data, &spr, sizeof spr) != 0)
                return EFAULT;

        switch (subcmd) {
        case SPPPIOGDEFS:

> automagically in BSD kernels. If this is the case, you really should fix
> that interface to do ioctl(2) like all the other interfaces, where the
> kernel provides the data for you. (For the BSD mechanism to work, the
> ioctl must be defined our way, with the size and direction of the param
> encoded in the request.)

I'm not the author, I only try to use the i386 stuff on my alpha.  It's an 
ISDN driver.

> To answer your exact question: fuword(9) is in locore.s, but is #if 0'ed
> right now because there are no MI callers in our tree. I'll try the code
> and let you know how it works.

Thanks a lot, my last kernel build took:
7031.8u 676.3s 2:22:58.90 89.8% 0+0k 7308+21292io 502pf+0w


 					Tragbar ist, was nicht herunterfaellt.


Content-Type: application/pgp-signature

Version: 2.6.3i