Subject: Re: fuword
To: Ross Harvey <ross@ghs.com>
From: Jan-Hinrich Fessel <oskar@zippo.unna.ping.de>
List: port-alpha
Date: 03/11/1999 08:25:18
--==_Exmh_-1755568126P
Content-Type: text/plain; charset=us-ascii
In message <199903102350.PAA27636@elbe.ghs.com>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)
#else
sppp_params(struct sppp *sp, int cmd, void *data)
#endif
{
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
Gruesse
Oskar
==============================================================================
Tragbar ist, was nicht herunterfaellt.
oskar@zappa.unna.ping.de
==============================================================================
--==_Exmh_-1755568126P
Content-Type: application/pgp-signature
-----BEGIN PGP MESSAGE-----
Version: 2.6.3i
iQCVAwUBNudv3bA63tqjeAhZAQGWswP5AdjjOme4zqWJi9hHizWZWSguCJxd+zZK
o4yyaVZ9MHoIsqYJhPEooBUGTGRURwFybrOreyKFi0NBmjw89Pl8p0HZ733l+quY
rJypyoD0kYXz3VXHU8O69PR3+utTUiyYY5fWTLE2tm2Cawopo9fTu/eOfwkjzpZa
+Jc8g7wf8Ik=
=qaf0
-----END PGP MESSAGE-----
--==_Exmh_-1755568126P--