/* find_listener - find a cm node listening on this addr-port pair  */
static struct nes_cm_listener* find_listener(struct nes_cm_core *cm_core, nes_addr_t dst_addr, u16 dst_port, enum nes_cm_listener_state listener_state)
/* find_listener - find a cm node listening on this addr-port pair  */
static struct nes_cm_listener* find_listener(struct nes_cm_core *cm_core, nes_addr_t dst_addr, u16 dst_port, enum nes_cm_listener_state listener_state)
{
	unsigned long flags;
	struct nes_cm_listener *listen_node;
	spin_lock_irqsave(&cm_core->listen_list_lock, flags);
	list_for_each_entry(listen_node, &cm_core->listen_list.list, list) {
		if (((listen_node->loc_addr == dst_addr) ||
				listen_node->loc_addr == 0x00000000) &&
				(listen_node->loc_port == dst_port) &&
				(listener_state & listen_node->listener_state)) {
			atomic_inc(&listen_node->ref_count);
			spin_unlock_irqrestore(&cm_core->listen_list_lock, flags);
			return listen_node;
		}
	}
	spin_unlock_irqrestore(&cm_core->listen_list_lock, flags);
	return NULL;
}