Lines Matching refs:entry
87 struct netlbl_dom_map *entry = kzalloc(sizeof(*entry), GFP_KERNEL); in netlbl_mgmt_add_common() local
89 if (!entry) in netlbl_mgmt_add_common()
91 entry->def.type = nla_get_u32(info->attrs[NLBL_MGMT_A_PROTOCOL]); in netlbl_mgmt_add_common()
94 entry->domain = kmalloc(tmp_size, GFP_KERNEL); in netlbl_mgmt_add_common()
95 if (entry->domain == NULL) { in netlbl_mgmt_add_common()
99 nla_strscpy(entry->domain, in netlbl_mgmt_add_common()
108 switch (entry->def.type) { in netlbl_mgmt_add_common()
111 entry->family = in netlbl_mgmt_add_common()
114 entry->family = AF_UNSPEC; in netlbl_mgmt_add_common()
124 entry->family = AF_INET; in netlbl_mgmt_add_common()
125 entry->def.cipso = cipsov4; in netlbl_mgmt_add_common()
136 entry->family = AF_INET6; in netlbl_mgmt_add_common()
137 entry->def.calipso = calipso; in netlbl_mgmt_add_common()
144 if ((entry->family == AF_INET && info->attrs[NLBL_MGMT_A_IPV6ADDR]) || in netlbl_mgmt_add_common()
145 (entry->family == AF_INET6 && info->attrs[NLBL_MGMT_A_IPV4ADDR])) in netlbl_mgmt_add_common()
183 map->def.type = entry->def.type; in netlbl_mgmt_add_common()
191 entry->family = AF_INET; in netlbl_mgmt_add_common()
192 entry->def.type = NETLBL_NLTYPE_ADDRSELECT; in netlbl_mgmt_add_common()
193 entry->def.addrsel = addrmap; in netlbl_mgmt_add_common()
234 map->def.type = entry->def.type; in netlbl_mgmt_add_common()
242 entry->family = AF_INET6; in netlbl_mgmt_add_common()
243 entry->def.type = NETLBL_NLTYPE_ADDRSELECT; in netlbl_mgmt_add_common()
244 entry->def.addrsel = addrmap; in netlbl_mgmt_add_common()
248 ret_val = netlbl_domhsh_add(entry, audit_info); in netlbl_mgmt_add_common()
264 kfree(entry->domain); in netlbl_mgmt_add_common()
266 kfree(entry); in netlbl_mgmt_add_common()
282 struct netlbl_dom_map *entry) in netlbl_mgmt_listentry() argument
292 if (entry->domain != NULL) { in netlbl_mgmt_listentry()
294 NLBL_MGMT_A_DOMAIN, entry->domain); in netlbl_mgmt_listentry()
299 ret_val = nla_put_u16(skb, NLBL_MGMT_A_FAMILY, entry->family); in netlbl_mgmt_listentry()
303 switch (entry->def.type) { in netlbl_mgmt_listentry()
309 netlbl_af4list_foreach_rcu(iter4, &entry->def.addrsel->list4) { in netlbl_mgmt_listentry()
345 netlbl_af6list_foreach_rcu(iter6, &entry->def.addrsel->list6) { in netlbl_mgmt_listentry()
384 entry->def.type); in netlbl_mgmt_listentry()
388 entry->def.type); in netlbl_mgmt_listentry()
392 entry->def.cipso->doi); in netlbl_mgmt_listentry()
396 entry->def.type); in netlbl_mgmt_listentry()
400 entry->def.calipso->doi); in netlbl_mgmt_listentry()
479 static int netlbl_mgmt_listall_cb(struct netlbl_dom_map *entry, void *arg) in netlbl_mgmt_listall_cb() argument
491 ret_val = netlbl_mgmt_listentry(cb_arg->skb, entry); in netlbl_mgmt_listall_cb()
601 struct netlbl_dom_map *entry; in netlbl_mgmt_listdef() local
618 entry = netlbl_domhsh_getentry(NULL, family); in netlbl_mgmt_listdef()
619 if (entry == NULL) { in netlbl_mgmt_listdef()
623 ret_val = netlbl_mgmt_listentry(ans_skb, entry); in netlbl_mgmt_listdef()