-static void ll_remove_matching_addrs(struct ll_entry **head, u_int base_offs, int shift)
-{
- struct ll_entry *next;
- while (*head) {
- u_int tc_offs = (u_char *)((*head)->addr) - ndrc->translation_cache;
- if (((tc_offs ^ base_offs) >> shift) == 0) {
- inv_debug("EXP: rm link from tc_offs %x)\n", tc_offs);
- next = (*head)->next;
- free(*head);
- *head = next;
- }
- else
- {
- head = &((*head)->next);
- }
- }
-}
-
-// Remove all entries from linked list
-static void ll_clear(struct ll_entry **head)
-{
- struct ll_entry *cur;
- struct ll_entry *next;
- if((cur=*head)) {
- *head=0;
- while(cur) {
- next=cur->next;
- free(cur);
- cur=next;
- }
- }
-}
-