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;
#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;