Lines Matching refs:ops

39 	struct nl_cache_ops *ops;
41 for (ops = cache_ops; ops; ops = ops->co_next)
42 if (!strcmp(ops->co_name, name))
43 return ops;
62 struct nl_cache_ops *ops;
64 for (ops = cache_ops; ops; ops = ops->co_next) {
65 if (ops->co_protocol != protocol)
68 for (i = 0; ops->co_msgtypes[i].mt_id >= 0; i++)
69 if (ops->co_msgtypes[i].mt_id == msgtype)
70 return ops;
78 * @arg ops cache operations
86 struct nl_msgtype *nl_msgtype_lookup(struct nl_cache_ops *ops, int msgtype)
90 for (i = 0; ops->co_msgtypes[i].mt_id >= 0; i++)
91 if (ops->co_msgtypes[i].mt_id == msgtype)
92 return &ops->co_msgtypes[i];
99 struct nl_cache_ops *ops;
101 for (ops = cache_ops; ops; ops = ops->co_next)
102 if (ops->co_obj_ops == obj_ops)
103 return ops;
116 struct nl_cache_ops *ops;
118 for (ops = cache_ops; ops; ops = ops->co_next)
119 cb(ops, arg);
124 * @arg ops cache operations
131 int nl_cache_mngt_register(struct nl_cache_ops *ops)
133 if (!ops->co_name || !ops->co_obj_ops)
136 if (nl_cache_ops_lookup(ops->co_name))
139 ops->co_next = cache_ops;
140 cache_ops = ops;
142 NL_DBG(1, "Registered cache operations %s\n", ops->co_name);
149 * @arg ops cache operations
158 int nl_cache_mngt_unregister(struct nl_cache_ops *ops)
163 if (t == ops)
169 NL_DBG(1, "Unregistered cache operations %s\n", ops->co_name);
192 struct nl_cache_ops *ops;
194 ops = cache_ops_lookup_for_obj(cache->c_ops->co_obj_ops);
195 if (!ops)
198 ops->co_major_cache = cache;
211 struct nl_cache_ops *ops;
213 ops = cache_ops_lookup_for_obj(cache->c_ops->co_obj_ops);
214 if (!ops)
216 else if (ops->co_major_cache == cache)
217 ops->co_major_cache = NULL;
232 struct nl_cache_ops *ops;
234 ops = nl_cache_ops_lookup(name);
235 if (!ops || !ops->co_major_cache) {
244 return ops->co_major_cache;