Lines Matching refs:mac_policy_list
261 * mac_policy_list holds the list of policy modules. Modules with a
286 mac_policy_list_t mac_policy_list;
454 if (mac_policy_list.numloaded <= mac_policy_list.staticmax)
458 if (mac_policy_list.numloaded > mac_policy_list.staticmax) {
488 mac_policy_list.numloaded = 0;
489 mac_policy_list.max = MAC_POLICY_LIST_CHUNKSIZE;
490 mac_policy_list.maxindex = 0;
491 mac_policy_list.staticmax = 0;
492 mac_policy_list.freehint = 0;
493 mac_policy_list.chunks = 1;
495 mac_policy_list.entries = kalloc(sizeof(struct mac_policy_list_element) * MAC_POLICY_LIST_CHUNKSIZE);
496 bzero(mac_policy_list.entries, sizeof(struct mac_policy_list_element) * MAC_POLICY_LIST_CHUNKSIZE);
562 for (i = 0; i <= mac_policy_list.maxindex; i++) {
736 LIST_FOREACH(tmpc, &mac_policy_list, mpc_list) {
817 if (mac_policy_list.numloaded >= mac_policy_list.max) {
821 MAC_POLICY_LIST_CHUNKSIZE) * (mac_policy_list.chunks + 1));
822 bzero(&tmac_policy_list_element[mac_policy_list.max],
827 memcpy(tmac_policy_list_element, mac_policy_list.entries,
829 MAC_POLICY_LIST_CHUNKSIZE * mac_policy_list.chunks);
832 kfree(mac_policy_list.entries,
834 MAC_POLICY_LIST_CHUNKSIZE * mac_policy_list.chunks);
836 mac_policy_list.entries = tmac_policy_list_element;
839 mac_policy_list.max += MAC_POLICY_LIST_CHUNKSIZE;
840 mac_policy_list.chunks++;
844 for (i = 0; i <= mac_policy_list.maxindex; i++) {
845 if (mac_policy_list.entries[i].mpc == NULL)
848 if (strcmp(mac_policy_list.entries[i].mpc->mpc_name,
881 for (i = mac_policy_list.freehint; i < mac_policy_list.max; i++) {
882 if (mac_policy_list.entries[i].mpc == NULL) {
884 mac_policy_list.freehint = ++i;
898 *handlep == mac_policy_list.staticmax)) {
900 mac_policy_list.staticmax++;
903 mac_policy_list.entries[*handlep].mpc = mpc;
906 if (*handlep > mac_policy_list.maxindex)
907 mac_policy_list.maxindex = *handlep;
908 mac_policy_list.numloaded++;
977 if (handle < mac_policy_list.freehint &&
978 handle >= mac_policy_list.staticmax)
979 mac_policy_list.freehint = handle;
981 if (handle == mac_policy_list.maxindex)
982 mac_policy_list.maxindex--;
984 mac_policy_list.numloaded--;
1133 mpc = mac_policy_list.entries[mll->mll_handle].mpc;
1231 mpc = mac_policy_list.entries[mll->mll_handle].mpc;
2035 for (i = 0; i < mac_policy_list.staticmax; i++) {
2036 mpc = mac_policy_list.entries[i].mpc;
2048 for (; i <= mac_policy_list.maxindex; i++) {
2049 mpc = mac_policy_list.entries[i].mpc;