Lines Matching defs:ibpkey

13 /* Create a low level ibpkey structure from
18 ocontext_t **ibpkey, const sepol_ibpkey_t *data)
30 tmp_ibpkey->u.ibpkey.subnet_prefix = sepol_ibpkey_get_subnet_prefix_bytes(data);
33 tmp_ibpkey->u.ibpkey.low_pkey = low;
34 tmp_ibpkey->u.ibpkey.high_pkey = high;
35 if (tmp_ibpkey->u.ibpkey.low_pkey > tmp_ibpkey->u.ibpkey.high_pkey) {
36 ERR(handle, "low ibpkey %d exceeds high ibpkey %d",
37 tmp_ibpkey->u.ibpkey.low_pkey, tmp_ibpkey->u.ibpkey.high_pkey);
50 *ibpkey = tmp_ibpkey;
64 ERR(handle, "could not create ibpkey structure");
70 ocontext_t *ibpkey, sepol_ibpkey_t **record)
72 context_struct_t *con = &ibpkey->context[0];
80 ibpkey->u.ibpkey.subnet_prefix);
82 sepol_ibpkey_set_range(tmp_record, ibpkey->u.ibpkey.low_pkey,
83 ibpkey->u.ibpkey.high_pkey);
96 ERR(handle, "could not convert ibpkey to record");
119 /* Check if a ibpkey exists */
133 uint64_t subnet_prefix2 = c->u.ibpkey.subnet_prefix;
134 uint16_t low2 = c->u.ibpkey.low_pkey;
135 uint16_t high2 = c->u.ibpkey.high_pkey;
149 /* Query a ibpkey */
163 uint64_t subnet_prefix2 = c->u.ibpkey.subnet_prefix;
164 int low2 = c->u.ibpkey.low_pkey;
165 int high2 = c->u.ibpkey.high_pkey;
180 ERR(handle, "could not query ibpkey subnet prefix: %#" PRIx64 " range %u - %u exists",
185 /* Load a ibpkey into policy */
191 ocontext_t *ibpkey = NULL;
197 if (ibpkey_from_record(handle, policydb, &ibpkey, data) < 0)
201 ibpkey->next = policydb->ocontexts[OCON_IBPKEY];
202 policydb->ocontexts[OCON_IBPKEY] = ibpkey;
207 ERR(handle, "could not load ibpkey subnet prefix: %#" PRIx64 " range %u - %u exists",
209 if (ibpkey) {
210 context_destroy(&ibpkey->context[0]);
211 free(ibpkey);
218 int (*fn)(const sepol_ibpkey_t *ibpkey,
223 sepol_ibpkey_t *ibpkey = NULL;
229 if (ibpkey_to_record(handle, policydb, c, &ibpkey) < 0)
233 status = fn(ibpkey, arg);
237 sepol_ibpkey_free(ibpkey);
238 ibpkey = NULL;
249 sepol_ibpkey_free(ibpkey);