Syncppp.[ch] - new patch

Jan Kasprzak (kas@informatics.muni.cz)
Thu, 15 Oct 1998 10:58:04 +0200


Alan,

I'm sorry I did not notice that most of my previous patch is already
included in -ac kernels. I am sending the new patch relative to 2.1.125-ac2,
which does the following:

- I have modified the debugging ioctl (both the
enabling and disabling debugging info is now set via SPPPIOCDEBUG ioctl).
- Everything except the ioctl number definitions is now hidden inside
the #ifdef __KERNEL__ in syncppp.h

-Yenya

--- /usr/src/linux/drivers/net/syncppp.c Thu Oct 15 10:42:39 1998
+++ syncppp.c Thu Oct 15 01:58:53 1998
@@ -868,6 +868,12 @@
case SPPPIOCPPP:
sp->pp_flags&=~PP_CISCO;
dev->type = ARPHRD_PPP;
+ break;
+ case SPPPIOCDEBUG:
+ if (ifr->ifr_data)
+ sp->pp_flags|=PP_DEBUG;
+ else
+ sp->pp_flags&=~PP_DEBUG;
break;
default:
return -EINVAL;
--- /usr/src/linux/drivers/net/syncppp.h Sun Sep 6 19:47:01 1998
+++ syncppp.h Thu Oct 15 01:11:36 1998
@@ -20,6 +20,7 @@
#ifndef _SYNCPPP_H_
#define _SYNCPPP_H_ 1

+#ifdef __KERNEL__
struct slcp {
u16 state; /* state machine */
u32 magic; /* local magic number */
@@ -71,7 +72,6 @@
#define IPCP_STATE_ACK_SENT 2 /* IPCP state: conf-ack sent */
#define IPCP_STATE_OPENED 3 /* IPCP state: opened */

-#ifdef __KERNEL__
void sppp_attach (struct ppp_device *pd);
void sppp_detach (struct device *dev);
void sppp_input (struct device *dev, struct sk_buff *m);
@@ -85,5 +85,6 @@

#define SPPPIOCCISCO (SIOCDEVPRIVATE)
#define SPPPIOCPPP (SIOCDEVPRIVATE+1)
+#define SPPPIOCDEBUG (SIOCDEVPRIVATE+2)

#endif /* _SYNCPPP_H_ */

--
\ Jan "Yenya" Kasprzak <kas at fi.muni.cz>       http://www.fi.muni.cz/~kas/
\\ PGP: finger kas at aisa.fi.muni.cz   0D99A7FB206605D7 8B35FCDE05B18A5E //
\\\             Czech Linux Homepage:  http://www.linux.cz/              ///
/// I think I'd rather be forced to learn perl than 68020 MMU. -Alan Cox \\\

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/