vserver 2.0 rc7
[linux-2.6.git] / include / net / llc_conn.h
index bbc0af5..8ad3bc2 100644 (file)
@@ -13,6 +13,7 @@
  */
 #include <linux/timer.h>
 #include <net/llc_if.h>
+#include <net/sock.h>
 #include <linux/llc.h>
 
 #define LLC_EVENT                1
@@ -28,8 +29,9 @@ struct llc_timer {
        u16               expire;       /* timer expire time */
 };
 
-struct llc_opt {
-       struct sock         *sk;                /* sock that has this llc_opt */
+struct llc_sock {
+       /* struct sock must be the first member of llc_sock */
+       struct sock         sk;
        struct sockaddr_llc addr;               /* address sock is bound to */
        u8                  state;              /* state of connection */
        struct llc_sap      *sap;               /* pointer to parent SAP */
@@ -75,7 +77,10 @@ struct llc_opt {
                                              Used for resending FRMR */
 };
 
-#define llc_sk(__sk) ((struct llc_opt *)(__sk)->sk_protinfo)
+static inline struct llc_sock *llc_sk(const struct sock *sk)
+{
+       return (struct llc_sock *)sk;
+}
 
 static __inline__ void llc_set_backlog_type(struct sk_buff *skb, char type)
 {
@@ -87,7 +92,7 @@ static __inline__ char llc_backlog_type(struct sk_buff *skb)
        return skb->cb[sizeof(skb->cb) - 1];
 }
 
-extern struct sock *llc_sk_alloc(int family, int priority);
+extern struct sock *llc_sk_alloc(int family, int priority, struct proto *prot);
 extern void llc_sk_free(struct sock *sk);
 
 extern void llc_sk_reset(struct sock *sk);