move search_prefix_list to send.c where it's used

This commit also fixes the next pointer in the linked list and it
groups together the IF_IFADDRES case in send.c.