Lines Matching refs:ops
26 struct nf_sockopt_ops *ops;
32 list_for_each_entry(ops, &nf_sockopts, list) {
33 if (ops->pf == reg->pf
34 && (overlap(ops->set_optmin, ops->set_optmax,
36 || overlap(ops->get_optmin, ops->get_optmax,
39 ops->set_optmin, ops->set_optmax,
40 ops->get_optmin, ops->get_optmax,
66 struct nf_sockopt_ops *ops;
71 list_for_each_entry(ops, &nf_sockopts, list) {
72 if (ops->pf == pf) {
73 if (!try_module_get(ops->owner))
77 if (val >= ops->get_optmin &&
78 val < ops->get_optmax)
81 if (val >= ops->set_optmin &&
82 val < ops->set_optmax)
85 module_put(ops->owner);
89 ops = ERR_PTR(-ENOPROTOOPT);
92 return ops;
99 struct nf_sockopt_ops *ops;
102 ops = nf_sockopt_find(sk, pf, val, get);
103 if (IS_ERR(ops))
104 return PTR_ERR(ops);
107 ret = ops->get(sk, val, opt, len);
109 ret = ops->set(sk, val, opt, *len);
111 module_put(ops->owner);
133 struct nf_sockopt_ops *ops;
136 ops = nf_sockopt_find(sk, pf, val, get);
137 if (IS_ERR(ops))
138 return PTR_ERR(ops);
141 if (ops->compat_get)
142 ret = ops->compat_get(sk, val, opt, len);
144 ret = ops->get(sk, val, opt, len);
146 if (ops->compat_set)
147 ret = ops->compat_set(sk, val, opt, *len);
149 ret = ops->set(sk, val, opt, *len);
152 module_put(ops->owner);