*/
#include <linux/timer.h>
#include <net/llc_if.h>
+#include <net/sock.h>
#include <linux/llc.h>
#define LLC_EVENT 1
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 */
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)
{
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);