summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@conectiva.com.br>2003-04-28 20:55:39 -0300
committerArnaldo Carvalho de Melo <acme@conectiva.com.br>2003-04-28 20:55:39 -0300
commit9614c53842e4b8833faaf35ea0e211343058909e (patch)
tree0b0e3f0f3ed3835df1fb5e83b7267a8076d9839f /include/linux
parent427375edc152ec4b2edac986eda18494ff228d42 (diff)
o af_pppox: create module infrastructure for protocol modules
With this the pppox module is protected by the networking core and the pppox "core" protects modules for specific pppox protocols (pppoe, for instance), while doing it removed some not needed struct sock member initializations in pppoe_create that are done by sock_init_data.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/if_pppox.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h
index 948826892b82..117357b14483 100644
--- a/include/linux/if_pppox.h
+++ b/include/linux/if_pppox.h
@@ -134,10 +134,15 @@ struct pppox_opt {
#define pppox_sk(__sk) ((struct pppox_opt *)(__sk)->protinfo)
+struct module;
+
struct pppox_proto {
- int (*create)(struct socket *sock);
- int (*ioctl)(struct socket *sock, unsigned int cmd,
- unsigned long arg);
+ int (*create)(struct socket *sock);
+ int (*ioctl)(struct socket *sock, unsigned int cmd,
+ unsigned long arg);
+ int (*release)(struct socket *sock);
+ void (*sk_free)(struct sock *sk);
+ struct module *owner;
};
extern int register_pppox_proto(int proto_num, struct pppox_proto *pp);
@@ -145,6 +150,9 @@ extern void unregister_pppox_proto(int proto_num);
extern void pppox_unbind_sock(struct sock *sk);/* delete ppp-channel binding */
extern int pppox_channel_ioctl(struct ppp_channel *pc, unsigned int cmd,
unsigned long arg);
+extern struct sock *pppox_sk_alloc(struct socket *sock, int protocol,
+ int priority, int zero_it,
+ kmem_cache_t *slab);
/* PPPoX socket states */
enum {