Hallo everybody,
I'm playing a little bit with ppp to modify it for my uses.
I use ppp version 2.3.7
I've added a new ioctl to ppp doing the following
1) in if_ppp.h I've added
#define PPPIOCSMODE _IO(�t�,62)
2) in sys-linux.c the ioctl is called from establish_ppp() like this
if (ioctl(ppp_fd,PPPIOCSMODE,0) < 0)
error("ioctl(PPPIOCSMODE): %m(%d)", errno);
3) in ppp.c in ppp_tty_ioctl() I've added the following after switch
(param2) {
case PPPIOCSMODE:
mode = 1;
printk.......
error=0;
break;
where mode is a global variable previously defined.
I've also tried using in if_ppp.h
#define PPPIOCSMODE _IOW(�t�,62,int)
and
#define PPPIOCSMODE _IOW(�t�,91,int)
but I always get the same answer from error(.... in user space, that is
ioctl(PPPIOCSMODE): Invalid argument(22)
Is anything missing?
Could anyone help me understanding what I am doing wrong?
Thanks a lot.
FEDE
----------------------------
Federico Pelizza
homepage:
http://cclinf30.polito.it/~s76927
Work:
NEC Europe ltd. - Adenauerplatz 6 -
69115 Heidelberg - Germany
tel. +49-(0)6221-9051133
fax +49-(0)6221-9051155
Home:
Rohrbacherstrasse 126 -
69126 Heidelberg - Germany
Mobile phone: +49-(0)177-4714687
--------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to [EMAIL PROTECTED]