void sock_diag_register_inet_compat(int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh));
void sock_diag_unregister_inet_compat(int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh));
-static inline
-void sock_init_cookie(struct sock *sk)
-{
- u64 res;
-
- res = atomic64_inc_return(&sock_net(sk)->cookie_gen);
- atomic64_set(&sk->sk_cookie, res);
-}
-
u64 sock_gen_cookie(struct sock *sk);
int sock_diag_check_cookie(struct sock *sk, const __u32 *cookie);
void sock_diag_save_cookie(struct sock *sk, __u32 *cookie);