Subject: Re: pppoectl(8) -d won't work
To: None <tech-net@netbsd.org>
From: Holger Weiss <lists@jhweiss.de>
List: tech-net
Date: 08/20/2007 15:53:59
* Martin Husemann <martin@duskware.de> [2007-08-20 13:38 UTC]:
> On Mon, Aug 20, 2007 at 03:24:05PM +0200, Holger Weiss wrote:
> > I should've mentioned that PPPOEGETSESSION evaluates to 3223349616 on
> > _both_ sides. That is, replacing the PPPOEGETSESSION macro with the
> > hardcoded value 3223349616UL within both the ioctl(2) call and
> > pppoe_ioctl()'s switch case doesn't change anything.
>
> What does ktrace say?
>
> 4883 1 pppoectl CALL ioctl(3,PPPOEGETSESSION,0xffffffffffffc694)
> 4883 1 pppoectl GIO fd 3 wrote 32 bytes
> "pppoe0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
> 4883 1 pppoectl GIO fd 3 read 32 bytes
> "pppoe0\0\0\0\0\0\0\0\0\0\0\0\0\0\^C\0\0\v\M-W\0\0\0\^U\0\0\0\0"
> 4883 1 pppoectl RET ioctl 0, 3223349616/0xc0206970
>
> is what I get.
I get:
568 1 pppoectl CALL ioctl(3,PPPOEGETSESSION,0xffffffffffffc4c0)
568 1 pppoectl GIO fd 3 wrote 32 bytes
"pppoe0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
568 1 pppoectl RET ioctl -1 errno 25 Inappropriate ioctl for device
> Corresponding kdump -n:
>
> 4883 1 pppoectl CALL ioctl(3,0xc0206970,0xffffffffffffc694)
> 4883 1 pppoectl GIO fd 3 wrote 32 bytes
> "pppoe0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
> 4883 1 pppoectl GIO fd 3 read 32 bytes
> "pppoe0\0\0\0\0\0\0\0\0\0\0\0\0\0\^C\0\0\v\M-W\0\0\0\^U\0\0\0\0"
> 4883 1 pppoectl RET ioctl 0, 0xc0206970
568 1 pppoectl CALL ioctl(3,0xc0206970,0xffffffffffffc4c0)
568 1 pppoectl GIO fd 3 wrote 32 bytes
"pppoe0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
568 1 pppoectl RET ioctl -1 errno 25
Holger