Lines Matching refs:ibpkey
17 ocontext_t **ibpkey, const sepol_ibpkey_t *data) in ibpkey_from_record() argument
29 tmp_ibpkey->u.ibpkey.subnet_prefix = sepol_ibpkey_get_subnet_prefix_bytes(data); in ibpkey_from_record()
32 tmp_ibpkey->u.ibpkey.low_pkey = low; in ibpkey_from_record()
33 tmp_ibpkey->u.ibpkey.high_pkey = high; in ibpkey_from_record()
34 if (tmp_ibpkey->u.ibpkey.low_pkey > tmp_ibpkey->u.ibpkey.high_pkey) { in ibpkey_from_record()
36 tmp_ibpkey->u.ibpkey.low_pkey, tmp_ibpkey->u.ibpkey.high_pkey); in ibpkey_from_record()
49 *ibpkey = tmp_ibpkey; in ibpkey_from_record()
69 ocontext_t *ibpkey, sepol_ibpkey_t **record) in ibpkey_to_record() argument
71 context_struct_t *con = &ibpkey->context[0]; in ibpkey_to_record()
79 ibpkey->u.ibpkey.subnet_prefix); in ibpkey_to_record()
81 sepol_ibpkey_set_range(tmp_record, ibpkey->u.ibpkey.low_pkey, in ibpkey_to_record()
82 ibpkey->u.ibpkey.high_pkey); in ibpkey_to_record()
132 uint64_t subnet_prefix2 = c->u.ibpkey.subnet_prefix; in sepol_ibpkey_exists()
133 uint16_t low2 = c->u.ibpkey.low_pkey; in sepol_ibpkey_exists()
134 uint16_t high2 = c->u.ibpkey.high_pkey; in sepol_ibpkey_exists()
162 uint64_t subnet_prefix2 = c->u.ibpkey.subnet_prefix; in sepol_ibpkey_query()
163 int low2 = c->u.ibpkey.low_pkey; in sepol_ibpkey_query()
164 int high2 = c->u.ibpkey.high_pkey; in sepol_ibpkey_query()
190 ocontext_t *ibpkey = NULL; in sepol_ibpkey_modify() local
196 if (ibpkey_from_record(handle, policydb, &ibpkey, data) < 0) in sepol_ibpkey_modify()
200 ibpkey->next = policydb->ocontexts[OCON_IBPKEY]; in sepol_ibpkey_modify()
201 policydb->ocontexts[OCON_IBPKEY] = ibpkey; in sepol_ibpkey_modify()
208 if (ibpkey) { in sepol_ibpkey_modify()
209 context_destroy(&ibpkey->context[0]); in sepol_ibpkey_modify()
210 free(ibpkey); in sepol_ibpkey_modify()
217 int (*fn)(const sepol_ibpkey_t *ibpkey, in sepol_ibpkey_iterate() argument
222 sepol_ibpkey_t *ibpkey = NULL; in sepol_ibpkey_iterate() local
228 if (ibpkey_to_record(handle, policydb, c, &ibpkey) < 0) in sepol_ibpkey_iterate()
232 status = fn(ibpkey, arg); in sepol_ibpkey_iterate()
236 sepol_ibpkey_free(ibpkey); in sepol_ibpkey_iterate()
237 ibpkey = NULL; in sepol_ibpkey_iterate()
248 sepol_ibpkey_free(ibpkey); in sepol_ibpkey_iterate()