Lines Matching full:domain

2  * NetLabel Domain Hash Table
4 * This file manages the domain hash table that NetLabel uses to determine
5 * which network labeling protocol to use for a given domain. The NetLabel
53 /* Domain hash table */
63 * Domain Hash Table Helper Functions
67 * netlbl_domhsh_free_entry - Frees a domain hash table entry
101 kfree(ptr->domain); in netlbl_domhsh_free_entry()
106 * netlbl_domhsh_hash - Hashing function for the domain hash table
107 * @domain: the domain name to hash
110 * This is the hashing function for the domain hash table, it returns the
111 * correct bucket number for the domain. The caller is responsible for
131 * netlbl_domhsh_search - Search for a domain entry
132 * @domain: the domain
135 * Searches the domain hash table and returns a pointer to the hash table
141 static struct netlbl_dom_map *netlbl_domhsh_search(const char *domain) in netlbl_domhsh_search() argument
147 if (domain != NULL) { in netlbl_domhsh_search()
148 bkt = netlbl_domhsh_hash(domain); in netlbl_domhsh_search()
151 if (iter->valid && strcmp(iter->domain, domain) == 0) in netlbl_domhsh_search()
159 * netlbl_domhsh_search_def - Search for a domain entry
160 * @domain: the domain
164 * Searches the domain hash table and returns a pointer to the hash table
171 static struct netlbl_dom_map *netlbl_domhsh_search_def(const char *domain) in netlbl_domhsh_search_def() argument
175 entry = netlbl_domhsh_search(domain); in netlbl_domhsh_search_def()
212 entry->domain ? entry->domain : "(default)"); in netlbl_domhsh_audit_add()
249 * Domain Hash Table Functions
253 * netlbl_domhsh_init - Init for the domain hash
257 * Initializes the domain hash table, should be called only by
292 * netlbl_domhsh_add - Adds a entry to the domain hash table
297 * Adds a new entry to the domain hash table and handles any updates to the
320 if (entry->domain != NULL) in netlbl_domhsh_add()
321 entry_old = netlbl_domhsh_search(entry->domain); in netlbl_domhsh_add()
323 entry_old = netlbl_domhsh_search_def(entry->domain); in netlbl_domhsh_add()
327 if (entry->domain != NULL) { in netlbl_domhsh_add()
328 u32 bkt = netlbl_domhsh_hash(entry->domain); in netlbl_domhsh_add()
359 * the selectors do not exist in the existing domain map */ in netlbl_domhsh_add()
411 * netlbl_domhsh_add_default - Adds the default entry to the domain hash table
416 * Adds a new default entry to the domain hash table and handles any updates
428 * netlbl_domhsh_remove_entry - Removes a given entry from the domain table
433 * Removes an entry from the domain hash table and handles any updates to the
463 entry->domain ? entry->domain : "(default)", in netlbl_domhsh_remove_entry()
494 * @domain: the domain
500 * Removes an individual address selector from a domain mapping and potentially
505 int netlbl_domhsh_remove_af4(const char *domain, in netlbl_domhsh_remove_af4() argument
520 if (domain) in netlbl_domhsh_remove_af4()
521 entry_map = netlbl_domhsh_search(domain); in netlbl_domhsh_remove_af4()
523 entry_map = netlbl_domhsh_search_def(domain); in netlbl_domhsh_remove_af4()
540 /* the domain mapping is empty so remove it from the mapping table */ in netlbl_domhsh_remove_af4()
560 * netlbl_domhsh_remove - Removes an entry from the domain hash table
561 * @domain: the domain to remove
565 * Removes an entry from the domain hash table and handles any updates to the
570 int netlbl_domhsh_remove(const char *domain, struct netlbl_audit *audit_info) in netlbl_domhsh_remove() argument
576 if (domain) in netlbl_domhsh_remove()
577 entry = netlbl_domhsh_search(domain); in netlbl_domhsh_remove()
579 entry = netlbl_domhsh_search_def(domain); in netlbl_domhsh_remove()
591 * Removes/resets the default entry for the domain hash table and handles any
602 * netlbl_domhsh_getentry - Get an entry from the domain hash table
603 * @domain: the domain name to search for
606 * Look through the domain hash table searching for an entry to match @domain,
611 struct netlbl_dom_map *netlbl_domhsh_getentry(const char *domain) in netlbl_domhsh_getentry() argument
613 return netlbl_domhsh_search_def(domain); in netlbl_domhsh_getentry()
617 * netlbl_domhsh_getentry_af4 - Get an entry from the domain hash table
618 * @domain: the domain name to search for
622 * Look through the domain hash table searching for an entry to match @domain
627 struct netlbl_domaddr4_map *netlbl_domhsh_getentry_af4(const char *domain, in netlbl_domhsh_getentry_af4() argument
633 dom_iter = netlbl_domhsh_search_def(domain); in netlbl_domhsh_getentry_af4()
649 * netlbl_domhsh_getentry_af6 - Get an entry from the domain hash table
650 * @domain: the domain name to search for
654 * Look through the domain hash table searching for an entry to match @domain
659 struct netlbl_domaddr6_map *netlbl_domhsh_getentry_af6(const char *domain, in netlbl_domhsh_getentry_af6() argument
665 dom_iter = netlbl_domhsh_search_def(domain); in netlbl_domhsh_getentry_af6()
681 * netlbl_domhsh_walk - Iterate through the domain mapping hash table
688 * Interate over the domain mapping hash table, skipping the first @skip_bkt