This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / include / linux / if_pppox.h
index 3348fc7..4fab3d0 100644 (file)
@@ -119,10 +119,13 @@ struct pppoe_opt {
                                             relayed to (PPPoE relaying) */
 };
 
-struct pppox_opt {
+#include <net/sock.h>
+
+struct pppox_sock {
+       /* struct sock must be the first member of pppox_sock */
+       struct sock             sk;
        struct ppp_channel      chan;
-       struct sock             *sk;
-       struct pppox_opt        *next;    /* for hash table */
+       struct pppox_sock       *next;    /* for hash table */
        union {
                struct pppoe_opt pppoe;
        } proto;
@@ -132,7 +135,15 @@ struct pppox_opt {
 #define pppoe_pa       proto.pppoe.pa
 #define pppoe_relay    proto.pppoe.relay
 
-#define pppox_sk(__sk) ((struct pppox_opt *)(__sk)->sk_protinfo)
+static inline struct pppox_sock *pppox_sk(struct sock *sk)
+{
+       return (struct pppox_sock *)sk;
+}
+
+static inline struct sock *sk_pppox(struct pppox_sock *po)
+{
+       return (struct sock *)po;
+}
 
 struct module;
 
@@ -146,8 +157,7 @@ struct pppox_proto {
 extern int register_pppox_proto(int proto_num, struct pppox_proto *pp);
 extern void unregister_pppox_proto(int proto_num);
 extern void pppox_unbind_sock(struct sock *sk);/* delete ppp-channel binding */
-extern int pppox_channel_ioctl(struct ppp_channel *pc, unsigned int cmd,
-                              unsigned long arg);
+extern int pppox_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
 
 /* PPPoX socket states */
 enum {
@@ -159,8 +169,6 @@ enum {
     PPPOX_DEAD         = 16  /* dead, useless, please clean me up!*/
 };
 
-extern struct ppp_channel_ops pppoe_chan_ops;
-
 #endif /* __KERNEL__ */
 
 #endif /* !(__LINUX_IF_PPPOX_H) */