[NET]: {get|set}sockopt compatibility layer
This patch extends {get|set}sockopt compatibility layer in order to
move protocol specific parts to their place and avoid huge universal
net/compat.c file in the future.
Signed-off-by: Dmitry Mishin <dim@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
c750360938
commit
3fdadf7d27
@@ -80,10 +80,14 @@ struct nf_sockopt_ops
|
||||
int set_optmin;
|
||||
int set_optmax;
|
||||
int (*set)(struct sock *sk, int optval, void __user *user, unsigned int len);
|
||||
int (*compat_set)(struct sock *sk, int optval,
|
||||
void __user *user, unsigned int len);
|
||||
|
||||
int get_optmin;
|
||||
int get_optmax;
|
||||
int (*get)(struct sock *sk, int optval, void __user *user, int *len);
|
||||
int (*compat_get)(struct sock *sk, int optval,
|
||||
void __user *user, int *len);
|
||||
|
||||
/* Number of users inside set() or get(). */
|
||||
unsigned int use;
|
||||
@@ -246,6 +250,11 @@ int nf_setsockopt(struct sock *sk, int pf, int optval, char __user *opt,
|
||||
int nf_getsockopt(struct sock *sk, int pf, int optval, char __user *opt,
|
||||
int *len);
|
||||
|
||||
int compat_nf_setsockopt(struct sock *sk, int pf, int optval,
|
||||
char __user *opt, int len);
|
||||
int compat_nf_getsockopt(struct sock *sk, int pf, int optval,
|
||||
char __user *opt, int *len);
|
||||
|
||||
/* Packet queuing */
|
||||
struct nf_queue_handler {
|
||||
int (*outfn)(struct sk_buff *skb, struct nf_info *info,
|
||||
|
||||
Reference in New Issue
Block a user