Host-parasite interactions, Ecological immunity