-static struct proto_ops nr_proto_ops;
-void nr_init_timers(struct sock *sk);
-
-static struct sock *nr_alloc_sock(void)
-{
- nr_cb *nr;
- struct sock *sk = sk_alloc(PF_NETROM, GFP_ATOMIC, 1, NULL);
-
- if (!sk)
- goto out;
-
- nr = sk->sk_protinfo = kmalloc(sizeof(*nr), GFP_ATOMIC);
- if (!nr)
- goto frees;
-
- memset(nr, 0x00, sizeof(*nr));
- nr->sk = sk;
-out:
- return sk;
-frees:
- sk_free(sk);
- sk = NULL;
- goto out;
-}